Intermediate Aspects

This chapter builds on the basic concepts and syntax of LogiQL considered in the previous chapter and introduces some more advanced features of the language. Although the British monarchy remains the primary domain from which examples and exercises are constructed, we begin to introduce other,...

Full description

Bibliographic Details
Main Authors: Halpin, Terry, Rugaber, Spencer
Format: Book Section
Language:English
Published: Taylor & Francis Group 2015
Subjects:
Online Access:http://eprints.intimal.edu.my/329/
http://eprints.intimal.edu.my/329/1/8_ft.pdf
Description
Summary:This chapter builds on the basic concepts and syntax of LogiQL considered in the previous chapter and introduces some more advanced features of the language. Although the British monarchy remains the primary domain from which examples and exercises are constructed, we begin to introduce other, more business-oriented domains to demonstrate the breadth of applicability of LogiQL. The first unit considers inverse-functional predicates, which are binary predicates where the first argument is a function of the second argument. The second unit discusses predicates that have more than two arguments and also surveys the various kinds of numeric datatypes available in LogiQL. The next unit covers some constraints that apply to two or more predicate arguments. We then learn how to use subtyping, where a type is contained in a larger type (e.g., Woman is a subtype of Person), as well as some simple subset constraints. The following unit then examines recursion, one of LogiQL’s most powerful features, and discusses constraints that often apply to predicates used in recursive rules. The final unit introduces two of LogiQL’s aggregation functions (count and total), useful for computing properties of a set of facts in the database. The consolidation exercise gives you an opportunity to test your mastery of the new concepts and syntax considered in the chapter.