This article's use of external links may not follow Wikipedia's policies or guidelines.(January 2023) |
Paradigm | Multi-paradigm: declarative, imperative, object-oriented |
---|---|
Developer | Sebastian Hack, Rubino Geiss, Moritz Kroll, Edgar Jakumeit, and others |
First appeared | 2003 |
Stable release | GrGen.NET 4.5 / April 9, 2017 |
Typing discipline | Static, partly dynamic, strong, safe, nominative |
OS | Cross-platform (multi-platform) |
License | GNU Lesser General Public License |
Website | grgen |
GrGen.NET is a software development tool that offers programming languages (domain-specific languages) that are optimized for the processing of graph structured data. The core of the languages consists of modular graph rewrite rules, which are built on declarative graph pattern matching and rewriting; they are supplemented by many of the constructs that are used in imperative and object-oriented programming, and are completed with language devices known from database query languages.
The Graph Rewrite GENerator compiles the languages into efficient CLI assemblies (via C#-Code in an intermediate step), which can be integrated via an API into code written in any .NET-language. GrGen can be executed under Windows and Linux (Mono needed) and is open source available under LGPL v3.
For rapid prototyping and debugging, an interactive shell and a (VCG-)graph viewer are included in the package. With its languages and its visual and stepwise debugging, GrGen allows one to develop at the natural level of abstraction of graph-based representations, such as those employed in engineering, model transformation, computational linguistics, or compiler construction (as intermediate representation).
GrGen increases productivity for those kinds of tasks far beyond what can be achieved by programming in a traditional programming language; due to many implemented performance optimizations it still allows one to achieve high-performance solutions. Its authors claim that the system offers the highest combined speed of development and execution available for the algorithmic processing of graph-based representations (based on their performance regarding diverse tasks posed at different editions of the Transformation Tool Contest (/GraBaTs)).
Below is an example containing a graph model and rule specifications from the GrGen.NET-solution to the AntWorld-case Archived 2011-08-10 at the Wayback Machine posed at Grabats 08 Archived 2012-11-29 at archive.today .
Graph model:
node class GridNode { food:int; pheromones:int; } node class GridCornerNode extends GridNode; node class AntHill extends GridNode { foodCountdown:int = 10; } node class Ant { hasFood:boolean; } edge class GridEdge connect GridNode[1] -> GridNode[1]; edge class PathToHill extends GridEdge; edge class AntPosition;
Rewrite rules:
rule TakeFood(curAnt:Ant) { curAnt -:AntPosition-> n:GridNode\AntHill; if { !curAnt.hasFood && n.food > 0; } modify { eval { curAnt.hasFood = true; n.food = n.food - 1; } } } rule SearchAlongPheromones(curAnt:Ant) { curAnt -oldPos:AntPosition-> old:GridNode <-:PathToHill- new:GridNode; if { new.pheromones > 9; } modify { delete(oldPos); curAnt -:AntPosition-> new; } } test ReachedEndOfWorld(curAnt:Ant) : (GridNode) { curAnt -:AntPosition-> n:GridNode\AntHill; negative { n <-:PathToHill-; } return (n); }
Flood fill, also called seed fill, is a flooding algorithm that determines and alters the area connected to a given node in a multi-dimensional array with some matching attribute. It is used in the "bucket" fill tool of paint programs to fill connected, similarly-colored areas with a different color, and in games such as Go and Minesweeper for determining which pieces are cleared. A variant called boundary fill uses the same algorithms but is defined as the area connected to a given node that does not have a particular attribute.
The travelling salesman problem asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?" It is an NP-hard problem in combinatorial optimization, important in theoretical computer science and operations research.
In computer science, a control-flow graph (CFG) is a representation, using graph notation, of all paths that might be traversed through a program during its execution. The control-flow graph was discovered by Frances E. Allen, who noted that Reese T. Prosser used boolean connectivity matrices for flow analysis before.
In computer science, a compiler-compiler or compiler generator is a programming tool that creates a parser, interpreter, or compiler from some form of formal description of a programming language and machine.
In graph theory, a cycle in a graph is a non-empty trail in which only the first and last vertices are equal. A directed cycle in a directed graph is a non-empty directed trail in which only the first and last vertices are equal.
A state diagram is a type of diagram used in computer science and related fields to describe the behavior of systems. State diagrams require that the system described is composed of a finite number of states; sometimes, this is indeed the case, while at other times this is a reasonable abstraction. Many forms of state diagrams exist, which differ slightly and have different semantics.
In computer science and operations research, the ant colony optimization algorithm (ACO) is a probabilistic technique for solving computational problems which can be reduced to finding good paths through graphs. Artificial ants stand for multi-agent methods inspired by the behavior of real ants. The pheromone-based communication of biological ants is often the predominant paradigm used. Combinations of artificial ants and local search algorithms have become a method of choice for numerous optimization tasks involving some sort of graph, e.g., vehicle routing and internet routing.
Houdini is a 3D animation software application developed by Toronto-based SideFX, who adapted it from the PRISMS suite of procedural generation software tools. The procedural tools are used to produce different effects such as complex reflections, animations and particles system. Some of its procedural features have been in existence since 1987.
In computer science, an abstract semantic graph (ASG) or term graph is a form of abstract syntax in which an expression of a formal or programming language is represented by a graph whose vertices are the expression's subterms. An ASG is at a higher level of abstraction than an abstract syntax tree, which is used to express the syntactic structure of an expression or program.
In computer science, graph transformation, or graph rewriting, concerns the technique of creating a new graph out of an original graph algorithmically. It has numerous applications, ranging from software engineering to layout algorithms and picture generation.
In computer programming, unreachable code is part of the source code of a program which can never be executed because there exists no control flow path to the code from the rest of the program.
In computer programming languages, Switch statements function somewhat similarly to the if
statement used in programming languages like C/C++, C#, Visual Basic .NET, Java and exists in most high-level imperative programming languages such as Pascal, Ada, C/C++, C#, Visual Basic .NET, Java, and in many other types of language, using such keywords as switch
, case
, select
or inspect
.
EiffelStudio is a development environment for the Eiffel programming language developed and distributed by Eiffel Software.
In computing, algorithmic skeletons, or parallelism patterns, are a high-level parallel programming model for parallel and distributed computing.
Elastic maps provide a tool for nonlinear dimensionality reduction. By their construction, they are a system of elastic springs embedded in the data space. This system approximates a low-dimensional manifold. The elastic coefficients of this system allow the switch from completely unstructured k-means clustering to the estimators located closely to linear PCA manifolds. With some intermediate values of the elasticity coefficients, this system effectively approximates non-linear principal manifolds. This approach is based on a mechanical analogy between principal manifolds, that are passing through "the middle" of the data distribution, and elastic membranes and plates. The method was developed by A.N. Gorban, A.Y. Zinovyev and A.A. Pitenko in 1996–1998.
A term graph is a representation of an expression in a formal language as a generalized graph whose vertices are terms. Term graphs are a more powerful form of representation than expression trees because they can represent not only common subexpressions but also cyclic/recursive subexpressions.
Nim is a general-purpose, multi-paradigm, statically typed, compiled systems programming language, designed and developed by a team around Andreas Rumpf. Nim is designed to be "efficient, expressive, and elegant", supporting metaprogramming, functional, message passing, procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages as intermediate representations.
Bazel is a free software tool used for the automation of building and testing software. The company Google uses the build tool Blaze internally and released an open-sourced port of the Blaze tool as Bazel, named as an anagram of Blaze. Bazel was first released in March 2015 and achieved beta status by September 2015.
In computer science, a linear graph grammar is a class of graph grammar on which nodes have a number of ports connected together by edges and edges connect exactly two ports together. Interaction nets are a special subclass of linear graph grammars in which rewriting is confluent.
In computer science, an e-graph is a data structure that stores an equivalence relation over terms of some language.