2 research outputs found

    On the Semantic Approaches to Boolean Grammars

    Get PDF
    Boolean grammars extend context-free grammars by allowing conjunction and negation in rule bodies. This new formalism appears to be quite expressive and still efficient from a parsing point of view. Therefore, it seems reasonable to hope that boolean grammars can lead to more expressive tools that can facilitate the compilation process of modern programming languages. One important aspect concerning the theory of boolean grammars is their semantics. More specifically, the existence of negation makes it difficult to define a simple derivation-style semantics (such as for example in the case of context-free grammars). There have already been proposed a number of different semantic approaches in the literature. The purpose of this paper is to present the basic ideas behind each method and identify certain interesting problems that can be the object of further study in this area

    Locally stratified Boolean grammars

    No full text
    We introduce locally stratified Boolean grammars, a natural subclass of Boolean grammars with many desirable properties. Informally, if a grammar is locally stratified then the set of all pairs of the form (nonterminal, string) of the grammar can be mapped to a (possibly infinite) set of strata so as that the following holds: if the membership of a string w in the language defined by nonterminal A depends on the membership of string w′ in the language defined by nonterminal B, then (B,w′) cannot belong to a stratum higher than the stratum of (A,w); furthermore, if the above dependency is obtained through negation, (B, w′) must belong to a stratum lower than the stratum of (A,w). We prove that local stratifiability can be tested in linear time with respect to the size of the given grammar. We then develop the semantics of locally stratified grammars and prove that it is independent of the choice of the stratification mapping. We argue that the class of locally stratified Boolean grammars appears at present to be the broadest subclass of Boolean grammars that can be given a classical semantics (ie., without resorting to three-valued formal language theory). © 2008 Elsevier Inc. All rights reserved
    corecore