Using_Prolog_as_the_AST

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
  1. 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.

    Consider using Datalog (the incredible subset of Prolog) for this perfect use case. Compared to Prolog, you get:

    1. Free de-duplication. No more debugging why a predicate is returning the same result more than once.

    2. Commutativity. Order of predicates does not change the result. Finally, true logic programming!

    3. Easy static analysis. There are many papers that describe how to do points-to analysis (and other similar techniques) with Datalog rules that fit on a single page :O

    Souffle[0] is a mature Datalog that is highly performant and has many nice features. I highly recommend playing with it!

    [0] https://souffle-lang.github.io

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. prusti-dev

    A static verifier for Rust, based on the Viper verification infrastructure.

    > The overall goal would be to figure out classical error conditions like nill pointers deference.

    > If I can figure out if a pointer will be nil in some execution branch, there is no reason why a computer cannot do the same.

    Note, this is called flow-sensitive typing (also called type narrowing) and I think that typescript does it.

    https://en.wikipedia.org/wiki/Flow-sensitive_typing

    > I personally would see this as an human race level upgrades. Imagine feeding your code to a CI that spit back something like: "you will have a panic at line 156 when your input is > 4"

    A model checker can do that!

    See this

    https://model-checking.github.io/kani/tutorial-kinds-of-fail...

    Other techniques are also possible

    https://github.com/viperproject/prusti-dev#quick-example

    (Here I could link a lot of things, I just selected two Rust projects to illustrate)

    This works better if you are able to provide contracts in your API that says which guarantees you provide. Alternatively, asserts are useful too.

  4. tree-edit

    🌲 Structural editing in Emacs for any™ language!

    I am using this idea to build an ai-first, reactive IDE (after talking to marcelle, who's brilliant). DM me at @eating_entropy on Twitter or email me at [email protected] if you are interested.

    Also it seems tree-edit implements something similar using reazon, a relational language library in elisp.

    https://github.com/ethan-leba/tree-edit

  5. chalk-ndm

    A PROLOG-ish interpreter written in Rust, intended eventually for use in the compiler

    Here's Niko Matsakis's embeddable logic engine in rust, to be used in the rust compiler's type system.

    https://github.com/nikomatsakis/chalk-ndm

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How to Get Started with Tree-Sitter

    4 projects | /r/emacs | 28 May 2023
  • How to use Emacs 29 Tree-sitter?

    12 projects | /r/emacs | 3 Dec 2022
  • tree-sitter has been merged into master

    3 projects | /r/emacs | 23 Nov 2022
  • regarding feature/tree-sitter branch

    2 projects | /r/emacs | 5 Sep 2022
  • Diffsitter: A Tree-sitter based AST difftool to get meaningful semantic diffs

    1 project | news.ycombinator.com | 7 Mar 2025

Did you know that Rust is
the 5th most popular programming language
based on number of references?