SWI-Prolog
   HOME

TheInfoList



OR:

SWI-Prolog is a free implementation of the
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
Prolog Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
, commonly used for teaching and semantic web applications. It has a rich set of features,
libraries A library is a collection of Document, materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or electronic media, digital access (soft copies) materials, and may be a ...
for
constraint logic programming Constraint logic programming is a form of constraint programming, in which logic programming is extended to include concepts from constraint satisfaction. A constraint logic program is a logic program that contains constraints in the body of clau ...
, multithreading,
unit testing In computer programming, unit testing is a software testing method by which individual units of source code—sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures&md ...
,
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
, interfacing to
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
,
ODBC In computing, Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems (DBMS). The designers of ODBC aimed to make it independent of database systems and operating systems. An ...
and others,
literate programming Literate programming is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of its logic in a natural language, such as English, interspersed (embedded) with snippets of macros an ...
, a
web server A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initia ...
,
SGML The Standard Generalized Markup Language (SGML; ISO 8879:1986) is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two postulates": * Declarative: Markup should ...
, RDF,
RDFS RDF Schema (Resource Description Framework Schema, variously abbreviated as RDFS, , RDF-S, or RDF/S) is a set of classes with certain properties using the RDF extensible knowledge representation data model, providing basic elements for the descr ...
, developer tools (including an IDE with a GUI
debugger A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its executi ...
and GUI profiler), and extensive documentation. SWI-Prolog runs on
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
,
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
,
Macintosh The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc., Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and ...
and
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
platforms. SWI-Prolog has been under continuous development since 1987. Its main author is Jan Wielemaker. The name SWI is derived from ("Social Science Informatics"), the former name of the group at the
University of Amsterdam The University of Amsterdam (abbreviated as UvA, nl, Universiteit van Amsterdam) is a public research university located in Amsterdam, Netherlands. The UvA is one of two large, publicly funded research universities in the city, the other being ...
, where Wielemaker is employed. The name of this group has changed to HCS (Human-Computer Studies).


Web framework

SWI-Prolog installs with a
web framework A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build an ...
based on definite clause grammars.


Distributed computing

SWI-Prolog queries may be distributed over several servers and web pages through the Pengines system.


XPCE

XPCE is a
platform-independent In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software r ...
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
GUI toolkit The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
for SWI-Prolog,
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lispin ...
and other interactive and dynamically typed languages. Although XPCE was designed to be language-independent, it has gained popularity mostly with Prolog. The development XPCE graphic toolkit started in 1987, together with SWI-Prolog. It supports
buttons A button is a fastener that joins two pieces of fabric together by slipping through a loop or by sliding through a buttonhole. In modern clothing and fashion design, buttons are commonly made of plastic but also may be made of metal, wood ...
, menus,
sliders Slider or Sliders may refer to: Arts * K.K. Slider, a fictional character within the ''Animal Crossing'' franchise * ''The Slider'', a 1972 album by T. Rex * ''Sliders'' (TV series), an American science fiction and fantasy television series * ...
, tabs and other basic
GUI widget A graphical widget (also graphical control element or control) in a graphical user interface is an element of interaction, such as a button or a scroll bar. Controls are software components that a computer user interacts with through dir ...
s. XPCE is available for all platforms supported by SWI-Prolog.


PceEmacs

PceEmacs is a SWI-Prolog builtin editor. PceEmacs is an
Emacs Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
clone implemented in Prolog (and XPCE). It supports proper
indentation __FORCETOC__ In the written form of many languages, an indentation or indent is an empty space at the beginning of a line to signal the start of a new paragraph. Many computer languages have adopted this technique to designate "paragraphs" or o ...
,
syntax highlighting Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms ...
, full syntax checking by calling the SWI-Prolog
parser Parsing, syntax analysis, or syntactic analysis is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar. The term ''parsing'' comes from Lat ...
, warning for singleton variables and finding predicate definitions based on the source information from the Prolog database.


Interface between Java and Prolog (JPL)

JPL is a bidirectional interface between Java and Prolog. It requires both SWI-Prolog and Java SDK. It is installed as a part of SWI-Prolog.


Constraint logic programming libraries (CLP)

Constraint logic programming functionality came rather late in the lifetime of SWI-Prolog, because it lacked the basic support. This changed early in 2004, when attributed variables were added to the language. The Leuven CHR library was then the first CLP library to be ported to SWI-Prolog. We mention SWI-Prolog's INCLP(R) library (De Koninck et al. 2006), which provides non-linear constraints over the reals and was implemented on top of CHR. Later came a port of Christian Holzbaur's CLP(QR) library and a finite-domain CLP(FD) solver. Finally, a boolean CLP(B) solver was added.Markus Triska: The Boolean Constraint Solver of SWI-Prolog (System Description). FLOPS 2016: 45–61.


See also

*
Prolog Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
*
Comparison of Prolog implementations The following Comparison of Prolog implementations provides a reference for the relative feature sets and performance of different implementations of the Prolog computer programming language. Portability There are Prolog implementations that are ...


References


External links

* {{Official website, www.swi-prolog.org Free compilers and interpreters Prolog programming language family Logic programming languages Constraint programming Integrated development environments