| NADATHUR Gopalan and PFENNING Frank, The Type System of a Higher-Order Logic Programming Language, Types in Logic Programming, ed. Pfenning F., pp.245-282, 1992. |
....some of the bene ts discussed here are also obtained in that context. 5.5 Representing Types In the discussion up to this point we have not considered explicitly the fact that the lambda terms of interest to us have types associated with them. These types have a twofold role in the language [32]. At one level, they serve to limit the set of acceptable programs. At another level, they participate in the computational mechanism of the language; this role is apparent from the manner in which types determine the imitation and projection substitutions that are to be generated for a ....
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245-283. MIT Press, 1992.
....etc) This is because we will use deduction rules that are close to standard logical deduction rules. This notation makes them still closer. 2.1 Prescriptive typing Typing of logic programs has traditionally been studied from two points of view. The prescriptive point of view [MO84, Han89, LR91, NP92, LR96] considers well typing as a property of programs, and relates it to the semantics of program via a semantic soundness theorem which says roughly that Well typed programs cannot go wrong [Mil78] e.g. well typed logic programs cannot produce ill typed goals) In the prescriptive view, ....
....have proposed a semantic presentation of this property. They also have proposed a less restrictive variant of it. On the Prolog side, Brisset and Ridoux adopt these conventions in their Prolog compiler [BR93] though Nadathur and Pfenning propose a typing scheme that rejects the head condition [NP92] We believe the head condition is a convenient property because it makes it possible to do separate compilation without redoing type checking inference when linking separate program les. It is also a safe condition for not representing types at run time. Note that in general, types must be ....
G. Nadathur and F. Pfenning. The type system of a higher-order logic programming language. In F. Pfenning, editor, Types in Logic Programming, pages 245-283. MIT Press, 1992.
....of Prolog [27] Prolog is a higher order logic programming language which extends Prolog in essentially two ways. First, it replaces first order terms with the more expressive simply typed terms; Prolog implementations generally extend simple types to include ML style prenex polymorphism [5, 15], which we use in our implementation. Second, it permits implication and universal quantification (over objects of any type) in goal formulas. We introduce types and constants using kind and type declarations, respectively. For example, a new primitive type t and a new constant f of type t t t ....
....have argued that types are not necessary to a logical metalanguage; the errors that would be caught by a static type system will always be caught eventually because invalid theorems simply won t prove, and sometimes the types just get in the way. Types, however, play an essential role in Prolog [15]. For example, they are necessary for unification. There is a sublanguage called L [11] in which unification doesn t require types, but it is too weak (with restrictions on fi equivalence) to encode our logic without extra rules to perform substitution explicitly. Regardless of whether the ....
Gopalan Nadathur and Frank Pfenning. The Type System of a Higher-Order Logic Programming Language, pages 243--283. MIT Press, 1992.
.... o. Since each message predicate is consistently typed in its scope, no type mismatch error occurs in message passing. An operator of parallel composition O is assigned a type o o o. Such formulation of type systems is found in other higher order logic programming languages such as Prolog[15]. The basic type system for HACL obtained in this manner is exactly the same as Damas Milner type system[4] for ML. An important observation from this fact is that we can easily enrich the basic type system with extensions of ML type system such as subtyping, recursive typing, polymorphic records, ....
....with types of 21 names. Although functions and basic values can be represented in name passing concurrent calculi, it is pragmatically important that functions and basic values can be directly written and typed. Prolog Our approach to introducing type system is similar to that taken in Prolog[15]. The major difference is that in Prolog, types take an important role at runtime as well as at the type checking phase, while they do not in HACL. It is because the purpose of computation in HACL is not to find answer substutions, and HACL is designed so that higher order unification is not ....
Nadathur, G., and F. Pfenning, "The Type System of a Higher-Order Logic Programming Language," in Types in Logic Programming, pp. 245--283, The MIT Press, 1992.
....of Prolog [20] Prolog is a higher order logic programming language which extends Prolog in essentially two ways. First, it replaces first order terms with the more expressive simply typed terms; Prolog implementations generally extend simple types to include ML style prenex polymorphism [3, 9], which we use in our implementation. Second, it permits implication and universal quantification (over objects of any type) in goal formulas. We introduce types and constants using kind and type declarations, respectively. Capital letters in type declarations denote type variables and are used in ....
Gopalan Nadathur and Frank Pfenning. The Type System of a Higher-Order Logic Programming Language, pages 243--283. MIT Press, 1992.
....that familiar from first order logic: a type is subsumed by another type if the first is a substitution instance of the second. 2.4 Static semantics for types and terms We shall assume that types are properly formed (they respect kind declarations) and that formulas and terms are well typed. See [NP92] for a fuller discussion of this aspect of static semantics. 2.5 Signatures Signatures are lists of tokens assigned kinds and types, and are denoted by the syntactic variable Sigma . The same token can be given a type and a kind. Infix declarations are also stored as members of signatures. The ....
....and type inference. In particular, a file containing a module need not explicitly attribute a type to all constants and variables. In this case, the programming environment must be able to infer a reasonable type for the undeclared constants. Type inference can be done much as it is in ML: see [NP92] for more discussion on possible type inference procedures for Prolog. Signature checking and inference will also need to be done by the environment. Checking involves making certain that when modules are accumulated and imported, constants are not given incomparable types and declarations in two ....
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245--283. MIT Press, 1992. This article was processed using the L a T E X macro package with LLNCS style
.... they are not independent instances) The head condition is implicit in the Mycroft O Keefe discipline [17] It is explicitly enforced in the Godel system [10] and in our implementation of Prolog [2] It is not mentioned in the first writings on Prolog [14, 18] but it is rejected in further works [19]. An objective of this article is to give support to enforcing the head condition. The head condition makes the inference of the types of predicate constants non decidable, but this will not be a problem here since we assume that all constants have their type declared. Godel and Prolog seem to be ....
....and concerns higher order programming only because goals can be passed as parameters. We think that the head condition must be enforced, and our type scheme applies to the more ambitious kind of higher order programming of Prolog. In the work of Nadathur and Pfenning on the typing of Prolog [19], the head condition is rejected. We have shown this is not compatible with useful program transformations. Much remains to be done. First, a less naive elimination of quantifiers is required. It will amount to replacing bound variables by free variables, and to replace equality testing by ....
G. Nadathur and F. Pfenning. The type system of a higher-order logic programming language. In F. Pfenning, editor, Types in Logic Programming, pages 245--283, MIT Press, 1992.
....different ways of manipulating these data. We therefore describe this aspect of the lpWAM in some detail in this and the following two subsections. The typing scheme of Prolog has been discussed briefly in section 2.2. It turns out that in Prolog, unlike Prolog, types are also needed at runtime [20] and must therefore be represented in the lpWAM. It is sufficient to store type information only for freevariable terms and constant terms, since all the type information that is needed at runtime can be efficiently computed from just these types. At the implementation level, a naive approach ....
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245--283. MIT Press, 1992.
.... o. Since each message predicate is consistently typed in its scope, no type mismatch error occurs upon message passing. An operator of parallel composition is assigned a type o o o. Such formulation of type systems is found in other higher order logic programming languages such as Prolog[12]. The basic type system for HACL obtained in this manner is exactly the same as Damas Milner type system[3] for ML. An important observation from this fact is that we can easily enrich the basic type system with extensions of ML type system such as subtyping, recursive typing, polymorphic records, ....
....deal with types of names. Although functions and basic values can be represented in name passing concurrent calculi, it is pragmatically important that functions and basic values can be directly written and typed. Prolog Our approach to introducing type system is similar to that taken in Prolog[12]. The major difference is that in Prolog, types take an important role at runtime as well as at the type checking phase, while they do not in HACL. It is because the purpose of computation in HACL is not to find answer substutions, and HACL is designed so that higher order unification is not ....
Nadathur, G., and F. Pfenning, "The Type System of a Higher-Order Logic Programming Language," in Types in Logic Programming, pp. 245--283, The MIT Press, 1992.
....actually embodies two extensions to a Prolog like language in addition to the higher order features considered here. In one direction, it makes richer use of logical connectives and quanti ers to introduce notions of scoping [29] In another direction, it includes a polymorphic typing regimen [38]. Both aspects raise new questions for implementation that we have addressed elsewhere [22, 33] The machinery that we describe here blends well with these other mechanisms and all our ideas have, in fact, been amalgamated in a new implementation of Prolog called Teyjus [37] The rest of this ....
....noted, the original value of the modi ed cell needs also to be remembered in order to resurrect the previous state. Up to this point we have not considered explicitly the fact that the terms of interest to us have types associated with them. These types have a twofold role in the language [38]. At one level, they serve to limit the set of acceptable programs. At another level, they participate in the computational mechanism of the language; this role is apparent from the manner in which types determine the imitation and projection substitutions that are to be generated for a ....
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245-283. MIT Press, 1992.
....in the new implementation problems that arise in this context. The main motivation for the work presented here is that of providing a good implementation for the higher order logic programming language called Prolog [19] that, amongst other things, incorporates such a notion of typing [20]. Numerous applications have been discovered for this language over the last few years (e.g. see [4, 5, 7, 14, 22] stressing the importance of this concern. In providing a robust and ecient implementation for Prolog, three aspects that are novel to this language have to be dealt with: its ....
....and variable, a function type with every function symbol and a predicate type with each predicate symbol. The associations for constants and for function and predicate symbols are obtained, rst of all, through a de ned type for the symbol that may be provided by declarations such as in Prolog [20]. Particular occurrences of these symbols may then assume instances of the de ned types as their types. The types of variables may be speci ed by an annotation such as X : type at one of the occurrences of the variable in the expression; all the occurrences of the variable in the given ....
[Article contains additional citation context not shown here]
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245-283. MIT Press, 1992.
....type information has been presented in these clauses: the types of the variables and of append have been omitted. These types could be provided by using the devices explained earlier. However, type declarations can be avoided in several situations since the desired types can be reconstructed [16]. For example, the type of append in the above program can be determined to be (list A) list A) list A) o. The type reconstruction algorithm that is used is sensitive to the set of clauses contained in the program. For example, if the program above included the clause (append (1 : nil) ....
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245--283. MIT Press, 1992.
....some of the benefits discussed here are also obtained in that context. 5.5 Representing Types In the discussion up to this point we have not considered explicitly the fact that the lambda terms of interest to us have types associated with them. These types have a twofold role in the language [32]. At one level, they serve to limit the set of acceptable programs. At another level, they participate in the computational mechanism of the language; this role is apparent from the manner in which types determine the imitation and projection substitutions that are to be generated for a ....
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245--283. MIT Press, 1992.
....particular, in the new implementation problems that arise in this context. The main motivation for the work presented here is that of providing a good implementation for the higher order logic programming language called Prolog [19] that, amongst other things, incorporates such a notion of typing [20]. Numerous applications have been discovered for this language over the last few years (e.g. see [4, 5, 7, 14, 22] stressing the importance of this concern. In providing a robust and efficient implementation for Prolog, three aspects that are novel to this language have to be dealt with: its ....
....and variable, a function type with every function symbol and a predicate type with each predicate symbol. The associations for constants and for function and predicate symbols are obtained, first of all, through a defined type for the symbol that may be provided by declarations such as in Prolog [20]. Particular occurrences of these symbols may then assume instances of the defined types as their types. The types of variables may be specified by an annotation such as X : type at one of the occurrences of the variable in the expression; all the occurrences of the variable in the given ....
[Article contains additional citation context not shown here]
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245--283. MIT Press, 1992.
....A, B and D. Consistent with this viewpoint, the invocation of a clause such as this one must also be accompanied by a determination of the type instance to be used. In practice this choice can be delayed through unification at the level of types. This possibility is discussed in greater detail in [NP92] and we assume below that it is used in the process of solving queries. A final comment concerns the inference of types for variables. Obvious requirements of this inference is that the overall term be judged to be well formed and that every occurrence of a variable that is (implicitly or ....
Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor, Types in Logic Programming, pages 245--283. MIT Press, 1992.
No context found.
NADATHUR Gopalan and PFENNING Frank, The Type System of a Higher-Order Logic Programming Language, Types in Logic Programming, ed. Pfenning F., pp.245-282, 1992.
No context found.
NADATHUR G. and PFENNING F., The Type System of a Higher-Order Logic Programming Language, in [PFE 92], pp.245-282, 1992.
No context found.
NADATHUR G. and PFENNING F., The Type System of a Higher-Order Logic Programming Language, in [PFE 92], pp.245-282, 1992.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC