Soufflé (programming language)
Soufflé is an open source parallel logic programming language, influenced by Datalog. Soufflé includes both an interpreter and a compiler that targets parallel C++. Soufflé has been used to build static analyzers, disassemblers, and tools for binary reverse engineering. Soufflé is considered by academic researchers to be high-performance and "state of the art," and is often used in benchmarks in academic papers.
Programming examples
Given a set of edges in a graph, the following program computes the set of (directed) paths between any two nodes. This is also known as the transitive closure of the edge
relation.
.decl edge(x:number, y:number)
.input edge
.decl path(x:number, y:number)
.output path
path(x, y) :- edge(x, y).
path(x, y) :- path(x, z), edge(z, y).
Features
- An interpreter and a compiler that targets parallel C++ (C++ that uses OpenMP). Both the interpreter and compiler use semi-naïve evaluation.
- Stratified negation
- Aggregation
- Automatic index selection
- Specialized parallel data structures, including disjoint-sets, B-trees, and tries.
- Static typing
- Records and algebraic data types
- A foreign function interface
Related tools
In addition to a compiler and an interpreter, the Soufflé project also publishes:
- a profiler,
- a "provenance"-based debugger,
- an "auto-scheduler" (also called a "join optimizer") that chooses efficient query plans based on a profile, as in profile-guided optimization.
Applications
Soufflé has been used to build static analyzers, including:
- A pointer analysis for Java
- A control-flow analysis for Scheme
- Various analyses for smart contract languages
It has also been used to build tools for binary analysis, including reverse engineering, and disassemblers.
References
Sources
- Jordan, Herbert; Scholz, Bernhard; Subotić, Pavle (2016). "Soufflé: On Synthesis of Program Analyzers". In Chaudhuri, Swarat; Farzan, Azadeh (eds.). Computer Aided Verification. Lecture Notes in Computer Science. Vol. 9780. Cham: Springer International Publishing. pp. 422–430. doi:10.1007/978-3-319-41540-6_23. ISBN 978-3-319-41540-6. S2CID 7428346.
- Antoniadis, Tony; Triantafyllou, Konstantinos; Smaragdakis, Yannis (2017-06-18). "Porting doop to Soufflé". Proceedings of the 6th ACM SIGPLAN International Workshop on State of the Art in Program Analysis. SOAP 2017. New York, NY, USA: Association for Computing Machinery. pp. 25–30. doi:10.1145/3088515.3088522. ISBN 978-1-4503-5072-3. S2CID 3074689.