CINXE.COM
View source for Prolog - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>View source for Prolog - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"3a282acd-2fe3-4622-bef0-0da71771b6a8","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Prolog","wgTitle":"Prolog","wgCurRevisionId":1258463030,"wgRevisionId":0,"wgArticleId":23485,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Prolog","wgRelevantArticleId":23485,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode": "en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":70000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","skins.vector.search.codex.styles":"ready", "skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.charinsert.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","jquery.makeCollapsible","skins.vector.js","ext.centralNotice.geoIP","ext.charinsert","ext.gadget.ReferenceTooltips","ext.gadget.charinsert","ext.gadget.extra-toolbar-buttons","ext.gadget.refToolbar","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession", "wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.charinsert.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,nofollow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="View source for Prolog - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Prolog"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Prolog&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Prolog"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Prolog rootpage-Prolog skin-vector-2022 action-edit"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Prolog&returntoquery=action%3Dedit" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Prolog&returntoquery=action%3Dedit" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Prolog&returntoquery=action%3Dedit" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Prolog&returntoquery=action%3Dedit" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <h1 id="firstHeading" class="firstHeading mw-first-heading">View source for Prolog</h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="This article exist only in this language. Add the article for other languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-0" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">Add languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="uls-after-portlet-link"></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Prolog" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Prolog" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="vector-tab-noicon mw-list-item"><a href="/wiki/Prolog"><span>Read</span></a></li><li id="ca-edit" class="selected vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Prolog&action=edit" title="Edit this page"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Prolog&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="vector-more-collapsible-item mw-list-item"><a href="/wiki/Prolog"><span>Read</span></a></li><li id="ca-more-edit" class="selected vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Prolog&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Prolog&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Prolog" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Prolog" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Prolog&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DProlog%26action%3Dedit"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DProlog%26action%3Dedit"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q163468" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> </div> <div id="contentSub"><div id="mw-content-subtitle">← <a href="/wiki/Prolog" title="Prolog">Prolog</a></div></div> <div id="mw-content-text" class="mw-body-content"><p>You do not have permission to edit this page, for the following reasons: </p> <ul class="permissions-errors"><li class="mw-permissionerror-blockedtext"> <div id="mw-blocked-text" style="border: 1px solid #AAA; background-color: var(--background-color-warning-subtle, ivory); color: inherit; padding: 1.5em; width: 100%; box-sizing: border-box;"> <div style="text-align: center;"><span style="font-size: 26px;"><span typeof="mw:File"><a href="/wiki/File:Stop_hand_nuvola.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/50px-Stop_hand_nuvola.svg.png" decoding="async" width="50" height="50" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/75px-Stop_hand_nuvola.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/100px-Stop_hand_nuvola.svg.png 2x" data-file-width="240" data-file-height="240" /></a></span><b> This IP address has been <a href="/wiki/Wikipedia:Blocking_policy" title="Wikipedia:Blocking policy">blocked</a> from <i>editing</i> Wikipedia.</b></span><br /><span style="font-size: 18px;">This does not affect your ability to <i>read</i> Wikipedia pages.</span></div><div class="paragraphbreak" style="margin-top:0.5em"></div><b>Most people who see this message have done nothing wrong.</b> Some kinds of blocks restrict editing from specific service providers or telecom companies in response to recent abuse or vandalism, and can sometimes affect other users who are unrelated to that abuse. Review the information below for assistance if you do not believe that you have done anything wrong.<div class="paragraphbreak" style="margin-top:0.5em"></div> <p>The IP address or range 8.222.128.0/17 has been <a href="/wiki/Wikipedia:Blocking_policy" title="Wikipedia:Blocking policy">blocked</a> by <a href="/wiki/User:L235" title="User:L235">L235</a> for the following reason(s): </p> <div style="padding:10px; background:var(--background-color-base, white); color:inherit; border:1px #666 solid;"> <div class="user-block colocation-webhost" style="margin-bottom: 0.5em; background-color: #ffefd5; border: 1px solid #AAA; padding: 0.7em;"> <figure class="mw-halign-left" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/5/53/Server-multiple.svg/40px-Server-multiple.svg.png" decoding="async" width="40" height="57" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/53/Server-multiple.svg/60px-Server-multiple.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/5/53/Server-multiple.svg/80px-Server-multiple.svg.png 2x" data-file-width="744" data-file-height="1052" /></span><figcaption></figcaption></figure><b>The <a href="/wiki/IP_address" title="IP address">IP address</a> that you are currently using has been blocked because it is believed to be a <a href="/wiki/Web_hosting_service" title="Web hosting service">web host provider</a> or <a href="/wiki/Colocation_centre" title="Colocation centre">colocation provider</a>.</b> To prevent abuse, <a href="/wiki/Wikipedia:Open_proxies" title="Wikipedia:Open proxies">web hosts and colocation providers may be blocked</a> from editing Wikipedia. <div style="border-top: 1px solid #AAA; clear: both">You will not be able to edit Wikipedia using a web host or colocation provider because it hides your IP address, much like a <a href="/wiki/Wikipedia:Open_proxies" title="Wikipedia:Open proxies">proxy</a> or <a href="/wiki/Virtual_private_network" title="Virtual private network">VPN</a>. <p><b>We recommend that you attempt to use another connection to edit.</b> For example, if you use a proxy or VPN to connect to the internet, turn it off when editing Wikipedia. If you edit using a mobile connection, try using a Wi-Fi connection, and vice versa. If you are using a corporate internet connection, switch to a different Wi-Fi network. If you have a Wikipedia account, please log in. </p><p>If you do not have any other way to edit Wikipedia, you will need to <a href="/wiki/Wikipedia:IP_block_exemption#Requesting_and_granting_exemption" title="Wikipedia:IP block exemption">request an IP block exemption</a>. </p> <style data-mw-deduplicate="TemplateStyles:r1214851843">.mw-parser-output .hidden-begin{box-sizing:border-box;width:100%;padding:5px;border:none;font-size:95%}.mw-parser-output .hidden-title{font-weight:bold;line-height:1.6;text-align:left}.mw-parser-output .hidden-content{text-align:left}@media all and (max-width:500px){.mw-parser-output .hidden-begin{width:auto!important;clear:none!important;float:none!important}}</style><div class="hidden-begin mw-collapsible mw-collapsed" style=""><div class="hidden-title skin-nightmode-reset-color" style="text-align:center;">How to appeal if you are confident that your connection does not use a colocation provider's IP address:</div><div class="hidden-content mw-collapsible-content" style=""> If you are confident that you are not using a web host, you may <a href="/wiki/Wikipedia:Appealing_a_block" title="Wikipedia:Appealing a block">appeal this block</a> by adding the following text on your <a href="/wiki/Help:Talk_pages" title="Help:Talk pages">talk page</a>: <code>{{<a href="/wiki/Template:Unblock" title="Template:Unblock">unblock</a>|reason=Caught by a colocation web host block but this host or IP is not a web host. My IP address is _______. <i>Place any further information here.</i> ~~~~}}</code>. <b>You must fill in the blank with your IP address for this block to be investigated.</b> Your IP address can be determined <span class="plainlinks"><b><a class="external text" href="https://en.wikipedia.org/wiki/Wikipedia:Get_my_IP_address?withJS=MediaWiki:Get-my-ip.js">here</a></b></span>. Alternatively, if you wish to keep your IP address private you can use the <a href="/wiki/Wikipedia:Unblock_Ticket_Request_System" title="Wikipedia:Unblock Ticket Request System">unblock ticket request system</a>. There are several reasons you might be editing using the IP address of a web host or colocation provider (such as if you are using VPN software or a business network); please use this method of appeal only if you think your IP address is in fact not a web host or colocation provider.</div></div> <p><span class="sysop-show" style="font-size: 85%;"><span style="border:#707070 solid 1px;background-color:#ffe0e0;padding:2px"><b>Administrators:</b></span> The <a href="/wiki/Wikipedia:IP_block_exemption" title="Wikipedia:IP block exemption">IP block exemption</a> user right should only be applied to allow users to edit using web host in exceptional circumstances, and requests should usually be directed to the functionaries team via email. If you intend to give the IPBE user right, a <a href="/wiki/Wikipedia:CheckUser" title="Wikipedia:CheckUser">CheckUser</a> needs to take a look at the account. This can be requested most easily at <a href="/wiki/Wikipedia:SPI#Quick_CheckUser_requests" class="mw-redirect" title="Wikipedia:SPI">SPI Quick Checkuser Requests</a>. <b>Unblocking</b> an IP or IP range with this template <b>is highly discouraged</b> without at least contacting the blocking administrator.</span> </p> </div></div> </div> <p>This block will expire on 18:23, 24 August 2026. Your current IP address is 8.222.208.146. </p> <div class="paragraphbreak" style="margin-top:0.5em"></div><div style="font-size: 16px;"> <p>Even when blocked, you will <i>usually</i> still be able to edit your <a href="/wiki/Special:MyTalk" title="Special:MyTalk">user talk page</a>, as well as <a href="/wiki/Wikipedia:Emailing_users" title="Wikipedia:Emailing users">email</a> administrators and other editors. </p> </div> <div class="paragraphbreak" style="margin-top:0.5em"></div><div style="font-size: 16px;"> <p>For information on how to proceed, please read the <b><a href="/wiki/Wikipedia:Appealing_a_block#Common_questions" title="Wikipedia:Appealing a block">FAQ for blocked users</a></b> and the <a href="/wiki/Wikipedia:Appealing_a_block" title="Wikipedia:Appealing a block">guideline on block appeals</a>. The <a href="/wiki/Wikipedia:Guide_to_appealing_blocks" title="Wikipedia:Guide to appealing blocks">guide to appealing blocks</a> may also be helpful. </p> </div> <p>Other useful links: <a href="/wiki/Wikipedia:Blocking_policy" title="Wikipedia:Blocking policy">Blocking policy</a> · <a href="/wiki/Help:I_have_been_blocked" title="Help:I have been blocked">Help:I have been blocked</a> </p> </div></li><li class="mw-permissionerror-globalblocking-blockedtext-range"> <div id="mw-blocked-text" style="border: 1px solid #AAA; background-color: var(--background-color-warning-subtle, ivory); color: inherit; padding: 1.5em; width: 100%; box-sizing: border-box;"> <div style="text-align: center;"><span style="font-size: 26px;"><span typeof="mw:File"><a href="/wiki/File:Stop_hand_nuvola.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/50px-Stop_hand_nuvola.svg.png" decoding="async" width="50" height="50" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/75px-Stop_hand_nuvola.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/100px-Stop_hand_nuvola.svg.png 2x" data-file-width="240" data-file-height="240" /></a></span><b> This IP address range has been <a href="https://meta.wikimedia.org/wiki/Global_blocks" class="extiw" title="m:Global blocks">globally blocked</a>.</b></span><br /><span style="font-size: 18px;">This does not affect your ability to <i>read</i> Wikipedia pages.</span></div><div class="paragraphbreak" style="margin-top:0.5em"></div><b>Most people who see this message have done nothing wrong.</b> Some kinds of blocks restrict editing from specific service providers or telecom companies in response to recent abuse or vandalism, and can sometimes affect other users who are unrelated to that abuse. Review the information below for assistance if you do not believe that you have done anything wrong.<div class="paragraphbreak" style="margin-top:0.5em"></div><div class="paragraphbreak" style="margin-top:0.5em"></div> <p>This block affects editing on all Wikimedia wikis. </p><p>The IP address or range 8.222.128.0/17 has been globally <a href="/wiki/Wikipedia:Blocking_policy" title="Wikipedia:Blocking policy">blocked</a> by <a href="/wiki/User:Jon_Kolbert" title="User:Jon Kolbert">Jon Kolbert</a> for the following reason(s): </p> <div style="padding:10px; background:var(--background-color-base, white); color:inherit; border:1px #666 solid;"> <p><a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/NOP" class="extiw" title="m:Special:MyLanguage/NOP">Open proxy/Webhost</a>: See the <a href="https://meta.wikimedia.org/wiki/WM:OP/H" class="extiw" title="m:WM:OP/H">help page</a> if you are affected </p> </div> <p>This block will expire on 15:12, 27 August 2028. Your current IP address is 8.222.208.146. </p> <div class="paragraphbreak" style="margin-top:0.5em"></div><div style="font-size: 16px;"> <p>Even while globally blocked, you will <i>usually</i> still be able to edit pages on <a href="https://meta.wikimedia.org/wiki/" class="extiw" title="m:">Meta-Wiki</a>. </p> </div> <div class="paragraphbreak" style="margin-top:0.5em"></div><div style="font-size: 16px;"> <p>If you believe you were blocked by mistake, you can find additional information and instructions in the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/No_open_proxies" class="extiw" title="m:Special:MyLanguage/No open proxies">No open proxies</a> global policy. Otherwise, to discuss the block please <a href="https://meta.wikimedia.org/wiki/Steward_requests/Global" class="extiw" title="m:Steward requests/Global">post a request for review on Meta-Wiki</a>. You could also send an email to the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Stewards" class="extiw" title="m:Special:MyLanguage/Stewards">stewards</a> <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/VRT" class="extiw" title="m:Special:MyLanguage/VRT">VRT</a> queue at <kbd>stewards@wikimedia.org</kbd> including all above details. </p> </div> <p>Other useful links: <a href="https://meta.wikimedia.org/wiki/Global_blocks" class="extiw" title="m:Global blocks">Global blocks</a> · <a href="/wiki/Help:I_have_been_blocked" title="Help:I have been blocked">Help:I have been blocked</a> </p> </div></li></ul><hr /> <div id="viewsourcetext">You can view and copy the source of this page:</div><textarea readonly="" accesskey="," id="wpTextbox1" cols="80" rows="25" style="" class="mw-editfont-monospace" lang="en" dir="ltr" name="wpTextbox1">{{Short description|Programming language that uses first order logic}} {{About|the programming language|the narrative device|Prologue|other uses|Prologue (disambiguation)}} {{Infobox programming language | paradigm = [[Logic programming|Logic]] | designers = [[Alain Colmerauer]] | released = {{Start date and age|1972}} | latest release version = Part 1: General core-Edition 1 ({{Start date and age|1995|06}})<br />Part 2: Modules-Edition 1 ({{Start date and age|2000|06}}) | latest release date = | typing = Untyped (its single data type is "term") | implementations = [http://www.amzi.com/#apls Amzi! Prolog], [[B-Prolog]], [[Ciao (programming language)|Ciao]], [[ECLiPSe]], [[GNU Prolog]], [[Logic Programming Associates|LPA Prolog]], [[Poplog]], [https://homepages.inf.ed.ac.uk/stg/research/Psharp/ P#], [[Quintus Prolog]], [https://www.scryer.pl/ Scryer Prolog], [https://sicstus.sics.se/ SICStus], [https://dobrev.com/ Strawberry], [[SWI-Prolog]], [http://tau-prolog.org/ Tau Prolog], [http://tuprolog.unibo.it/ tuProlog], [https://www.lpa.co.uk/win.htm WIN-PROLOG] [[XSB]], [[YAP (Prolog)|YAP]]. | dialects = [[#ISO Prolog|ISO Prolog]], Edinburgh Prolog | influenced by = [[Planner (programming language)|Planner]] | influenced = [[Constraint Handling Rules|CHR]], [[Clojure]], [[Datalog]], [[Erlang (programming language)|Erlang]], [http://epilog.stanford.edu/ Epilog], [[KL0]], [[KL1]], [[Logtalk]], [[Mercury (programming language)|Mercury]], [[Oz (programming language)|Oz]], [[Strand (programming language)|Strand]], [[Visual Prolog]] | file_ext = <code>.pl</code>, <code>.pro</code>, <code>.P</code> | website = Part 1: {{URL|https://www.iso.org/standard/21413.html}}<br /> Part 2: {{URL|https://www.iso.org/standard/20775.html}} | wikibooks = Prolog }} '''Prolog''' is a [[logic programming]] language that has its origins in [[artificial intelligence]], [[automated theorem proving]] and [[computational linguistics]].<ref name=Clocksin2003>{{Cite book |last1=Clocksin |first1=William F. |last2=Mellish |first2=Christopher S. |title=Programming in Prolog |year=2003 |publisher=Springer-Verlag |location=Berlin; New York |isbn=978-3-540-00678-7}}</ref><ref name=Bratko2012>{{Cite book |last1=Bratko |first1=Ivan |title=Prolog programming for artificial intelligence |edition=4th |year=2012 |publisher=Addison Wesley |location=Harlow, England; New York |isbn=978-0-321-41746-6}}</ref><ref name=Covington1994>{{Cite book |last1=Covington |first1=Michael A. |title=Natural language processing for Prolog programmers |year=1994 |publisher=Prentice Hall |location=Englewood Cliffs, N.J. |isbn=978-0-13-629213-5}}</ref> Prolog has its roots in [[first-order logic]], a [[formal logic]], and unlike many other [[programming language]]s, Prolog is intended primarily as a [[declarative programming]] language: the program is a set of facts and [[Horn clause|rules]], which define [[Finitary relation|relations]]. A [[computation]] is initiated by running a ''query'' over the program.<ref name=lloyd84/> Prolog was one of the first logic programming languages<ref>See {{section link|Logic programming|History}}.</ref> and remains the most popular such language today, with several free and commercial implementations available. The language has been used for [[automated theorem proving|theorem proving]],<ref>{{Cite journal |last1=Stickel |first1=M. E. |title=A prolog technology theorem prover: Implementation by an extended prolog compiler |journal=[[Journal of Automated Reasoning]] |volume=4 |issue=4 |pages=353–380 |year=1988 |doi=10.1007/BF00297245 |citeseerx=10.1.1.47.3057 |s2cid=14621218}}</ref> [[expert system]]s,<ref>{{cite book |author=Merritt, Dennis |title=Building expert systems in Prolog |publisher=Springer-Verlag |location=Berlin |year=1989 |isbn=978-0-387-97016-5 |url-access=registration |url=https://archive.org/details/buildingexpertsy0000merr}}</ref> [[term rewriting]],<ref>Felty, Amy. "A logic programming approach to implementing higher-order term rewriting." Extensions of Logic Programming (1992): 135-161.</ref> [[type system]]s,<ref name="Lee2015">{{cite book|author=Kent D. Lee|title=Foundations of Programming Languages|url=https://books.google.com/books?id=dERFBgAAQBAJ&q=prolog+type+inference&pg=PA298|date=19 January 2015|publisher=Springer|isbn=978-3-319-13314-0|pages=298–}}</ref> and [[automated planning]],<ref name="Schmid2003">{{cite book|author=Ute Schmid|author-link= Ute Schmid |title=Inductive Synthesis of Functional Programs: Universal Planning, Folding of Finite Programs, and Schema Abstraction by Analogical Reasoning|url=https://books.google.com/books?id=p-Fy25LE4lMC|date=21 August 2003|publisher=Springer Science & Business Media|isbn=978-3-540-40174-2}}</ref> as well as its original intended field of use, [[natural language processing]].<ref>{{cite book |author1=Fernando C. N. Pereira |author-link1=Fernando Pereira |author2=Stuart M. Shieber |year=2005 |title=Prolog and Natural Language Analysis |publisher=Microtome |url=http://mtome.com/Publications/PNLA/pnla.html}}</ref><ref name=lally>{{cite web |author1=Adam Lally |author2=Paul Fodor |date=31 March 2011 |url=http://www.cs.nmsu.edu/ALP/2011/03/natural-language-processing-with-prolog-in-the-ibm-watson-system/ |title=Natural Language Processing With Prolog in the IBM Watson System |publisher=Association for Logic Programming |access-date=13 June 2014 |archive-date=3 September 2014 |archive-url=https://web.archive.org/web/20140903064037/http://www.cs.nmsu.edu/ALP/2011/03/natural-language-processing-with-prolog-in-the-ibm-watson-system/ |url-status=dead }} See also [[Watson (computer)]].</ref> Prolog is a Turing-complete, general-purpose programming language, which is well-suited for intelligent knowledge-processing applications. == Syntax and semantics == {{Main|Prolog syntax and semantics}} In Prolog, program logic is expressed in terms of relations, and a computation is initiated by running a ''query'' over these relations. Relations and queries are constructed using Prolog's single data type, the ''term''.<ref name=lloyd84>{{cite book |author=Lloyd, J. W. |title=Foundations of logic programming |publisher=Springer-Verlag |location=Berlin |year=1984 |isbn=978-3-540-13299-8}}</ref> Relations are defined by ''clauses''. Given a query, the Prolog engine attempts to find a [[resolution (logic)|resolution]] [[refutation]] of the negated query. If the negated query can be refuted, i.e., an instantiation for all free variables is found that makes the union of clauses and the singleton set consisting of the negated query false, it follows that the original query, with the found instantiation applied, is a [[logical consequence]] of the program. This makes Prolog (and other logic programming languages) particularly useful for database, [[symbolic mathematics]], and language parsing applications. Because Prolog allows impure [[Predicate (mathematical logic)|predicates]], checking the [[truth value]] of certain special predicates may have some deliberate [[side effect (computer science)|side effect]], such as printing a value to the screen. Because of this, the programmer is permitted to use some amount of conventional [[imperative programming]] when the logical paradigm is inconvenient. It has a purely logical subset, called "pure Prolog", as well as a number of extralogical features. === Data types === Prolog's single [[data type]] is the ''term''. Terms are either ''[[symbol (programming)#Prolog|atom]]s'', ''numbers'', ''variables'' or ''compound terms''.<ref group=note> The Prolog terminology differs from that of [[First-order logic|logic]]. A term of Prolog is (depending on the context) a [[Term (logic)|term]] or an [[atomic formula]] of logic. An atom in a standard logic terminology means an [[atomic formula]]; an atom of Prolog (depending on the context) is a constant, function symbol or predicate symbol of logic. </ref> * An '''atom''' is a symbol name starting with a lower case letter or guarded by quotes. Examples of atoms include <code>x</code>, <code>red</code>, <code>'Taco'</code>, <code>'some atom'</code>, and <code>'p(a)'</code>. * '''Numbers''' can be [[floating-point arithmetic|floats]] or [[integer]]s. Most of the major Prolog systems support arbitrary length integer numbers. * '''Variables''' are denoted by a string consisting of letters, numbers and underscore characters, and beginning with an upper-case letter or underscore. Variables closely resemble variables in logic in that they are placeholders for arbitrary terms. * A '''compound term''' is composed of an atom called a "functor" and a number of "arguments", which are again terms. Compound terms are ordinarily written as a functor followed by a comma-separated list of argument terms, which is contained in parentheses. The number of arguments is called the term's [[arity]]. An atom can be regarded as a compound term with [[arity]] zero. An example of a compound term is <code>person_friends(zelda,[tom,jim])</code>. Special cases of compound terms: * A ''List'' is an ordered collection of terms. It is denoted by square brackets with the terms separated by commas, or in the case of the empty list, by <code>[]</code>. For example, <code>[1,2,3,4]</code> or <code>[red,green,blue]</code>. * ''Strings'': A sequence of characters surrounded by quotes is equivalent to either a list of (numeric) character codes, a list of characters (atoms of length 1), or an atom depending on the value of the Prolog flag <code>double_quotes</code>. For example, <code>"to be, or not to be"</code>.<ref name="ISO 13211-1 6.3.7">ISO/IEC 13211-1:1995 Prolog, 6.3.7 Terms - double quoted list notation. [[International Organization for Standardization]], Geneva.</ref> === Rules and facts === Prolog programs describe relations, defined by means of clauses. Pure Prolog is restricted to [[Horn clause]]s. Two types of Horn clauses are used to define Prolog programs: rules and facts. A rule is of the form <syntaxhighlight lang="prolog">Head :- Body.</syntaxhighlight> and is read as "Head is true if Body is true". A rule's body consists of calls to predicates, which are called the rule's '''goals'''. The built-in [[logical operator]] <code>,/2</code> (meaning an arity 2 [[Operator (programming)|operator]] with name <code>,</code>) denotes [[logical conjunction|conjunction]] of goals, and <code>;/2</code> denotes [[logical disjunction|disjunction]]. Conjunctions and disjunctions can only appear in the body, not in the head of a rule. Clauses with empty bodies are called '''facts'''. An example of a fact is: <syntaxhighlight lang="prolog">human(socrates).</syntaxhighlight> which is equivalent to the rule: <syntaxhighlight lang="prolog">human(socrates) :- true.</syntaxhighlight> The built-in predicate <code>true/0</code> is always true. Given the above fact, one can ask: ''is socrates a human?'' <syntaxhighlight lang="prolog"> ?- human(socrates). Yes </syntaxhighlight> ''what things are humans?'' <syntaxhighlight lang="prolog"> ?- human(X). X = socrates </syntaxhighlight> Clauses with bodies are called '''rules'''. An example of a rule is: <syntaxhighlight lang="prolog">mortal(X) :- human(X).</syntaxhighlight> If we add that rule and ask ''what things are mortals?'' <syntaxhighlight lang="prolog"> ?- mortal(X). X = socrates </syntaxhighlight> === Predicates and programs === A ''predicate'' (or ''procedure definition'') is a collection of clauses whose heads have the same name and arity. We use the notation ''name/arity'' to refer to predicates. A ''logic program'' is a set of predicates. For example, the following Prolog program, which defines some family relations, has four predicates: <syntaxhighlight lang="prolog"> mother_child(trude, sally). father_child(tom, sally). father_child(tom, erica). father_child(mike, tom). sibling(X, Y) :- parent_child(Z, X), parent_child(Z, Y). parent_child(X, Y) :- father_child(X, Y). parent_child(X, Y) :- mother_child(X, Y). </syntaxhighlight> Predicate <code>father_child/2</code> has three clauses, all of which are facts, and predicate <code>parent_child/2</code> has two clauses, both are rules. Due to the relational nature of many built-in predicates, they can typically be used in several directions. For example, <code>length/2</code> can be used to determine the length of a list (<code>length(List, L)</code>, given a list <code>List</code>), and to generate a list skeleton of a given length (<code>length(X, 5)</code>), and to generate both list skeletons and their lengths together (<code>length(X, L)</code>). Similarly, <code>append/3</code> can be used both to append two lists (<code>append(ListA, ListB, X)</code> given lists <code>ListA</code> and <code>ListB</code>), and to split a given list into parts (<code>append(X, Y, List)</code>, given a list <code>List</code>). For this reason, a comparatively small set of library predicates suffices for many Prolog programs. As a general purpose language, Prolog also provides various built-in predicates to perform routine activities like [[input/output]], using graphics and otherwise communicating with the operating system. These predicates are not given a relational meaning and are only useful for the side-effects they exhibit on the system. For example, the predicate <code>write/1</code> displays a term on the screen. === Loops and recursion === Iterative algorithms can be implemented by means of recursive predicates.<ref>{{cite book |last=Carlsson |first=Mats |url=https://books.google.com/books?id=dZimAwAAQBAJ&q=prolog%20failure%20driven%20loop%20%22iteration%22&pg=PA148 |title=SICStus Prolog User's Manual 4.3: Core reference documentation |date=27 May 2014 |publisher=BoD – Books on Demand |isbn=978-3-7357-3744-1 |via=Google Books}}</ref> Consider the <code>parent_child/2</code> predicate defined in the family relation program above. The following Prolog program defines the ''ancestor'' relation:<syntaxhighlight lang="prolog"> ancestor(X, Y) :- parent_child(X, Y). ancestor(X, Y) :- parent_child(X, Z), ancestor(Z, Y). </syntaxhighlight>It expresses that X is an ancestor of Y if X is parent of Y or X is parent of an ancestor of Y. It is recursive because it is defined in terms of itself (there is a call to predicate <code>ancestor/2</code> in the body of the second clause). === Execution === Execution of a Prolog program is initiated by the user's posting of a single goal, called the query. Logically, the Prolog engine tries to find a [[resolution (logic)|resolution]] refutation of the negated query. The resolution method used by Prolog is called [[SLD resolution]]. If the negated query can be refuted, it follows that the query, with the appropriate variable bindings in place, is a logical consequence of the program. In that case, all generated variable bindings are reported to the user, and the query is said to have succeeded. Operationally, Prolog's execution strategy can be thought of as a generalization of function calls in other languages, one difference being that multiple clause heads can match a given call. In that case, the system creates a choice-point, [[unification (computer science)|unifies]] the goal with the clause head of the first alternative, and continues with the goals of that first alternative. If any goal fails in the course of executing the program, all variable bindings that were made since the most recent choice-point was created are undone, and execution continues with the next alternative of that choice-point. This execution strategy is called chronological [[backtracking]]. For example, given the family relation program defined above, the following query will be evaluated to true: <syntaxhighlight lang="prolog"> ?- sibling(sally, erica). Yes </syntaxhighlight> This is obtained as follows: Initially, the only matching clause-head for the query <code>sibling(sally, erica)</code> is the first one, so proving the query is equivalent to proving the body of that clause with the appropriate variable bindings in place, i.e., the conjunction <code>(parent_child(Z,sally), parent_child(Z,erica))</code>. The next goal to be proved is the leftmost one of this conjunction, i.e., <code>parent_child(Z, sally)</code>. Two clause heads match this goal. The system creates a choice-point and tries the first alternative, whose body is <code>father_child(Z, sally)</code>. This goal can be proved using the fact <code>father_child(tom, sally)</code>, so the binding <code>Z = tom</code> is generated, and the next goal to be proved is the second part of the above conjunction: <code>parent_child(tom, erica)</code>. Again, this can be proved by the corresponding fact. Since all goals could be proved, the query succeeds. Since the query contained no variables, no bindings are reported to the user. A query with variables, like: <syntaxhighlight lang="prolog">?- father_child(Father, Child).</syntaxhighlight> enumerates all valid answers on backtracking. Notice that with the code as stated above, the query <code>?- sibling(sally, sally).</code> also succeeds. One would insert additional goals to describe the relevant restrictions, if desired. === Negation === The built-in Prolog predicate <code>\+/1</code> provides [[negation as failure]], which allows for [[non-monotonic logic|non-monotonic]] reasoning. The goal <code>\+ illegal(X)</code> in the rule <syntaxhighlight lang="prolog">legal(X) :- \+ illegal(X).</syntaxhighlight> is evaluated as follows: Prolog attempts to prove <code>illegal(X)</code>. If a proof for that goal can be found, the original goal (i.e., <code>\+ illegal(X)</code>) fails. If no proof can be found, the original goal succeeds. Therefore, the <code>\+/1</code> prefix operator is called the "not provable" operator, since the query <code>?- \+ Goal.</code> succeeds if Goal is not provable. This kind of negation is [[Soundness|sound]] if its argument is [[Ground expression|"ground"]] (i.e. contains no variables). Soundness is lost if the argument contains variables and the proof procedure is complete. In particular, the query <code>?- legal(X).</code> now cannot be used to enumerate all things that are legal. == Programming in Prolog == In Prolog, loading code is referred to as ''consulting''. Prolog can be used interactively by entering queries at the Prolog prompt <code>?-</code>. If there is no solution, Prolog writes <code>no</code>. If a solution exists then it is printed. If there are multiple solutions to the query, then these can be requested by entering a semi-colon <code>;</code>. There are guidelines on good programming practice to improve code efficiency, readability and maintainability.<ref>{{Cite journal |last1=Covington |first1=Michael A. |last2=Bagnara |first2=Roberto |last3=O'Keefe |first3=Richard A. |author-link3=Richard O'Keefe |last4=Wielemaker |first4=Jan |last5=Price |first5=Simon |title=Coding guidelines for Prolog |doi=10.1017/S1471068411000391 |journal=[[Theory and Practice of Logic Programming]] |volume=12 |issue=6 |pages=889–927 |year=2011 |arxiv=0911.2899|s2cid=438363}}</ref> Here follow some example programs written in Prolog. === Hello World === Example of a basic query in a couple of popular Prolog dialects: {| |- ! [[SWI-Prolog]] ! [[GNU Prolog]] |- |<syntaxhighlight lang="prolog"> ?- write('Hello World!'), nl. Hello World! true. ?- </syntaxhighlight> |<syntaxhighlight lang="prolog"> | ?- write('Hello World!'), nl. Hello World! yes | ?- </syntaxhighlight> |} This comparison shows the prompt ("?-" vs "| ?-") and resolution status ("true." vs "yes", "false." vs "no") can differ from one Prolog implementation to another. === Compiler optimization === Any computation can be expressed declaratively as a sequence of state transitions. As an example, an [[optimizing compiler]] with three optimization passes could be implemented as a relation between an initial program and its optimized form: <syntaxhighlight lang="prolog"> program_optimized(Prog0, Prog) :- optimization_pass_1(Prog0, Prog1), optimization_pass_2(Prog1, Prog2), optimization_pass_3(Prog2, Prog). </syntaxhighlight> or equivalently using [[definite clause grammar|DCG]] notation: <syntaxhighlight lang="prolog"> program_optimized --> optimization_pass_1, optimization_pass_2, optimization_pass_3. </syntaxhighlight> === Quicksort === The [[quicksort]] sorting algorithm, relating a list to its sorted version: <syntaxhighlight lang="prolog"> partition([], _, [], []). partition([X|Xs], Pivot, Smalls, Bigs) :- ( X @< Pivot -> Smalls = [X|Rest], partition(Xs, Pivot, Rest, Bigs) ; Bigs = [X|Rest], partition(Xs, Pivot, Smalls, Rest) ). quicksort([]) --> []. quicksort([X|Xs]) --> { partition(Xs, X, Smaller, Bigger) }, quicksort(Smaller), [X], quicksort(Bigger). </syntaxhighlight> == Design patterns of Prolog == A [[design pattern (computer science)|design pattern]] is a general reusable solution to a commonly occurring problem in [[software design]]. Some design patterns in Prolog are skeletons, techniques,<ref> {{cite journal |last1=Kirschenbaum |first1=M. |last2=Sterling |first2=L.S. |year=1993 |series=Lecture Notes in Computer Science / Lecture Notes in Artificial Intelligence |title=Applying Techniques to Skeletons - Patterns for Prolog Programming |journal=Constructing Logic Programs, (Ed. J.M.J. Jacquet) |pages=27–140 |citeseerx =10.1.1.56.7278}}</ref><ref>{{cite book |title=Computational Logic: Logic Programming and Beyond |first=Leon |last=Sterling |year=2002 |volume=2407 |pages=17–26 |doi=10.1007/3-540-45628-7_15 |isbn=978-3-540-43959-2 }}</ref> cliches,<ref>D. Barker-Plummer. Cliche programming in Prolog. In M. Bruynooghe, editor, Proc. Second Workshop on Meta-Programming in Logic, pages 247--256. Dept. of Comp. Sci., Katholieke Univ. Leuven, 1990.</ref> program schemata,<ref name=Gegg-harrison1995> {{cite conference |last=Gegg-harrison |first=T. S. |year=1995 |title=Representing Logic Program Schemata in Prolog |conference=Procs Twelfth International Conference on Logic Programming |pages=467–481 }}</ref> logic description schemata,<ref name=Deville1990> {{cite book |last=Deville |first=Yves |year=1990 |title=Logic programming: systematic program development |publisher=Addison-Wesley |location=Wokingham, England |isbn=978-0-201-17576-9 }}</ref> and [[higher-order programming]].<ref name=Naish1996> {{cite report |last=Naish |first=Lee |year=1996 |title=Higher-order logic programming in Prolog |publisher=Department of Computer Science, [[University of Melbourne]] |citeseerx=10.1.1.35.4505 }}</ref> == Higher-order programming == {{Main|Higher-order logic|Higher-order programming}} A higher-order predicate is a predicate that takes one or more other predicates as arguments. Although support for higher-order programming takes Prolog outside the domain of first-order logic, which does not allow quantification over predicates,<ref>{{cite web|title=With regard to Prolog variables, variables only in the head are implicitly universally quantified, and those only in the body are implicitly existentially quantified|url=http://okmij.org/ftp/Prolog/quantification.txt|access-date=2013-05-04}}</ref> ISO Prolog now has some built-in higher-order predicates such as <code>call/1</code>, <code>call/2</code>, <code>call/3</code>, <code>findall/3</code>, <code>setof/3</code>, and <code>bagof/3</code>.<ref name="ISO 13211"/> Furthermore, since arbitrary Prolog goals can be constructed and evaluated at run-time, it is easy to write higher-order predicates like <code>maplist/2</code>, which applies an arbitrary predicate to each member of a given list, and <code>sublist/3</code>, which filters elements that satisfy a given predicate, also allowing for [[currying]].<ref name="Naish1996"/> To convert solutions from temporal representation (answer substitutions on backtracking) to spatial representation (terms), Prolog has various all-solutions predicates that collect all answer substitutions of a given query in a list. This can be used for [[list comprehension]]. For example, [[perfect numbers]] equal the sum of their proper divisors: <syntaxhighlight lang="prolog"> perfect(N) :- between(1, inf, N), U is N // 2, findall(D, (between(1,U,D), N mod D =:= 0), Ds), sumlist(Ds, N). </syntaxhighlight> This can be used to enumerate perfect numbers, and to check if a number is perfect. As another example, the predicate <code>maplist</code> applies a predicate <code>P</code> to all corresponding positions in a pair of lists: <syntaxhighlight lang="prolog"> maplist(_, [], []). maplist(P, [X|Xs], [Y|Ys]) :- call(P, X, Y), maplist(P, Xs, Ys). </syntaxhighlight> When <code>P</code> is a predicate that for all <code>X</code>, <code>P(X,Y)</code> unifies <code>Y</code> with a single unique value, <code>maplist(P, Xs, Ys)</code> is equivalent to applying the [[Map (higher-order function)|map]] function in [[functional programming]] as <code>Ys = map(Function, Xs)</code>. Higher-order programming style in Prolog was pioneered in [[HiLog]] and [[λProlog]]. == 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"/> == Parsing == {{Main|Prolog syntax and semantics#Definite clause grammars|Definite clause grammar}} There is a special notation called [[definite clause grammar]]s (DCGs). A rule defined via <code>-->/2</code> instead of <code>:-/2</code> is expanded by the preprocessor (<code>expand_term/2</code>, a facility analogous to macros in other languages) according to a few straightforward rewriting rules, resulting in ordinary Prolog clauses. Most notably, the rewriting equips the predicate with two additional arguments, which can be used to implicitly thread state around,{{Clarify|date=October 2012}} analogous to [[monads in functional programming|monads]] in other languages. DCGs are often used to write parsers or list generators, as they also provide a convenient interface to difference lists. == Meta-interpreters and reflection == Prolog is a [[homoiconic]] language and provides many facilities for [[reflective programming]] (reflection). Its implicit execution strategy makes it possible to write a concise [[meta-circular evaluator]] (also called ''meta-interpreter'') for pure Prolog code: <syntaxhighlight lang="prolog"> solve(true). solve((Subgoal1,Subgoal2)) :- solve(Subgoal1), solve(Subgoal2). solve(Head) :- clause(Head, Body), solve(Body). </syntaxhighlight> where <code>true</code> represents an empty conjunction, and <code>clause(Head, Body)</code> unifies with clauses in the database of the form <code>Head :- Body</code>. Since Prolog programs are themselves sequences of Prolog terms (<code>:-/2</code> is an infix [[Operator (programming)|operator]]) that are easily read and inspected using built-in mechanisms (like <code>read/1</code>), it is possible to write customized interpreters that augment Prolog with domain-specific features. For example, Sterling and Shapiro present a meta-interpreter that performs reasoning with uncertainty, reproduced here with slight modifications:<ref name=AOP94>{{cite book |author1=Shapiro, Ehud Y. |author2=Sterling, Leon |title=The Art of Prolog: Advanced Programming Techniques |publisher=MIT Press |location=Cambridge, Massachusetts |year=1994 |isbn=978-0-262-19338-2}}</ref>{{rp|330}} <syntaxhighlight lang="prolog"> solve(true, 1) :- !. solve((Subgoal1,Subgoal2), Certainty) :- !, solve(Subgoal1, Certainty1), solve(Subgoal2, Certainty2), Certainty is min(Certainty1, Certainty2). solve(Goal, 1) :- builtin(Goal), !, Goal. solve(Head, Certainty) :- clause_cf(Head, Body, Certainty1), solve(Body, Certainty2), Certainty is Certainty1 * Certainty2. </syntaxhighlight> This interpreter uses a table of built-in Prolog predicates of the form<ref name="AOP94"/>{{rp|327}} <syntaxhighlight lang="prolog"> builtin(A is B). builtin(read(X)). % etc. </syntaxhighlight> and clauses represented as <code>clause_cf(Head, Body, Certainty)</code>. Given those, it can be called as <code>solve(Goal, Certainty)</code> to execute <code>Goal</code> and obtain a measure of certainty about the result. == Turing completeness == Pure Prolog is based on a subset of first-order [[predicate logic]], [[Horn clause]]s, which is [[Turing completeness|Turing-complete]]. Turing completeness of Prolog can be shown by using it to simulate a Turing machine: <syntaxhighlight lang="prolog"> turing(Tape0, Tape) :- perform(q0, [], Ls, Tape0, Rs), reverse(Ls, Ls1), append(Ls1, Rs, Tape). perform(qf, Ls, Ls, Rs, Rs) :- !. perform(Q0, Ls0, Ls, Rs0, Rs) :- symbol(Rs0, Sym, RsRest), once(rule(Q0, Sym, Q1, NewSym, Action)), action(Action, Ls0, Ls1, [NewSym|RsRest], Rs1), perform(Q1, Ls1, Ls, Rs1, Rs). symbol([], b, []). symbol([Sym|Rs], Sym, Rs). action(left, Ls0, Ls, Rs0, Rs) :- left(Ls0, Ls, Rs0, Rs). action(stay, Ls, Ls, Rs, Rs). action(right, Ls0, [Sym|Ls0], [Sym|Rs], Rs). left([], [], Rs0, [b|Rs0]). left([L|Ls], Ls, Rs, [L|Rs]). </syntaxhighlight> A simple example Turing machine is specified by the facts: <syntaxhighlight lang="prolog"> rule(q0, 1, q0, 1, right). rule(q0, b, qf, 1, stay). </syntaxhighlight> This machine performs incrementation by one of a number in unary encoding: It loops over any number of "1" cells and appends an additional "1" at the end. Example query and result: <syntaxhighlight lang="prolog"> ?- turing([1,1,1], Ts). Ts = [1, 1, 1, 1] ; </syntaxhighlight> This illustrates how any computation can be expressed declaratively as a sequence of state transitions, implemented in Prolog as a relation between successive states of interest. == Implementation == {{Further|Comparison of Prolog implementations}} === ISO Prolog === The [[International Organization for Standardization]] (ISO) Prolog [[technical standard]] consists of two parts. ISO/IEC 13211-1,<ref name="ISO 13211">ISO/IEC 13211: Information technology – Programming languages – Prolog. [[International Organization for Standardization]], Geneva.</ref><ref>{{cite book |last1=Ed-Dbali |first1=A. |last2=Deransart |first2=Pierre |last3=Cervoni |first3=L. |year=1996 |title=Prolog: the standard: reference manual |publisher=Springer |location=Berlin |isbn=978-3-540-59304-1}}</ref> published in 1995, aims to standardize the existing practices of the many implementations of the core elements of Prolog. It has clarified aspects of the language that were previously ambiguous and leads to portable programs. There are three corrigenda: Cor.1:2007,<ref name="Cor.1">{{Cite web|url=https://www.iso.org/cms/render/live/en/sites/isoorg/contents/data/standard/05/04/50405.html|title=ISO/IEC 13211-1:1995/Cor 1:2007|website=ISO}}</ref> Cor.2:2012,<ref name="Cor.2">{{Cite web|url=https://www.iso.org/cms/render/live/en/sites/isoorg/contents/data/standard/05/80/58033.html|title=ISO/IEC 13211-1:1995/Cor 2:2012|website=ISO}}</ref> and Cor.3:2017.<ref name="Cor.3">{{Cite web|url=https://www.iso.org/cms/render/live/en/sites/isoorg/contents/data/standard/07/31/73194.html|title=ISO/IEC 13211-1:1995/Cor 3:2017|website=ISO}}</ref> ISO/IEC 13211-2,<ref name="ISO 13211"/> published in 2000, adds support for modules to the standard. The standard is maintained by the [[JTC1|ISO/IEC JTC1]]/[[SC22]]/WG17<ref name="WG17">{{Cite web|url=http://iso.org/jtc1sc22wg17|title=ISO/IEC JTC1 SC22 WG17}}{{Dead link|date=February 2023 |bot=InternetArchiveBot |fix-attempted=yes}}</ref> working group. ANSI X3J17 is the US Technical Advisory Group for the standard.<ref name="X3J17">{{cite web|url=http://www.sju.edu/~jhodgson/x3j17.html|title=X3J17 and the Prolog Standard|access-date=2009-10-02|archive-url=https://web.archive.org/web/20090823160951/http://www.sju.edu/~jhodgson/x3j17.html|archive-date=2009-08-23|url-status=dead}}</ref> === Compilation === For efficiency, Prolog code is typically compiled to abstract machine code, often influenced by the register-based [[Warren Abstract Machine]] (WAM) instruction set.<ref>David H. D. Warren. [http://www.ai.sri.com/pubs/files/641.pdf "An abstract Prolog instruction set"]. Technical Note 309, [[SRI International]], Menlo Park, CA, October 1983.</ref> Some implementations employ [[abstract interpretation]] to derive type and mode information of predicates at compile time, or compile to real machine code for high performance.<ref>{{Cite journal |doi=10.1109/2.108055 |last1=Van Roy |first1=P. |last2=Despain |first2=A. M. |title=High-performance logic programming with the Aquarius Prolog compiler |journal=Computer |volume=25 |pages=54–68 |year=1992 |s2cid=16447071}}</ref> Devising efficient implementation methods for Prolog code is a field of active research in the logic programming community, and various other execution methods are employed in some implementations. These include [[clause binarization]] and [[stack machines|stack-based virtual machines]].{{Citation needed|date=November 2010}} === Tail recursion === Prolog systems typically implement a well-known optimization method called [[tail call#Tail call optimization|tail call optimization]] (TCO) for deterministic predicates exhibiting [[tail recursion]] or, more generally, tail calls: A clause's stack frame is discarded before performing a call in a tail position. Therefore, deterministic tail-recursive predicates are executed with constant stack space, like loops in other languages. === Term indexing === {{Main|Term indexing}} Finding clauses that are unifiable with a term in a query is linear in the number of clauses. [[Term indexing]] uses a [[data structure]] that enables [[Sublinear time|sub-linear-time]] lookups.<ref>{{Cite book |last1=Graf |first1=Peter |title=Term indexing |year=1995 |publisher=Springer |isbn=978-3-540-61040-3}}</ref> Indexing only affects program performance, it does not affect semantics. Most Prologs only use indexing on the first term, as indexing on all terms is expensive, but techniques based on ''field-encoded words'' or ''[[Superimposed code|superimposed]] codewords'' provide fast indexing across the full query and head.<ref name=WisePowers>{{cite conference |last1=Wise |first1=Michael J. |last2=Powers |first2=David M. W. |title=Indexing Prolog Clauses via Superimposed Code Words and Field Encoded Words |journal=International Symposium on Logic Programming |pages=203–210 |year=1986}}</ref><ref name=Colomb>{{Cite journal |doi=10.1016/0743-1066(91)90004-9 |title=Enhancing unification in PROLOG through clause indexing |journal=The Journal of Logic Programming |volume=10 |pages=23–44 |year=1991 |last1=Colomb |first1=Robert M. |doi-access =}}</ref> === Hashing === Some Prolog systems, such as [[Logic Programming Associates|WIN-PROLOG]] and SWI-Prolog, now implement hashing to help handle large datasets more efficiently. This tends to yield very large performance gains when working with large corpora such as [[WordNet]]. === Tabling === {{main|Tabled logic programming}} Some Prolog systems, ([[B-Prolog]], [[XSB]], [[SWI-Prolog]], [[YAP (Prolog)|YAP]], and [[Ciao (programming language)|Ciao]]), implement a [[memoization]] method called ''tabling'', which frees the user from manually storing intermediate results. Tabling is a [[space–time tradeoff]]; execution time can be reduced by using more memory to store intermediate results:<ref>{{Cite journal |last1=Swift |first1=T. |journal=Annals of Mathematics and Artificial Intelligence |volume=25 |issue=3/4 |pages=201–240|title=Tabling for non-monotonic programming |year=1999 |doi=10.1023/A:1018990308362 |s2cid=16695800}}</ref><ref>{{cite journal|last1=Zhou|first1=Neng-Fa|last2=Sato|first2=Taisuke|title=Efficient Fixpoint Computation in Linear Tabling|journal=Proceedings of the 5th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming|date=2003|pages=275–283|url=http://www.sci.brooklyn.cuny.edu/~zhou/papers/ppdp03.pdf}}</ref> <blockquote>Subgoals encountered in a query evaluation are maintained in a table, along with answers to these subgoals. If a subgoal is re-encountered, the evaluation reuses information from the table rather than re-performing resolution against program clauses.<ref>{{Cite journal |doi=10.1017/S1471068411000500 |title=XSB: Extending Prolog with Tabled Logic Programming |journal=Theory and Practice of Logic Programming |volume=12 |issue=1–2 |pages=157–187 |year=2011 |last1=Swift |first1=T. |last2=Warren |first2=D. S. |arxiv=1012.5123 |s2cid=6153112}}</ref></blockquote> Tabling can be extended in various directions. It can support recursive predicates through '''SLG resolution''' or linear tabling. In a multi-threaded Prolog system tabling results could be kept private to a thread or shared among all threads. And in incremental tabling, tabling might react to changes. === Implementation in hardware === During the [[Fifth Generation Computer Systems project]], there were attempts to implement Prolog in hardware with the aim of achieving faster execution with dedicated architectures.<ref>{{Cite book |first5=K. |last5=Kiriyama |page=100 |doi=10.1145/30350.30362 |year=1987 |first4=K. |last4=Kurosawa |last2=Bandoh |first1=S. |first2=T. |title=Proceedings of the 14th annual international symposium on Computer architecture - ISCA '87 |last3=Yamaguchi |first3=S. |last1=Abe |chapter=High performance integrated Prolog processor IPP |isbn=978-0-8186-0776-9 |s2cid=10283148}}</ref><ref>{{cite conference |first=Ian |last=Robinson |isbn=978-3-540-16492-0 |doi=10.1007/3-540-16492-8_73 |title=A Prolog processor based on a pattern matching memory device |conference=Third International Conference on Logic Programming |series=Lecture Notes in Computer Science |publisher=Springer |volume=225|pages=172–179 |year=1986}}</ref><ref>{{Cite journal |journal=ACM SIGPLAN Notices |title=Performance and architectural evaluation of the PSI machine |volume=22 |page=128 |doi=10.1145/36205.36195 |year=1987 |last1=Taki |first4=M. |last2=Nakajima |first1=K. |last4=Ikeda |first2=K. |last3=Nakashima |first3=H. |issue=10 |doi-access=free}}</ref> Furthermore, Prolog has a number of properties that may allow speed-up through parallel execution.<ref>{{Cite journal |last1=Gupta |first1=G. |last2=Pontelli |first2=E. |last3=Ali |first3=K. A. M. |last4=Carlsson |first4=M. |last5=Hermenegildo |first5=M. V. |year=2001 |journal=[[ACM Transactions on Programming Languages and Systems]] |title=Parallel execution of prolog programs: a survey |volume=23 |page=472 |doi=10.1145/504083.504085 |issue=4 |s2cid=2978041 |url=http://oa.upm.es/11160/ |doi-access=free}}</ref> A more recent approach has been to compile restricted Prolog programs to a [[field programmable gate array]].<ref>{{Cite web|url=http://www.cl.cam.ac.uk/~am21/research/sa/byrdbox.ps.gz|title=Statically Allocated Systems}}</ref> However, rapid progress in general-purpose hardware has consistently overtaken more specialised architectures. In 1982, computers operated at around 10,000 to 100,000 LIPS [logical inferences per second]. The FGCS planned to produce computers operating at 0.1 to 1 GLIPS.<ref>{{Cite book |last=Bramer |first=M. A. |url=https://archive.org/details/fifthgenerationa0000bram |title=The fifth generation: an annotated bibliography |last2=Bramer |first2=Dawn |date=1984 |publisher=Addison-Wesley |isbn=978-0-201-14427-7 |location=Wokingham, England ; Reading, Mass |pages=6}}</ref> The Institute for New Generation Computer Technology documents estimated that 1 LIP took about 100 operations on a conventional computer. The plan was to produce at the end of the project (in 1992) a machine with 1000 processors achieving 1 GLIPS, implying at least 1 MLIPS per processor.<ref>{{Cite journal |last=Feigenbaum |first=Edward |last2=Shrobe |first2=Howard |date=1993-07-01 |title=The Japanese national Fifth Generation project: Introduction, survey, and evaluation |url=https://www.sciencedirect.com/science/article/pii/0167739X93900038 |journal=Future Generation Computer Systems |series=FGCS Conference |volume=9 |issue=2 |pages=105–117 |doi=10.1016/0167-739X(93)90003-8 |issn=0167-739X|doi-access=free }}</ref> [[Sega]] implemented Prolog for use with the Sega AI Computer, released for the Japanese market in 1986. Prolog was used for reading [[natural language]] inputs, in the [[Japanese language]], via a [[touch pad]].<ref>{{cite magazine |date=March 26, 1987 |title=Software that takes games seriously |magazine=[[New Scientist]] |publisher=[[Reed Business Information]] |via=[[Google Books]] |page=34 |url=https://books.google.com/books?id=RI51dkpbcGoC&pg=PA34 }}{{Dead link|date=November 2023 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> == Limits == Although Prolog is widely used in research and education,<ref>{{Cite web |title=Computer science - Programming Languages, Syntax, Algorithms {{!}} Britannica |url=https://www.britannica.com/science/computer-science/Programming-languages |access-date=2023-07-12 |website=www.britannica.com |language=en}}</ref> Prolog and other logic programming languages have not had a significant impact on the computer industry in general.<ref name="RealWorld">Logic programming for the real world. Zoltan Somogyi, Fergus Henderson, Thomas Conway, Richard O'Keefe. Proceedings of the ILPS'95 Postconference Workshop on Visions for the Future of Logic Programming.</ref> Most applications are small by industrial standards, with few exceeding 100,000 lines of code.<ref name="RealWorld"/><ref name="The Prolog 1000 database">{{Cite web |url=http://www.faqs.org/faqs/prolog/resource-guide/part1/section-9.html |title=FAQ: Prolog Resource Guide 1/2 [Monthly posting]Section - [1-8] The Prolog 1000 Database |website=Faqs.org}}</ref> [[Programming in the large]] is considered to be complex because not all Prolog compilers support modules, and there are compatibility problems between the module systems of the major Prolog compilers.<ref name="cs.kuleuven.ac.be"/> Portability of Prolog code across implementations has also been a problem, but developments since 2007 have meant: "the portability within the family of Edinburgh/Quintus derived Prolog implementations is good enough to allow for maintaining portable real-world applications."<ref>Jan Wielemaker and Vıtor Santos Costa: [http://www.swi-prolog.org/download/publications/porting.pdf Portability of Prolog programs: theory and case-studies]. [http://www.floc-conference.org/CICLOPS-WLPE-accepted.html CICLOPS-WLPE Workshop 2010] {{Webarchive|url=https://web.archive.org/web/20100716184811/http://www.floc-conference.org/CICLOPS-WLPE-accepted.html |date=2010-07-16}}.</ref> Software developed in Prolog has been criticised for having a high performance penalty compared to conventional programming languages. In particular, Prolog's non-deterministic evaluation strategy can be problematic when programming deterministic computations, or when even using "don't care non-determinism" (where a single choice is made instead of backtracking over all possibilities). Cuts and other language constructs may have to be used to achieve desirable performance, destroying one of Prolog's main attractions, the ability to run programs "backwards and forwards".<ref name="rethinking">{{cite conference |first1=Oleg |last1=Kiselyov |first2=Yukiyoshi |last2=Kameyama |title=Re-thinking Prolog |conference=Proc. 31st meeting of the Japan Society for Software Science and Technology |year=2014 |url=http://okmij.org/ftp/kakuritu/logic-programming.html#vs-prolog}}</ref> Prolog is not purely declarative: because of constructs like the [[Cut (logic programming)|cut operator]], a procedural reading of a Prolog program is needed to understand it.<ref>{{citation|first=Torkel|last=Franzen|date=1994|url=http://dtai.cs.kuleuven.be/projects/ALP/newsletter/archive_93_96/comment/decl.html|title=Declarative vs procedural|journal=Association of Logic Programming|volume=7|issue=3}}</ref> The order of clauses in a Prolog program is significant, as the execution strategy of the language depends on it.<ref>{{cite journal |title=Complexity and Expressive Power of Logic Programming |journal=[[ACM Computing Surveys]] |first1=Evgeny |last1=Dantsin |first2=Thomas |last2=Eiter |first3=Georg |last3=Gottlob |first4=Andrei |last4=Voronkov |year=2001 |volume=33 |issue=3 |pages=374–425 |doi=10.1145/502807.502810|citeseerx=10.1.1.616.6372 |s2cid=518049}}</ref> Other logic programming languages, such as [[Datalog]], are truly declarative but restrict the language. As a result, many practical Prolog programs are written to conform to Prolog's [[depth-first search]] order, rather than as purely declarative logic programs.<ref name="rethinking"/> == Extensions == Various implementations have been developed from Prolog to extend logic programming abilities in many directions. These include [[type system|types]], modes, [[constraint logic programming]] (CLP), [[Object-oriented programming|object-oriented]] logic programming (OOLP), concurrency, [[linear logic]] (LLP), functional and [[higher-order logic]] programming abilities, plus interoperability with [[knowledge base]]s: === Types === Prolog is an untyped language. Attempts to introduce and extend Prolog with types began in the 1980s,<ref>{{Cite journal |doi=10.1016/0004-3702(84)90017-1 |last1=Mycroft |first1=A. |last2=O'Keefe |first2=R. A. |title=A polymorphic type system for prolog |journal=[[Artificial Intelligence (journal)|Artificial Intelligence]] |volume=23 |issue=3 |page=295 |year=1984}}</ref><ref>{{cite book |author=Pfenning, Frank |title=Types in logic programming |publisher=MIT Press |location=Cambridge, Massachusetts |year=1992 |isbn=978-0-262-16131-2}}</ref> and continue {{as of|2008|lc=y}}.<ref>{{Cite book |last1=Schrijvers |first1=Tom |last2=Santos Costa |first2=Vitor |last3=Wielemaker |first3=Jan |last4=Demoen |first4=Bart |year=2008 |chapter=Towards Typed Prolog |editor1=María García de la Banda |editor1-link=María García de la Banda|editor2=Enrico Pontelli |title=Logic programming: 24th international conference, ICLP 2008, Udine, Italy, December 9-13, 2008: proceedings |series=Lecture Notes in Computer Science |volume=5366 |pages=693–697 |doi=10.1007/978-3-540-89982-2_59 |isbn=978-3-540-89982-2 |chapter-url=https://lirias.kuleuven.be/handle/123456789/197561}}</ref> Type information is useful not only for [[type safety]] but also for reasoning about Prolog programs.<ref name="cite doi|10.1007/BF01213601">{{Cite journal |doi=10.1007/BF01213601 |last1=Apt |first1=K. R. |last2=Marchiori |first2=E. |title=Reasoning about Prolog programs: From modes through types to assertions |journal=Formal Aspects of Computing |volume=6 |issue=S1 |page=743 |year=1994 |url=http://www.cwi.nl/~apt/am.ps |citeseerx=10.1.1.57.395 |s2cid=12235465}}</ref> === Modes === {| style="float: right;" class="wikitable" border="1" |- ! Mode specifier ! Interpretation |- | <code>+</code> | <code>nonvar</code> on entry |- | <code>-</code> | <code>var</code> on entry |- | <code>?</code> | Not specified |} The syntax of Prolog does not specify which arguments of a predicate are inputs and which are outputs.<ref name="craft">{{cite book |author=O'Keefe, Richard A. |title=The craft of Prolog |publisher=MIT Press |location=Cambridge, Massachusetts |year=1990 |isbn=978-0-262-15039-2}}</ref> However, this information is significant and it is recommended that it be included in the comments.<ref>{{cite arXiv |title=Coding guidelines for Prolog |date=2010 |eprint=0911.2899 |last1=Covington |first1=Michael |last2=Bagnara |first2=Roberto |last3=O'Keefe |first3=Richard |last4=Wielemaker |first4=Jan |last5=Price |first5=Simon |display-authors=2 |class=cs.PL}}</ref> Modes provide valuable information when reasoning about Prolog programs<ref name="cite doi|10.1007/BF01213601"/> and can also be used to accelerate execution.<ref>{{Cite book |doi=10.1007/BFb0014976 |last1=Roy |first1=P. |last2=Demoen |first2=B. |isbn=978-3-540-17611-4 |last3=Willems |first3=Y. D. |chapter=Improving the execution speed of compiled Prolog with modes, clause selection, and determinism |title=Tapsoft '87 |series=Lecture Notes in Computer Science |volume=250 |pages=[https://archive.org/details/tapsoft87proceed0000inte/page/111 111] |year=1987 |chapter-url=https://archive.org/details/tapsoft87proceed0000inte/page/111}}</ref> === Constraints === [[Constraint logic programming]] extends Prolog to include concepts from [[constraint satisfaction]].<ref>{{Cite journal |last=Jaffar |first=J. |year=1994 |title=Constraint logic programming: a survey |journal=The Journal of Logic Programming |volume=19–20 |pages=503–581 |doi=10.1016/0743-1066(94)90033-7 |doi-access=free}}</ref><ref> {{cite journal |first=Alain |last=Colmerauer |year=1987 |title=Opening the Prolog III Universe |journal=Byte |volume=August }}</ref> A constraint logic program allows constraints in the body of clauses, such as: <code>A(X,Y) :- X+Y>0.</code> It is suited to large-scale [[combinatorial optimisation]] problems<ref>{{Cite book |last=Wallace |first=M. |year=2002 |chapter=Constraint Logic Programming |isbn=978-3-540-45628-5 |title=Computational Logic: Logic Programming and Beyond |series=Lecture Notes in Computer Science |volume=2407 |pages=512–556 |doi=10.1007/3-540-45628-7_19}}</ref> and is thus useful for applications in industrial settings, such as automated time-tabling and [[production scheduling]]. Most Prolog systems ship with at least one constraint solver for finite domains, and often also with solvers for other domains like [[rational number]]s. === Object-orientation === [[Flora-2]] is an object-oriented knowledge representation and reasoning system based on [[F-logic]] and incorporates [[HiLog]], [[Transaction logic]], and [[defeasible reasoning]]. [[Logtalk]] is an object-oriented logic programming language that can use most Prolog implementations as a back-end compiler. As a multi-paradigm language, it includes support for both prototypes and classes. [[Oblog]] is a small, portable, object-oriented extension to Prolog by Margaret McDougall of EdCAAD, University of Edinburgh. [[Objlog]] was a frame-based language combining objects and Prolog II from CNRS, Marseille, France. [[Prolog++]] was developed by [[Logic Programming Associates]] and first released in 1989 for MS-DOS PCs. Support for other platforms was added, and a second version was released in 1995. A book about Prolog++ by Chris Moss was published by Addison-Wesley in 1994. [[Visual Prolog]] is a multi-paradigm language with interfaces, classes, implementations and object expressions. === Graphics === Prolog systems that provide a [[graphics library]] are [[SWI-Prolog]],<ref>{{Cite web |url=https://www.swi-prolog.org/packages/xpce/ |title=XPCE: the SWI-Prolog native GUI library |website=swi-prolog.org}}</ref> [[Visual Prolog]], [[Logic Programming Associates|WIN-PROLOG]], and [[B-Prolog]]. === Concurrency === Prolog-MPI is an open-source [[SWI-Prolog]] extension for [[distributed computing]] over the [[Message Passing Interface]].<ref>{{cite web|url=http://apps.lumii.lv/prolog-mpi/ |title=prolog-mpi |publisher=Apps.lumii.lv |access-date=2010-09-16}}</ref> Also there are various concurrent Prolog programming languages.<ref>Ehud Shapiro. ''The family of concurrent logic programming languages'' [[ACM Computing Surveys]]. September 1989.</ref> === Web programming === Some Prolog implementations, notably [[Visual Prolog]], [[SWI-Prolog]] and [[Ciao (programming language)|Ciao]], support [[server-side]] [[web programming]] with support for web protocols, [[HTML]] and [[XML]].<ref>{{Cite journal |journal=Theory and Practice of Logic Programming |volume=8 |year=2008 |doi=10.1017/S1471068407003237 |title=SWI-Prolog and the web |first3=L. |first1=J. |last2=Huang |first2=Z. |last1=Wielemaker |last3=Van Der Meij |issue=3 |page=363 |s2cid=5404048 |url=https://pure.uva.nl/ws/files/4221287/58604_285112.pdf}}</ref> There are also extensions to support [[semantic web]] formats such as [[Resource Description Framework]] (RDF) and [[Web Ontology Language]] (OWL).<ref> {{citation |last1=Wielemaker |first1=Jan |last2=Hildebrand |first2=Michiel |last3=van Ossenbruggen |first3=Jacco |year=2007 |title=Using {Prolog} as the fundament for applications on the semantic web |periodical=Proceedings of the 2nd Workshop on Applications of Logic Programming and to the Web, Semantic Web and Semantic Web Services |publisher=CEUR-WS.org |series=CEUR Workshop Proceedings |volume=287 |pages=84–98 |location=Porto, Portugal |editor1-last=Heymans |editor1-first=S. |editor2-last=Polleres |editor2-first=A. |editor3-last=Ruckhaus |editor3-first=E. |editor4-last=Pearse |editor4-first=D. |editor5-last=Gupta |editor5-first=G. |url=http://ftp.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-287/paper_1.pdf }}</ref><ref>[http://ceur-ws.org/Vol-529/owled2009_submission_43.pdf Processing OWL2 Ontologies using Thea: An Application of Logic Programming]. Vangelis Vassiliadis, Jan Wielemaker and Chris Mungall. Proceedings of the 5th International Workshop on OWL: Experiences and Directions (OWLED 2009), Chantilly, VA, United States, October 23–24, 2009</ref> Prolog has also been suggested as a [[client-side]] language.<ref>{{Cite journal |last1=Loke |first1=S. W. |last2=Davison |first2=A. |title=Secure Prolog-based mobile code |journal=Theory and Practice of Logic Programming |volume=1 |issue=3 |page=321 |year=2001 |doi=10.1017/S1471068401001211 |citeseerx=10.1.1.58.6610 |arxiv=cs/0406012 |s2cid=11754347}}</ref> In addition, Visual Prolog supports [[JSON-RPC]] and [[Websockets]]. === Adobe Flash === [http://sites.google.com/site/cedarprolog/ Cedar] {{Webarchive|url=https://web.archive.org/web/20101019074143/http://sites.google.com/site/cedarprolog/ |date=2010-10-19}} is a free and basic Prolog interpreter. From version 4 and above Cedar has a FCA (Flash Cedar App) support. This provides a new platform to programming in Prolog through [[ActionScript]]. === Other === * [[F-logic]] extends Prolog with frames/objects for [[knowledge representation]]. * [[Transaction logic]] extends Prolog with a logical theory of state-changing update operators. It has both a model-theoretic and procedural semantics. * [[OW Prolog]] has been created in order to answer Prolog's lack of graphics and interface. == Interfaces to other languages == Frameworks exist which can bridge between Prolog and other languages: * The [https://www.lpa.co.uk/int.htm LPA Intelligence Server] allows embedding [https://www.lpa.co.uk/win.htm LPA Prolog for Windows] in other programming languages, including: [[C (programming language)|C]], {{nowrap|[[C++]]}}, [[C Sharp (programming language)|C#]], [[Java (programming language)|Java]], [[Visual Basic (classic)|Visual Basic]] (VB), [[Delphi (software)|Delphi]], [[.NET]], [[Lua (programming language)|Lua]], [[Python (programming language)|Python]], and others. It exploits the dedicated string data type which LPA Prolog provides * The [http://www.amzi.com/#apls Logic Server] Application Programming Interface ([[API]]) allows both the extension and embedding of Prolog in [[C (programming language)|C]], {{nowrap|[[C++]]}}, [[Java (programming language)|Java]], [[Visual Basic (classic)|Visual Basic]] (VB), [[Delphi (software)|Delphi]], [[.NET]], and any language or environment which can call a .dll or .so. It is implemented for [http://www.amzi.com/#apls Amzi! Prolog + Logic Server] but the API specification can be made available for any implementation. * [https://jpl7.org/ JPL] is a bi-directional Java Prolog bridge which ships with SWI-Prolog by default, allowing Java and Prolog to call each other (recursively). It is known to have good concurrency support and is under active development. * [http://interprolog.com/ InterProlog], a programming [[Library (computing)|library]] bridge between [[Java platform|Java]] and Prolog, implementing bi-directional predicate/method calling between both languages. Java objects can be mapped into Prolog terms and vice versa. Allows the development of [[graphical user interface]]s (GUIs) and other functions in Java while leaving logic processing in the Prolog layer. Supports [[XSB]] and [[SWI-Prolog]]. * [[Prova]] provides native syntax integration with Java, agent messaging and reaction rules. Prova positions itself as a rule-based scripting (RBS) system for middleware. The language breaks new ground in combining [[imperative programming|imperative]] and [[declarative programming]]. * [https://github.com/raydac/jprol/ PROL] An embeddable Prolog engine for Java. It includes a small IDE and a few libraries. * [https://www.gnu.org/software/gnuprologjava/ GNU Prolog for Java] is an implementation of ISO Prolog as a Java library (gnu.prolog) * [[Ciao (programming language)|Ciao]] provides interfaces to C, {{nowrap|C++}}, Java, and relational databases. * [http://sourceforge.net/projects/cs-prolog/ C#-Prolog] is a Prolog interpreter written in (managed) C#. Can easily be integrated in C# programs. Characteristics: reliable and fairly fast interpreter, command line interface, Windows-interface, builtin DCG, XML-predicates, SQL-predicates, extendible. The complete source code is available, including a parser generator that can be used for adding special purpose extensions. * [https://github.com/Trismegiste/WamBundle A Warren Abstract Machine for PHP] A Prolog compiler and interpreter in PHP 5.3. A library that can be used standalone or within Symfony2.1 framework which was translated from [http://stefan.buettcher.org/ Stephan Buettcher's] work in Java which can be found [here {{URL|http://stefan.buettcher.org/cs/wam/}}] * [http://tuprolog.unibo.it tuProlog] is a lightweight Prolog system for distributed applications and infrastructures, intentionally designed around a minimal core, to be either statically or dynamically configured by loading/unloading libraries of predicates. tuProlog natively supports multi-paradigm programming, providing a clean, seamless integration model between Prolog and mainstream object-oriented languages, namely Java, for tuProlog Java version, and any .NET-based language (C#, F#..), for tuProlog .NET version. * [https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/janus.html%27) Janus] is a bi-directional interface between Prolog and Python using portable low-level primitives. It was initially developed for XSB by Anderson and Swift,<ref>Andersen, C. and Swift, T., 2023. The Janus System: a bridge to new prolog applications. In Prolog: The Next 50 Years (pp. 93-104). Cham: Springer Nature Switzerland.</ref> but has been adopted as a joint initiative by the XSB, Ciao and SWI-Prolog teams. == History == [[File:Early Prolog timeline.svg|thumb|upright=2|Timeline of early developments in Prolog]] The name ''Prolog'' was chosen by Philippe Roussel, at the suggestion of his wife, as an abbreviation for ''{{lang|fr|programmation en logique}}'' ([[French language|French]] for ''programming in [[logic]]'').<ref> Colmerauer, A. and Roussel, P., 1996. The birth of Prolog. In History of programming languages---II (pp. 331-367).</ref> It was created around 1972 by [[Alain Colmerauer]] with Philippe Roussel, based on [[Robert Kowalski]]'s procedural interpretation of [[Horn clause]]s. It was motivated in part by the desire to reconcile the use of logic as a declarative knowledge representation language with the procedural representation of knowledge that was popular in North America in the late 1960s and early 1970s. According to [[Robert Kowalski]], the first Prolog system was developed in 1972 by Colmerauer and Phillipe Roussel.<ref name="Kowalski">{{Cite journal |last1=Kowalski |first1=R. A. |year=1988 |title=The early years of logic programming |journal=[[Communications of the ACM]] |volume=31 |page=38 |s2cid=12259230 |url=http://www.doc.ic.ac.uk/~rak/papers/the%20early%20years.pdf |doi=10.1145/35043.35046}}</ref><ref>{{Cite journal |last1=Colmerauer |first1=A. |last2=Roussel |first2=P. |title=The birth of Prolog |journal=[[ACM SIGPLAN Notices]] |volume=28 |issue=3 |page=37 |year=1993 |url=http://alain.colmerauer.free.fr/alcol/ArchivesPublications/PrologHistory/19november92.pdf |doi=10.1145/155360.155362}}</ref><ref>{{cite web |url=https://www.mta.ca/~rrosebru/oldcourse/371199/prolog/history.html |title=Prolog: a brief history |access-date=21 November 2021}}</ref> The first implementation of Prolog was an interpreter written in [[Fortran]] by Gerard Battani and Henri Meloni. [[David H. D. Warren]] took this interpreter to the [[University of Edinburgh]], and there implemented an alternative front-end, which came to define the "Edinburgh Prolog" syntax used by most modern implementations. Warren also implemented the first compiler for Prolog, creating the influential DEC-10 Prolog in collaboration with Fernando Pereira. Warren later generalised the ideas behind DEC-10 Prolog, to create the [[Warren Abstract Machine]]. European AI researchers favored Prolog while Americans favored [[Lisp (programming language)|Lisp]], reportedly causing many nationalistic debates on the merits of the languages.<ref name="pountain198410">{{cite news |last=Pountain |first=Dick |date=October 1984 |url=https://archive.org/stream/byte-magazine-1984-10/1984_10_BYTE_09-11_Databases#page/n377/mode/2up |title=POP and SNAP |work=[[Byte (magazine)|Byte]] |access-date=23 October 2013 |page=381}}</ref> Much of the modern development of Prolog came from the impetus of the [[Fifth Generation Computer Systems project]] (FGCS), which developed a variant of Prolog named ''[[KL1|Kernel Language]]'' for its first [[operating system]]. Pure Prolog was originally restricted to the use of a [[resolution (logic)|resolution]] theorem prover with [[Horn clause]]s of the form: H :- B<sub>1</sub>, ..., B<sub>n</sub>. The application of the theorem-prover treats such clauses as procedures: to show/solve H, show/solve B<sub>1</sub> and ... and B<sub>n</sub>. Pure Prolog was soon extended, however, to include [[negation as failure]], in which negative conditions of the form not(B<sub>i</sub>) are shown by trying and failing to solve the corresponding positive conditions B<sub>i</sub>. Subsequent extensions of Prolog by the original team introduced [[constraint logic programming]] abilities into the implementations. == Use in industry == Prolog has been used in [[Watson (computer)|Watson]]. Watson uses IBM's DeepQA software and the Apache [[UIMA]] (Unstructured Information Management Architecture) framework. The system was written in various languages, including Java, {{nowrap|C++}}, and Prolog, and runs on the [[SUSE Linux Enterprise Server]] 11 operating system using [[Apache Hadoop]] framework to provide distributed computing. Prolog is used for [[pattern matching]] over natural language parse trees. The developers have stated: "We required a language in which we could conveniently express pattern matching rules over the parse trees and other annotations (such as named entity recognition results), and a technology that could execute these rules very efficiently. We found that Prolog was the ideal choice for the language due to its simplicity and [[Expressive power (computer science)|expressiveness]]."<ref name=lally/> Prolog is being used in the Low-Code Development Platform [[GeneXus]], which is focused around AI.{{Citation needed|date=November 2022}} Open source [[graph database]] [[TerminusDB]] is implemented in Prolog.<ref>{{Citation|title=terminusdb/terminusdb|date=2020-12-13|url=https://github.com/terminusdb/terminusdb|publisher=TerminusDB|access-date=2020-12-15}}</ref> TerminusDB is designed for collaboratively building and curating [[knowledge graph]]s. == See also == * [[Comparison of Prolog implementations]] * [[Logico-linguistic modeling]]. A method for building knowledge-based system that uses Prolog. * [[Answer set programming]]. A fully declarative approach to logic programming. * [[Association for Logic Programming]] ===Related languages=== * The [[Gödel (programming language)|Gödel]] language is a strongly typed implementation of [[concurrent constraint logic programming]]. It is built on [[SICStus Prolog]]. * [[Visual Prolog]], formerly named PDC Prolog and Turbo Prolog, is a [[data type|strongly typed]] [[Object-oriented programming|object-oriented]] dialect of Prolog, which is very different from standard Prolog. As Turbo Prolog, it was marketed by Borland, but is now developed and marketed by the Danish firm Prolog Development Center (PDC) that originally produced it. * [[Datalog]] is a subset of Prolog. It is limited to relationships that may be stratified and does not allow compound terms. In contrast to Prolog, Datalog is not [[Turing-complete]]. * [[Mercury (programming language)|Mercury]] is an offshoot of Prolog geared toward software engineering in the large with a static, polymorphic type system, as well as a mode and determinism system. * GraphTalk is a proprietary implementation of Warren's Abstract Machine, with additional object-oriented properties. * In some ways{{Which|date=February 2010}} Prolog is a subset of [[Planner (programming language)|Planner]]. The ideas in Planner were later further developed in the [[Scientific Community Metaphor]]. * [[AgentSpeak]] is a variant of Prolog for programming agent behavior in [[multi-agent system]]s. * [[Erlang (programming language)|Erlang]] began life with a Prolog-based implementation and maintains much of Prolog's unification-based syntax. * [https://picolisp.com/wiki/?accessToLispFunctionFromPilog Pilog] is a declarative language built on top of [[PicoLisp]], that has the semantics of Prolog, but uses the syntax of Lisp. * [[λProlog]] is an extension of core Prolog that features polymorphic typing, modular programming, and higher-order programming, including direct support for terms with variable-binding operators through so-called λ-tree syntax and higher-order pattern unification. == Notes == {{reflist|group=note}} == References == {{reflist}} == Further reading == {{refbegin|2}} * {{cite book |first1=Patrick |last1=Blackburn |first2=Johan |last2=Bos |first3=Kristina |last3=Striegnitz |title=Learn Prolog Now! |url=http://www.learnprolognow.org/ |year=2006 |publisher=College Publications |isbn=978-1-904987-17-8 |access-date=2008-12-02 |archive-date=2007-08-26 |archive-url=https://web.archive.org/web/20070826231318/http://www.learnprolognow.org/ |url-status=dead }} * [[Ivan Bratko (computer scientist)|Ivan Bratko]], ''Prolog Programming for Artificial Intelligence'', 4th ed., 2012, {{ISBN|978-0-321-41746-6}}. [https://ailab.si/ivan/datoteke/dokumenti/32/107_19_Bratko_Prolog_book_web_resources.htm Book supplements and source code]{{Dead link|date=August 2019 |bot=InternetArchiveBot |fix-attempted=yes }} * William F. Clocksin, Christopher S. Mellish: ''Programming in Prolog: Using the ISO Standard''. Springer, 5th ed., 2003, {{ISBN|978-3-540-00678-7}}. ''(This edition is updated for ISO Prolog. Prior editions described Edinburgh Prolog.)'' * William F. Clocksin: ''Clause and Effect. Prolog Programming for the Working Programmer''. Springer, 2003, {{ISBN|978-3-540-62971-9}}. * [[Michael A. Covington]], Donald Nute, Andre Vellino, ''Prolog Programming in Depth'', 1996, {{ISBN|0-13-138645-X}}. * Michael A. Covington, ''Natural Language Processing for Prolog Programmers'', 1994, {{ISBN|978-0-13-629213-5}} * M. S. Dawe and C.M.Dawe, ''Prolog for Computer Sciences'', Springer Verlag 1992. * ''ISO/IEC 13211: Information technology – Programming languages – Prolog''. [[International Organization for Standardization]], Geneva. * Feliks Kluźniak and Stanisław Szpakowicz (with a contribution by Janusz S. Bień). ''Prolog for Programmers''. Academic Press Inc. (London), 1985, 1987 (available under a [[Creative Commons]] license at {{URL|https://sites.google.com/site/prologforprogrammers/}}{{Dead link|date=September 2019 |bot=InternetArchiveBot |fix-attempted=yes}}). {{ISBN|0-12-416521-4}}. * [[Richard O'Keefe]], ''The Craft of Prolog'', {{ISBN|0-262-15039-5}}. * Robert Smith, John Gibson, [[Aaron Sloman]]: 'POPLOG's two-level virtual machine support for interactive languages', in ''Research Directions in Cognitive Science Volume 5: Artificial Intelligence'', Eds [[Derek H. Sleeman|D. Sleeman]] and N. Bernsen, Lawrence Erlbaum Associates, pp 203–231, 1992. * [[Leon Sterling]] and [[Ehud Shapiro]], ''The Art of Prolog: Advanced Programming Techniques'', 1994, {{ISBN|0-262-19338-8}}. * David H D Warren, Luis M. Pereira and Fernando Pereira, Prolog - the language and its implementation compared with Lisp. ACM SIGART Bulletin archive, Issue 64. Proceedings of the 1977 symposium on Artificial intelligence and programming languages, pp 109–115. {{refend}} {{Wikibooks}} {{Programming languages}} {{ISO standards}} {{Authority control}} [[Category:Dynamically typed programming languages]] [[Category:Logic programming languages]] [[Category:Pattern matching programming languages]] [[Category:Programming languages created in 1972]] [[Category:Programming languages with an ISO standard]] [[Category:Prolog programming language family]] [[Category:Homoiconic programming languages]] [[Category:French inventions]] </textarea><div class="templatesUsed"><div class="mw-templatesUsedExplanation"><p><span id="templatesused">Pages transcluded onto the current version of this page<span class="posteditwindowhelplinks"> (<a href="/wiki/Help:Transclusion" title="Help:Transclusion">help</a>)</span>:</span> </p></div><ul> <li><a href="/wiki/Template:About" title="Template:About">Template:About</a> (<a href="/w/index.php?title=Template:About&action=edit" title="Template:About">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:As_of" title="Template:As of">Template:As of</a> (<a href="/w/index.php?title=Template:As_of&action=edit" title="Template:As of">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Authority_control" title="Template:Authority control">Template:Authority control</a> (<a href="/w/index.php?title=Template:Authority_control&action=edit" title="Template:Authority control">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Catalog_lookup_link" title="Template:Catalog lookup link">Template:Catalog lookup link</a> (<a href="/w/index.php?title=Template:Catalog_lookup_link&action=edit" title="Template:Catalog lookup link">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Category_handler" title="Template:Category handler">Template:Category handler</a> (<a href="/w/index.php?title=Template:Category_handler&action=edit" title="Template:Category handler">view source</a>) (protected)</li><li><a href="/wiki/Template:Citation" title="Template:Citation">Template:Citation</a> (<a href="/w/index.php?title=Template:Citation&action=edit" title="Template:Citation">view source</a>) (protected)</li><li><a href="/wiki/Template:Citation_needed" title="Template:Citation needed">Template:Citation needed</a> (<a href="/w/index.php?title=Template:Citation_needed&action=edit" title="Template:Citation needed">view source</a>) (protected)</li><li><a href="/wiki/Template:Cite_arXiv" title="Template:Cite arXiv">Template:Cite arXiv</a> (<a href="/w/index.php?title=Template:Cite_arXiv&action=edit" title="Template:Cite arXiv">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Cite_book" title="Template:Cite book">Template:Cite book</a> (<a href="/w/index.php?title=Template:Cite_book&action=edit" title="Template:Cite book">view source</a>) (protected)</li><li><a href="/wiki/Template:Cite_conference" title="Template:Cite conference">Template:Cite conference</a> (<a href="/w/index.php?title=Template:Cite_conference&action=edit" title="Template:Cite conference">view source</a>) (protected)</li><li><a href="/wiki/Template:Cite_journal" title="Template:Cite journal">Template:Cite journal</a> (<a href="/w/index.php?title=Template:Cite_journal&action=edit" title="Template:Cite journal">view source</a>) (protected)</li><li><a href="/wiki/Template:Cite_magazine" title="Template:Cite magazine">Template:Cite magazine</a> (<a href="/w/index.php?title=Template:Cite_magazine&action=edit" title="Template:Cite magazine">view source</a>) (protected)</li><li><a href="/wiki/Template:Cite_news" title="Template:Cite news">Template:Cite news</a> (<a href="/w/index.php?title=Template:Cite_news&action=edit" title="Template:Cite news">view source</a>) (protected)</li><li><a href="/wiki/Template:Cite_report" title="Template:Cite report">Template:Cite report</a> (<a href="/w/index.php?title=Template:Cite_report&action=edit" title="Template:Cite report">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Cite_web" title="Template:Cite web">Template:Cite web</a> (<a href="/w/index.php?title=Template:Cite_web&action=edit" title="Template:Cite web">view source</a>) (protected)</li><li><a href="/wiki/Template:Clarify" title="Template:Clarify">Template:Clarify</a> (<a href="/w/index.php?title=Template:Clarify&action=edit" title="Template:Clarify">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:DMCA" class="mw-redirect" title="Template:DMCA">Template:DMCA</a> (<a href="/w/index.php?title=Template:DMCA&action=edit" class="mw-redirect" title="Template:DMCA">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Dated_maintenance_category" title="Template:Dated maintenance category">Template:Dated maintenance category</a> (<a href="/w/index.php?title=Template:Dated_maintenance_category&action=edit" title="Template:Dated maintenance category">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Dated_maintenance_category_(articles)" title="Template:Dated maintenance category (articles)">Template:Dated maintenance category (articles)</a> (<a href="/w/index.php?title=Template:Dated_maintenance_category_(articles)&action=edit" title="Template:Dated maintenance category (articles)">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Dead_link" title="Template:Dead link">Template:Dead link</a> (<a href="/w/index.php?title=Template:Dead_link&action=edit" title="Template:Dead link">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Delink" title="Template:Delink">Template:Delink</a> (<a href="/w/index.php?title=Template:Delink&action=edit" title="Template:Delink">view source</a>) (protected)</li><li><a href="/wiki/Template:FULLROOTPAGENAME" title="Template:FULLROOTPAGENAME">Template:FULLROOTPAGENAME</a> (<a href="/w/index.php?title=Template:FULLROOTPAGENAME&action=edit" title="Template:FULLROOTPAGENAME">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Fix" title="Template:Fix">Template:Fix</a> (<a href="/w/index.php?title=Template:Fix&action=edit" title="Template:Fix">view source</a>) (protected)</li><li><a href="/wiki/Template:Fix-span" title="Template:Fix-span">Template:Fix-span</a> (<a href="/w/index.php?title=Template:Fix-span&action=edit" title="Template:Fix-span">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Fix/category" title="Template:Fix/category">Template:Fix/category</a> (<a href="/w/index.php?title=Template:Fix/category&action=edit" title="Template:Fix/category">view source</a>) (protected)</li><li><a href="/wiki/Template:Further" title="Template:Further">Template:Further</a> (<a href="/w/index.php?title=Template:Further&action=edit" title="Template:Further">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Hlist/styles.css" title="Template:Hlist/styles.css">Template:Hlist/styles.css</a> (<a href="/w/index.php?title=Template:Hlist/styles.css&action=edit" title="Template:Hlist/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Template:ISBN" title="Template:ISBN">Template:ISBN</a> (<a href="/w/index.php?title=Template:ISBN&action=edit" title="Template:ISBN">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:ISO_standards" title="Template:ISO standards">Template:ISO standards</a> (<a href="/w/index.php?title=Template:ISO_standards&action=edit" title="Template:ISO standards">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Icon" title="Template:Icon">Template:Icon</a> (<a href="/w/index.php?title=Template:Icon&action=edit" title="Template:Icon">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Infobox" title="Template:Infobox">Template:Infobox</a> (<a href="/w/index.php?title=Template:Infobox&action=edit" title="Template:Infobox">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Infobox_programming_language" title="Template:Infobox programming language">Template:Infobox programming language</a> (<a href="/w/index.php?title=Template:Infobox_programming_language&action=edit" title="Template:Infobox programming language">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Infobox_software/simple" title="Template:Infobox software/simple">Template:Infobox software/simple</a> (<a href="/w/index.php?title=Template:Infobox_software/simple&action=edit" title="Template:Infobox software/simple">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Lang" title="Template:Lang">Template:Lang</a> (<a href="/w/index.php?title=Template:Lang&action=edit" title="Template:Lang">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:MONTHNAME" title="Template:MONTHNAME">Template:MONTHNAME</a> (<a href="/w/index.php?title=Template:MONTHNAME&action=edit" title="Template:MONTHNAME">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:MONTHNUMBER" title="Template:MONTHNUMBER">Template:MONTHNUMBER</a> (<a href="/w/index.php?title=Template:MONTHNUMBER&action=edit" title="Template:MONTHNUMBER">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Main" title="Template:Main">Template:Main</a> (<a href="/w/index.php?title=Template:Main&action=edit" title="Template:Main">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Main_other" title="Template:Main other">Template:Main other</a> (<a href="/w/index.php?title=Template:Main_other&action=edit" title="Template:Main other">view source</a>) (protected)</li><li><a href="/wiki/Template:Navbox" title="Template:Navbox">Template:Navbox</a> (<a href="/w/index.php?title=Template:Navbox&action=edit" title="Template:Navbox">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Nobold" title="Template:Nobold">Template:Nobold</a> (<a href="/w/index.php?title=Template:Nobold&action=edit" title="Template:Nobold">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Nobold/styles.css" title="Template:Nobold/styles.css">Template:Nobold/styles.css</a> (<a href="/w/index.php?title=Template:Nobold/styles.css&action=edit" title="Template:Nobold/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Nowrap" title="Template:Nowrap">Template:Nowrap</a> (<a href="/w/index.php?title=Template:Nowrap&action=edit" title="Template:Nowrap">view source</a>) (protected)</li><li><a href="/wiki/Template:Ns_has_subpages" title="Template:Ns has subpages">Template:Ns has subpages</a> (<a href="/w/index.php?title=Template:Ns_has_subpages&action=edit" title="Template:Ns has subpages">view source</a>) (protected)</li><li><a href="/wiki/Template:PAGENAMEBASE" title="Template:PAGENAMEBASE">Template:PAGENAMEBASE</a> (<a href="/w/index.php?title=Template:PAGENAMEBASE&action=edit" title="Template:PAGENAMEBASE">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Pagetype" title="Template:Pagetype">Template:Pagetype</a> (<a href="/w/index.php?title=Template:Pagetype&action=edit" title="Template:Pagetype">view source</a>) (protected)</li><li><a href="/wiki/Template:Plainlist/styles.css" title="Template:Plainlist/styles.css">Template:Plainlist/styles.css</a> (<a href="/w/index.php?title=Template:Plainlist/styles.css&action=edit" title="Template:Plainlist/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Template:Programming_languages" title="Template:Programming languages">Template:Programming languages</a> (<a href="/w/index.php?title=Template:Programming_languages&action=edit" title="Template:Programming languages">edit</a>) </li><li><a href="/wiki/Template:Px2" class="mw-redirect" title="Template:Px2">Template:Px2</a> (<a href="/w/index.php?title=Template:Px2&action=edit" class="mw-redirect" title="Template:Px2">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:R/superscript" title="Template:R/superscript">Template:R/superscript</a> (<a href="/w/index.php?title=Template:R/superscript&action=edit" title="Template:R/superscript">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:R/where" title="Template:R/where">Template:R/where</a> (<a href="/w/index.php?title=Template:R/where&action=edit" title="Template:R/where">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Refbegin" title="Template:Refbegin">Template:Refbegin</a> (<a href="/w/index.php?title=Template:Refbegin&action=edit" title="Template:Refbegin">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Refbegin/styles.css" title="Template:Refbegin/styles.css">Template:Refbegin/styles.css</a> (<a href="/w/index.php?title=Template:Refbegin/styles.css&action=edit" title="Template:Refbegin/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Refend" title="Template:Refend">Template:Refend</a> (<a href="/w/index.php?title=Template:Refend&action=edit" title="Template:Refend">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Reference_page" title="Template:Reference page">Template:Reference page</a> (<a href="/w/index.php?title=Template:Reference_page&action=edit" title="Template:Reference page">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Reflist" title="Template:Reflist">Template:Reflist</a> (<a href="/w/index.php?title=Template:Reflist&action=edit" title="Template:Reflist">view source</a>) (protected)</li><li><a href="/wiki/Template:Reflist/styles.css" title="Template:Reflist/styles.css">Template:Reflist/styles.css</a> (<a href="/w/index.php?title=Template:Reflist/styles.css&action=edit" title="Template:Reflist/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Template:Rp" class="mw-redirect" title="Template:Rp">Template:Rp</a> (<a href="/w/index.php?title=Template:Rp&action=edit" class="mw-redirect" title="Template:Rp">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:SDcat" title="Template:SDcat">Template:SDcat</a> (<a href="/w/index.php?title=Template:SDcat&action=edit" title="Template:SDcat">view source</a>) (protected)</li><li><a href="/wiki/Template:Section_link" title="Template:Section link">Template:Section link</a> (<a href="/w/index.php?title=Template:Section_link&action=edit" title="Template:Section link">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Short_description" title="Template:Short description">Template:Short description</a> (<a href="/w/index.php?title=Template:Short_description&action=edit" title="Template:Short description">view source</a>) (protected)</li><li><a href="/wiki/Template:Short_description/lowercasecheck" title="Template:Short description/lowercasecheck">Template:Short description/lowercasecheck</a> (<a href="/w/index.php?title=Template:Short_description/lowercasecheck&action=edit" title="Template:Short description/lowercasecheck">view source</a>) (protected)</li><li><a href="/wiki/Template:Side_box" title="Template:Side box">Template:Side box</a> (<a href="/w/index.php?title=Template:Side_box&action=edit" title="Template:Side box">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Sister-inline" title="Template:Sister-inline">Template:Sister-inline</a> (<a href="/w/index.php?title=Template:Sister-inline&action=edit" title="Template:Sister-inline">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Sister_project" title="Template:Sister project">Template:Sister project</a> (<a href="/w/index.php?title=Template:Sister_project&action=edit" title="Template:Sister project">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Sister_project/styles.css" title="Template:Sister project/styles.css">Template:Sister project/styles.css</a> (<a href="/w/index.php?title=Template:Sister_project/styles.css&action=edit" title="Template:Sister project/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Start_date_and_age" title="Template:Start date and age">Template:Start date and age</a> (<a href="/w/index.php?title=Template:Start_date_and_age&action=edit" title="Template:Start date and age">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Template_other" title="Template:Template other">Template:Template other</a> (<a href="/w/index.php?title=Template:Template_other&action=edit" title="Template:Template other">view source</a>) (protected)</li><li><a href="/wiki/Template:Tooltip" title="Template:Tooltip">Template:Tooltip</a> (<a href="/w/index.php?title=Template:Tooltip&action=edit" title="Template:Tooltip">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Tooltip/styles.css" title="Template:Tooltip/styles.css">Template:Tooltip/styles.css</a> (<a href="/w/index.php?title=Template:Tooltip/styles.css&action=edit" title="Template:Tooltip/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Trim" title="Template:Trim">Template:Trim</a> (<a href="/w/index.php?title=Template:Trim&action=edit" title="Template:Trim">view source</a>) (protected)</li><li><a href="/wiki/Template:Two_pixel_space" title="Template:Two pixel space">Template:Two pixel space</a> (<a href="/w/index.php?title=Template:Two_pixel_space&action=edit" title="Template:Two pixel space">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:URL" title="Template:URL">Template:URL</a> (<a href="/w/index.php?title=Template:URL&action=edit" title="Template:URL">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Webarchive" title="Template:Webarchive">Template:Webarchive</a> (<a href="/w/index.php?title=Template:Webarchive&action=edit" title="Template:Webarchive">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Which" title="Template:Which">Template:Which</a> (<a href="/w/index.php?title=Template:Which&action=edit" title="Template:Which">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Wikibooks" title="Template:Wikibooks">Template:Wikibooks</a> (<a href="/w/index.php?title=Template:Wikibooks&action=edit" title="Template:Wikibooks">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Wikibooks_inline" title="Template:Wikibooks inline">Template:Wikibooks inline</a> (<a href="/w/index.php?title=Template:Wikibooks_inline&action=edit" title="Template:Wikibooks inline">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Years_or_months_ago" title="Template:Years or months ago">Template:Years or months ago</a> (<a href="/w/index.php?title=Template:Years_or_months_ago&action=edit" title="Template:Years or months ago">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Yesno" title="Template:Yesno">Template:Yesno</a> (<a href="/w/index.php?title=Template:Yesno&action=edit" title="Template:Yesno">view source</a>) (protected)</li><li><a href="/wiki/Template:Yesno-no" title="Template:Yesno-no">Template:Yesno-no</a> (<a href="/w/index.php?title=Template:Yesno-no&action=edit" title="Template:Yesno-no">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Yesno-yes" title="Template:Yesno-yes">Template:Yesno-yes</a> (<a href="/w/index.php?title=Template:Yesno-yes&action=edit" title="Template:Yesno-yes">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Zero_width_joiner" title="Template:Zero width joiner">Template:Zero width joiner</a> (<a href="/w/index.php?title=Template:Zero_width_joiner&action=edit" title="Template:Zero width joiner">view source</a>) (extended confirmed protected)</li><li><a href="/wiki/Module:About" title="Module:About">Module:About</a> (<a href="/w/index.php?title=Module:About&action=edit" title="Module:About">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Arguments" title="Module:Arguments">Module:Arguments</a> (<a href="/w/index.php?title=Module:Arguments&action=edit" title="Module:Arguments">view source</a>) (protected)</li><li><a href="/wiki/Module:Authority_control" title="Module:Authority control">Module:Authority control</a> (<a href="/w/index.php?title=Module:Authority_control&action=edit" title="Module:Authority control">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Authority_control/auxiliary" title="Module:Authority control/auxiliary">Module:Authority control/auxiliary</a> (<a href="/w/index.php?title=Module:Authority_control/auxiliary&action=edit" title="Module:Authority control/auxiliary">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Authority_control/config" title="Module:Authority control/config">Module:Authority control/config</a> (<a href="/w/index.php?title=Module:Authority_control/config&action=edit" title="Module:Authority control/config">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Catalog_lookup_link" title="Module:Catalog lookup link">Module:Catalog lookup link</a> (<a href="/w/index.php?title=Module:Catalog_lookup_link&action=edit" title="Module:Catalog lookup link">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Category_handler" title="Module:Category handler">Module:Category handler</a> (<a href="/w/index.php?title=Module:Category_handler&action=edit" title="Module:Category handler">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler/blacklist" title="Module:Category handler/blacklist">Module:Category handler/blacklist</a> (<a href="/w/index.php?title=Module:Category_handler/blacklist&action=edit" title="Module:Category handler/blacklist">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler/config" title="Module:Category handler/config">Module:Category handler/config</a> (<a href="/w/index.php?title=Module:Category_handler/config&action=edit" title="Module:Category handler/config">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler/data" title="Module:Category handler/data">Module:Category handler/data</a> (<a href="/w/index.php?title=Module:Category_handler/data&action=edit" title="Module:Category handler/data">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler/shared" title="Module:Category handler/shared">Module:Category handler/shared</a> (<a href="/w/index.php?title=Module:Category_handler/shared&action=edit" title="Module:Category handler/shared">view source</a>) (protected)</li><li><a href="/wiki/Module:Check_for_unknown_parameters" title="Module:Check for unknown parameters">Module:Check for unknown parameters</a> (<a href="/w/index.php?title=Module:Check_for_unknown_parameters&action=edit" title="Module:Check for unknown parameters">view source</a>) (protected)</li><li><a href="/wiki/Module:Check_isxn" title="Module:Check isxn">Module:Check isxn</a> (<a href="/w/index.php?title=Module:Check_isxn&action=edit" title="Module:Check isxn">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Citation/CS1" title="Module:Citation/CS1">Module:Citation/CS1</a> (<a href="/w/index.php?title=Module:Citation/CS1&action=edit" title="Module:Citation/CS1">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/COinS" title="Module:Citation/CS1/COinS">Module:Citation/CS1/COinS</a> (<a href="/w/index.php?title=Module:Citation/CS1/COinS&action=edit" title="Module:Citation/CS1/COinS">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Configuration" title="Module:Citation/CS1/Configuration">Module:Citation/CS1/Configuration</a> (<a href="/w/index.php?title=Module:Citation/CS1/Configuration&action=edit" title="Module:Citation/CS1/Configuration">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Date_validation" title="Module:Citation/CS1/Date validation">Module:Citation/CS1/Date validation</a> (<a href="/w/index.php?title=Module:Citation/CS1/Date_validation&action=edit" title="Module:Citation/CS1/Date validation">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Identifiers" title="Module:Citation/CS1/Identifiers">Module:Citation/CS1/Identifiers</a> (<a href="/w/index.php?title=Module:Citation/CS1/Identifiers&action=edit" title="Module:Citation/CS1/Identifiers">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Utilities" title="Module:Citation/CS1/Utilities">Module:Citation/CS1/Utilities</a> (<a href="/w/index.php?title=Module:Citation/CS1/Utilities&action=edit" title="Module:Citation/CS1/Utilities">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Whitelist" title="Module:Citation/CS1/Whitelist">Module:Citation/CS1/Whitelist</a> (<a href="/w/index.php?title=Module:Citation/CS1/Whitelist&action=edit" title="Module:Citation/CS1/Whitelist">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/styles.css" title="Module:Citation/CS1/styles.css">Module:Citation/CS1/styles.css</a> (<a href="/w/index.php?title=Module:Citation/CS1/styles.css&action=edit" title="Module:Citation/CS1/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Module:DecodeEncode" title="Module:DecodeEncode">Module:DecodeEncode</a> (<a href="/w/index.php?title=Module:DecodeEncode&action=edit" title="Module:DecodeEncode">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Delink" title="Module:Delink">Module:Delink</a> (<a href="/w/index.php?title=Module:Delink&action=edit" title="Module:Delink">view source</a>) (protected)</li><li><a href="/wiki/Module:Disambiguation/templates" title="Module:Disambiguation/templates">Module:Disambiguation/templates</a> (<a href="/w/index.php?title=Module:Disambiguation/templates&action=edit" title="Module:Disambiguation/templates">view source</a>) (protected)</li><li><a href="/wiki/Module:EditAtWikidata" title="Module:EditAtWikidata">Module:EditAtWikidata</a> (<a href="/w/index.php?title=Module:EditAtWikidata&action=edit" title="Module:EditAtWikidata">view source</a>) (protected)</li><li><a href="/wiki/Module:Exponential_search" title="Module:Exponential search">Module:Exponential search</a> (<a href="/w/index.php?title=Module:Exponential_search&action=edit" title="Module:Exponential search">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Format_link" title="Module:Format link">Module:Format link</a> (<a href="/w/index.php?title=Module:Format_link&action=edit" title="Module:Format link">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:GetParameters" title="Module:GetParameters">Module:GetParameters</a> (<a href="/w/index.php?title=Module:GetParameters&action=edit" title="Module:GetParameters">view source</a>) (protected)</li><li><a href="/wiki/Module:Hatnote" title="Module:Hatnote">Module:Hatnote</a> (<a href="/w/index.php?title=Module:Hatnote&action=edit" title="Module:Hatnote">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Hatnote/styles.css" title="Module:Hatnote/styles.css">Module:Hatnote/styles.css</a> (<a href="/w/index.php?title=Module:Hatnote/styles.css&action=edit" title="Module:Hatnote/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Hatnote_list" title="Module:Hatnote list">Module:Hatnote list</a> (<a href="/w/index.php?title=Module:Hatnote_list&action=edit" title="Module:Hatnote list">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Icon" title="Module:Icon">Module:Icon</a> (<a href="/w/index.php?title=Module:Icon&action=edit" title="Module:Icon">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Icon/data" title="Module:Icon/data">Module:Icon/data</a> (<a href="/w/index.php?title=Module:Icon/data&action=edit" title="Module:Icon/data">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Infobox" title="Module:Infobox">Module:Infobox</a> (<a href="/w/index.php?title=Module:Infobox&action=edit" title="Module:Infobox">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Infobox/styles.css" title="Module:Infobox/styles.css">Module:Infobox/styles.css</a> (<a href="/w/index.php?title=Module:Infobox/styles.css&action=edit" title="Module:Infobox/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:InfoboxImage" title="Module:InfoboxImage">Module:InfoboxImage</a> (<a href="/w/index.php?title=Module:InfoboxImage&action=edit" title="Module:InfoboxImage">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Labelled_list_hatnote" title="Module:Labelled list hatnote">Module:Labelled list hatnote</a> (<a href="/w/index.php?title=Module:Labelled_list_hatnote&action=edit" title="Module:Labelled list hatnote">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang" title="Module:Lang">Module:Lang</a> (<a href="/w/index.php?title=Module:Lang&action=edit" title="Module:Lang">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang/Configuration" title="Module:Lang/Configuration">Module:Lang/Configuration</a> (<a href="/w/index.php?title=Module:Lang/Configuration&action=edit" title="Module:Lang/Configuration">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang/ISO_639_synonyms" title="Module:Lang/ISO 639 synonyms">Module:Lang/ISO 639 synonyms</a> (<a href="/w/index.php?title=Module:Lang/ISO_639_synonyms&action=edit" title="Module:Lang/ISO 639 synonyms">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang/data" title="Module:Lang/data">Module:Lang/data</a> (<a href="/w/index.php?title=Module:Lang/data&action=edit" title="Module:Lang/data">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang/data/iana_languages" title="Module:Lang/data/iana languages">Module:Lang/data/iana languages</a> (<a href="/w/index.php?title=Module:Lang/data/iana_languages&action=edit" title="Module:Lang/data/iana languages">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang/data/iana_regions" title="Module:Lang/data/iana regions">Module:Lang/data/iana regions</a> (<a href="/w/index.php?title=Module:Lang/data/iana_regions&action=edit" title="Module:Lang/data/iana regions">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang/data/iana_scripts" title="Module:Lang/data/iana scripts">Module:Lang/data/iana scripts</a> (<a href="/w/index.php?title=Module:Lang/data/iana_scripts&action=edit" title="Module:Lang/data/iana scripts">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang/data/iana_suppressed_scripts" title="Module:Lang/data/iana suppressed scripts">Module:Lang/data/iana suppressed scripts</a> (<a href="/w/index.php?title=Module:Lang/data/iana_suppressed_scripts&action=edit" title="Module:Lang/data/iana suppressed scripts">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Lang/data/iana_variants" title="Module:Lang/data/iana variants">Module:Lang/data/iana variants</a> (<a href="/w/index.php?title=Module:Lang/data/iana_variants&action=edit" title="Module:Lang/data/iana variants">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Namespace_detect/config" title="Module:Namespace detect/config">Module:Namespace detect/config</a> (<a href="/w/index.php?title=Module:Namespace_detect/config&action=edit" title="Module:Namespace detect/config">view source</a>) (protected)</li><li><a href="/wiki/Module:Namespace_detect/data" title="Module:Namespace detect/data">Module:Namespace detect/data</a> (<a href="/w/index.php?title=Module:Namespace_detect/data&action=edit" title="Module:Namespace detect/data">view source</a>) (protected)</li><li><a href="/wiki/Module:Navbar" title="Module:Navbar">Module:Navbar</a> (<a href="/w/index.php?title=Module:Navbar&action=edit" title="Module:Navbar">view source</a>) (protected)</li><li><a href="/wiki/Module:Navbar/configuration" title="Module:Navbar/configuration">Module:Navbar/configuration</a> (<a href="/w/index.php?title=Module:Navbar/configuration&action=edit" title="Module:Navbar/configuration">view source</a>) (protected)</li><li><a href="/wiki/Module:Navbar/styles.css" title="Module:Navbar/styles.css">Module:Navbar/styles.css</a> (<a href="/w/index.php?title=Module:Navbar/styles.css&action=edit" title="Module:Navbar/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Module:Navbox" title="Module:Navbox">Module:Navbox</a> (<a href="/w/index.php?title=Module:Navbox&action=edit" title="Module:Navbox">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Navbox/configuration" title="Module:Navbox/configuration">Module:Navbox/configuration</a> (<a href="/w/index.php?title=Module:Navbox/configuration&action=edit" title="Module:Navbox/configuration">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Navbox/styles.css" title="Module:Navbox/styles.css">Module:Navbox/styles.css</a> (<a href="/w/index.php?title=Module:Navbox/styles.css&action=edit" title="Module:Navbox/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Ns_has_subpages" title="Module:Ns has subpages">Module:Ns has subpages</a> (<a href="/w/index.php?title=Module:Ns_has_subpages&action=edit" title="Module:Ns has subpages">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype" title="Module:Pagetype">Module:Pagetype</a> (<a href="/w/index.php?title=Module:Pagetype&action=edit" title="Module:Pagetype">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/config" title="Module:Pagetype/config">Module:Pagetype/config</a> (<a href="/w/index.php?title=Module:Pagetype/config&action=edit" title="Module:Pagetype/config">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/disambiguation" class="mw-redirect" title="Module:Pagetype/disambiguation">Module:Pagetype/disambiguation</a> (<a href="/w/index.php?title=Module:Pagetype/disambiguation&action=edit" class="mw-redirect" title="Module:Pagetype/disambiguation">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/rfd" title="Module:Pagetype/rfd">Module:Pagetype/rfd</a> (<a href="/w/index.php?title=Module:Pagetype/rfd&action=edit" title="Module:Pagetype/rfd">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/setindex" title="Module:Pagetype/setindex">Module:Pagetype/setindex</a> (<a href="/w/index.php?title=Module:Pagetype/setindex&action=edit" title="Module:Pagetype/setindex">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/softredirect" title="Module:Pagetype/softredirect">Module:Pagetype/softredirect</a> (<a href="/w/index.php?title=Module:Pagetype/softredirect&action=edit" title="Module:Pagetype/softredirect">view source</a>) (protected)</li><li><a href="/wiki/Module:Plain_text" title="Module:Plain text">Module:Plain text</a> (<a href="/w/index.php?title=Module:Plain_text&action=edit" title="Module:Plain text">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:SDcat" title="Module:SDcat">Module:SDcat</a> (<a href="/w/index.php?title=Module:SDcat&action=edit" title="Module:SDcat">view source</a>) (protected)</li><li><a href="/wiki/Module:Section_link" title="Module:Section link">Module:Section link</a> (<a href="/w/index.php?title=Module:Section_link&action=edit" title="Module:Section link">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Side_box" title="Module:Side box">Module:Side box</a> (<a href="/w/index.php?title=Module:Side_box&action=edit" title="Module:Side box">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Side_box/styles.css" title="Module:Side box/styles.css">Module:Side box/styles.css</a> (<a href="/w/index.php?title=Module:Side_box/styles.css&action=edit" title="Module:Side box/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:String" title="Module:String">Module:String</a> (<a href="/w/index.php?title=Module:String&action=edit" title="Module:String">view source</a>) (protected)</li><li><a href="/wiki/Module:String2" title="Module:String2">Module:String2</a> (<a href="/w/index.php?title=Module:String2&action=edit" title="Module:String2">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:TableTools" title="Module:TableTools">Module:TableTools</a> (<a href="/w/index.php?title=Module:TableTools&action=edit" title="Module:TableTools">view source</a>) (protected)</li><li><a href="/wiki/Module:URL" title="Module:URL">Module:URL</a> (<a href="/w/index.php?title=Module:URL&action=edit" title="Module:URL">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Unicode_data" title="Module:Unicode data">Module:Unicode data</a> (<a href="/w/index.php?title=Module:Unicode_data&action=edit" title="Module:Unicode data">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Unicode_data/scripts" title="Module:Unicode data/scripts">Module:Unicode data/scripts</a> (<a href="/w/index.php?title=Module:Unicode_data/scripts&action=edit" title="Module:Unicode data/scripts">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Unsubst" title="Module:Unsubst">Module:Unsubst</a> (<a href="/w/index.php?title=Module:Unsubst&action=edit" title="Module:Unsubst">view source</a>) (protected)</li><li><a href="/wiki/Module:Webarchive" title="Module:Webarchive">Module:Webarchive</a> (<a href="/w/index.php?title=Module:Webarchive&action=edit" title="Module:Webarchive">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Webarchive/data" title="Module:Webarchive/data">Module:Webarchive/data</a> (<a href="/w/index.php?title=Module:Webarchive/data&action=edit" title="Module:Webarchive/data">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Wikitext_Parsing" title="Module:Wikitext Parsing">Module:Wikitext Parsing</a> (<a href="/w/index.php?title=Module:Wikitext_Parsing&action=edit" title="Module:Wikitext Parsing">view source</a>) (protected)</li><li><a href="/wiki/Module:Yesno" title="Module:Yesno">Module:Yesno</a> (<a href="/w/index.php?title=Module:Yesno&action=edit" title="Module:Yesno">view source</a>) (protected)</li></ul></div><p id="mw-returnto">Return to <a href="/wiki/Prolog" title="Prolog">Prolog</a>.</p> <!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/wiki/Prolog">https://en.wikipedia.org/wiki/Prolog</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Prolog&action=edit&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-669b4ddb54-2qn8l","wgBackendResponseTime":360,"wgPageParseReport":{"limitreport":{"cputime":"0.047","walltime":"0.062","ppvisitednodes":{"value":418,"limit":1000000},"postexpandincludesize":{"value":17740,"limit":2097152},"templateargumentsize":{"value":6556,"limit":2097152},"expansiondepth":{"value":9,"limit":100},"expensivefunctioncount":{"value":0,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":469,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 42.063 1 -total"," 99.86% 42.002 2 Template:Blocked_text"," 41.95% 17.645 2 Template:Replace"," 38.00% 15.982 1 Template:Colocationwebhost"," 34.69% 14.592 1 Template:Hidden"," 14.97% 6.296 1 Template:Hidden_begin"," 14.49% 6.094 1 Template:Tlx"," 2.62% 1.104 1 MediaWiki:Wikimedia-globalblocking-blockedtext-mistake"," 2.15% 0.903 1 MediaWiki:Wikimedia-globalblocking-blockedtext-mistake-email-steward"," 1.94% 0.817 1 Template:Hidden_end"]},"scribunto":{"limitreport-timeusage":{"value":"0.009","limit":"10.000"},"limitreport-memusage":{"value":1043243,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-669b4ddb54-2qn8l","timestamp":"20241127100002","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>