🇮🇷 Iran Proxy | https://www.wikipedia.org/wiki/Talk:Prolog
Jump to content

Talk:Prolog

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Former good article nomineeProlog was a good articles nominee, but did not meet the good article criteria at the time. There may be suggestions below for improving the article. Once these issues have been addressed, the article can be renominated. Editors may also seek a reassessment of the decision if they believe there was a mistake.
Article milestones
DateProcessResult
October 17, 2006Good article nomineeNot listed

Free PROLOG distribution missing

[edit]

There is a free prolog implementation missing in the article : Arity Prolog for Windows, it can be downloaded from www.arity.com It uses an old text based user interface (for creating program code text files) with good debug tool, offers good speed, simple and solid operation for 32bit systems.

Portability : It's Edingburg like, not ISO. Doesn't support other operating systems but interpretation/compilation in SWI-PROLOG for example is direct, unless you use many specific Arity commands like local & global counters, the [! !] operator (works like once/1 SWI-PROLOG operator), etc. all very handy but specific.

Edgardo Garcia

See Also

[edit]

I added a *See Also section* of WP links because of the significance of typed prolog variants in the evolution of Oz and Alice; the others are these as *See Also* usually covers related/alternative/other-than-this links in other WP CS articles. I didn't think to check for a reference to Peter van Roy's excellent CTM book from MIT Press which is so even-handed in its treatment of Prolog's strengths and weaknesses I will add a link to YProlog when it becomes available Prolog/V should be restored to Squeak Smalltalk 3.10

Negation and soundness: needs reference and explanations

[edit]

The part https://en.wikipedia.org/wiki/Prolog#Negation, about negation and soundness, is so much important it deserves an authoritative reference, even if it may be obvious for many ones involved in this area. Also, it may require some explanations, to be understood. First and the least, about the variables, it is said it is sound if the term is ground: what if all variables are bound to ground terms? Shouldn't it mention free variables (and variable bounded to term containing free variables, transitively), instead? Then, the assertion that it is not correct/is unsound, to use `legal` to list all `legal` terms, needs explanations. I try to guess below, please tell me if it’s indeed the point.

A logic which is expressive enough, is either sound and incomplete, either complete and unsound. I feel to know the logic underlying Prolog, is sound, so may be it's incomplete, although I also feel to know an Horn clauses system is sound and complete (so not that much expressive), but may be there are additional things in Prolog, which makes it sound and incomplete. So let's assume Prolog is incomplete, hence the response we get from a query on a rule is incomplete however sound. If `illegal(X)` is incomplete, an issue arise: it may not well fail to find a solution to `illegal(X)`, making the rule fail, and then making `legal(X)` succeed. Intuitively, if `illegal` is incomplete, the simple negation of its conclusion, has no warranted soundness. In the mean time, there are cases where a simple rule seems to be complete, hence it's negation sound. Ex. a rule saying X is valid/invalid if it's a given constant and says nothing else, just as simple as that. In this case, it's hard to see a case where the rule and its negation do not form a sound system (an easy and naive assertion, I feel, so it may be wrong).

In fewer words: is the negation of `illegal`, unsound, because `illegal` is not complete? And do someone know an authoritative reference for the assertion in the related paragraph? Hibou57 (talk) 18:44, 31 August 2025 (UTC)[reply]

(Reply to myself)
Another guess, just with a doubt. The said paragraph mentions `legal(X)` cannot be used to list all X which are `legal` (it may list some if `legal` has some other bodies). That's true, at least with Prolog, but to me, this does not qualify as unsoundness, rather as incompleteness. This may be seen as inconsistent if one read it as meaning it can list these solutions, while it can't ; still not unsound. Hibou57 (talk) 10:26, 1 September 2025 (UTC)[reply]
Perhaps this is the answer: the first though says if the logic is incomplete, this definition of the negation leads to unsoundness, the second though says if the logic is complete, this definition of the negation leads to incompleteness, putting both together there is the path completeness -> incompleteness -> unsoundness. Is that it? Hibou57 (talk) 18:25, 2 September 2025 (UTC)[reply]
This seems to be that, because it means unsoundness comes if a negation is used in a negation (which may be in an inner goal), and that's the conclusion given here: https://en.wikipedia.org/wiki/Talk:Prolog/Archive_1#Argument_is_ground%3F Hibou57 (talk) 18:52, 2 September 2025 (UTC)[reply]

Prolog said to be homoiconic

[edit]

Unless I'm wrong, I feel dubious facing the sentence saying Prolog is homoiconic. A language is homoiconic if data and program have the same form and can be manipulated the same way. In which way something like `r(X) :- s(X)` can be manipulated with Prolog? This does not have the syntax of a term. A language like the pure untyped lambda calculus is surely homoiconic, but Prolog is not an example of such a language. Being able to program a Prolog interpreter in Prolog is not sufficient to qualify it as homoiconic, or else, if it suffices, so Ada is, since there is an Ada compiler written in Ada, C is, with most C compilers written in C, and so on. Hibou57 (talk) 10:43, 1 September 2025 (UTC)[reply]