Hostname: page-component-586b7cd67f-rdxmf Total loading time: 0 Render date: 2024-11-23T20:44:38.107Z Has data issue: false hasContentIssue false

SWI-Prolog and the web

Published online by Cambridge University Press:  01 May 2008

JAN WIELEMAKER
Affiliation:
Human-Computer Studies Laboratory, University of Amsterdam, Matrix I, Kruislaan 419, 1098 VA, Amsterdam, The Netherlands (e-mail: [email protected])
ZHISHENG HUANG
Affiliation:
Computer Science Department, Vrije University Amsterdam, De Boelelaan 1081a, 1081 HV, Amsterdam, The Netherlands (e-mail: [email protected], [email protected])
LOURENS VAN DER MEIJ
Affiliation:
Computer Science Department, Vrije University Amsterdam, De Boelelaan 1081a, 1081 HV, Amsterdam, The Netherlands (e-mail: [email protected], [email protected])

Abstract

Prolog is an excellent tool for representing and manipulating data written in formal languages as well as natural language. Its safe semantics and automatic memory management make it a prime candidate for programming robust Web services. Although Prolog is commonly seen as a component in a Web application that is either embedded or communicates using a proprietary protocol, we propose an architecture where Prolog communicates to other components in a Web application using the standard HTTP protocol. By avoiding embedding in external Web servers, development and deployment become much easier. To support this architecture, in addition to the transfer protocol, we must also support parsing, representing and generating the key Web document types such as HTML, XML and RDF. This article motivates the design decisions in the libraries and extensions to Prolog for handling Web documents and protocols. The design has been guided by the requirement to handle large documents efficiently. The described libraries support a wide range of Web applications ranging from HTML and XML documents to Semantic Web RDF processing. The benefits of using Prolog for Web-related tasks are illustrated using three case studies.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2008

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

Bechhofer, S., Möller, R. and Crowther, P. 2003. The DIG description logic interface. In International Workshop on Description Logics (DL2003), Rome, vol. 81 (electronic).Google Scholar
Broekstra, J., Kampman, A. and van Harmelen, F. 2002. Sesame: An architecture for storing and querying RDF and RDF schema. In Proc. First International Semantic Web Conference ISWC 2002, Sardinia, Italy. Lecture notes on computer science, vol. 2342. Springer-Verlag, Berlin, 54–68.Google Scholar
Cabeza, D. and Hermenegildo, M. V. 2003. Distributed WWW programming using (ciao-) prolog and the piLLoW library. CoRR cs.DC/0312031.Google Scholar
Demoen, B. 2002. Dynamic Attributes, Their hProlog Implementation, and a First Evaluation. Report CW 350. Department of Computer Science, K.U. Leuven, Leuven, Belgium. URL:http://www.cs.kuleuven.ac.be/publicaties/rapporten/cw/CW350.abs.html.Google Scholar
Deransart, P., Ed-Dbali, A. and Cervoni, L. 1996. Prolog: The Standard. Springer-Verlag, New York.CrossRefGoogle Scholar
Gras, D. C. and Hermenegildo, M. V. 2001. Distributed WWW programming using (ciao-) prolog and the piLLoW library. Theory and Practice of Logic Programming 1, 3, 251282.Google Scholar
Haarslev, V. and Möller, R. 2001. Description of the racer system and its applications. In Proceedings of the International Workshop on Description Logics (DL-2001), Stanford University, CA, 132–141.Google Scholar
Hearst, M., English, J., Sinha, R., Swearingen, K. and Yee, K. 2002. Finding the flow in Web site search. Communications of the ACM 45, 9 (September), 4249.CrossRefGoogle Scholar
Horrocks, I. 1999. Fact and ifact. In Proceedings of the International Workshop on Description Logics (DL'99), Sweden, 133–135.Google Scholar
Huang, Z. and Stuckenschmidt, H. 2005. Reasoning with multiversion ontologies: A temporal logic approach. In International Semantic Web Conference, Gil, Y., Motta, E., Benjamins, V. R., and Musen, M. A., Eds. Lecture Notes in Computer Science, vol. 3729. Springer, 398–412.Google Scholar
Huang, Z., van Harmelen, F. and ten Teije, A. 2005. Reasoning with inconsistent ontologies. In Proceedings of the International Joint Conference on Artificial Intelligence – IJCAI'05. Kaelbling, L. P. and Saffiotti, A., Eds. Professional Book Center, Edinburgh, Scotland, 454459.Google Scholar
Huang, Z. and Visser, C. 2004. Extended DIG Description Logic Interface Support for PROLOG. Deliverable D3.4.1.2. SEKT.Google Scholar
Leth, L., Bonnet, P., Bressan, S. and Thomsen, B. 1996. Towards ECLiPSe agents on the internet. In Proceedings of the 1st Workshop on Logic Programming Tools for INTERNET Applications, Bonn, Germany.Google Scholar
Mäkelä, E., Hyvönen, E., Saarela, S. and Viljanen, K. 2004. Ontoviews – a tool for creating Semantic Web portals. In International Semantic Web Conference, McIlraith, S. A., Plexousakis, D. and van Harmelen, F., Eds. Lecture Notes in Computer Science, vol. 3298. Springer, New York, 797811.Google Scholar
Miller, G. 1995. WordNet: A lexical database for english. Communication of the ACM 38, 11 (November), 3941.CrossRefGoogle Scholar
Philips, L. 2000. The double metaphone search algorithm. C/C++ Users Journal 18, 6 (June), 38–43.Google Scholar
Ramakrishnan, I. V., Rao, P., Sagonas, K., Swift, T. and Warren, D. S. 1995. Efficient tabling mechanisms for logic programs. In Proceedings of the 12th International Conference on Logic Programming, Sterling, L., Ed. MIT Press, Cambridge, MA. 697714.Google Scholar
Schlobach, S. and Huang, Z. 2005. Inconsistent Ontology Diagnosis: Framework and Prototype. Deliverable D3.6.1. SEKT. URL:http://www.cs.vu.nl/~huang/sekt/sekt361.pdfGoogle Scholar
Szeredi, P., Molnár, K. and Scott, R. 1996. Serving multiple HTML clients from a Prolog application. In Proceedings of the 1st Workshop on Logic Programming Tools for INTERNET Applications, JICSLP'96, Bonn. URL:http://clement.info.umoncton.ca/~lpnet/lpnet9.htmlGoogle Scholar
van Gendt, M., Isaac, A., van der Meij, L. and Schlobach, S. 2006. Semantic web techniques for multiple views on heterogeneous collections: A case study. In Research and Advanced Technology for Digital Libraries. Lecture Notes in Computer Science, vol. 4172. Springer, Berlin, 426–437.Google Scholar
Wielemaker, J. 2003. Native preemptive threads in SWI-Prolog. In Practical Aspects of Declarative Languages, Palamidessi, C., Ed. Lecture Notes in Computer Science, vol. 2916. Springer-Verlag, Berlin, 331345.Google Scholar
Wielemaker, J. 2005. An optimised Semantic Web query language implementation in prolog. In ICLP 2005, Baggrielli, M. and Gupta, G., Eds. Lecture Notes in Computer Science, vol. 3668. Springer-Verlag, Berlin, 128142.Google Scholar
Wielemaker, J., Schreiber, G. and Wielinga, B. 2003. Prolog-based infrastructure for RDF: Performance and scalability. In The Semantic Web – Proceedings ISWC'03, Sanibel Island, Florida, Fensel, D., Sycara, K. and Mylopoulos, J., Eds. Lecture Notes in Computer Science, vol. 2870. Springer-Verlag, Berlin, 644658.Google Scholar