HN
Today

A ZIP-style Prolog VM for trilog

A new project, zipc, is building a Prolog virtual machine (VM) in C based on a classic 1984 design. This deep dive into VM architecture aims to significantly boost the performance of the trilog Prolog interpreter. It's a fascinating look at how foundational computer science principles can be resurrected for modern optimization challenges.

3
Score
0
Comments
#14
Highest Rank
6h
on Front Page
First Seen
Nov 11, 7:00 AM
Last Seen
Nov 11, 12:00 PM
Rank Over Time
271421182529

The Lowdown

The zipc project is an ambitious work-in-progress to create a Prolog virtual machine, implemented in C, that adheres to the specifications of the "ZIP" abstract machine. This ZIP design, originating from Clocksin's 1984 seminal work, is being revived to potentially serve as a high-performance backend for the trilog Prolog interpreter.

  • zipc is designed as a standalone, faster Prolog compilable runtime, with the primary objective of outperforming trilog's current runtime.
  • The expectation is that compiling Prolog clauses to the ZIP VM will result in fewer instructions and reduced memory consumption, directly addressing trilog's performance goals.
  • The system comprises two main components: a compiler, written in Prolog and running on Scryer Prolog, that generates a binary image; and a C-based VM that loads and executes this binary.

Ultimately, zipc represents an effort to leverage established, efficient VM architectures to enhance the speed and memory footprint of modern Prolog execution environments, specifically targeting the trilog project.