Re: leanTap wasn't a good idea

Liste des GroupesRevenir à s logic 
Sujet : Re: leanTap wasn't a good idea
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : sci.logic
Date : 09. Dec 2024, 15:35:17
Autres entêtes
Message-ID : <vj6v74$l2rk$1@solani.org>
References : 1 2
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.19
Actually I don't know why prove2/2 is slower than prove/1.
Its not because of A->B, because the urquhart/2 examples
don't contain A->B.
So maybe prefering (A<->B) over - (A<->B) does the job?
Changing this line:
prove2([- (A<->B)|L],R) :- !, prove2([-A,-B|L],R), prove2([B,A|L],R).
Into this line:
prove2([- (A<->B)|L],R) :- !, prove2([-B,-A|L],R), prove2([A,B|L],R).
Also changes the performance:
?- urquhart(12,X), time(prove2([X],[])).
% Zeit 22261 ms, GC 0 ms, Lips 7011361, Uhr 09.12.2024 15:33
Maybe should try something what Jens Otten does in one
of its provers. Some heuristic ordering based on
formula measurement.
Mild Shock schrieb:
Hi,
 Refering to this idea:
 leanTAP revisited - Melvin Fitting
https://www.researchgate.net/publication/2240690
 Some benchmark results:
 /* non-leanTap, prefers A->B over other forms */
?- urquhart(12,X), time(prove([X])).
% Zeit 2104 ms, GC 16 ms, Lips 6894483, Uhr 09.12.2024 15:15
 /* leanTap, works strictly left to right */
?- urquhart(12,X), time(prove2([X],[])).
% Zeit 81174 ms, GC 0 ms, Lips 6679748, Uhr 09.12.2024 15:12
 The source code:
 /* non-leanTap, prefers A->B over other forms */
prove(L) :- select(-A,L,R), member(A,R), !.
prove(L) :- select((A->B),L,R), !, prove([-A,B|R]).
prove(L) :- select((A<->B),L,R), !, prove([-A,B|R]), prove([-B,A|R]).
prove(L) :- select(- (A->B),L,R), !, prove([A|R]), prove([-B|R]).
prove(L) :- select(- (A<->B),L,R), !, prove([-A,-B|R]), prove([B,A|R]).
 /* leanTap, works strictly left to right */
prove2([(A->B)|L],R) :- !, prove2([-A,B|L],R).
prove2([(A<->B)|L],R) :- !, prove2([-A,B|L],R), prove2([-B,A|L],R).
prove2([- (A->B)|L],R) :- !, prove2([A|L],R), prove2([-B|L],R).
prove2([- (A<->B)|L],R) :- !, prove2([-A,-B|L],R), prove2([B,A|L],R).
prove2([A|_],R) :- member(-A,R), !.
prove2([-A|_],R) :- member(A,R), !.
prove2([A|L],R) :- prove2(L,[A|R]).

