Results 1 -
1 of
1
A Semi-Functional Implementation of a Higher-Order Logic Programming Language
- Topics in Advanced Language Implementation
, 1991
"... ions *) and varbind = Varbind of string * term (* Variable binders , Type *) In the implementation of the term language and the type checker, we have two constants type and pi. And, yes, type is a type, though this could be avoided by introducing universes (see [16]) without any changes to the code ..."
Abstract
-
Cited by 32 (0 self)
- Add to MetaCart
ions *) and varbind = Varbind of string * term (* Variable binders , Type *) In the implementation of the term language and the type checker, we have two constants type and pi. And, yes, type is a type, though this could be avoided by introducing universes (see [16]) without any changes to the code of the unifier. As is customary, we use A ! B as an abbreviation for \Pix : A: B if x does not occur free in B. Also, however, \Pix : A: B is an abbreviation for the application pi A (x : A: B). In our formulation, then, the constant pi has type \PiA : type: ((A ! type) ! type). As an example consider a predicate constant eq of type \PiA : type: A ! A ! o (where o is the type of formulas as indicated in Section 9). The single clause eqAM M: correctly models equality, that is, a goal of the form eq AM N will succeed if M and N are unifiable. The fact that unification now has to branch can be seen by considering the goal eq int (F 1 1) 1 which has three solutions for the functional logic var...

