Abstract Semantics for a Higher order Functional Language with Logic Variables
Jagadeesan, Radhakrishnan; Pingali, Keshav
The addition of logic variables to functional languages gives the programmer novel and powerful tools such as incremental definition of data structures through constraint intersection. A number of such "hybrid" languages, like FGL + LV , Id  and Qute , have been implemented and are in active use. Pure functional and logic programming languages can be given elegant abstract semantics as functions and relations over values. The definition of such an abstract semantics for a functional language with logic variables has remained an open problem. In an earlier paper, we gave such a semantics for the special case of a first-order functional languages with logic variables by reducing the problem to that of solving simultaneous fixpoint equations involving closure operators over a Scott domain . In fact, we obtained the rather strong result that the denotational semantics was fully abstract with respect to the operational semantics. However, the problem for higher-order languages remain open, in part because higher-order functions can interact with logic variables in complicated ways to give rise to behavior reminiscent of own variables in Algol-60. This problem is solved completely in this paper. We show that in the presence of logic variables, higher-order functions may be modeled extensionally as closure operators on graphs ordered a way reminiscent of the ordering on extensible records in studies of inheritance . We then extend the equation solving semantics of the first-order subset to the full language, and prove the usual soundness and adequacy theorems for this semantics. These results show that a higher-order functional language with logic variables can be viewed as a language of incremental definition of functions.
computer science; technical report
Previously Published As