20 research outputs found

    An implementation of the HLP

    Get PDF

    A characterization of attribute evaluation in passes

    Get PDF
    This paper describes the evaluation of semantic attributes in a bounded number of passes from left-to-right and/or from right-to-left over the derivation tree of a program. Evaluation strategies where different instances of the same attribute in any derivation tree are restricted to be evaluated in one pass, with for every derivation tree the same pass number, are referred to as simple multi-pass whereas the unrestricted pass-oriented strategies are referred to as pure multi-pass.\ud \ud A graph theoretic characterization is given, showing in which cases an attribute grammar meets the simple multi-pass requirements and what are the minimal pass numbers of its attributes for a given sequence of pass directions. For the special cases where only left-to-right passes are made or where left-to-right and right-to-left passes strictly alternate, new algorithms are developed that associate minimal pass numbers with attributes and indicate in case of failure the attributes that cause the rejection of the grammar. Mixing of a simple multi-pass strategy with other evaluation strategies, in case the grammar is not simple multi-pass, is discussed

    Concurrent incremental attribute evaluation

    Get PDF
    The design of a concurrent incremental combined static/dynamic attribute evaluator is presented. The static part is an incremental version of the ordered attribute evaluation scheme. The dynamic part is an incremental version of the dynamic evaluation scheme.To remove the restriction that every transformation of an attributed syntax tree should immediately be followed by a reevaluation of the tree, criteria have been formulated which permit a delay in calling the reevaluator. These criteria allow multiple asynchronous tree transformations and multiple asynchronous reevaluations. Transformation and reevaluation processes are distributed over regions of the tree. Each region is either in its transformation phase or in its reevaluation phase. Different regions can be in different phases at the same time

    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

    Simple multi-visit attribute grammars

    Get PDF
    An attribute grammar is simple multi-visit if each attribute of a nonterminal has a fixed visit-number associated with it such that, during attribute evaluation, the attributes of a node which have visit-number j are computed at the jth visit to the node. An attribute grammar is l-ordered if for each nonterminal a linear order of its attributes exists such that the attributes of a node can always be evaluated in that order (cf. the work of Kastens).\ud \ud An attribute grammar is simple multi-visit if and only if it is l-ordered. Every noncircular attribute grammar can be transformed into an equivalent simple multi-visit attribute grammar which uses the same semantic operations.\ud \ud For a given distribution of visit-numbers over the attributes, it can be decided in polynomial time whether the attributes can be evaluated according to these visit-numbers. The problem whether an attribute grammar is simple multi-visit is NP-complete
    corecore