Abstract

Logic programming is advocated as a style for specifying the denotational semantics of programming languages. To investigate the applicability of logic programming as a metalanguage for denotational semantics, the authors have developed Prolog definitions of a simple imperative subject language using both an interpretive approach which uses the denotational semantics to interpret programs on some input and a compiler-oriented approach which translates programs into lambda calculus, essentially embedding a functional style into Prolog predicates. To make the latter executable, a lambda calculus machine is also defined in Prolog. It is found that there is a very natural representation of the denotational semantics domains and evaluation functions in Prolog. The compiler-oriented definition in particular has the significant property that the compilation of source programs can be executed in parallel. The result is that logic programming is a very suitable approach to denotational semantics and formal specification of programming languages in general. >

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call