Boolean grammars generalize context-free rewriting by extending the possibilities when dealing with different rules for the same nonterminal symbol. By allowing not only disjunction (as in the case of usual context-free grammars), but also conjunction and negation as possible connections between different rules with the same left-hand side, they are able to simplify the description of context-free languages and characterize languages that are not context-free. The use of negation, however, leads to the possibility of introducing rules that interplay in such a way which is problematic to handle in the classical, two-valued logical setting. Here we define a three valued interpretation to deal with such contradictory grammars using a method introduced originally in the context of logic programming, and present an algorithm to determine the membership status of strings with respect to the resulting three valued languages.
翻译:布尔文法通过扩展处理同一非终结符的不同规则时的可能性,推广了上下文无关重写。它们不仅允许析取(如通常的上下文无关文法),还允许合取和否定作为具有相同左侧的不同规则之间的可能连接,从而能够简化上下文无关语言的描述并刻画非上下文无关语言。然而,否定的使用可能导致引入以某种方式相互作用的规则,这在经典二值逻辑框架中难以处理。本文定义了一种三值解释来处理此类矛盾文法,该方法最初在逻辑编程的背景下提出,并给出了一种算法来确定字符串在所得三值语言中的成员资格状态。