Lightweight compilation of (C)LP to JavaScript


Autoria(s): Morales Caballero, José Francisco; Haemmerlé, R.; Carro Liñares, Manuel; Hermenegildo, Manuel V.
Data(s)

01/07/2012

Resumo

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 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.

Formato

application/pdf

Identificador

http://oa.upm.es/14834/

Idioma(s)

eng

Publicador

Facultad de Informática (UPM)

Relação

http://oa.upm.es/14834/1/HERME_NB_2012-1.pdf

http://dx.doi.org/10.1017/S1471068412000336

info:eu-repo/semantics/altIdentifier/doi/10.1017/S1471068412000336

Direitos

http://creativecommons.org/licenses/by-nc-nd/3.0/es/

info:eu-repo/semantics/openAccess

Fonte

Theory and Practice of Logic Programming, ISSN 1471-0684, 2012-07, Vol. 12, No. 4-5

Palavras-Chave #Informática
Tipo

info:eu-repo/semantics/article

Artículo

PeerReviewed