Subset-Logic Programming: Application and Implementation.
Bharat Jayaraman, Anil Ramachandran Nair · 1988
o Subset-logic programming is a paradigm of programming with subset and equality assertions. We propose this paradigm as a logical basis for programming with sets. We p r~ent a language called SEL to illustrate the approach. The teriii3 of SEL arc the usual first-order ten:Dll of Prolog, augmented with one associative-commutative (a-c) constructor, U, for defining sets. Computa.tionally, we treat assertions as one-way rewrite rules, where the matching used is a. restricted form of associative-commutative matching. Unlike Prolog's unification, a-c matching could produce multiple matching substitutions, which can effectively serve to iterate over the elements of sets, thus permitting many useful set operations to be stated non-recursively. We also describe the implementation of SEL. We show how W AM-like instructions ClUl be used to compile SEL programs. Because matching