20 research outputs found

    Operational and denotational semantics of prolog

    Get PDF
    AbstractA Vienna Definition Language operational semantics of PROLOG, which includes the cut, the database, and the extra-logical operations, is presented. This semantics serves as the basis for deriving a denotational-continuation-style semantics of PROLOG through a systematic transformation of the operational semantics by a method described by Berry

    The formal power of one-visit attribute grammars

    Get PDF
    An attribute grammar is one-visit if the attributes can be evaluated by walking through the derivation tree in such a way that each subtree is visited at most once. One-visit (1V) attribute grammars are compared with one-pass left-to-right (L) attribute grammars and with attribute grammars having only one synthesized attribute (1S).\ud \ud Every 1S attribute grammar can be made one-visit. One-visit attribute grammars are simply permutations of L attribute grammars; thus the classes of output sets of 1V and L attribute grammars coincide, and similarly for 1S and L-1S attribute grammars. In case all attribute values are trees, the translation realized by a 1V attribute grammar is the composition of the translation realized by a 1S attribute grammar with a deterministic top-down tree transduction, and vice versa; thus, using a result of Duske e.a., the class of output languages of 1V (or L) attribute grammars is the image of the class of IO macro tree languages under all deterministic top-down tree transductions

    Linear deterministic attributed transformations

    Get PDF

    Tree automata and attribute grammars

    Get PDF
    The translational mechanism of attribute grammars using tree automata are investigated. The pushdown tree-to-string transducer with a certain synchronization facility as a model to realize transformations by attribute grammars is proposed and its basic properties using tree-walking finite state automata are studied. To demonstrate the utility of this model, it is shown that noncircular attribute grammars are equally powerful as arbitrary attribute grammars, and a method is provided to show that a certain type of transformations is impossible by attribute grammars

    Yet Another Implementation of Attribute Evaluation

    Get PDF
    We introduce another item in the already large list of techniques for attribute evaluation. Our algorithm consists in computing attributes by reductions to normal forms using a transducer operating on tree encodings of a cyclic representation of zippers. A zipper is a data structure introduced by GĂ©rard Huet for representing a subtree together with its context, i.e. it is a tree with a focus that points to some node inside it. We mention some potential applications of this representation of attribute grammars as zipper transformers

    Proofs of partial correctness for attribute grammars with applications to recursive procedures and logic programming

    Get PDF
    AbstractAn extension of the inductive assertion method allowing one to prove the partial correctness of an attribute grammar w.r.t. a specification is presented. It is complete in an abstract sense. It is also shown that the semantics of systems of recursive imperative procedures or of recursive applicative procedures computed with call-by-value or call-by-name can be expressed by an attribute grammar associating attributes with the nodes of the so-called trees of calls. Hence the proof methods for the partial correctness of attribute grammars can be applied to these recursive procedures. We show also how the proof method can be applied in logic programming

    CAN WE TRANSFORM LOGIC PROGRAMS INTO ATTRIBUTE GRAMMARS?

    Get PDF
    In this paper we study the relationship between Attribute Grammars and Logic Programs, concentrating on transforming logic programs into attribute grammars. This has potential applications in compilation techniques for logic programs. It does not seem possible to transform arbitrary Logic Programs into Attribute Grammars, basically because the same logic variables can sometimes be used as input and sometimes as output. We introduce the notion of an Abstract Attribute Grammar, which is similar to that of an Attribute Grammar with the exception that attributes are not classified into inherited and synthesized, and that the semantic equations are replaced by restriction sets. These sets represent a restriction on the values of attribute occurrences namely, all elements within each set have to be equal. We give an effective translation schema which produces an equivalent Abstract Attribute Grammar for a given Logic Program. We provide a formal proof of this equivalence. We then proceed to classify a class of Abstract Attribute Grammars that can be transformed into Attribute Grammars, and show how to achieve this transformation. By composing both transformations one can transform certain logic programs into attribute grammars. Complete proofs ar5e given.Information Systems Working Papers Serie
    corecore