Welcome to B-Prolog, a versatile and efficient constraint logic programming (CLP) system. B-Prolog is being brought to you by Afany Software.
The birth of CLP is a milestone in the history of programming languages. CLP combines two declarative programming paradigms: logic programming and constraint solving. The declarative nature is appealing in numerous applications including computer-aided design and verification, database, data mining, software engineering, optimization, configuration, graphical user interface, and language processing. It greatly enhances the productivity of software development and software maintainability. In addition, because of the availability of efficient constraint-solving, memory management, and compilation techniques, CLP programs can be more efficient than their counterparts written in procedural languages.
B-Prolog is a Prolog system with extensions for programming concurrency, constraints, and interactive graphics. The system is based on a significantly refined WAM, called
TOAM, that facilitates software emulation. In addition to a TOAM emulator with a garbage collector written in C, the system
consists of a compiler and an interpreter written in Prolog, and a rich library of built-in predicates written in C and Prolog. B-Prolog follows the
standard of Prolog but also enjoys several features that are not available in traditional Prolog systems.
Interactive
Environment
B-Prolog provides an interactive environment through which users can consult, list, compile, load, debug and run programs. The command editor in the environment facilitates recalling and editing old commands.
Matching clauses
B-Prolog accepts not only standard form Prolog programs but also matching clauses in which the determinacy and input/output unifications are denoted explicitly. Matching clauses are compiled into more compact and faster code than standard-form clauses. The compiler and most of the libraries are written in matching clauses.
Bi-directional Interface with C or Java
B-Prolog provides a bi-directional interface with C and Java. This interface makes it possible to integrate applications developed in B-Prolog with those developed in C, C++, and Java such as DBMS systems, Servlet, JSP, COM, and 3D graphics packages.
Action rules and constraint solvers
B-Prolog offers the user a unique construct, called action rules, which is useful for programming concurrency, implementing constraint propagators, and developing interactive graphical user interfaces. Action rules have been successfully used to implement efficient constraint solvers over trees, Boolean, finite-domains, and sets.
Constraint-based graphics package
B-Prolog provides a high-level and constraint-based graphics library, called CGLIB. The library includes primitives for creating and manipulating graphical objects and a set of constraints that facilitates the specification of the layouts of objects. Action rules are employed to program interactions.
Tabling mechanism
B-Prolog supports the tabling mechanism, which is effective for certain applications such as parsing, problem solving, theorem
proving, model checking, and deductive databases.
