Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Prolog
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Modules == For [[Programming in the large and programming in the small#Programming in the large|programming in the large]], Prolog provides a [[modular programming|module system]], which is in the ISO Standard.<ref>ISO/IEC 13211-2: Modules.</ref> However, while most Prolog systems support structuring the code into modules, virtually no implementation adheres to the modules part of the ISO standard. Instead, most [[Comparison of Prolog implementations|Prolog systems]] have decided to support as ''de-facto'' module standard the [[Quintus Prolog|Quintus]]/[[SICStus]] module system. However, further convenience predicates concerning modules are provided by some implementations only and often have subtle differences in their semantics.<ref name="auto">{{citation |author=Philipp Körner |author2=Michael Leuschel |author3=João Barbosa |author4=Vítor Santos Costa |author5=Verónica Dahl |author6=Manuel V. Hermenegildo |author7=Jose F. Morales |author8=Jan Wielemaker |author9=Daniel Diaz |author10=Salvador Abreu |author11=Giovanni Ciatto |title=Fifty Years of Prolog and Beyond |date=November 2022 |journal=Theory and Practice of Logic Programming|volume=22|issue=6 |pages=776–858 |doi=10.1017/S1471068422000102 |doi-access=free|hdl=10174/33387 |hdl-access=free }}</ref> Some systems chose to implement module concepts as source-to-source compilation into base ISO Prolog, as is the case of [[Logtalk]].<ref name="cs.kuleuven.ac.be">{{citation|first=Paulo|last=Moura|title=Logtalk|journal=Association of Logic Programming|volume=17|issue=3|date=August 2004|url=http://www.cs.kuleuven.ac.be/~dtai/projects/ALP/newsletter/aug04/nav/print/all.html#logtalk|access-date=2010-02-16|archive-date=2010-04-12|archive-url=https://web.archive.org/web/20100412151301/http://www.cs.kuleuven.ac.be/~dtai/projects/ALP/newsletter/aug04/nav/print/all.html#logtalk|url-status=dead}}</ref> GNU Prolog initially diverted from ISO modules, opting instead for [[Contextual Logic Programming]], in which unit (module) loading and unloading can be made dynamically.<ref>{{citation|last1=Abreu|last2=Nogueira|year=2005|journal=Lecture Notes in Artificia Intelligence|volume=4369|title=Using a Logic Programming Language with Persistence and Contexts}}</ref> [[Ciao (programming language)|Ciao]] designed a strict module system that, while being basically compatible with the ''de-facto'' standard used by other Prolog systems, is amenable to precise static analysis, supports term hiding, and facilitates programming in the large.<ref>{{citation|last1=Cabeza|last2=Hermenegildo|title=A new module system for Prolog|series=Lecture Notes in Computer Science|volume=1861|year=2000}}</ref> [[XSB]] takes a different approach and offers an ''atom-based'' module system.<ref>{{citation|last1=Sagonas|last2=Swift|last3=Warren|year=1994|title=XSB as an efficient deductive database engine |journal=SIGMOD}}</ref> The latter two Prolog systems allow controlling the ''visibility of terms'' in addition to that of predicates.<ref name="auto"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)