Design and Implementation of a Multithreaded Virtual Machine for Executing Linear Logic Programs

Flávio Cruz, Ricardo Rocha and Seth Copen Goldstein

September 2014


Abstract

Linear Meld is a concurrent forward-chaining linear logic programming language where logical facts can be asserted and retracted in a structured way. In Linear Meld, a program is seen as a database of logical facts and a set of derivation rules. The database of facts is partitioned by the nodes of a graph structure which leads to parallelism when nodes are executed simultaneously. Due to the foundations on linear logic, rules can retract facts in a declarative and structured fashion, leading to more expressive programs. We present the design and implementation of the virtual machine that we implemented to run Linear Meld on multicores, with particular focus on thread management, code organization, fact indexing, rule execution, and database organization for efficient fact insertion, lookup and deletion. Our results show that the virtual machine is capable of scaling programs with up to 16 threads and also exhibits interesting scalar performance results due to our indexing optimizations.

Bibtex

@InProceedings{cruz-ppdp14,
  author =    {F. Cruz and R. Rocha and S. C. Goldstein},
  title =     {{Design and Implementation of a Multithreaded Virtual Machine for 
                Executing Linear Logic Programs}},
  booktitle = {Proceedings of the International Symposium on Principles and Practice
               of Declarative Programming (PPDP 2014)},
  pages =     {43--53},
  publisher = {ACM},
  editor =    {O. Danvy},
  month =     {September},
  year =      {2014},
  address =   {Canterbury, UK},
}

Download Paper

PDF file
ACM Digital Library