Hostname: page-component-586b7cd67f-2plfb Total loading time: 0 Render date: 2024-11-22T04:07:11.705Z Has data issue: false hasContentIssue false

Pengines: Web Logic Programming Made Easy

Published online by Cambridge University Press:  21 July 2014

TORBJÖRN LAGER
Affiliation:
University of Gothenburg, Sweden (e-mail: [email protected])
JAN WIELEMAKER
Affiliation:
VU University Amsterdam, The Netherlands (e-mail: [email protected])

Abstract

When developing a (web) interface for a deductive database, functionality required by the client is provided by means of HTTP handlers that wrap the logical data access predicates. These handlers are responsible for converting between client and server data representations and typically include options for paginating results. Designing the web accessible API is difficult because it is hard to predict the exact requirements of clients. Pengines changes this picture. The client provides a Prolog program that selects the required data by accessing the logical API of the server. The pengine infrastructure provides general mechanisms for converting Prolog data and handling Prolog non-determinism. The Pengines library is small (2000 lines Prolog, 150 lines JavaScript). It greatly simplifies defining an AJAX based client for a Prolog program and provides non-deterministic RPC between Prolog processes as well as interaction with Prolog engines similar to Paul Tarau's engines. Pengines are available as a standard package for SWI-Prolog 7.1

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2014 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Brand, D. and Zafiropulo, P. 1983. On communicating finite-state machines. Journal of the ACM (JACM) 30, 2, 323342.Google Scholar
Byrd, L. 1980. Understanding the control flow of Prolog programs. In Logic Programming Workshop, Tarnlund, S., Ed. Debrecen, Hungary, 127138.Google Scholar
Calejo, M. 2004. Interprolog: Towards a declarative embedding of logic programming in java. In JELIA, Alferes, J. J. and Leite, J. A., Eds. Lecture Notes in Computer Science, vol. 3229. Springer, 714717.Google Scholar
Shen, K., Schimpf, J., Novello, S., and Singer, J. 2002. A high-level generic interface to external programming languages for eclipse. In PADL, Krishnamurthi, S. and Ramakrishnan, C. R., Eds. Lecture Notes in Computer Science, vol. 2257. Springer, 262279.Google Scholar
Tarau, P. and Majumdar, A. 2009. Interoperating logic engines. In Practical Aspects of Declarative Languages. Springer, 137151.Google Scholar
Wielemaker, J., Huang, Z. and van der Meij, L. 2008. Swi-prolog and the web. Theory and Practice of Logic Programming 8, 3, 363392.Google Scholar