A structured alternative to Prolog with simple compositional semantics

Computer Science – Programming Languages

Scientific paper

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

27th Int'l. Conference on Logic Programming (ICLP'11) Special Issue, 2011

Scientific paper

10.1017/S1471068411000202

Prolog's very useful expressive power is not captured by traditional logic programming semantics, due mainly to the cut and goal and clause order. Several alternative semantics have been put forward, exposing operational details of the computation state. We propose instead to redesign Prolog around structured alternatives to the cut and clauses, keeping the expressive power and computation model but with a compositional denotational semantics over much simpler states-just variable bindings. This considerably eases reasoning about programs, by programmers and tools such as a partial evaluator, with safe unfolding of calls through predicate definitions. An if-then-else across clauses replaces most uses of the cut, but the cut's full power is achieved by an until construct. Disjunction, conjunction and until, along with unification, are the primitive goal types with a compositional semantics yielding sequences of variable-binding solutions. This extends to programs via the usual technique of a least fixpoint construction. A simple interpreter for Prolog in the alternative language, and a definition of until in Prolog, establish the identical expressive power of the two languages. Many useful control constructs are derivable from the primitives, and the semantic framework illuminates the discussion of alternative ones. The formalisation rests on a term language with variable abstraction as in the {\lambda}-calculus. A clause is an abstraction on the call arguments, a continuation, and the local variables. It can be inclusive or exclusive, expressing a local case bound to a continuation by either a disjunction or an if-then-else. Clauses are open definitions, composed (and closed) with simple functional application ({\beta}-reduction). This paves the way for a simple account of flexible module composition mechanisms. Cube, a concrete language with the exposed principles, has been implemented.

No associations

LandOfFree

Say what you really think

Search LandOfFree.com for scientists and scientific papers. Rate them and share your experience with other people.

Rating

A structured alternative to Prolog with simple compositional semantics does not yet have a rating. At this time, there are no reviews or comments for this scientific paper.

If you have personal experience with A structured alternative to Prolog with simple compositional semantics, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and A structured alternative to Prolog with simple compositional semantics will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFWR-SCP-O-112874

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.