This chapter covers the semantics of Mercury clauses, and the goals and expressions they contain. The first section gives an informal introduction to declarative programming; if you are already familiar with this topic, and logic programming in particular, you may wish to skip it and start with Goals.
Full details of the language semantics can be found in Formal semantics.
• Introduction to declarative programming | ||
• Goals | ||
• State variables | ||
• DCG-goals | ||
• Expressions | ||
• Variable scoping | ||
• Implicit quantification | ||
• Elimination of double negation |