Amphithéâtre Guillaume Budé, Site Marcelin Berthelot
Open to all
-

Abstract

In contrast to classical imperative programming, declarative programming is concerned with describing the expected results of a program, without making explicit the sequence of elementary computational steps that produce these results. Do we still need control structures in declarative programs ? The third lecture attempted to answer this question by taking the example of three declarative programming paradigms : synchronous reactive programming (Lustre), purely functional programming (Haskell, pure Scheme), and logic programming (Prolog). The semantics of programs written in these languages are based on elegant principles, but they are not sufficient to guarantee the termination and cost (in time, space) of program executions ; hence the importance, even in a declarative language, of giving programmers the means to control how their programs are evaluated. We have mentioned three such means : adding ad hoc operations such as cut in Prolog, specifying the evaluation strategies used (such as call by value in Scheme and call by necessity in Haskell), or encoding the desired strategy in the program itself (for example, by adding suspensions to a Scheme program).