Lightweight compilation of (C)LP to JavaScript
-
Published:2012-07
Issue:4-5
Volume:12
Page:755-773
-
ISSN:1471-0684
-
Container-title:Theory and Practice of Logic Programming
-
language:en
-
Short-container-title:Theory and Practice of Logic Programming
Author:
MORALES JOSE F.,HAEMMERLÉ RÉMY,CARRO MANUEL,HERMENEGILDO MANUEL V.
Abstract
AbstractWe 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 onpackages. 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 maturity of the compiler by testing it with complex code such as a CLP(FD) library written in Prolog with attributed variables. Finally, we validate our proposal by measuring the performance of some LP and CLP(FD) benchmarks running on top of major JavaScript engines.
Publisher
Cambridge University Press (CUP)
Subject
Artificial Intelligence,Computational Theory and Mathematics,Hardware and Architecture,Theoretical Computer Science,Software
Reference30 articles.
1. Warren D. 1983. An Abstract Prolog Instruction Set. Technical Report 309, Artificial Intelligence Center, SRI International, 333 Ravenswood Ave, Menlo Park CA 94025.
2. Integrated symbol table, engine and heap memory management in multi-engine prolog
3. Loitsch F. and Serrano M. 2007. Hop client-side compilation. In TFP 2007: Draft Proceedings of the 8th Symposium on Trends in Functional Programming.
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献