Try this online Prolog (Was: --- OLCOTT BANNED ---)

Liste des GroupesRevenir à s logic 
Sujet : Try this online Prolog (Was: --- OLCOTT BANNED ---)
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : sci.logic
Date : 10. Jul 2024, 05:21:47
Autres entêtes
Message-ID : <v6l28r$ddn3$2@solani.org>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.2
Hi,
 > - Its not performed in the goal to head unification
 > - Its not performed in (=)/2 buit-in
 > - It is performed in unify_with_occurs_check/2 built-in
An example of goal to head unification would be:
equal(X, X) :- write('You hit me!'), nl.
?- equal(foo(Y), Y).
You can try the same here with this online Prolog:
Example 02: Website Sandbox
https://www.xlog.ch/runtab/doclet/docs/04_tutor/reference/example02/package.html
It will give you:
You hit me!
Y = <cyclic term> .
Bye
Mild Shock schrieb:
You wrote:
  > Yet C&M say that this test is only performed when run
 > thus almost never performed because it is too expensive.
 But for soundness you have to perform it sometimes!
So what is the solution? The solution is simple:
 - Its not performed in the goal to head unification
- Its not performed in (=)/2 buit-in
- It is performed in unify_with_occurs_check/2 built-in
 The ISO core standard requires both (=)/2 and
unify_with_occurs_check/2. You need unify_with_occurs_check/2
when you want an occurs check, which is need
 for example in rewriting or type inference
to get correct results.

Date Sujet#  Auteur
9 Jul 24 * --- OLCOTT BANNED ---21Mild Shock
9 Jul 24 +* I am Mild Shocked11olcott
9 Jul 24 i`* Re: I am Mildly Shocked --- typo10olcott
9 Jul 24 i `* --- OLCOTT BANNED ---9Mild Shock
9 Jul 24 i  `* I am Mildly Shocked that this guy does not know about cycles in directed graphs8olcott
9 Jul 24 i   `* --- OLCOTT BANNED ---7Mild Shock
9 Jul 24 i    +- I am mildly shocked1olcott
9 Jul 24 i    `* Re: --- OLCOTT BANNED ---5Mild Shock
9 Jul 24 i     `* Re: --- OLCOTT BANNED ---4Mild Shock
9 Jul 24 i      `* Please quit disrespecting me3olcott
10 Jul 24 i       `* --- OLCOTT BANNED ---2Mild Shock
10 Jul 24 i        `- Try this online Prolog (Was: --- OLCOTT BANNED ---)1Mild Shock
10 Jul 24 +* PROLOG AND INFINITE TREES (Was: --- OLCOTT BANNED ---)4Mild Shock
10 Jul 24 i+- Re: PROLOG AND INFINITE TREES1olcott
10 Jul 24 i`* Re: PROLOG AND INFINITE TREES (Was: --- OLCOTT BANNED ---)2Mild Shock
10 Jul 24 i `- --- OLCOTT BANNED ---1Mild Shock
10 Jul 24 +* Re: --- OLCOTT BANNED ---3Mikko
10 Jul 24 i`* Re: --- OLCOTT BANNED ---2olcott
11 Jul 24 i `- Re: --- OLCOTT BANNED ---1Mikko
12 Jul 24 `* Re: --- OLCOTT BANNED ---2Mild Shock
12 Jul 24  `- Re: --- OLCOTT BANNED ---1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal