- GrGen
GrGen.NET (Graph Rewrite GENerator, .NET version) is a
graph transformation tool which generates efficient C#-code (or .NET-assemblies) out of declarative graph rewrite rule specifications.
Graphs and graph rewrite rules are specified by intuitive domain specific languages (semantics based on the SPO-approach, DPO available as well); they may get used from graph rewrite sequences, a simple, yet for most graph transformation tasks sufficient, special purpose programming language, or via anAPI by any .NET language.GrGen is meant to be used for generating the algorithmic kernel of applications processing graph structured data (program graphs, social nets, chemical structures, ...). For rapid prototyping and debugging, an interactive shell and a (VCG-)graph viewer are included in the package, which executes underWindows andLinux (Mono required) and isopen source available underGPL v3.Specification sample
An example containing some graph model and rule specifications from the GrGen.NET-solution to the [http://www.fots.ua.ac.be/events/grabats2008/cases/grabats2008performancecase.pdf AntWorld-challenge] posed at [http://www.fots.ua.ac.be/events/grabats2008 Grabats 08] .
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:GridNodeAntHill; 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:GridNodeAntHill; negative { n <-:PathToHill-; } return (n); }
External links
* Homepage of the [http://www.grgen.net GrGen.NET] -project
* [http://www.info.uni-karlsruhe.de/software/grgen/GrGenNET-Manual.pdf GrGen.NET User Manual]
* [http://www.info.uni-karlsruhe.de/software/grgen/agtive_2007_grgennet.pdf Short introduction into GrGen.NET]Conference papers
* [http://www.springerlink.com/content/291511p891rn6616 GrGen: A Fast SPO-Based Graph Rewriting Tool] / [http://www.info.uni-karlsruhe.de/papers/grgen_icgt2006.pdf] - ICGT 06
* [http://www-users.cs.york.ac.uk/~det/Papers/agtive.07.pdf Generation of Sierpinski Triangles: A Case Study for Graph Transformation Tools] - AGTIVE 07
* [http://www.info.uni-karlsruhe.de/papers/agtive_2007_firm.pdf Graph Rewriting for Hardware Dependent Program Optimizations] - AGTIVE 07
* [http://www.info.uni-karlsruhe.de/papers/agtive_2007_search_plan.pdf A First Experimental Evaluation of Search Plan Driven Graph Pattern Matching] - AGTIVE 07
* [http://www.ipd.uka.de/Tichy/uploads/publikationen/180/gramot2-gelhausen.pdf Customizing GrGen.NET for Model Transformation] - GraMoT 08
* [http://www.informatik.uni-bremen.de/~hof/papers/08-GCM.pdf Graph Rewrite Rules with Structural Recursion] - ICGT/GCM 08See also
*
Graph transformation
*Graph rewriting
*Domain Specific Language (DSL)
* Source Code Generation
Wikimedia Foundation. 2010.