GP 2

The Graph Programming Language

Usage: Build From Source Code

You can compile GP 2 programs using the gp2. From the bin folder, run

./gp2 [-d] [-f] [-g] [-m] [-n] [-q] [-l <libdir>] [-o <outdir>] <program_file>

Compiles gp2-program into C code. The generated code is placed in /tmp/gp2 unless an alternate location is specified with the -o flag.

To execute the generated code, run ./build.sh and ./gp2run <graph_file> from /tmp/gp2.

This will generate a file “gp2.output” containing the output graph.

Before executing, you may need to copy library files from the source code.

cp <path_to_source_code_directory>/lib/*.{c,h} ./gp2_code_temp/

If GP 2 is installed in a non-standard directory, use the -l option to ensure the generated code can be compiled and executed.

The following is the list of compiler flags:

The compiler can also be used to validate GP 2 source files.