Prolog

[XFB] Konu Bilgileri

Konu Hakkında Merhaba, tarihinde Wiki kategorisinde News tarafından oluşturulan Prolog başlıklı konuyu okuyorsunuz. Bu konu şimdiye dek 1 kez görüntülenmiş, 0 yorum ve 0 tepki puanı almıştır...
Kategori Adı Wiki
Konu Başlığı Prolog
Konbuyu başlatan News
Başlangıç tarihi
Cevaplar
Görüntüleme
İlk mesaj tepki puanı
Son Mesaj Yazan News

News

Moderator
Top Poster Of Month
Credits
0
Syntax and semantics: minor: "...find a resolution refutation" to "...find a resolution or refutation"

← Previous revision
Revision as of 19:55, 27 April 2024
Line 27:Line 27:
==Syntax and semantics====Syntax and semantics==
{{Main|Prolog 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.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]] or [[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======Data types===

Okumaya devam et...
 

Geri
Üst