The headache an eGovernment might get from Prolog

Liste des GroupesRevenir à s logic 
Sujet : The headache an eGovernment might get from Prolog
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : sci.logic
Date : 16. Jul 2025, 18:01:26
Autres entêtes
Message-ID : <1058lt5$2cep9$2@solani.org>
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0 SeaMonkey/2.53.21
Hi,
That false/0 and not fail/0 is now all over the place,
I don't mean in person but for example here:
?- X=f(f(X), X), Y=f(Y, f(Y)), X = Y.
false.
Is a little didactical nightmare.
Syntactic unification has mathematical axioms (1978),
to fully formalize unifcation you would need to
formalize both (=)/2 and (≠)/2 (sic!), otherwise you
rely on some negation as failure concept.
Keith L. Clark, Negation as Failure
https://link.springer.com/chapter/10.1007/978-1-4684-3384-5_11
You can realize a subset of a mixture of (=)/2
and (≠)/2 in the form of a vanilla unify Prolog
predicate using some of the meta programming
facilities of Prolog, like var/1 and having some
negation as failure reading:
/* Vanilla Unify */
unify(V, W) :- var(V), var(W), !, (V \== W -> V = W; true).
unify(V, T) :- var(V), !, V = T.
unify(S, W) :- var(W), !, W = S.
unify(S, T) :- functor(S, F, N), functor(T, F, N),
      S =.. [F|L], T =.. [F|R], maplist(unify, L, R).
I indeed get:
?- X=f(f(X), X), Y=f(Y, f(Y)), unify(X,Y).
false.
If the vanilla unify/2 already fails then unify
with and without subject to occurs check, will also
fail, and unify with and without ability to
handle rational terms, will also fail:
Bye

Date Sujet#  Auteur
16 Jul18:01 * The headache an eGovernment might get from Prolog7Mild Shock
16 Jul18:02 `* Wait till they find out about compare/3 (Re: The headache an eGovernment might get from Prolog)6Mild Shock
16 Jul18:02  `* Humans are just overwhelmed by computers (Re: Wait till they find out about compare/3)5Mild Shock
17 Jul09:50   +* Fishy 🐟 in Scryer Prolog and SWI-Prolog (Was: Humans are just overwhelmed by computers)2Mild Shock
17 Jul09:58   i`- So we are essentially all using Trojan Horses 🐎 daily? (Re: Fishy 🐟 in Scryer Prolog and SWI-Prolog)1Mild Shock
20 Jul13:38   `* SWI-Prolog as a Test Bed for Copilots (Re: Humans are just overwhelmed by computers)2Mild Shock
20 Jul14:11    `- Mathematics currently hates Computer Science because of AI (Was: SWI-Prolog as a Test Bed for Copilots)1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal