Parametric order-sorted types in logic programming [chapter]

Michael Hanus
1991 Lecture Notes in Computer Science  
This paper proposes a type system for logic programming where types are structured in two .ways. Firstly, functions and predicates may be declared with types containing type parameters which are universally quantified over all types. In this ca~e each instance of the type declaration can be used in the logic program. Secondly, types are related by subset inclusions. In this case a function or predicate can be applied to all subtypes of its declared type. While previous proposals for such type
more » ... stems have strong restrictions on the subtype relation, we assume that the subtype order is specified by Horn clauses for the subtype relation _<. This allows the declaration of a lot of interesting type structures, e.g., type constructors which are monotonic as well as anti-monotonic in their arguments. For instance, parametric order-sorted type structures for logic programs with higher-order predicates can be specified in our framework. This paper presents the declarative and operational semantics of the typed logic language. The operational semantics requires a unification procedure on well-typed terms. This unification procedure is described by a set of transformation rules which generate a set of type constraints from a given unification problem. The solvability of these type constraints is decidable for particular type structures.
doi:10.1007/3540539816_67 fatcat:aw64wrabq5bfpmsqs4rijb6zri