hn.today

A ZIP-style Prolog VM for trilog

github.com33 points10 comments
Screenshot of A ZIP-style Prolog VM for trilog

ZIPC is a work-in-progress implementation of a Prolog compiler and virtual machine written in C. It uses ZIP, an abstract Prolog machine described by William Clocksin in a 1984 work on sequential Prolog machines; related papers are included in the project’s documentation. The immediate aim is to build enough of the VM to compare its performance with trilog’s existing runtime, rather than to present a finished or benchmarked system.

The compiler is written in Prolog and runs on Scryer Prolog. It translates Prolog programs into a binary image that the C-based VM loads and executes. The project is motivated by trilog’s current approach, which interprets clauses as terms using the ABC algorithm: compiling those same programs to ZIP is expected to reduce both instruction count and memory use, helping trilog’s intended use case. If the initial implementation proves useful, ZIPC could become trilog’s backend; alternatively, it may remain a separate Prolog runtime that compiles programs. The project has not settled that direction, and its stated goal is still exploratory.

Read on github.com10 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Ggml v1.0.0

Ggml v1.0.0

ggml 1.0.0 removes deprecated public APIs and legacy DIAG_MASK operations, while adding configurable YaRN truncation and FP8 support. It also improves backend performance with quantized matrix multiplication, fused MoE operations, and new attention and scheduling paths. (github.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.