| S. Antoy. Definitional Trees. In 3rd Int'l Conf. on Algebraic and Logic Programming (ALP'92), volume 632 of LNCS, pages 143--157. SpringerVerlag, 1992. |
....computation step performs a reduction in exactly one unsolved expression of a disjunction. This reduction may yield a single new expression (deterministic step) or a disjunction of new expressions together with corresponding bindings (non deterministic step) For inductively sequential programs [1] (these are, roughly speaking, function definitions without overlapping left hand sides) this strategy, called needed narrowing [2] computes the shortest possible successful derivations (if common subterms are shared) and a minimal set of solutions, and it is fully deterministic if free ....
....called needed narrowing [2] computes the shortest possible successful derivations (if common subterms are shared) and a minimal set of solutions, and it is fully deterministic if free variables do not occur. Since the exact evaluation strategy of Curry is specified using definitional trees [1, 11], Curry also supports more powerful evaluation strategies than current functional languages. These properties also shows some of the advantages of integrating functions into logic programs, since similar properties for purely logic programs are not known. Note that Curry is not based on a ....
S. Antoy. Definitional trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
....steps issuing from t, without losing completeness. Needed narrowing [6] is currently the best known narrowing strategy due to its optimality properties. It extends the Huet and L evy s notion of a needed reduction [18] The definition of needed narrowing [6] uses the notion of definitional tree [5]. Roughly speaking, a definitional tree for a function symbol f is a tree whose leaves contain all (and only) the rules used to define f and whose inner nodes contain information to guide the (optimal) pattern matching during the evaluation of expressions. Each inner node contains a pattern and a ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
....x is a tuple of di#erent variables. Informally, inductive sequentiality amounts to the existence of discriminating left hand sides, i.e. typical functional programs. A precise definition of this class of programs and the needed narrowing strategy is based on the notion of a definitional tree [10]. Needed narrowing can be easily and e#ciently implemented by translating definitional trees into case expressions as proposed in [36] which also proves that there is a strong equivalence of needed narrowing derivations in the original program and leftmost outermost narrowing derivations in ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
....normalizing rewriting strategies. In most cases, such strategies only work for TRSs that satisfy strong syntactic requirements (typically orthogonality or almost orthogonality together with left normality, inductive sequentiality, strong sequentiality, etc. on the shape of rules of the TRSs [Ant92, AM96, DM97, HL91, Ken89, O Do77, O Do85, SR93, Toy92] Formal techniques for proving termination are much more general since they usually apply to arbitrary TRSs [AG00, BFR00, Der87] On the other hand, in contrast to termination analysis, checking whether a TRS satisfies the syntactic ....
....normalizing strategy for computing normal forms. Note that R is not even weakly orthogonal: it has two critical pairs hhalf(0) 0i and hhalf(s(s(dbl(x) s(x)i which are not trivial. Therefore, most existing results describing normalizing strategies for weakly or almost orthogonal TRSs (e.g. Ant92, AM96, DM97, HL91, Ken89, NT99, O Do77, O Do85, SR93, Toy92] do not apply to R. As far as the author knows, only [Toy92] provides some results ensuring normalization of (strong) index reduction strategies for left linear (possibly overlapping) strongly sequential TRSs. However, in this case, ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional Trees. In H. Kirchner and G. Levi, editors, Proc. of 3rd International Conference on Algebraic and Logic Programming, ALP'92, LNCS 632:143-157, Springer-Verlag, Berlin, 1992.
.... [17] 28] is to consider programs written in an intermediate programming language with a simple operational semantics (and to automatically translate sourcelevel programs into this intermediate language) Recently, 21] introduced such a simplified representation for functional logic programs [7]. In the following, we present an extension of this intermediate representation which covers all the facilities of the language. The syntax of the resulting representation is depicted in Figure 1. Following the terminology of [21] we refer to this representation as the flat representation for ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming (ALP'92), pages 143--157. Springer LNCS 632, 1992.
....Given a set A, P(A) denotes the set of all subsets of A. Given a binary relation R on a set A, we denote its transitive closure by R and its reflexive and transitive closure by R . An element a 2 A is an R normal form, if there Indeed, they are inductively sequential in the sense of [Ant92]. This class of TRSs are strongly sequential, see [HLM98] is no b such that a R b. We say that b is an R normal form of a (written aR b) if b is an R normal form and a R b. We say that R is terminating iff there is no infinite sequence a 1 R a 2 R a 3 Delta Delta Delta. Throughout the ....
S. Antoy. Definitional Trees. In H. Kirchner and G. Levi, editors, Proc. of 3rd International Conference on Algebraic and Logic Programming, ALP'92, LNCS 632:143-157, Springer-Verlag, Berlin, 1992.
....of needed narrowing. This article is organized as follows. After recalling in Section 2 some basic notions about functional logic programming and (lazy) narrowing strategies, we characterize in Section 3 the class of uniform programs as a subclass of the inductively sequential programs of [3]. Section 4 investigates the precise relation between lazy narrowing and needed narrowing. Here, we prove the main theoretical result of this work: the computational equivalence of both narrowing strategies over the class of uniform programs. In Section 5, we present an optimization of the lazy ....
....outcome [5] Needed Narrowing In this section, we recall the main notions concerning the needed narrowing strategy of [5] Needed Narrowing reduces the outermost needed positions of the input term which are unavoidable to compute the final result. It is defined on inductively sequential programs [3], a (strict) subset of constructor based orthogonal programs. The definition of this class of programs, as well as the needed narrowing strategy, makes use of the notion of a definitional tree, first introduced by Antoy [3] nevertheless, we use the more declarative definition appeared later in ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional Trees. In Proc. of the Int'l Conf. on Algebraic and Logic Programming (ALP'92), pages 143--157. Springer LNCS 632, 1992.
....i is a tuple of different variables. Informally, inductive sequentiality amounts to the existence of discriminating left hand sides, i.e. typical functional programs. A precise definition of this class of programs and the needed narrowing strategy is based on the notion of a definitional tree [9]. Needed narrowing can be easily and efficiently implemented by translating definitional trees into case expressions as proposed in [35] which also proves that there is a strong equivalence of needed narrowing derivations in the original program and leftmost outermost narrowing derivations in ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143-157. Springer LNCS 632, 1992.
....way by using rewriting strategies. For constructor based weakly orthogonal term rewriting systems, efficient strategies have been proposed in the literature. For example, O Donnell has shown that paralleloutermost strategy is normalizing [13] Sekar and Ramakrishnan [18] as well as Antoy [1] improved O Donnell s strategy by proposing strategies which rewrite in parallel a necessary set of redexes. The two last strategies are optimal with respect to strategies which have no knowledge about the right hand sides of the rules. Their extension to graphs is not such an easy task. Indeed, ....
....and parallel reductions of graphs that share some subgraphs need some care. We propose an optimal graph rewriting strat egy which reduces admissible graphs in parallel at some necessary set of outermost redexes. This strategy is a conservative extension of the one presented for terms in [1]. The rest of the paper is organized as follows : The next section lists some definitions and notations used later in the paper. Section 3 defines the graph rewriting systems we consider and establishes some confluence results. Section 4 discusses briefly the definition of a parallel graph ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In Proc. of ALP'92, pages 143--157. LNCS 632, 1992.
.... end (assertz) of the clauses defining the corresponding predicate [9, pages 44 47] Obviously, the possibilities will be di#erent, if the ADT of stores is more sophisticated in order to implement optimal evaluation strategies, where rules are stored, for instance, within definitional trees [2]. There are still more possibilities for the addition of a rule to a store. Consider the case of adding several times the same rule. Depending on the operational semantics, the existence of duplicated rules may be important (notice that the standard of Prolog [9] is not very precise about how ....
S. Antoy. Definitional trees. In H. Kirchner and G. Levi, editors, Proc. of ALP
....expression. Due to its optimality properties w.r.t. the length of derivations and the number of computed solutions, needed narrowing [6] is currently the best narrowing strategy for functional logic programs. The formulation of needed narrowing is based on the use of definitional trees [5], which define a strategy to evaluate functions by applying narrowing steps. In this work, we are concerned with the PE of functional logic languages. The first approach to this topic was the narrowing driven PE of [4] which considered functional logic languages with an operational semantics ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
.... of patterns (e.g. Haskell, Hope or Miranda) 6, 26] Within this framework, the class of inductively sequential programs has been defined, studied, and used for the implementation of programming languages which provide for optimal computations both in functional and functional logic programming [4, 5, 19, 21, 28]. Inductively sequential programs can be thought of as constructor based TRSs with discriminating left hand sides, i.e. typical functional programs. Thus, in the remainder of the paper we follow the standard framework of term rewriting [14] for developing our results. We assume familiarity with ....
....from t, without loosing completeness. Needed narrowing [5] is currently the best known narrowing strategy due to its optimality properties. Needed narrowing extends the Huet and L evy s notion of a needed reduction [23] The definition of needed narrowing [5] uses the notion of definitional tree [4]. Roughly speaking, a definitional tree for a function symbol f is a tree whose leaves contain all (and only) the rules used to define f and whose inner nodes contain information to guide the (optimal) pattern matching during the evaluation of expressions. Each inner node contains a pattern and a ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
....the left linearity and nonambiguity conditions. However, there are important subclasses of such rewrite systems with different implications on the usefulness of integrating simplification. In this section we consider the following three subclasses in more detail: inductively sequential systems [1] where the rules for each function can be organized in a hierarchical structure, orthogonal systems satisfying the strong nonambiguity condition (no overlapping in the left hand sides of the rules) and weakly orthogonal systems with overlapping left hand sides. 4.1 Inductively Sequential ....
....s at the top, then a further case distinction on the second argument is necessary to distinguish between rules R 2 and R 3 . Altogether, the rules can be organized in a hierarchical structure representing the various case distinctions. Such hierarchical structures have been introduced by Antoy [1] under the name definitional trees. A program for which the rules of each function symbol can be organized in a definitional tree is called inductively sequential. Antoy, Echahed and Hanus [2] have defined for inductively sequential programs a narrowing strategy, called needed narrowing, which is ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional Trees. In Proc. of the 3rd Int. Conf. on Algebraic and Logic Programming, pp. 143--157. Springer LNCS 632, 1992.
....power of the method in many cases. To overcome this problem, 3] introduces a novel approach for the PE of functional logic languages. The new scheme considers a maximally simplified representation into which programs written in a higher level language (i.e. inductively sequential programs [5] with evaluation annotations) can be automatically translated. The restriction to not evaluate terms in head normal form is avoided by defining a non standard semantics which is well suited to perform computations at PE time. The aim of this work is to show how in contrast to [4] and Indy the ....
....with the RLNT calculus, we generate a residual rule a resultant of the form: e 1 = e 2 . Additionally, a post processing of renaming is often required to recover the same class of programs. 2. 1 The Flat Representation Following [13] we consider inductively sequential rewrite systems [5] (with evaluation annotations) as programs and an operational semantics which integrates (needed) narrowing and residuation. In order to simplify the underlying semantics, a flat representation for programs is introduced. This representation is based on the formulation of [19] to express ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
....derivation. Unfortunately, it is undecidable whether a redex is needed. Strongly sequential redexes approximate needed redexes. However, reduction of strong redexes is costly to implement [10] and some efforts have been done to simplify the (strongly) needed reduction process. Definitional trees [1] allow us to define optimal strategies both in rewriting [1] and narrowing [3] A definitional tree consists of branches on the values of particular arguments and the rules of the TRS. Example 1.1 Consider the following rules: Informatik II, RWTH Aachen, D 52056 Aachen, Germany, ....
....is needed. Strongly sequential redexes approximate needed redexes. However, reduction of strong redexes is costly to implement [10] and some efforts have been done to simplify the (strongly) needed reduction process. Definitional trees [1] allow us to define optimal strategies both in rewriting [1] and narrowing [3] A definitional tree consists of branches on the values of particular arguments and the rules of the TRS. Example 1.1 Consider the following rules: Informatik II, RWTH Aachen, D 52056 Aachen, Germany, hanus informatik.rwth aachen.de. y DSIC, U.P. de Valencia, Camino de la ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional Trees. In Proc. of ALP'92, LNCS 632:143-157, Springer-Verlag, 1992.
....source code. Our implementation is high level, portable, and similar to, but more efficient than, 5] that in turn is an improvement of [7] Needed narrowing [3] is a sound, complete, and optimal strategy for semantic unification in inductively sequential rewrite systems. Inductive sequentiality [1] amounts to the existence of a definitional tree T for each operation f , i.e. a set of patterns partially ordered by subsumption with the following properties up to renaming of variables. root property] The minimum element, referred to as the root, of T is f(X 1 ; Xn ) where X 1 ; ....
....child of 0 . induction property] All the children of a same parent differ from each other only at the position of a variable, referred to as inductive, of their parent. There exist operations with no definitional tree, and operations with more than one definitional tree, examples are in [1]. The existence of a definitional tree of a function f is decidable and simple to decide in most practical situations. Our implementation of needed narrowing maps each operation f into a family of Prolog predicates f 0 ; f 1 ; such that if f i (u 1 ; un ; u) succeeds, then u is a ....
S. Antoy. Definitional trees. In Proc. of the 4th Intl. Conf. on Algebraic and Logic programming, pages 143--157. Springer LNCS 632, 1992.
....lr x 0 0 = 0 lr 1 2 0 = 1 lr 2 y 1 = 2 lr 3 1 1 = 3 The call (lr (loop 0) 0 0) works fine, but (lr 2 (loop 0) 1) loops. Our own Curry [7] compiler (Sloth [17] is able to generate sequential code from these two examples by performing sequentiality analysis based on the so called definitional trees [1]. For the last example the following decision tree is built: H H H Hj Phi Phi Phi Phi S Sw H H H Hj Phi Phi Phi Phi lr x y z lr x y 0 lr x y 1 lr x 0 0 lr x 2 0 lr 1 2 0 lr 3 y 1 lr 2 y 1 lr 3 1 1 0 1 2 3 Depending on the value of the third argument to lr, the first or ....
....by unifying (h:ts) with [a,b,c] and applying the resulting unifier to ts, i.e. b,c] is obtained as result. 5 The usual situation is to have partial and non deterministic goals, where a result is defined only for certain values of its free variables. Consider, for instance, asking eval [1,2,3]= as bs) Four different substitutions (fas 7 [ bs 7 [1,2,3]g, fas 7 [1] bs 7 [2,3]g, etc) satisfy this equation. In general, the outcome of a query is a possibly infinite series of pairs (result, condition) Example 1. The following is a possible definition of a predicate to test ....
[Article contains additional citation context not shown here]
Sergio Antoy. Definitional trees. In Proc. of the 4th Intl. Conf. on Algebraic and Logic Programming, number 632 in Springer LNCS, pages 143--157, 1992.
....until the arguments have a particular form. For instance, consider the concatenation on lists defined by function append: A] A] A] append [ L = L append [E R] L = E append R L] Without any evaluation restrictions, Curry computes the answer L= 1,2] to the goal equation append L [3,4] = 1,2,3,4] by narrowing. However, if the evaluation restriction eval append 1:rigid is added, an append call is only reduced if the first argument is not headed by a defined function symbol and different from a logical variable, 4 otherwise the call is delayed. Such evaluation restrictions ....
....arguments have a particular form. For instance, consider the concatenation on lists defined by function append: A] A] A] append [ L = L append [E R] L = E append R L] Without any evaluation restrictions, Curry computes the answer L= 1,2] to the goal equation append L [3,4] [1,2,3,4] by narrowing. However, if the evaluation restriction eval append 1:rigid is added, an append call is only reduced if the first argument is not headed by a defined function symbol and different from a logical variable, 4 otherwise the call is delayed. Such evaluation restrictions are implicit ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
....of narrowing [EJ97] The confluence of a rewrite relation allows to evaluate expressions in a deterministic and efficient way by using rewriting strategies. Such strategies have been well investigated in the setting of finite and infinite orthogonal TRSs (e.g. O D77, HL91, KKSV95] In [Ant92] a strategy that computes outermost needed redexes based on definitional trees has been designed in the framework of orthogonal constructor based TRSs. In this article, we show that Antoy s strategy can be extended to orthogonal constructor based GRSs with the same nice properties. We ....
....graph labeled with defined operations and such that there exist a path from p to q (i.e. p is outer than q) then there is no path from q to p. Our graph rewriting strategy is based on definitional trees and is a conservative extension to admissible graphs of Antoy s term rewriting strategy [Ant92] A definitional tree is a hierarchical structure whose leaves are the rules of a cGRS used to define a given operation. In the following definition, branch and rule are uninterpreted symbols, used to construct the nodes of a definitional tree. Definition 28 (Definitional tree) Let SP = h Sigma; ....
S. Antoy. Definitional trees. In Proc. of the 4th Intl. Conf. on Algebraic and Logic programming, pages 143--157. Springer Verlag LNCS 632, 1992. 32
....on needed narrowing. The transformation process con sists of applying an arbitrary number of times the basic transformation rules, which are: definition introduction, definition elimination, unfolding, folding, and abstraction. Needed narrowing is complete for inductively sequential programs [4]. Thus, we demonstrate that such a program structure is preserved through the transformation sequence (R 0 ; Rn ) which is a key point for proving the correctness of the transformation system as well as its effective applicability. For instance, by using other variants of narrowing (e.g. ....
....steps issuing from t, without losing completeness. Needed narrowing [5] is currently the best known narrowing strategy due to its optimality properties. It extends the Huet and L evy s notion of a needed reduction [18] The definition of needed narrowing [5] uses the notion of definitional tree [4]. Roughly speaking, a definitional tree for a function symbol f is a tree whose leaves contain all (and only) the rules used to define f and whose inner nodes contain information to guide the (optimal) pattern matching during the evaluation of expressions. Each inner node contains a pattern and a ....
S. Antoy. Definitional Trees. In Proc. of ALP'92, Springer LNCS 632, pages 143--157, 1992.
....is evaluated. Needed narrowing is the currently best narrowing strategy for first order functional logic programs due to its optimality properties w.r.t. the length of derivations and the number of computed solutions [2] Since needed narrowing is defined for inductively sequential rewrite systems [1] (these are constructor based rewrite system with discriminating left hand sides, i.e. typical functional programs) it can be efficiently implemented by pattern matching and unification due to its local computation of a narrowing step (see, e.g. 9] On ground terms, needed narrowing falls ....
....narrowing does not evaluate the first 2 argument of the function call f( s(0) Thus, needed narrowing reduces this expression to 0, in contrast to Miranda or Haskell which do not terminate on this function call. In general, needed narrowing rewriting always computes a normal form if it exists [1]. In this paper, we extend the needed narrowing strategy to higher order functions and terms as data structures. In contrast to current functional languages, we permit free (existentially quantified) variables and abstractions in expressions, and the latter also in left hand sides of rewrite ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
....x 1 : 1 , x k : k and F : A term t (rewrite rule l r) is x k lifted if an x k lifter has been applied to t (l and r) For example, fG 7 G 0 (x)g is an x lifter of g(G) away from any W not containing G 0 . 3 First Order Definitional Trees Definitional trees are introduced in [1] to define efficient normalization strategies for (first order) term rewriting. The idea is to represent all rules for a defined 1 The strict equality t t 0 holds if t and t 0 are reducible to the same ground constructor term. Note that normal forms may not exist in general due to ....
....sequential if there exists a definitional tree of f such that each rule node corresponds to exactly one rule of the rewrite system R. The term rewriting system R is called inductively sequential if each function defined by R is inductively sequential. 2 This corresponds to Antoy s notion [1] except that we ignore exempt nodes. A definitional tree defines a strategy to apply narrowing steps. 3 To narrow a term t, we consider the definitional tree T of the outermost function symbol of t (note that, by our restriction on goals, the outermost symbol is always a Boolean function) If T ....
S. Antoy. Definitional trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
....logic languages are based on needed narrowing and inductively sequential programs. Needed narrowing extends the Huet and L evy s notion of a needed reduction [9] A precise definition of this class of programs and the needed narrowing strategy is based on the notion of a definitional tree [3]. Roughly speaking, a definitional tree for a function symbol f is a tree whose leaves contain all (and only) the rules used to define f and the inner nodes contain information to guide the 3 sh( b) True sh(x : xs; b ) sh(x : xs; False sh(x : xs; y:ys) sh(xs; ys) sh( a ; b) j j ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
.... [12, 33, 47] Within this framework, the class of inductively sequential programs, which we consider in this paper, has been defined, studied, and used for the implementation of programming languages which provide for optimal computations both in functional and functional logic programming [7, 10, 27, 28, 40]. Inductively sequential programs can be thought of as constructor based TRSs with discriminating left hand sides, i.e. typical functional programs. Thus, in the remainder of the paper we follow the standard framework of term rewriting [19] for developing our results. We consider a (many sorted) ....
....of successful derivations and the number of computed solutions. Needed narrowing is defined on inductively sequential programs. To provide a precise definition of this class of programs and the needed narrowing strategy, we introduce definitional trees. In contrast to the original definition [7], here we use the declarative definition [8] since it is more appropriate for proving the results about partial evaluation based on needed narrowing. A definitional tree of a finite set of linear patterns S is a non empty set P of linear patterns partially ordered by subsumption having the ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, volume 632 of Lecture Notes in Computer Science, pages 143--157. Springer-Verlag, Berlin, 1992.
....the strategy to evaluate different and nested arguments. 5 The list notation is similar to Prolog. The type [A] denotes all lists with elements of type A. append [E R] L = E append R L] Without any evaluation restrictions, Curry computes the answer L= 1,2] to the goal equation append L [3,4] = 1,2,3,4] by narrowing. However, if the evaluation restriction eval append 1:rigid is added, an append call is only reduced if the first argument is not headed by a defined function symbol and different from a logical variable, 6 otherwise the call is delayed. Such evaluation restrictions ....
....to evaluate different and nested arguments. 5 The list notation is similar to Prolog. The type [A] denotes all lists with elements of type A. append [E R] L = E append R L] Without any evaluation restrictions, Curry computes the answer L= 1,2] to the goal equation append L [3,4] [1,2,3,4] by narrowing. However, if the evaluation restriction eval append 1:rigid is added, an append call is only reduced if the first argument is not headed by a defined function symbol and different from a logical variable, 6 otherwise the call is delayed. Such evaluation restrictions are implicit ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
.... Investigating the Search Space Idea: Evaluate demanded arguments one by one in advance #possible narrowings naive improved #rules Example: one(0) s(0) one(s(N) one(N) solve one(one(X) Keep the order of rules and arguments yes( MKMWH93] no( HLW92, LLR93, AEH94] 27 Definitional Trees [An92] leq(0,X) true leq(s(X) 0) false leq(s(X) s(Y) leq(X,Y) leq(Z,Z ) leq(0,Z ) true leq(s(X) Z ) leq(s(X) 0) leq(s(X) s(Y) false leq(X,Y) Z s(X) Z s(Y) Z 0 Z 0 28 Needed Narrowing repeatedly: select demanded position, evaluate it to hnf if no further position demanded try rhs of ....
S. Antoy. Definitional Trees. Proc. ALP'92, LNCS 632:143-157, 1992.
.... a non deterministic function insert for inserting elements in a list and a non deterministic function permute for computing all permutations of a list: insert x [ x] insert x (y:ys) choose (x:y:ys) y:insert x ys) permute [ permute (x:xs) insert x (permute xs) Thus, permute [1,2,3] evaluates to all permutations of the list [1,2,3] 2 Usually, the leftmost outermost reducible expression is evaluated first, but there are also situations where the evaluation of another outermost reducible expression is preferred, see [11] for details. 5 permute [1,2,3] # # [1,2,3] ....
.... elements in a list and a non deterministic function permute for computing all permutations of a list: insert x [ x] insert x (y:ys) choose (x:y:ys) y:insert x ys) permute [ permute (x:xs) insert x (permute xs) Thus, permute [1,2,3] evaluates to all permutations of the list [1,2,3]: 2 Usually, the leftmost outermost reducible expression is evaluated first, but there are also situations where the evaluation of another outermost reducible expression is preferred, see [11] for details. 5 permute [1,2,3] # # [1,2,3] 2,1,3] 2,3,1] 1,3,2] 3,1,2] 3,2,1] 2 ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional Trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming, pp. 143--157. Springer LNCS 632, 1992.
....FlatCurry which does not consider additional features was presented in [24] which we refer to as Core FlatCurry, i.e. a term in Core FlatCurry is composed only by variables, constructors, defined functions, and case expressions. The operational semantics of Curry is based on definitional trees [6] which are used to guide the pattern matching process to obtain an optimal 4 R : D1 : Dm (program) t : v (variable) D : f(v1 ; vn ) t (definition) j c(t1 ; tn) constructor) j f(t1 ; tn) function call) p : c(v1 ; vn ) flat pattern) j (f)case t0 ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
No context found.
S. Antoy. Definitional trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming (ALP'92), pages 143--157. Springer LNCS 632, 1992.
No context found.
S. Antoy. Definitional trees. In Proc. 3rd Intl. Conference on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
....a list of ar(c) variables. The patterns for a single Case are assumed to be mutually exclusive, but not necessarily exhaustive. More complicated pattern matching in the source language must be mapped to nested Case expressions. Such nested case expressions can be used to encode definitional trees [2]. Finally, Letrec expressions introduce sets of (potentially) mutually recursive bindings. Curry is intended to use lazy or, more properly, call by need evaluation, as opposed to simple call by name evaluation (without sharing) Although the results of call by name and call by need cannot be ....
Antoy, S., Definitional trees, in: Proc. 3rd International Conference on Algebraic and Logic Programming (ALP'92) (1992), pp. 143--157.
....arguments are more popular than others and the strategy evaluates a position according to this popularity order. In strongly sequential systems, the order of evaluation is determined by matching automata [10] In inductively sequential, the order of evaluation is determined by definitional trees [3]. This strategy extends the behavior of call by need computations to narrowing. 4] extends this strategy to rewrite systems with a particular kind of overlapping rules. All these strategies are quite accurate in the sense that they compute only necessary steps [4] modulo non deterministic ....
S. Antoy. Definitional trees. In Proc. of the 4th Intl. Conf. on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
....arguments are more popular than others and the strategy evaluates a position according to this popularity order. In strongly sequential systems, the order of evaluation is determined by matching automata [10] In inductively sequential, the order of evaluation is determined by definitional trees [3]. This strategy extends the behavior of call by need computations to narrowing. 4] extends this strategy to rewrite systems with a particular kind of overlapping rules. All these strategies are quite accurate in the sense that they compute only necessary steps [4] modulo non deterministic ....
S. Antoy. Definitional trees. In Proc. of the 4th Intl. Conf. on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
....since it is inconsistent with the completeness of CLNC [11, Th. 7.2] Outermost strategies are incomplete for constructor based TRSs. The operations occurring in the following counterexample are all defined in [11, pp. 53 54] Example 2. Consider all the outermost derivations of: sorted(permute([1,2]) t0 ) The only available step of t0 yields: sorted(insert(1,permute( 2] t1 ) There exists a unique outermost step of t1 which yields: sorted( 1 permute( 2] t2 ) No matter what the remaining steps of a derivation of t2 are, term false can no longer be reached from t2 . However, it is ....
....strategies are incomplete for constructor based TRSs. The operations occurring in the following counterexample are all defined in [11, pp. 53 54] Example 2. Consider all the outermost derivations of: sorted(permute( 1,2] t0 ) The only available step of t0 yields: sorted(insert(1,permute([2]) t1 ) There exists a unique outermost step of t1 which yields: sorted( 1 permute( 2] t2 ) No matter what the remaining steps of a derivation of t2 are, term false can no longer be reached from t2 . However, it is easy to verify that false can be reached from t0 . We also dispute the use ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming (ALP'92), pages 143--157. Springer LNCS 632, 1992.
....and length, are assumed to be library functions. Capture is a constraint, i.e. a function that, similar to a Prolog predicate, succeeds iff its condition succeeds. Void is a primitive construct that succeeds iff its argument is a constraint with no solution. A query of the form, e.g. queens [1,2,3,4] non deterministically computes a solution of the 4 queens problem. To understand the promise of functional logic programming languages, it is instructive to compare the above program with textbook examples of both functional and logic programs proposed for the same problem. All the programs, ....
....built in operation of a functional logic language run time system. X X R 1 [X Y] Z [X Y Z] R 2 [ success R 3 [X X s ] Y Y s ] X=Y X s =Y s R 4 success X X R 5 The execution of the program of Example 1 requires the solution of constraints, such as U V=[2,3,4], which are solved by narrowing. A free variable may have different instantiations. Consequently, expressions containing free variables may be narrowed to different results. Below is the initial portion of one of several possible sequences of steps that solve the constraint, i.e. narrow it to ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In Proc. of the 4th Intl. Conf. on Algebraic and Logic Programming, pages 143--157. Springer LNCS 632, 1992.
....lazy [9, 36, 44] or narrowing with redundancy tests [31] Each strategy demands certain conditions of the rewrite relation to ensure the completeness of narrowing (the ability to compute all the solutions of an equation. Our contribution is a strategy that, for inductively sequential systems [1], preserves the completeness of narrowing and performs only steps that are unavoidable for solving equations. This characterization leads to the optimality of our strategy with respect to the number of distinct steps of a derivation. Advantages of our strategy over existing ones include: the ....
....oe(t[r] p ) is a narrowing step. We now define a class of rewrite systems for which there exists an efficiently computable needed narrowing strategy. Systems in this class have the property that the rules defining any operation can be organized in a hierarchical structure called definitional tree [1], which is used to implement needed rewriting. This note generalizes that result to narrowing. The symbols branch, rule, and exempt, used in the next definition, are uninterpreted functions used to classify the nodes of the tree. A pattern is an innermost term contained in each node. Definition ....
[Article contains additional citation context not shown here]
S. Antoy. Definitional trees. In ALP'92, pages 143-- 157. Springer LNCS 632, 1992.
....An efficient implementation of needed narrowing exists for inductively sequential programs. The formal definition of inductive sequentiality is rather technical. In this paper, for the sake of completeness, we give a more intuitive account of this concept. The complete technical details are in [9]. A rewrite system is inductively sequential when all its operations are defined by rewrite rules that, recursively, make on their arguments a case distinction analogous to a data type (or structural) induction. Both definitions of Example 1 show this point. In fact, operation app makes a case ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming (ALP'92), pages 143--157. Springer LNCS 632, 1992.
....7 3.1 Definitional Trees If an operation f is designed using the binary choice strategy, then f s defining rules are naturally represented in a tree like structure in which branches represent design decisions and leaves represent rewrite rules. This structure, called definitional tree [3], is formally defined below. Definition 1 d is a partial definitional tree, or pdt, if and only if one of the following cases holds: d = rule(l; r) where l is a template in which there are no occurrences of places and r is a term whose variables are in l, too. d = var(t; o; v; d 0 ) where t ....
....of each other [25] In particular, these reduction sequences have the same length, a point we will discuss again later. The non determinism in the choice of redexes seems to be missing from our definition. The reason is that an operation may have several non isomorphic definitional trees [3] and the non determinism discussed earlier is removed by the choice of a particular tree. Indeed, from : Gamma t ) T exactly one reduction is computed. Inductively sequential rewrite systems are orthogonal and in such systems certain redexes of a term t can be shown to be needed to reduce t to ....
[Article contains additional citation context not shown here]
Sergio Antoy. Definitional trees. In ALP'92, pages 143--157, Volterra, Italy, September 1992. Lect. Notes in Comp. Sci., Vol. 632.
....tries. To reason about these counterintuitive results, we introduce several formal criteria to measure the efficiency of a computation. Our criteria are independent of a particular implementation of the language. To make the discourse concrete, we consider inductively sequential rewrite systems [11] as programs and needed narrowing [12] as operational semantics (a call by name mechanism that has been proved optimal in functional logic programming) We formally define the cost of executing an expression in terms of the number of steps, the number of function applications, and the complexity ....
....to terminate. Therefore, we fix a strategy throughout the rest of this paper. Our choice falls on needed narrowing [12] for the following reasons: it is the basis of modern functional logic languages (e.g. Curry [20] no other narrowing strategy for the inductively sequen4 tial rewrite systems [11] computes shorter derivations, and computed answers by needed narrowing are disjoint. 1 On the other hand, needed narrowing defines a lazy (call by name) computation model, which makes difficult the computation of cost measures since they are not compositional [29] It is more convenient to ....
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
....to 2 by binding x to 0, or it is evaluated to 3 by binding x to 1. Thus, a single computation step may yield a single new expression (deterministic step) or a disjunction of new expressions together with the corresponding bindings (non deterministic step) For inductively sequential programs [3] (these are, roughly speaking, function definitions with one demanded argument) this strategy is called needed narrowing [5] Needed narrowing computes the shortest successful derivations (if common subterms are shared) and minimal sets of solutions. Moreover, it is fully deterministic for ....
....In the next section, we will describe a transformation scheme to implement this computation model in Prolog. 3 A Transformation Scheme for Curry Programs As mentioned above, the evaluation of nested expressions is based on a lazy strategy. The exact strategy is specified via definitional trees [3], a data structure for the efficient selection of the outermost reducible expressions. Direct transformations of definitional trees into Prolog (without an implementation of concurrency features) have been proposed in [2, 4, 11, 21] Definitional trees deal with arbitrarily large patterns and use ....
S. Antoy. Definitional Trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming, pp. 143--157. Springer LNCS 632, 1992.
No context found.
S. Antoy. Definitional Trees. In 3rd Int'l Conf. on Algebraic and Logic Programming (ALP'92), volume 632 of LNCS, pages 143--157. SpringerVerlag, 1992.
No context found.
S. Antoy. Definitional Trees. In Proc. of the 3rd Int. Conf. on Algebraic and Logic Programming (ALP'92), Springer LNCS 632, pages 143--157, 1992.
No context found.
) Antoy S., "Definitional Trees," in Proc. of the 3rd Int'l Conf. on Algebraic and Logic Programming (ALP'92), Springer LNCS 632, pp. 143--157, 1992.
No context found.
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
No context found.
S. Antoy. Definitional trees. In Proc. of the 3rd International Conference on Algebraic and Logic Programming ALP'92, volume 632 of Lecture Notes in Computer Science, pages 143--157. Springer-Verlag, Berlin, 1992.
No context found.
S. Antoy. Definitional Trees. In 3rd Int'l Conf. on Algebraic and Logic Programming (ALP'92), volume 632 of LNCS, pages 143--157. SpringerVerlag, 1992.
No context found.
S. Antoy. Definitional Trees. In H. Kirchner and G. Levi, editors, Proc. of the 3rd International Conference on Algebraic and Logic Programming, volume Springer LNCS 632, pages 143--157, 1992.
No context found.
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, volume 632 of Lecture Notes in Computer Science, pages 143--157. Springer-Verlag, Berlin, 1992.
No context found.
S. Antoy. Definitional Trees. In Proc. Int. Conf. on Algebraic and Logic Programming (ALP'92), Springer LNCS 632, 1992, 143-157.
No context found.
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP'92, pages 143--157. Springer LNCS 632, 1992.
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