[Paper Review] SWISH: SWI-Prolog for Sharing
SWISH is a web-based, collaborative Prolog development environment built on SWI-Prolog and web technologies, enabling real-time code editing, query execution, and result visualization. It integrates with systems like ClioPatria and TRILL, supports educational deployment, and enables shared, interactive Prolog programming through a modular client-server architecture using Pengines for server-side execution.
Recently, we see a new type of interfaces for programmers based on web technology. For example, JSFiddle, IPython Notebook and R-studio. Web technology enables cloud-based solutions, embedding in tutorial web pages, atractive rendering of results, web-scale cooperative development, etc. This article describes SWISH, a web front-end for Prolog. A public website exposes SWI-Prolog using SWISH, which is used to run small Prolog programs for demonstration, experimentation and education. We connected SWISH to the ClioPatria semantic web toolkit, where it allows for collaborative development of programs and queries related to a dataset as well as performing maintenance tasks on the running server and we embedded SWISH in the Learn Prolog Now! online Prolog book.
Motivation & Objective
- To create a web-based, interactive Prolog development environment that supports real-time collaboration, education, and data analysis.
- To enable seamless integration of Prolog into web tutorials, documentation, and data exploration workflows.
- To provide a scalable, secure, and extensible platform for sharing and executing Prolog programs via a browser.
- To extend Prolog's accessibility by embedding it in web pages and supporting multiple use cases, including probabilistic reasoning and semantic web querying.
- To build a foundation for future enhancements such as multi-document editing, full module editing, and tutorial authoring in markdown.
Proposed method
- The system uses a JavaScript-based client built with jQuery, Bootstrap, and RequireJS for interactive editing, query input, and result rendering in the browser.
- The server-side is implemented entirely in SWI-Prolog using HTTP server libraries and the Pengines framework to execute Prolog queries remotely via HTTP.
- SWISH integrates with existing Prolog libraries for syntax highlighting, code completion, documentation lookup, and cross-referencing.
- It supports source code sharing and versioning through a shared source repository managed by the server.
- For specialized use cases, such as probabilistic reasoning, the system extends the query runner via client-side JavaScript modifications without altering the core server.
- The architecture enables embedding in web pages (e.g., Learn Prolog Now!) and integration with semantic web tools like ClioPatria and TRILL.
Experimental results
Research questions
- RQ1How can a modern, web-based interface be designed to support interactive, collaborative Prolog programming?
- RQ2To what extent can Prolog be effectively embedded in web-based educational materials and data analysis workflows?
- RQ3How can server-side Prolog execution be securely and efficiently exposed via HTTP using Pengines?
- RQ4What architectural patterns enable seamless integration of Prolog with web technologies for real-time code and result sharing?
- RQ5How can SWISH be extended to support advanced use cases such as RDF/OWL reasoning and probabilistic logic programming?
Key findings
- SWISH successfully enables real-time, collaborative Prolog programming through a browser-based interface with live code editing, query execution, and result visualization.
- The system has been successfully embedded in the Learn Prolog Now! online textbook, demonstrating its utility in educational contexts.
- SWISH supports integration with ClioPatria for collaborative data exploration and server maintenance, enabling shared access to SPARQL and SQL-backed datasets.
- The system enables execution of probabilistic Prolog programs via cplint and TRILL by modifying only the client-side runner logic, demonstrating extensibility.
- Despite stability issues such as memory leaks requiring weekly restarts, the system remains usable with minimal disruption to active users.
- The architecture allows for future enhancements such as full module editing, multi-document workflows, and markdown-based tutorial authoring.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.