percival
c-semantics
percival | c-semantics | |
---|---|---|
12 | 4 | |
571 | 301 | |
- | 0.7% | |
0.0 | 1.8 | |
about 1 year ago | over 2 years ago | |
Rust | C | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
percival
-
Learn Datalog Today
Souffle and Cozo mentioned below already implement the whole of "traditional" datalog.
Percival (https://github.com/ekzhang/percival) has some very nice examples showing how you can interactively write and test rules on top of a datalog interpreter.
Bud (http://bloom-lang.net/bud/) is Hellerstein's proof of concept playground. It has bit-rotted in the past few years, but the examples are readable even if you can't easily get it working.
The complexity can be quite good. You can syntactically determine when you've written linear recursion (equivalent to a for loop) vs not. Otherwise, the complexity is what you'd expect from incremental view maintenance in a normal SQL database. Which is to say O(n^k) with k being the number of relations joined, but usually much, much less with appropriate indexes and skew in the data. All the usual tricks concerning data normalization and indexes from databases apply.
-
Soufflé: A Datalog Synthesis Tool for Static Analysis
I've worked on percival a bit, it compiles (transpiles?) the datalog ast into javascript code on demand and executes it to get the results, see [1]. Percival's creator, Eric, also submitted a 10m presentation about the project [2] to the HYTRADBOI 'virtual conference' earlier this year [2]. They also submitted a Show HN that received a couple comments [3]. The Have You Tried Rubbing A Database On It conference included several awesome presentations featuring datalog, which readers may find interesting [4].
[1]: https://github.com/ekzhang/percival/blob/main/crates/perciva...
[2]: https://www.hytradboi.com/2022/percival-a-reactive-language-...
[3]: https://news.ycombinator.com/item?id=29521975
[4]: https://www.hytradboi.com/
-
Chumsky, a Rust parser-combinator library with error recovery
I haven't written a parser with Chumsky, bit I've played with a little one a bit if you wanna see an example syntax. The error reporting for this project is implemented with `ariadne` which is also really slick.
Parser: https://github.com/ekzhang/percival/blob/main/crates/perciva...
Error reporting: https://github.com/ekzhang/percival/blob/main/crates/perciva...
Datalog playground: https://percival.ink/
To see an error report, delete some punctuation from one of the Datalog code blocks then press shift-return.
- Show HN: Percival – Web-based reactive Datalog notebooks, made with Rust+Svelte
- Percival: Web-based, reactive Datalog notebooks for data analysis and visualization, written in Rust and Svelte
c-semantics
- The C Bounded Model Checker: Criminally Underused
-
Soufflé: A Datalog Synthesis Tool for Static Analysis
https://github.com/kframework/c-semantics while you can do static analysis with this the dynamic instrumentation of UB isnfar more thorough than ubsan
-
Mildly Interesting Quirks of C
> "Who Says C is Simple?"
People who don't know what "simple" means and confuse it with "easy".
https://www.entropywins.wtf/blog/2017/01/02/simple-is-not-ea...
https://www.infoq.com/presentations/Simple-Made-Easy/
"Easy" things almost always lead to astonishing complexity.
Also it's easy to see just how complex C is: Have a look at a formal description of it! (And compare to a truly simple language like e.g. LISP).
https://github.com/kframework/c-semantics/tree/master/semant...
In contrast some basic Lambda calculus language semantics fit 0.5 of a pages in K.
https://www.youtube.com/watch?v=eSaIKHQOo4c
https://www.youtube.com/watch?v=y5Tf1EZVj8E
-
Programming language for high performance simulations. Is there anything like this already?
I stopped working on it in 2012, but people have continued working on it since then. The current repository is at https://github.com/kframework/c-semantics, but it includes stuff in addition to C; people have started adding C++ semantics as well.
What are some alternatives?
codeql - CodeQL: the libraries and queries that power security researchers around the world, as well as code scanning in GitHub Advanced Security
cclyzerpp - cclyzer++ is a precise and scalable pointer analysis for LLVM code.
crepe - Datalog compiler embedded in Rust as a procedural macro
taichi - Productive, portable, and performant GPU programming in Python.
modus - A language for building Docker/OCI container images
bakeware - Compile Elixir applications into single, easily distributed executable binaries
cbmc - C Bounded Model Checker
souffle - Soufflé is a variant of Datalog for tool designers crafting analyses in Horn clauses. Soufflé synthesizes a native parallel C++ program from a logic specification.
tis-interpreter - An interpreter for finding subtle bugs in programs written in standard C
async-observable - Async & reactive synchronization model to keep multiple async tasks / threads partially synchronized.
Halide - a language for fast, portable data-parallel computation