| A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. Artificial Intelligence, 23(3):295--307, 1984. |
....head. implicit type casts of procedure parameters are converted into explicit uni cation constraints. For example the program in the left of Figure 2 must be rewritten as on the right. The analyses presented in this paper assume that the program is well typed in the sense of Mycroft and O Keefe [17]. That is, the results of analyses approximate semantics computed through a sequence of type correct resolution steps. A typecorrect resolution step, whether it is top down or bottom up, is restricted to considering only a type correct subset of the result. Types of Terms Satisfying Program ....
A. Mycroft and R.A. O'Keefe. A polymorphic type system for Prolog. Arti cial Intelligence, 23:295-307, 1984.
....the semantics of a program. Since the semantics of the program is not changed, typed programs can be executed in exactly the same way as untyped programs, where, however, the structure imposed by the type discipline can be exploited for optimizations. Mycroft and O Keefe 1.2. Related Work 5 [MO84] show how Milner s [Mil78] polymorphic type discipline can be adapted to Pure Prolog. Their system relies on type declarations given by the programmer but does not require type declarations for the variables occurring in a clause. Dietrich and Hagl s [DH88] extends Mycroft and O Keefe s work to ....
....(discussed already in [Str67] is that a parametrically polymorphic operator must behave in exactly the same way for all parameter sorts while an ad hoc polymorphic operator is free to do different things for different sort parameters. Now, if there are no subsorts (as in [Han88, Han89] and [MO84] and the clauses of the program are well typed under a type discipline enforcing parametric polymorphism (as in this thesis and [MO84] then the standard unsorted operational semantics turns out to be sound and complete. Hence, the sort related operational methods of Hanus are orthogonal to the ....
[Article contains additional citation context not shown here]
A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. Artificial Intelligence, 23:295--307, 1984.
....constructors) constructors list(A) A list(A) The type of a function is declared as follows: function f (type 1 , type 2 , type. For example: function mult(nat,nat) nat. function app(list(A) list(A) list(A) The type checking scheme follows Mycroft and O Keefe [35] with a straightforward extension to include function rewrite rules. A typeless version of the language could be envisaged. Type information is required by the built in equality function. 5.3 The equality function eq The equality function eq returns true or false. It behaves something like a ....
Mycroft, A., O'Keefe, R. A., A polymorphic type system for Prolog, Art. Intel. 23 (1984), 295--307
....) g 2 In what follows, it is often convenient to consider the normal form of programs. In normal form, each atom is of the form p(X 1 ; Xn ) X = Y or X = f(X 1 ; Xn ) with X 1 ; Xn ) di erent variables) To develop our approach, we adopt the concept of well typing of [23]. It relies on the notion of variable typing, which is a function from variables to types. First, it is assumed that each predicate p=n has a unique declaration p( 1 ; n ) stating the (possibly polymorphic) types of its arguments. Next, it is assumed that the program has a well typing. ....
A. Mycroft and R.A. O'Keefe. A Polymorphic Type System for Prolog. Arti cial Intelligence 23(3): 295-307 1984.
.... we present here are in fact used directly in an abstract machine that we have designed for the higher order language [11] We also note that the rst order language that is considered is itself of some interest, being closely related to typed versions of Prolog that have been proposed recently [8, 13, 15]. Finally, our work is also pertinent to languages with a di erent typing regimen such as the one based on order sorting [24] and we believe that this relevance is more clearly exposed through the focus on a rst order language. Typing is generally viewed as a device for providing information ....
....which type analysis can be avoided at run time. A notable exception is the work in [2] for an order sorted language. The general approach has been to identify situations in which success or failure in typed uni cation is not dependent on type annotations. One such situation, rst presented in [15] and labeled in [8] as type generality, e ectively amounts to banishing ad hoc polymorphism. A generalization of this criterion is also described in [9] While identifying such criteria is useful, this does not provide a scheme for dealing with situations in which the criteria described are not ....
[Article contains additional citation context not shown here]
A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. Arti cial Intelligence, 23:295-307, 1984.
....v1 , vn . Clearly, we can view the type definition for f as simply a sequence of production rules over signature # tree and nonterminal set #(#type , Vtype ) In order to avoid type expressions that depend on an infinite number of types, we restrict the type definitions to be regular [13]. Essentially regularity ensures that for any type t, grammar (t) defined below, is finite. Example 1. Type definitions for lists, and a simple type abc which includes constants a, b and c are : type list(T) T list(T) type abc a ; b ; c. We can associate with each ....
A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. AI, 23:295--307, 1984.
....in a sorted version. Looking at logic as a programming language leads to the discussion of types , as sorts are usually called within this area. Here, besides efficiency, one aims at the discovery of programming errors during compile time. The hypothesis well typed programms do not go wrong ([33]) leads to a concept of types, where as much as possible is expressed by syntactical constraints. All functions and predicates are defined together with necessary type informations, so that it can be checked more or less syntactically whether a program is well typed , that is whether each ....
A. Mycroft and R. O'Keefe. A polymorphic type system for Prolog. In Proceedings of the Workshop on Logic Programming, pages 107--121, 1983.
....as the computational engine. However, the demand for more expressive power and efficiency has led language designers to consider logical extensions to the original Horn Clause core [26, 48, 51, 50, 46, 28] and to add control features and constructs drawn from other language paradigms (e.g. types [55, 32, 49], partial evaluation [31] and constraints [10, 29, 30] to name just a few) The effect has been to expand the boundaries of the subject and of the very notion of declarative content of a program. A more general syntax and semantics is needed to model these new features and provide criteria for ....
....programming languages [28, 45, 9] and which give rise to useful operations that still agree with some notion of conventional semantics in the limiting case. 7. 2 Directions for future work This foundation opens the way to a categorical approach to modeling other extensions of logic programming [28, 51, 50, 55, 49], and connecting well known techniques for modeling functional evaluation, non local control, side effects (e.g. monads, see [62, 42, 47, 68, 69] to the declarative and operational semantics of logic programs. Our operational semantics ignores control issues (such as the selection rule) since ....
A. Mycroft and R. A. O'Keefe. A Polymorphic Type System for Prolog. Artificial Intelligence, 23(3):295-307, 1984.
....many programming errors to be detected by the compiler. Moreover, it ensures that once a program has passed the compiler, the types of arguments of predicates can be ignored at runtime, since it is guaranteed that they will be of correct type. This has been turned into the famous slogan [Mil78, MO84] Well typed programs cannot go wrong. Adopting the terminology from the theory of the # calculus [Tho91] this property of a typed program is called subject reduction. For the simply typed # calculus, subject reduction states that the type of a # term is invariant under reduction. Translated ....
....Note how in the above proof, the transparency condition is essential to ensure that subarguments in corresponding positions have identical types, so that each variable can only become instantiated to a term of its own type. Hill gives examples explaining this [Hil93] The condition was ignored in [MO84] 7 From the point of view of functional programming, the transparency condition may seem very restrictive: for example, it would be ludicrous to forbid a function that computes the length of a list, which would naturally have the type list(U) # int and hence violate the transparency ....
A. Mycroft and R. O'Keefe. A polymorphic type system for Prolog. Artificial Intelligence, 23:295--307, 1984.
....Tomasz Truderung Institute of Computer Science Wroc aw University Poland tt ii.uni.wroc.pl ABSTRACT In this paper we present a new type system for logic programs. Our system combines ideas of the classical polymorphic, but not very precise, system due to Mycroft and O Keefe [16], and the complementary system of directional types that has been proposed by Aiken and Lakshman [1] Our main technical inventions are a new method of deriving more speci c types from a given type, which we call pruning, and the notion of the main type from which, using a combination of ....
....system are not polymorphic. J. Boye and J. Mauszyski in [3, 4] designed a system where directional types are merged with polymorphic types of terms. In our type system input and output types are not regular sets. To describe them we follow the notion of a polymorphic type taken from [16] and [14] Types of terms are constructed from variables and type constructors, we also allow union and intersection of types. Furthermore, we have a subtyping relation. Subtyping and well typedness are described by a system of derivation rules. A predicate can have many directional types. Each ....
A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. Articial Intelligence, pages 295307, 1989.
....step really is a term, that is, really is type correct. Propositions 2.27 and 2.28 below show that a computation step respects the type requirements. This kind of result is known by the phrase run time type checking is unnecessary . A first order version of this result was first obtained in [MO84] and later in [HT92] Proposition 2.27. Let t be a term and h = b a statement. Suppose there is a subterm r of t at occurrence p and a substitution # such that r is # equivalent to h#. Then t[r b#] p is a term that is type weaker than t. Furthermore, t = t[r b#] p is a term. Proof. The result ....
A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. Artificial Intelligence, 23:295--307, 1984.
....of type o, i.e p(t 1 ; t q ) with p a predicate symbol. In the concrete syntax, logic variables and type variables identifiers start with an uppercase letter, function and predicate symbols start with a lowercase letter. The type system We briefly recall here Mycroft O Keefe type system [15] (see also Typed Prolog [11] and give motivations for such a system. variable : Gamma; X : fl X : fl atom : Gamma a : fl fl (a) compound term : Gamma t 1 : fl 1 : Gamma t n : fl n Gamma f(t 1 ; t n ) fl (fl 1 ; fl n ) fl (f) clause : Gamma ....
....should appear in the result type. For example in ML, type variables of a type declaration must occur in the left side: the declarations for constants cons and nil can be written in ML as datatype a list = nil cons of a a list 4 This ensures that well typed programs cannot go wrong [15]. This restriction makes it always possible to derive the type of subterms from the type of a term. Hanus [6] showed that this type preserving restriction, coupled with definitional genericity, is not compatible with higher order programming. Consider the map predicate: map : pred(T1, T2) ....
[Article contains additional citation context not shown here]
A. Mycroft and R.A. O'Keefe. A polymorphic type system for Prolog. Artificial Intelligence, 23:295--307, 1984.
....for meta programming. On the other hand, most problems in language processing benefit from typing. Types are useful for program comprehension, to prevent programs from going wrong , to optimise programs and others. For these and other reasons, type systems have been proposed for logic programming [41,25], and they have been integrated with some logic languages such as Godel and Mercury. Also, when specification formalisms are mapped to Prolog, we often have types available anyway, e.g. in the case of Typol [15] As for Laptob, we adopt a standard many sorted type system based on certain basic ....
A. Mycroft and R.A. O'Keefe. A polymorphic type system for PROLOG. ARTIF. INTELL. (NETHERLANDS) ISSN: 0004-3702, 23(3):295--307, August 1984.
No context found.
A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. Artificial Intelligence, 23(3):295--307, 1984.
No context found.
A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. Artificial Intelligence, 23:295--307, 1984.
No context found.
MYCROFT A. and O'KEEFE R.A., A polymorphic type system for Prolog, Logic Programming Workshop, pp:107:121, 1983.
No context found.
A. Mycroft and R. A. O'Keefe. A Polymorphic Type System for Prolog. Arti cial Intelligence, 23:295-307, 1984.
No context found.
A. Mycroft and R. A. O'Keefe. A Polymorphic Type System for Prolog. Arti cial Intelligence, 23:295-307, 1984.
No context found.
A. Mycroft and R.A. O'Keefe, "A Polymorphic Type System for Prolog", Artificial Intelligence, 23, 295-307, 1984.
No context found.
A. Mycroft and R. A. O'Keefe, A polymorphic type system for Prolog, Logic Programming Workshop, 1983, pp. 107--121. 21
No context found.
A. Mycroft and R. O'Keefe. A polymorphic type system for Prolog. Articial Intelligence, 23:295-307, 1984.
No context found.
A. Mycroft and R. A. O'Keefe. A Polymorphic Type System for Prolog. Artificial Intelligence, 23:295--307, 1984.
No context found.
A. Mycroft and R.A. O'Keefe. A polymorphic type system for prolog. Arti cial Intelligence, 23:295-307, 1984.
No context found.
A. Mycroft and R.A. O'Keefe. A Polymorphic Type System for Prolog. Artificial Intelligence, 23:295--307, 1984.
No context found.
A. Mycroft and R. A. O'Keefe. A Polymorphic Type System for Prolog. Artificial Intelligence, 23(3):295--307, 1984.
First 50 documents Next 50
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