XSB

Last updated
XSB
Paradigm Logic Programming
Designed by David S. Warren, Terrance Swift, Kostis Sagonas
Stable release
5.0 / 12 May 2022;18 months ago (2022-05-12)
OS Cross-platform
Filename extensions .P
Website Sourceforge.net
Influenced by
Prolog, PSB-Prolog, SB-Prolog

XSB is the name of a dialect of the Prolog programming language and its implementation developed at Stony Brook University in collaboration with the Katholieke Universiteit Leuven, the New University of Lisbon, Uppsala University and software vendor XSB, Inc.

Contents

XSB extends Prolog with tabled resolution and HiLog.

Features

XSB is a compiled dialect of Prolog based on the Warren Abstract Machine. [1] Unlike systems derived from Quintus, XSB uses a module system based on Prolog atoms. [1] It features tabled resolution and supports the HiLog language (permitting limited higher-order logic programming). [1] Tabling enables XSB to implement the well-founded semantics [1] and makes it suitable as a deductive database engine. [2] The open source XSB implementation includes an interface to the Python programming language. [3]

History

XSB was originally developed at Stony Brook University by David S. Warren, Terrance Swift, and Kostis Sagonas and launched in 1993-4. It was based on the SB-Prolog language that was also developed at Stony Brook University in 1986, and it was the first implementation of tabled resolution. [1]

Syntax

XSB supports the ISO-mandated Prolog data types such as integers, floating point numbers, and atoms. Integers in XSB can be interpreted in multiple bases. By default integers are interpreted in base 10 but can be interpreted in a range of bases from 2 to 36. [4]

Related Research Articles

Logic programming is a programming, database and knowledge-representation and reasoning paradigm which is based on formal logic. A program, database or knowledge base in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain. Major logic programming language families include Prolog, Answer Set Programming (ASP) and Datalog. In all of these languages, rules are written in the form of clauses:

Mercury is a functional logic programming language made for real-world uses. The first version was developed at the University of Melbourne, Computer Science department, by Fergus Henderson, Thomas Conway, and Zoltan Somogyi, under Somogyi's supervision, and released on April 8, 1995.

Prolog is a logic programming language associated with artificial intelligence and computational linguistics.

Planner is a programming language designed by Carl Hewitt at MIT, and first published in 1969. First, subsets such as Micro-Planner and Pico-Planner were implemented, and then essentially the whole language was implemented as Popler by Julian Davies at the University of Edinburgh in the POP-2 programming language. Derivations such as QA4, Conniver, QLISP and Ether were important tools in artificial intelligence research in the 1970s, which influenced commercial developments such as Knowledge Engineering Environment (KEE) and Automated Reasoning Tool (ART).

Datalog is a declarative logic programming language. While it is syntactically a subset of Prolog, Datalog generally uses a bottom-up rather than top-down evaluation model. This difference yields significantly different behavior and properties from Prolog. It is often used as a query language for deductive databases. Datalog has been applied to problems in data integration, networking, program analysis, and more.

SWI-Prolog is a free implementation of the programming language Prolog, commonly used for teaching and semantic web applications. It has a rich set of features, libraries for constraint logic programming, multithreading, unit testing, GUI, interfacing to Java, ODBC and others, literate programming, a web server, SGML, RDF, RDFS, developer tools, and extensive documentation.

ECLiPSe is a software system for the development and deployment of constraint logic programming applications, e.g., in the areas of optimization, planning, scheduling, resource allocation, timetabling, transport, etc. It is also suited for teaching most aspects of combinatorial problem solving, e.g., problem modeling, constraint programming, mathematical programming, and search techniques. It contains constraint solver libraries, a high-level modeling and control language, interfaces to third-party solvers, an integrated development environment and interfaces for embedding into host environments.

Indeterminacy in concurrent computation is concerned with the effects of indeterminacy in concurrent computation. Computation is an area in which indeterminacy is becoming increasingly important because of the massive increase in concurrency due to networking and the advent of many-core computer architectures. These computer systems make use of arbiters which gives rise to indeterminacy.