Date Sujet#  Auteur
1 Dec 24 * Still on negative translation for substructural logics54Julio Di Egidio
1 Dec 24 +* Re: Still on negative translation for substructural logics20Mild Shock
1 Dec 24 i`* intuitionistic vs. classical implication in Prolog code (Was: Still on negative translation for substructural logics)19Mild Shock
1 Dec 24 i +* Re: intuitionistic vs. classical implication in Prolog code (Was: Still on negative translation for substructural logics)3Mild Shock
1 Dec 24 i i`* Girards Exponentiation after Dragalins Implication (Was: intuitionistic vs. classical implication in Prolog code)2Mild Shock
1 Dec 24 i i `- Does Jens Ottens Int-Prover also do the Repeat? (Was: Girards Exponentiation after Dragalins Implication)1Mild Shock
1 Dec 24 i `* Re: intuitionistic vs. classical implication in Prolog code15Julio Di Egidio
1 Dec 24 i  `* Re: intuitionistic vs. classical implication in Prolog code14Mild Shock
1 Dec 24 i   +- Re: intuitionistic vs. classical implication in Prolog code1Mild Shock
1 Dec 24 i   `* Re: intuitionistic vs. classical implication in Prolog code12Julio Di Egidio
1 Dec 24 i    +- Re: intuitionistic vs. classical implication in Prolog code1Ross Finlayson
2 Dec 24 i    +- Re: intuitionistic vs. classical implication in Prolog code1Mild Shock
2 Dec 24 i    `* Re: intuitionistic vs. classical implication in Prolog code9Mild Shock
2 Dec 24 i     `* Re: intuitionistic vs. classical implication in Prolog code8Mild Shock
2 Dec 24 i      `* Re: intuitionistic vs. classical implication in Prolog code7Mild Shock
2 Dec 24 i       `* Re: intuitionistic vs. classical implication in Prolog code6Julio Di Egidio
3 Dec 24 i        `* Re: intuitionistic vs. classical implication in Prolog code5Mild Shock
3 Dec 24 i         +* Re: intuitionistic vs. classical implication in Prolog code3Mild Shock
3 Dec 24 i         i`* Re: intuitionistic vs. classical implication in Prolog code2Mild Shock
3 Dec 24 i         i `- Re: intuitionistic vs. classical implication in Prolog code1Ross Finlayson
3 Dec 24 i         `- Re: intuitionistic vs. classical implication in Prolog code1Julio Di Egidio
2 Dec 24 +* Re: Still on negative translation for substructural logics25Mild Shock
2 Dec 24 i+* Re: Still on negative translation for substructural logics2Mild Shock
2 Dec 24 ii`- Re: Still on negative translation for substructural logics1Mild Shock
2 Dec 24 i+* Re: Still on negative translation for substructural logics20Julio Di Egidio
2 Dec 24 ii+* Re: Still on negative translation for substructural logics2Julio Di Egidio
3 Dec 24 iii`- Re: Still on negative translation for substructural logics1Mild Shock
5 Dec 24 ii`* The solver does not terminate (Was: Still on negative translation for substructural logics)17Julio Di Egidio
6 Dec 24 ii +* Re: The solver does not terminate7Julio Di Egidio
6 Dec 24 ii i`* Re: The solver does not terminate6Mild Shock
6 Dec 24 ii i `* Re: The solver does not terminate5Mild Shock
6 Dec 24 ii i  `* Re: The solver does not terminate4Julio Di Egidio
6 Dec 24 ii i   `* Re: The solver does not terminate3Julio Di Egidio
6 Dec 24 ii i    `* Re: The solver does not terminate2Mild Shock
6 Dec 24 ii i     `- Re: The solver does not terminate1Mild Shock
7 Dec 24 ii `* Re: The solver does not terminate9Julio Di Egidio
7 Dec 24 ii  `* Re: The solver does not terminate8Mild Shock
7 Dec 24 ii   +* Re: The solver does not terminate2Mild Shock
7 Dec 24 ii   i`- Re: The solver does not terminate1Mild Shock
8 Dec 24 ii   `* Re: The solver does not terminate5Julio Di Egidio
8 Dec 24 ii    `* Seventy-Five Problems for Testing Automatic Theorem Provers (Was: Fuck the nazi-retards)4Mild Shock
8 Dec 24 ii     +- Re: Seventy-Five Problems for Testing Automatic Theorem Provers (Was: Fuck the nazi-retards)1Mild Shock
9 Dec 24 ii     `* Re: Seventy-Five Problems for Testing Automatic Theorem Provers2Julio Di Egidio
9 Dec 24 ii      `- Re: Seventy-Five Problems for Testing Automatic Theorem Provers1Mild Shock
9 Dec 24 i`* Re: Still on negative translation for substructural logics2Mild Shock
9 Dec 24 i `- Re: Still on negative translation for substructural logics1Mild Shock
3 Dec 24 +- Re: Still on negative translation for substructural logics1Julio Di Egidio
3 Dec 24 +- Re: Still on negative translation for substructural logics1Julio Di Egidio
4 Dec 24 +* Counter Example by Troelstra & Schwichtenberg (Was: Still on negative translation for substructural logics)4Mild Shock
4 Dec 24 i`* Re: Counter Example by Troelstra & Schwichtenberg (Was: Still on negative translation for substructural logics)3Julio Di Egidio
6 Dec 24 i `* Affine Logic, what Properties does it have? (Was: Counter Example by Troelstra & Schwichtenberg)2Mild Shock
6 Dec 24 i  `- Re: Affine Logic, what Properties does it have? (Was: Counter Example by Troelstra & Schwichtenberg)1Mild Shock
9 Dec 24 `* leanTap wasn't a good idea2Mild Shock
9 Dec 24  `- Re: leanTap wasn't a good idea1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal