Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Prolog
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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"/>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Prolog
(section)
Add topic