Skip to main content
QUICK REVIEW

[Paper Review] Prolog Server Pages

Alin Suciu, Kalman Pusztai|ArXiv.org|Mar 26, 2006
Robotics and Automated SystemsEngineering3 references4 citations
TL;DR

Prolog Server Pages (PSP) is a server-side scripting language that embeds Prolog code within HTML documents, enabling dynamic web content generation. It integrates with the Apache web server via a custom module, processes HTTP requests (GET/POST), manages cookies, and compiles embedded logic into standard HTML output sent to clients.

ABSTRACT

Prolog Server Pages (PSP) is a scripting language, based on Prolog, than can be embedded in HTML documents. To run PSP applications one needs a web server, a web browser and a PSP interpreter. The code is executed, by the interpreter, on the server-side (web server) and the output (together with the html code in witch the PSP code is embedded) is sent to the client-side (browser). The current implementation supports Apache Web Server. We implemented an Apache web server module that handles PSP files, and sends the result (an html document) to the client. PSP supports both GET and POST http requests. It also provides methods for working with http cookies.

Motivation & Objective

  • Enable dynamic web application development using Prolog’s declarative logic programming model.
  • Bridge the gap between web technologies and logic programming by embedding Prolog in HTML.
  • Support standard web protocols such as HTTP GET and POST requests within a Prolog-based server-side environment.
  • Provide first-class support for HTTP cookies and server-side state management in a Prolog-driven web framework.
  • Integrate seamlessly with the Apache web server through a dedicated module for executing PSP files.

Proposed method

  • Embed Prolog code within HTML documents using special delimiters, similar to server-side scripting languages.
  • Develop an Apache web server module that recognizes and processes .psp files using a Prolog interpreter.
  • Execute embedded Prolog code on the server side, generating dynamic HTML output before sending it to the client.
  • Support both GET and POST HTTP methods by parsing request data and passing it to Prolog predicates.
  • Expose built-in methods for reading and writing HTTP cookies through the Prolog runtime environment.
  • Ensure compatibility with existing web infrastructure by outputting standard HTML and leveraging the Apache server stack.

Experimental results

Research questions

  • RQ1Can Prolog be effectively used to generate dynamic web content through server-side scripting?
  • RQ2How can Prolog’s logic programming paradigm be integrated into standard web application workflows?
  • RQ3What architectural patterns enable seamless execution of Prolog code within HTML documents on a web server?
  • RQ4To what extent can Prolog handle common web tasks such as form processing and state management via cookies?
  • RQ5Is it feasible to build a production-ready web server module for Prolog that supports standard HTTP interactions?

Key findings

  • The implementation successfully demonstrates that Prolog can be used to generate dynamic web content through embedded scripting in HTML.
  • The Apache web server module enables transparent execution of PSP files, treating them as first-class web resources.
  • Support for both GET and POST HTTP methods allows full-featured web application development using Prolog.
  • The system provides native support for HTTP cookies, enabling stateful interactions in stateless web environments.
  • The architecture proves viable for server-side logic execution, combining Prolog’s symbolic reasoning with web standards.
  • The solution is deployable on standard Apache infrastructure, showing compatibility and practicality for real-world use.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.