Lightweight compilation of (C)LP to JavaScript
Jose F. Morales, R\'emy Haemmerl\'e, Manuel Carro, and Manuel V., Hermenegildo

TL;DR
This paper introduces a lightweight compiler that translates Prolog and its extensions into JavaScript, enabling logic programming in web applications across all modern devices without extra software.
Contribution
It presents a novel Prolog-to-JavaScript compiler integrated with the Ciao system, supporting modular compilation and complex logic programming features.
Findings
Successfully compiles complex Prolog code including CLP(FD) libraries
Enables logic programming in web environments without additional software
Performance benchmarks show competitive execution speeds
Abstract
We present and evaluate a compiler from Prolog (and extensions) to JavaScript which makes it possible to use (constraint) logic programming to develop the client side of web applications while being compliant with current industry standards. Targeting JavaScript makes (C)LP programs executable in virtually every modern computing device with no additional software requirements from the point of view of the user. In turn, the use of a very high-level language facilitates the development of high-quality, complex software. The compiler is a back end of the Ciao system and supports most of its features, including its module system and its rich language extension mechanism based on packages. We present an overview of the compilation process and a detailed description of the run-time system, including the support for modular compilation into separate JavaScript code. We demonstrate the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
