In graph grammars based on borrowing hyperedge replacement (BHR), a production replaces a hyperedge by a hypergraph that contains borrowed nodes, which are later contracted with other nodes of the graph being derived. In contrast to context-free hyperedge replacement, this allows graph languages of unbounded treewidth to be defined. Here we further equip the productions of BHR grammars with conditions, which are specified by graph formulas that may require (or forbid) the existence of paths of arbitrary length in the graphs of the language. This is defined in such a way that the top-down parsers for BHR grammars devised in earlier work can be extended to verify these conditions.
Graph-based modeling plays a fundamental role in many areas of computer science. In this paper, we introduce systems of graph formulas with variables for specifying graph properties; this notion generalizes the graph formulas introduced in earlier work by incorporating recursion. We show that these formula systems have the same expressive power as alternating graph automata, a computational model that extends traditional finite-state automata to graphs, and allows both existential and universal states. In particular, we provide a bidirectional translation between formula systems and alternating graph automata, proving their equivalence in specifying graph languages. This result implies that alternating graph automata can be naturally represented using logic-based formulations, thus bridging the gap between automata-theoretic and logic-based approaches to graph language specification.
Graphs are widely used in various domains to model complex relationships, often requiring the specification and verification of their properties. These properties may involve complex conditions placing, e.g., structural requirements on subgraphs of unbounded size. In this paper, we propose graph formulas as a new formalism for specifying graph properties, providing a higher level of "graphical" abstraction compared to well-known approaches such as monadic second-order logic. We show how these graph formulas can be translated into alternating graph automata, allowing to check computationally difficult graph properties, such as the existence or non-existence of Hamiltonian paths.
Engelfriet and Vereijken have shown that linear graph grammars based on hyperedge replacement generate graph languages that can be considered as interpretations of regular string languages over typed symbols. In this paper we show that finite automata can be lifted from strings to graphs within the same framework. For the efficient recognition of graphs with these automata, we make them deterministic by a modified powerset construction, and state sufficient conditions under which deterministic finite graph automata recognize graphs without the need to use backtracking.
In many application areas, it is necessary to specify and check properties of graphs. Such properties may be complex, placing structural requirements on graph regions of unbounded size. In this paper, we show that alternating graph automata can check such graph properties, e.g., whether a given input graph is a tree, or whether it contains a Hamiltonian cycle or not. In fact, we show that these automata can accept PSPACE-complete graph languages, and that their uniform membership problem is contained in PSPACE when only automata without permutation cycles are considered.
Graph grammars based on contextual hyperedge replacement (CHR) extend the generative power of the well-known hyperedge replacement (HR) grammars to an extent that makes them useful for practical modeling. Recent work has shown that acyclicity is a key condition for parsing CHR grammars efficiently. In this paper we show that acyclicity of CHR grammars is decidable and that the generative power of acyclic CHR grammars lies strictly between that of HR grammars and unrestricted CHR grammars.
Contextual hyperedge replacement (CHR) strengthens the generative power of hyperedge replacement (HR) significantly, thus increasing its usefulness for practical modeling. We define top-down parsing for CHR grammars by graph transformation, and prove that it is correct as long as the generation and use of context nodes in productions does not create cyclic dependencies. An efficient predictive version of this algorithm can be obtained as in the case of HR grammars.
Hyperedge replacement (HR) allows to define context-free graph languages, but parsing is NP-hard in the general case. Predictive top-down (PTD) is an efficient, backtrack-free parsing algorithm for subclasses of HR and contextual HR grammars, which has been described and implemented in earlier work, based on a representation of graphs and grammar productions as strings. In this paper, we define PTD parsers for HR grammars by graph transformation rules and prove that they are correct.
Embedded systems are mainly modeled by using Matlab's Simulink and Stateflow tools. Matlab's Simulink is a tool for modeling, simulating and analyzing software systems and Simulink Stateflow is a control logic tool used to model event-driven systems (Reactive systems) through state machines and flow charts within a Simulink model. In real time, systems undergo frequent changes, thus complexity of the systems grows and testing of the systems become time consuming and expensive even if changes occur in small parts of the system. So, these models need formal verification. In this paper, we focus on event-driven systems which are captured by Simulink Stateflow model. For this, we propose an algorithm generateFSM in which we first generate an XML file for the Simulink Stateflow model of a system. Then, we parse that XML file following top-down approach by using an XML parser. Next, we generate a
Hyperedge replacement (HR) grammars can generate NP-complete graph languages, which makes parsing hard even for fixed HR languages. Therefore, we study predictive shift-reduce (PSR) parsing that yields efficient parsers for a subclass of HR grammars, by generalizing the concepts of SLR(1) string parsing to graphs. We formalize the construction of PSR parsers and show that it is correct. PSR parsers run in linear space and time, and are more efficient than the predictive top-down (PTD) parsers recently developed by the authors.
Parsing with respect to grammars based on hyperedge replacement (HR) is NP-hard in general, even for some fixed grammars. In recent work, we have devised predictive shift-reduce parsing (PSR), a very efficient algorithm that applies to a wide subclass of HR grammars. In this paper, we extend PSR parsing to contextual HR grammars, a moderate extension of HR grammars that have greater generative power, and are therefore better suited for the practical specification of graph and diagram languages. Although the extension requires considerable modifications of the original algorithm, it turns out that the resulting parsers are still very efficient.
Parsing for graph grammars based on hyperedge replacement (HR) is in general NP-hard, even for a particular grammar. The recently developed predictive shift-reduce (PSR) parsing is efficient, but restricted to a subclass of unambiguous HR grammars. We have implemented a generalized PSR parsing algorithm that applies to all HR grammars, and pursues severals parses in parallel whenever decision conflicts occur. We compare GPSR parsers with the Cocke-Younger-Kasami parser and show that a GPSR parser, despite its exponential worst-case complexity, can be much faster.
Predictive shift-reduce (PSR) parsing for a subclass of hyperedge replacement graph grammars has recently been devised by Frank Drewes and the authors. This paper describes in detail how efficient PSR parsers are generated with the Grappa parser generator implemented by Mark Minas. Measurements confirm that the generated parsers run in linear time.
We establish the following specific relation between contextfree grammars that have LL(k) and LR(k) parsers, respectively: after cleaning an SLL(1) grammar (by unfolding its empty productions), the resulting grammar is SLR(1).
Graph languages defined by hyperedge replacement grammars can be NP-complete. We study predictive shift-reduce (PSR) parsing for a subclass of these grammars, which generalizes the concepts of SLR(1) string parsing to graphs. PSR parsers run in linear space and time. In comparison to the predictive top-down (PTD) parsers recently developed by the authors, PSR parsing is more efficient and more general, while the required grammar analysis is easier than for PTD parsing.
The Parikh image of a word abstracts from the order of its letters. Parikh’s famous theorem states that the set of Parikh images of a context-free string language forms a semilinear set that can be effectively computed from its grammar. In this paper we study the computation of Parikh images for graph grammars defined by contextual hyperedge replacement (CHR). Our motivation is to generate efficient predictive top-down (PTD) parsers for a subclass of CHR grammars. We illustrate this by describing the subtask that identifies the nodes of the input graph that parsing starts with.
Graph languages defined by hyperedge replacement grammars can be NP-complete. We invent predictive top-down (PTD) parsers for a subclass of these grammars, similar to recursive descent parsers for string languages. The focus of this paper lies on the grammar analysis that computes neighbor edges of nonterminals, in analogy to the first and follow symbols used in SLL(1) parsing. The analysis checks whether a grammar is PTD parsable and yields all information for generating a parser that runs in linear space and quadratic time.
In GRGEN , a graph rewrite generator tool, rules have the outstanding feature that variables in their pattern and replacement graphs may be refined with meta-rules based on contextual hyperedge replacement grammars. A refined rule may delete, copy, and transform subgraphs of unbounded size and of variable shape. In this paper, we show that rules with contextual refinement can be transformed to stan- dard graph rewrite rules that perform the refinement incrementally, and are applied according to a strategy called residual rewriting. With this transformation, it is possi- ble to state precisely whether refinements can be determined in finitely many steps or not, and whether refinements are unique for every form of refined pattern or not.
In GRGEN, a graph rewrite generator tool, rules have the outstanding feature that variables in their pattern and replacement graphs may be refined with meta-rules based on contextual hyperedge replacement grammars. A refined rule may delete, copy, and transform subgraphs of unbounded size and of variable shape. In this paper, we show that rules with contextual refinement can be transformed to standard graph rewrite rules that perform the refinement incrementally, and are applied according to a strategy called residual rewriting. With this transformation, it is possible to state precisely whether refinements can be determined in finitely many steps or not, and whether refinements are unique for every form of refined pattern or not.
In model-driven design, the structure of software is commonly specified by meta-models like uml class diagrams. In this paper we study how graph grammars can be used for this purpose, using statecharts as an example. We extend context-free hyperedge-replacement—which is not powerful enough for this application—so that rules may not only access the nodes attached to the variable on their left-hand side, but also nodes elsewhere in the graph. Although the resulting notion of contextual hyperedge replacement preserves many properties of the context-free case, it has considerably more generative power—enough to specify software models that cannot be specified by class diagrams.
Mark Minas合作论文数Institute for Software Technology, Department of Computer Science, Bundeswehr University Munich30
Annegret Habel合作论文数Annegret Habel
Universität Oldenburg
Fakultät II
Department für Informatik4
S. Kuske合作论文数Theoretical Comuter Science group2
B. Krieg-Brückner合作论文数Institut fur Informatik, Technische Universitat Munchen1