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.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.