Abstract

We report on a technique for interfacing an untyped logic language to a statically polymorphically typed functional language (FL). Our key insight is that polymorphic types can be interpreted as “need to know” specifications on function arguments. This leads to a criterion for liberally yet safely invoking the FL to reduce application terms as required during unification in the logic language. This method, called P-unification, enriches the capabilities of each language while retaining the integrity of their individual semantics and implementation technologies. The results presented suggest that a Horn clause logic programming (HCLP) systems can utilize unmodified implementations of FL's to (i) manipulate untyped or dynamically typed data, even though the FL is statically typed; (ii) act lazily, even though the FL is strict, and (iii) build structures containing HCLP terms alien to the FL, such as unbound variables.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call