A polymorphic type system for PROLOG.
Artificial Intelligence
Foundations of logic programming; (2nd extended ed.)
Foundations of logic programming; (2nd extended ed.)
Declarative modeling of the operational behavior of logic languages
Theoretical Computer Science
The craft of Prolog
Type theory and functional programming
Type theory and functional programming
Types in logic programming
A grammatical view of logic programming
A grammatical view of logic programming
Type reconstruction in the presence of polymorphic recursion
ACM Transactions on Programming Languages and Systems (TOPLAS)
The Go¨del programming language
The Go¨del programming language
POPL '77 Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Miranda: The Craft of Functional Programming
Miranda: The Craft of Functional Programming
On the Unification Free Prolog Programs
MFCS '93 Proceedings of the 18th International Symposium on Mathematical Foundations of Computer Science
Typed Static Analysis: Application to Groundness Analysis of PROLOG and lambda-PROLOG
FLOPS '99 Proceedings of the 4th Fuji International Symposium on Functional and Logic Programming
Parametric Polymorphism for Typed Prolog and lambda-Prolog
PLILP '96 Proceedings of the 8th International Symposium on Programming Languages: Implementations, Logics, and Programs
PLILP '96 Proceedings of the 8th International Symposium on Programming Languages: Implementations, Logics, and Programs
Mode Analysis Domains for Typed Logic Programs
LOPSTR'99 Selected papers from the 9th International Workshop on Logic Programming Synthesis and Transformation
Proving Properties of Logic Programs by Abstract Diagnosis
Selected papers from the 5th LOMAPS Workshop on Analysis and Verification of Multiple-Agent Languages
Hi-index | 0.00 |
We consider prescriptive type systems for logic programs (as in Gödel or Mercury). In such systems, the typing is static, but it guarantees an operational property: if a program is "well-typed", then all derivations starting in a "well-typed" query are again "well-typed". This property has been called subject reduction. We show that this property can also be phrased as a property of the proof-theoretic semantics of logic programs, thus abstracting from the usual operational (top-down) semantics. This proof-theoretic view leads us to questioning a condition which is usually considered necessary for subject reduction, namely the head condition. It states that the head of each clause must have a type which is a variant (and not a proper instance) of the declared type. We provide a more general condition, thus reestablishing a certain symmetry between heads and body atoms. The condition ensures that in a derivation, the types of two unified terms are themselves unifiable. We discuss possible implications of this result. We also discuss the relationship between the head condition and polymorphic recursion, a concept known in functional programming.