Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 1013 Bytes

README.md

File metadata and controls

17 lines (9 loc) · 1013 Bytes

souffle-tools

The goal of this package is to provide reliable tooling for the Souffle programming language.

Parsers

This package uses Lark for its parsers.

There are currently two parsers, one for Souffle, and another for the intermediate RAM language used in its compiler. Both parsers have a wrapper which invokes the preprocessor. This simplifies parsing, as we don't need to handle macros/extra source files. The RAM parser wrapper also runs the compiler to generate the RAM program.

The Souffle grammar is mostly complete, but occasionally stumbles when parsing transformed Datalog from the compiler.

The RAM grammar is incomplete, lacking parsing for more advanced language features e.g. subsumption.

Visitors

Currently the most interesting visitor is PyPlanVisitor, which generates a succinct "plan" in (non-functional) Python representing the RAM program generated by the compiler. This is a great aid for hand-tuning Souffle programs.