Skip to content

Latest commit

 

History

History

godel-script

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

GödelScript

Content

Introduction

GödelScript is designed for creating code analysis libraries and programs, and compiling them to soufflé more easily. With it's Object-Oriented features, it has great maintainability and readability.

@output
pub fn hello() -> string {
    return "Hello World!"
}

Documents

Compilation

Structure of this project:

.
|-- docs                godel-script documents
|-- godel-backend       godel-script backend
|   |-- extension       godel-script souffle extension
|   |-- souffle         souffle source code
|   +-- tools           souffle build tools
+-- godel-frontend      godel-script frontend
    +-- src             godel-frontend source code

Environment

Need C++ standard at least -std=c++17.

On Ubuntu, you are expected to install the following packages before compiling.

sudo apt install -y git build-essential libffi-dev m4 cmake libsqlite3-dev zlib1g-dev

For convenience, we recommend directly using the Dev Container plugin of VSCode. The configuration files are in godel-script/.devcontainer/.

Apply Patch On Soufflé Submodule

GödelScript uses a self-modified soufflé from a much older branch of public soufflé. Use these commands to clone.

git submodule init
git submodule update --recursive

Now we use patch to make sure it could be built successfully. Use these commands to apply patch:

cd godel-backend/souffle
git am ../0001-init-self-used-souffle-from-public-souffle.patch

Use these commands to revert:

cd godel-backend/souffle
git apply -R ../0001-init-self-used-souffle-from-public-souffle.patch
git reset HEAD~

Build GödelScript

Use command below:

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE:STRING=Release 
cmake --build .

After building, you'll find build/godel in the build folder.

Usage

Use this command for help:

godel -h

Compile GödelScript to Target Soufflé

godel -p {godel library directory} {input file} -s {soufflé output file} -O2

We suggest to use -O2 for stable optimizations.

Directly Run GödelScript

godel -p {godel library directory} {input file} -r -O2 -f {database directory}

We suggest to use -O2 for stable optimizations.

-r means directly run soufflé.