Code Monkey home page Code Monkey logo

gp2-interpreter's Introduction

GP 2: Graph Programming

Authors: Chris Bak and Glyn Faulkner (May 14th 2015)

GP 2 is a graph programming language. Graph programs consist of two text files. The first is a specification of the graph program, namely a set of graph transformation rules and a procedural-style command sequence to organise rule application. The second describes an initial host graph to which the graph program is applied. These text files can be written in a text editor. A graphical editor is under development to construct programs visually. Graph programs are executed by either passing them to an interpreter, or by compiling to native code.

Compiler

The Compiler directory contains a C compiler that translates GP 2 textual programs to executable C code. Instructions for building and running the compiler are contained in the directory.

Haskell

The Haskell directory contains a reference interpreter for GP 2 implemented in Haskell, a compiler that generates OILR Machine instructions (see below), and several ancillary tools for viewing and testing GP 2 host graphs.

Typing make in the Haskell directory produces the following binaries:

gp2: The GP2 reference interpreter.

gp2c: The OILR machine compiler, which generates a C file that can be compiled and linked against the OILR Machine runtime.

ViewGraph: A host graph visualiser (using GraphViz as a back-end).

IsoChecker: A standalone host graph comparison tool, which checks whether two host graphs are isomorphic.

OilrMachine

The OILR machine is a specialised graph language abstract machine.

Build instructions (basic graph data structure)

Typing make in the OilrMachine directory builds the OILR runtime, oilrrt.a using a simplistic graph representation.

Build instructions (full graph data structure)

To build the OILR runtime using the full graph data structure:

make -f Makefile.gp2

Compiling GP 2 programs

Compile a GP 2 program to C:

gp2c prog.gp2 graph.host

To compile a GP 2 program generated by gp2c, you will need the runtime static library, and the two header files oilrrt.h and oilrinst.h.

gcc -o prog prog.c oilrrt.a

gp2-interpreter's People

Contributors

briancourtehoute avatar

Stargazers

Milad avatar

Watchers

Mike Dodds avatar Glyn avatar Matt Windsor avatar James Cloos avatar Ivaylo avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.