A deductive language is a computer programming language in which the program is a collection of predicates ('facts') and rules that connect them. Such a language is used to create knowledge based systems or expert systems which can deduce answers to problem sets by applying the rules to the facts they have been given. An example of a deductive language is Prolog, or its database-query cousin, Datalog.

Logtalk is an object-oriented logic programming language that extends and leverages the Prolog language with a feature set suitable for programming in the large. It provides support for encapsulation and data hiding, separation of concerns and enhanced code reuse. Logtalk uses standard Prolog syntax with the addition of a few operators and directives.

B-Prolog was a high-performance implementation of the standard Prolog language with several extended features including matching clauses, action rules for event handling, finite-domain constraint solving, arrays and hash tables, declarative loops, and tabling. First released in 1994, B-Prolog is now a widely used CLP system. The constraint solver of B-Prolog was ranked top in two categories in the Second International Solvers Competition, and it also took the second place in P class in the second ASP solver competition and the second place overall in the third ASP solver competition. B-Prolog underpins the PRISM system, a logic-based probabilistic reasoning and learning system. B-Prolog is a commercial product, but it can be used for learning and non-profit research purposes free of charge. B-Prolog is not anymore actively developed, but it forms the basis for the Picat programming language.

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.

The syntax and semantics of Prolog, a programming language, are the sets of rules that define how a Prolog program is written and how it is interpreted, respectively. The rules are laid out in ISO standard ISO/IEC 13211 although there are differences in the Prolog implementations.

HiLog is a programming logic with higher-order syntax, which allows arbitrary terms to appear in predicate and function positions. However, the model theory of HiLog is first-order. Although syntactically HiLog strictly extends first order logic, HiLog can be embedded into this logic.

Flora-2 is an open source semantic rule-based system for knowledge representation and reasoning. The language of the system is derived from F-logic, HiLog, and Transaction logic. Being based on F-logic and HiLog implies that object-oriented syntax and higher-order representation are the major features of the system. Flora-2 also supports a form of defeasible reasoning called Logic Programming with Defaults and Argumentation Theories (LPDA). Applications include intelligent agents, Semantic Web, knowledge-bases networking, ontology management, integration of information, security policy analysis, automated database normalization, and more.

Rulelog is an expressive semantic rule-based knowledge representation and reasoning (KRR) language. It underlies knowledge representation languages used in systems such as Flora-2, SILK and others. It extends well-founded declarative logic programs with features for higher-order syntax, frame syntax, defeasibility, general quantified expressions both in the bodies of the rules and their heads, user-defined functions, and restraint bounded rationality.

Scott A. Smolka is a SUNY Distinguished Professor in the Department of Computer Science at Stony Brook University, Stony Brook, New York.

Tabling is a technique first developed for natural language processing, where it was called Earley parsing. It consists of storing in a table partial successful analyses that might come in handy for future reuse.

Quintus Prolog is a proprietary implementation of the Prolog programming language based on the Warren Abstract Machine.

References

  1. 1 2 3 4 5 Körner, Philipp; Leuschel, Michael; Barbosa, João; Costa, Vítor Santos; Dahl, Verónica; Hermenegildo, Manuel V.; Morales, Jose F.; Wielemaker, Jan; Diaz, Daniel; Abreu, Salvador; Ciatto, Giovanni (November 2022). "Fifty Years of Prolog and Beyond". Theory and Practice of Logic Programming. 22 (6): 776–858. doi:10.1017/S1471068422000102. ISSN   1471-0684.
  2. Brass, Stefan; Wenzel, Mario (2019). "Performance Analysis and Comparison of Deductive Systems and SQL Databases" (PDF). In Alviano, Mario (ed.). Datalog 2.0 2019. CEUR Workshop Proceedings. Vol. 2368. pp. 27–38.
  3. Andersen, Carl; Swift, Theresa (2023), "The Janus System: A Bridge to New Prolog Applications", Prolog: The Next 50 Years, Cham: Springer Nature Switzerland, pp. 93–104, ISBN   978-3-031-35253-9 , retrieved 2023-11-14
  4. Swift, Theresa; Warren, David S. (13 May 2022). The XSB System Version 5.0.x Programmer’s Manual.

Further reading