12,764 research outputs found
Object Grammars: Compositional & Bidirectional Mapping Between Text and Graphs
Abstract: Object Grammars define mappings between text and object graphs. Parsing recognizes syntactic features and creates the corresponding object structure. In the reverse direction, formatting recognizes object graph features and generates an appropriate textual presentation. The key to Object Grammars is the expressive power of the mapping, which decouples the syntactic structure from the graph structure. To handle graphs, Object Grammars support declarative annotations for resolving textual names that refer to arbitrary objects in the graph structure. Predicates on the semantic structure provide additional control over the mapping. Furthermore, Object Grammars are compositional so that languages may be defined in a modular fashion. We have implemented our approach to Object Grammars as one of the foundations of the EnsÅ system and illustrate the utility of our approach by showing how it enables definition and composition of domain-specific languages (DSLs)
Graph Grammars, Insertion Lie Algebras, and Quantum Field Theory
Graph grammars extend the theory of formal languages in order to model
distributed parallelism in theoretical computer science. We show here that to
certain classes of context-free and context-sensitive graph grammars one can
associate a Lie algebra, whose structure is reminiscent of the insertion Lie
algebras of quantum field theory. We also show that the Feynman graphs of
quantum field theories are graph languages generated by a theory dependent
graph grammar.Comment: 19 pages, LaTeX, 3 jpeg figure
The design and implementation of Object Grammars
An Object Grammar is a variation on traditional BNF grammars, where the notation is extended to support declarative bidirectional mappings between text and object graphs. The two directions for interpreting Object Grammars are parsing and formatting. Parsing transforms text into an object graph by recognizing syntactic features and creating the corresponding object structure. In the reverse direction, formatting recognizes object graph features and generates an appropriate textual presentation. The key to Object Grammars is the expressive power of the mapping, which decouples the syntactic structure from the graph structure. To handle graphs, Object Grammars support declarative annotations for resolving textual names that refer to arbitrary objects in the graph structure. Predicates on the semantic structure provide additional control over the mapping. Furthermore, Object Grammars are compositional so that languages may be defined in a modular fashion. We have implemented our approach to Object Grammars as one of the foundations of the Ens (o) over bar system and illustrate the utility of our approach by showing how it enables definition and composition of domain-specific languages (DSLs). (C) 2014 Elsevier B.V. All rights reserved.</p
Nested Term Graphs (Work In Progress)
We report on work in progress on 'nested term graphs' for formalizing
higher-order terms (e.g. finite or infinite lambda-terms), including those
expressing recursion (e.g. terms in the lambda-calculus with letrec). The idea
is to represent the nested scope structure of a higher-order term by a nested
structure of term graphs.
Based on a signature that is partitioned into atomic and nested function
symbols, we define nested term graphs both in a functional representation, as
tree-like recursive graph specifications that associate nested symbols with
usual term graphs, and in a structural representation, as enriched term graph
structures. These definitions induce corresponding notions of bisimulation
between nested term graphs. Our main result states that nested term graphs can
be implemented faithfully by first-order term graphs.
keywords: higher-order term graphs, context-free grammars, cyclic
lambda-terms, higher-order rewrite systemsComment: In Proceedings TERMGRAPH 2014, arXiv:1505.0681
Generating Instance Graphs from Class Diagrams with Adaptive Star Grammars
In model-driven software engineering, class diagrams are used to define the structure of object-oriented software and valid object configurations, i.e., what objects may occur in a program and how they are related. Object configurations are essentially graphs, so that class diagrams define graph languages. Class diagrams are declarative, i.e., it is quite easy to check whether a graph is an instance of a class diagram. Graph grammars, on the other hand, define a graph language by derivation and are thus well suited for constructing instance graphs. This paper describes how a class diagram can be translated into a graph grammar that defines the same graph language as the original class diagram. Such a graph grammar may then be used for, e.g., automatically generating valid object configurations as test cases. In contrast to earlier attempts, the presented approach allows to translate class diagrams with arbitrary multiplicities, unique and non-unique associations, composition associations, class generalization, association subsetting and redefinition. This is made possible by using adaptive star grammars, a special kind of graph grammars
Modeling Graphs with Vertex Replacement Grammars
One of the principal goals of graph modeling is to capture the building
blocks of network data in order to study various physical and natural
phenomena. Recent work at the intersection of formal language theory and graph
theory has explored the use of graph grammars for graph modeling. However,
existing graph grammar formalisms, like Hyperedge Replacement Grammars, can
only operate on small tree-like graphs. The present work relaxes this
restriction by revising a different graph grammar formalism called Vertex
Replacement Grammars (VRGs). We show that a variant of the VRG called
Clustering-based Node Replacement Grammar (CNRG) can be efficiently extracted
from many hierarchical clusterings of a graph. We show that CNRGs encode a
succinct model of the graph, yet faithfully preserves the structure of the
original graph. In experiments on large real-world datasets, we show that
graphs generated from the CNRG model exhibit a diverse range of properties that
are similar to those found in the original networks.Comment: Accepted as a regular paper at IEEE ICDM 2019. 15 pages, 9 figure
On congruences of automata defined by directed graphs
Graphs and various objects derived from them are basic
essential tools that have been actively used in various
branches of modern theoretical computer science. In
particular, graph grammars and graph transformations have
been very well explored in the literature.
We consider finite state automata defined by directed graphs,
characterize all their congruences, and
give a complete description of all automata of this type
satisfying three properties for congruences introduced and
considered in the literature by analogy with classical
semisimplicity conditions that play important roles in
structure theory
Defining Models - Meta Models versus Graph Grammars
The precise specification of software models is a major concern in model-driven design of object-oriented software. Metamodelling and graph grammars are apparent choices for such specifications. Metamodelling has several advantages: it is easy to use, and provides procedures that check automatically whether a model is valid or not. However, it is less suited for proving properties of models, or for generating large sets of example models. Graph grammars, in contrast, offer a natural procedure - the derivation process - for generating example models, and they support proofs because they define a graph language inductively. However, not all graph grammars that allow to specify practically relevant models are easily parseable. In this paper, we propose contextual star grammars as a graph grammar approach that allows for simple parsing and that is powerful enough for specifying non-trivial software models. This is demonstrated by defining program graphs, a language-independent model of object-oriented programs, with a focus on shape (static structure) rather than behavior
DPO Rewriting and Abstract Semantics via Opfibrations
AbstractThe classical DPO graph rewriting construction is re-expressed using the opfibration approach introduced originally for term graph rewriting. Using a skeleton category of graphs, a base of canonical graphs-in-context, with DPO rules as arrows, and with categories of redexes over each object in the base, yields a category of rewrites via the discrete Grothendieck construction. The various possible ways of combining rules and rewrites leads to a variety of functors amongst the various categories formed. Categories whose arrows are rewriting sequences have counterparts where the arrows are elementary event structures, and an event structure semantics for arbitrary graph grammars emerges naturally
Ten virtues of structured graphs
This paper extends the invited talk by the first author about the virtues
of structured graphs. The motivation behind the talk and this paper relies on our
experience on the development of ADR, a formal approach for the design of styleconformant,
reconfigurable software systems. ADR is based on hierarchical graphs
with interfaces and it has been conceived in the attempt of reconciling software architectures
and process calculi by means of graphical methods. We have tried to
write an ADR agnostic paper where we raise some drawbacks of flat, unstructured
graphs for the design and analysis of software systems and we argue that hierarchical,
structured graphs can alleviate such drawbacks
- ā¦