rewoked framing for once call negation and double negation

parent df0a6be6
......@@ -2170,9 +2170,9 @@ constant = #(nlocals nstack constants code)
(<let> ((SCM np (<ref> inst-pt (<c> 0))))
(<=> cut (<ref> inst-pt (<c> 1)))
(<=> inst-pt (<+> inst-pt (<c> 2)))
(RESTORE-STATE-TAIL s p np ctrl-stack)
(UNWIND-TAIL s)
(NEXT inst-pt))
(<let> ((fr (RESTORE-STATE-TAIL-NEG s scut p np ctrl-stack)))
(UNWIND-TAIL fr)
(NEXT inst-pt)))
(LABEL post-q)
(PRSTACK sp fp)
......
......@@ -31,6 +31,7 @@ compile_conj0([X|Gs],Tail,V,L) :- var(X),!,
compile_conj0([call(X)|Gs],Tail,V,L).
compile_conj0([!|Gs],Tail,V,[L,LL]) :- !,
get_C(V,[[_,#t]|_]),
ifc(compile_conj0(Gs,Tail,V,[L1,LL]),E,
(
tfc(E),
......
......@@ -91,7 +91,7 @@ goal(X,Y,First,Lab,Tail,Out,A,Ae,Aq,S0,[U|UU],V,L,LL,LG,B2,LLX) :-
get_CES(V,[C|_],E,S),
set_AB2ES(V,Aq,B2,0,S0),
((nonvar(X),X=(G1->G2)) ->
XX=(G1,softie(A),collect_F(FF),G2) ;
XX=(call(G1),softie(A),collect_F(FF),G2) ;
(XX=(X,newtag_F(FF)))),
compile_goal(XX,Tail,V,[LX,LG]),
(var(FF) -> true ; set_F(V,FF)),
......
......@@ -52,7 +52,7 @@ compile_goal(Code,Iout,StackSize,Narg,Constants,Pretty) :- !,
init_vars,init_e,
(var(Constants) -> init_const ; true),
b_setval(pretty,#t),
make_state(0,[[0,_,_]],[0],0,0,0,0,0,[HC,HV],[],V),
make_state(0,[[0,_,_]],[],[[0,_]],0,0,0,0,0,[HC,HV],[],V),
wrap(compile_goal(Code,#t,V,[L,[]]),[L,[]]),!,
%print(L),nl,!,
get_M(V,StackSize),
......@@ -245,30 +245,61 @@ compile_goal(verbatim_call(X),Tail,V,[L,LL]) :- !,
!,
compile_goal(X,Tail,V,[L,LL]).
compile_goal(call(X),Tail,V,[L,LL]) :- !,
( \\+var_p(X),
compile_goal(call(X),Tail,V,L) :- !,
new_var(VS,V,TagS1),
new_var(VP,V,TagP1),
compile_goal(call_(X,A,Al,[C0|_],Pre,Post,LP),Tail,V,L),
new_var(VS,V,TagS2),
new_var(VP,V,TagP2),
Ad=[A0,Cut_p],
(
F(|Args)=X ->
A == #t ->
(
(var_p(F) ; isApply(Args)) -> fail ; true
Cut_p == #t ->
(
Pre = ['store-ps' , A0, TagP1, TagS1 ],
Post = [['goto-inst' , Out ],
[label , A0 ],
['fail-psc' , TagP1, TagS1, C0 ],
[label , Out ],
['post-sc' , TagS1, C0 ]|LP]
) ;
true
(
Pre = [true],
Post = LP
)
),
!,
L=[['newframe-negation',Al,0]|LX],
) ;
(
Cut_p == #t ->
(
Pre = ['store-p', A0, TagP1],
Post = [['goto-inst' , Out ],
[label , A0 ],
['fail-pc ' ,TagP1, C0 ],
[label , Out ],
['post-c' , C0 ]|LP]
) ;
(
Pre = [true],
Post = LP
)
)
).
compile_goal(call_(X,A0,Al,C0,Pre,Post,LP),Tail,V,[L,LL]) :- !,
L=[Pre|LX],
get_C(V,C),
get_AA(V,A),
AA = [A0|A],
set_AA(V,AA),
C = [C0|_],
CC = [Al|C],
set_C(V,CC),
compile_goal(X,#f,V,[LX,LLX]),
set_AA(V,A)
LLX = Post,
set_C(V,C),
(Tail=#t -> LG=[[cc]|LL] ; LG=LL),
LLX = [['goto-inst' ,Bl ],
[label ,Al ],
['unwind-negation' ,Al,C0],
[label ,Bl ],
['post-q' ,C0 ]|LG].
(Tail=#t -> LP=[[cc]|LL] ; LP=LL).
compile_goal((X =.. Y),Tail,V, L, LL) :- !,
(var_p(X);constant(X)) ->
......@@ -295,15 +326,47 @@ compile_goal(set(V,X),Tail,V,[L,LL]) :- !,
).
compile_goal(once(G),Tail,V,[L,LL]) :- !,
compile_goal(G,#f,V,[LX,LLX]),
tr('store-state',Newframe),
tr('softie' ,UnwindTail),
(zero(V) -> Tp is 0 ; Tp is 2),
L=[[Newframe,A]|LX],
var_p(VP),
var_p(VS),
new_var(VP,V,TagP1),
new_var(VS,V,TagS1),
compile_goal(call_(G,A,Al,[C0|_],Pre,Post,LP),#f,V,[LX,LLX]),
new_var(VP,V,TagP2),
new_var(VS,V,TagS2),
get_C(V,C),
Al=[A0,Cut_p],
(
Tail=#t ->
LLX=[[label,A],[UnwindTail,A],[cc]|LL];
LLX=[[label,A],[UnwindTail,A] |LL]
A==#t ->
(
Cut_p==#t ->
(
Pre = ['store-ps' , A0,TagP1,TagS1 ],
Post = [['goto-inst' , Out ],
[label , A0 ],
[fail-psc , TagP2,TagS2,C0 ],
[label,Out ],
['softie-psc', TagP2,TagS2,C0 ]|LP]
) ;
(
Pre = ['store-ps',TagP1,TagS1],
Post = [['softie-ps',TagP2,TagS2]|LP]
)
) ;
(
Cut_p==#t ->
(
Pre = ['store-p',A0,TagP1],
Post = [['goto-inst',Out],
[label ,A0],
[fail-pc ,TagP2,C0],
[label,Out],
['softie-pc',TagP2,C0]|LP]
) ;
(
Pre = [true],
Post = LP
)
)
).
compile_goal((X->Y),Tail,V,L) :- !,
......@@ -314,46 +377,147 @@ compile_goal(\\+\\+\\+X,Tail,V,[L,LL]) :- !,
compile_goal(\\+\\+X,Tail,V,[L,LL]) :- !,
L=[['newframe-negation',Al,0]|LX],
get_QACESB(V,Q,A,C,E,S,B),
C = [C0|_],
CC = [Al|C],
set_QACE(V,[],[[0|_]],CC,0),
compile_goal(X,#f,V,[LX,LLX]),
set_QACESB(V,Q,A,C,E,S,B),
(Tail=#t -> LG=[[cc]|LL] ; LG=LL),
LLX = [['goto-inst' ,Bl ],
[label ,Al ],
['unwind-negation' ,Al,C0],
[label ,Bl ],
['post-s' ,Al,C0]|LG].
compile_goal(\\+X,Tail,V,[L,LL]) :- !,
get_QAESBB2(V,Q,A,E,S,B,B2),
set_QAE(V,[],[[0|_]],0),
new_var(VP,V,tagP1),
new_var(VS,V,tagS1),
new_var(VT,V,tagY1),
compile_goal(call_(X,A,Ad,[C0|_],Pre,Post,LP),#f,V,[LX,LLX]),
new_var(VP,V,tagP2),
new_var(VS,V,tagS2),
new_var(VT,V,tagT2),
set_QAESBB2(V,Q,A,E,S,B,B2).
(A=[[0|_]|_] -> Tp is 0 ; Tp is 1),
Ad=[A0,Cut_p],
(
A==#t ->
(
Cut_p == #t ->
(
Tp == 0 ->
(
Pre = ['newframe-ps', A0, TagP1, TagS1],
Post = [['goto-inst' , Out],
[label , A0]
['fail-psc' , TagP2, TagS2, C0],
[label , Out],
['unwind-psc', TagP2, TagS2, C0]|LP]
) ;
(
Pre = ['newframe-pst', A0, TagP1, TagS1, TagT1],
Post = [['goto-inst' , Out],
[label , A0],
['fail-psc' , TagP2, TagS2, C0],
[label , Out],
['unwind-psct', TagP2, TagS2, TagT2, C0]|LP]
) ;
) ;
(
Tp == 0 ->
(
Pre = ['newframe-ps', TagP1, TagS1],
Post = [['unwind-ps' , TagP2, TagS2]|LP]
) ;
(
Pre = ['newframe-pst', TagP1, TagS1, TagT1],
Post = [['unwind-pst' , TagP2, TagS2, TagT2]|LP]
)
)
);
(
Cut_p == #t ->
(
Pre = ['store-p' , A0, TagP1],
Post = [['goto-inst', Out ],
[label , A0 ],
['fail-pc' , TagP2, C ],
[label , Out ],
['restore-c', C0 ]|LP]
) ;
(
Pre = [true],
Post = LP
)
)
).
'newframe-negation','unwind-negation','post-s'),
compile_goal(\\+X,Tail,V,L) :- !,
check_tail(Tail),
label(Br),
tr('newframe-negation', Newframe ),
tr('unwind-negation' , Unwind ),
tr('post-negation' , Post ),
tr(notend,Notend),
tail(Tail,LL,LLL),
get_QACESB(V,Q,A,C,E,S,B),
C = [C0|_],
CC = [Al|C],
new_var(VS,V,TagS1),
new_var(VP,V,TagP1),
new_var(VT,V,TagT1),
get_QAESB(V,Q,A,E,S,B),
ifc(
(
set_QACE(V,[],[[0|_]],CC,0),
compile_goal(X,#f,V,[LX,LLX])
set_QAE(V,[],[[0|_]],0),
compile_goal(call_(X,A,Ad,[C0|_],Pre,Post,LP),#f,V,L)
),Er,
(
tfc(Er),
(Er==#t -> throw(#f) ; throw(#t))
),
(
new_var(VS,V,TagS2),
new_var(VP,V,TagP2),
new_var(VT,V,TagT2),
get_A(V,A1),
set_QACESB(V,Q,A,C,E,S,B),
(A=[[0|_]|_] -> Tp is 0 ; Tp is 1),
L = [ [Newframe,Al,Tp] |LX ],
LLX = [ [Unwind,Al,C0],[label,Al],[Post,Al,C0] | LLL]
)).
set_QAESB(V,Q,A,E,S,B),
(A=[[0|_]|_] -> Tp is 0 ; Tp is 1)
Ad=[A0,Cut_p],
(
A==#t ->
(
Cut_p == #t ->
(
Tp == 0 ->
(
Pre = ['newframe-psc',Al,TagP1,TagS1],
Post = [['fail-psc',TagP2,TagS2,C0],
[label,Al],
['unwind-psc',TagP2,TagS2,C0]|LP]
);
(
Pre = ['newframe-psct',Al,TagP1,TagS1, TagT1],
Post = [['fail-psc',TagP2,TagS2,C0],
[label,Al],
['unwind-psct',TagP2,TagS2,TagT2,C0]|LP]
)
) ;
(
Tp == 0 ->
(
Pre = ['newframe-ps',TagP1,TagS1],
Post = [['fail-p',TagP2],
[label,Al],
['unwind-ps',TagP2,TagS2]|LP]
);
(
Pre = ['newframe-pst',TagP1,TagS1,TagT1],
Post = [['fail-p',TagP2],
[label,Al],
['unwind-pst',TagP2,TagS2,TagT2]|LP]
)
)
) ;
(
Cut_p == #t ->
(
Pre = ['store-p',Al,TagP1],
Post = [['fail-pc',TagP2,C0],
[label,Al],
['restore-pc',TagP2,C0]|LP]
) ;
(
Pre = ['store-p',Al,TagP1],
Post = [['fail-p',TagP2],
[label,Al],
['restore-p',TagP2]|LP]
)
)
)
).
......
......@@ -130,6 +130,169 @@ handle((X,[(newframe ; 'newframe-negation' ; 'post-negation'
II is I + 3,
L=[X|LL].
handle(['newframe-ps',A0,[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_]],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
U is E1 + E2<<1,
Code is V1C + V2C << 16 + U << 32
L = [['newframe-ps',A0,Code]|LL],
II is I + 2.
handle(['newframe-pst',A0,[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_],
[[S2,V2,Q2],N2,F2|_]],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
new_var(V3,Q3,S3),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
(V3=[V3C|_] -> E3=0 ; (V3=V3C,E3=1)),
U is E1 + E2<<1 + E3 << 2,
Code is V1C + V2C << 16 + V3C<<32 + U << 48
L = [['newframe-pst',A0,Code]|LL],
II is I + 3.
handle(['unwind-ps',[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_]],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
U is E1 + E2<<1,
Code is V1C + V2C << 16 + U << 32
L = [['unwind-ps', Code]|LL],
II is I + 2.
handle(['unwind-psc',[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_],C],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
U is E1 + E2<<1,
Code is C + V1C<<16 + V2C << 32 + U << 48
L = [['unwind-psc', Code]|LL],
II is I + 2.
handle(['unwind-psct',A0,[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_],
[[S2,V2,Q2],N2,F2|_], C],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
new_var(V3,Q3,S3),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
(V3=[V3C|_] -> E3=0 ; (V3=V3C,E3=1)),
U is E1 + E2<<1 + E3 << 2,
Code is V1C + V2C << 16 + V3C<<32 + U << 48
L = [['unwind-psct',C,Code]|LL],
II is I + 3.
handle(['unwind-pst',A0,[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_],
[[S2,V2,Q2],N2,F2|_]],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
new_var(V3,Q3,S3),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
(V3=[V3C|_] -> E3=0 ; (V3=V3C,E3=1)),
U is E1 + E2<<1 + E3 << 2,
Code is V1C + V2C << 16 + V3C<<32 + U << 48
L = [['unwind-pst',Code]|LL],
II is I + 2.
handle(['store-ps',A0,[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_]],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
U is E1 + E2<<1,
Code is V1C + V2C << 16 + U << 32
L = [['store-ps',A0,Code]|LL],
II is I + 2.
handle(['store-p',A0,[[S1,V1,Q1],N1,F1|_]],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
Code is V1C + E1 << 16
L = [['store-p',A0,Code]|LL],
II is I + 2.
handle(['restore-c',C,],I,II,L,LL) :-
!,
L = [['store-p',C]|LL],
II is I + 2.
handle(['fail-psc',[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_],C],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
U is E1 + E2<<1,
Code is C + V1C<<16 + V2C<<32 + U << 48,
L = [['fail-psc',Code]|LL],
II is I + 2.
handle(['fail-pc',[[S1,V1,Q1],N1,F1|_],C],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
Code is C + V1C<<16 + E1<<32,
L = [['fail-psc',Code]|LL],
II is I + 2.
handle(['softie-psc',[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_],C],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
U is E1 + E2<<1,
Code is C + V1C<<16 + +V2C<<32 + U << 48
L = [['softie-psc',Code]|LL],
II is I + 2.
handle(['softie-ps',[[S1,V1,Q1],N1,F1|_],[[S2,V2,Q2],N2,F2|_]],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
new_var(V2,Q2,S2),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
(V2=[V2C|_] -> E2=0 ; (V2=V2C,E2=1)),
U is E1 + E2<<1,
Code is V1C + +V2C<<16 + U << 32
L = [['softie-ps',Code]|LL],
II is I + 2.
handle(['softie-pc',[[S1,V1,Q1],N1,F1|_],C],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
Code is C + V1C<<16 + E1 << 32,
L = [['softie-pc',Code]|LL],
II is I + 2.
handle(['post-sc',[[S1,V1,Q1],N1,F1|_],C],I,II,L,LL) :-
!,
new_var(V1,Q1,S1),
(V1=[V1C|_] -> E1=0 ; (V1=V1C,E1=1)),
Code is C + V1C<<16 + E1 << 32
L = [['post-sc',Code]|LL],
II is I + 2.
handle(['post-c',C],I,II,L,LL) :-
!,
L = [['post-c',C]|LL],
II is I + 2.
handle([label,N,[_,Tags]],I,II,L,LL) :- !,
N=I,
addvs(Tags,I,II,L,LL).
......
(<define> (make_state f a c e m s b b2 h q x)
(<var> (F A C E M S B B2 H Q)
(<=> (F A C E M S B B2 H Q)
(f a c e m s b b2 h q))
(<=> x ,(vector F A C E M S B B2 H Q))))
(<define> (make_state f a aa c e m s b b2 h q x)
(<var> (F A AA C E M S B B2 H Q)
(<=> (F A AA C E M S B B2 H Q)
(f a aa c e m s b b2 h q))
(<=> x ,(vector F A AA C E M S B B2 H Q))))
(define nf 0)
(define na 1)
(define nc 2)
(define ne 3)
(define nm 4)
(define ns 5)
(define nb 6)
(define nb2 7)
(define nh 8)
(define nq 9)
(define naa 2)
(define nc 3)
(define ne 4)
(define nm 5)
(define ns 6)
(define nb 7)
(define nb2 8)
(define nh 9)
(define nq 10)
(<define> (push_Q e v u)
;(<pp> `(push ,e))
......@@ -42,8 +43,8 @@
(<=> q ,(car (<lookup> (vector-ref v nq))))))
(<define> (copy_state v1 v2)
(<var> (L F A C E M S B H Q)
(<=> v2 ,(vector L F A C E M S B H Q))
(<var> (L F A AA C E M S B H Q)
(<=> v2 ,(vector L F A AA C E M S B H Q))
(<=> v2 v1)))
(<define> (get_EB v e b)
......@@ -134,6 +135,15 @@
(<=> a ,(<lookup> (vector-ref v na)))
(<=> b ,(<lookup> (vector-ref v nb)))))
(<define> (get_QAESBB2 v q a e s b b2)
(<let> ((v (<lookup> v)))
(<=> q ,(<lookup> (vector-ref v nq )))
(<=> s ,(<lookup> (vector-ref v ns )))
(<=> e ,(<lookup> (vector-ref v ne )))
(<=> a ,(<lookup> (vector-ref v na )))
(<=> b ,(<lookup> (vector-ref v nb )))
(<=> b2 ,(<lookup> (vector-ref v nb2)))))
(<define> (get_H v h)
(<let> ((v (<lookup> v)))
(<=> h ,(<lookup> (vector-ref v nh)))))
......@@ -151,6 +161,10 @@
(<let> ((v (<lookup> v)))
(<=> a ,(<lookup> (vector-ref v na)))))
(<define> (get_AA v aa)
(<let> ((v (<lookup> v)))
(<=> aa ,(<lookup> (vector-ref v naa)))))
(<define> (get_E v e)
(<let> ((v (<lookup> v)))
(<=> e ,(<lookup> (vector-ref v ne)))))
......@@ -216,12 +230,11 @@
(<set> (vector-ref v ne) (<lookup> e))
(<set> (vector-ref v nc) (<lookup> c))))
(<define> (set_QACE v q a c e)
(<define> (set_QAE v q a e)
(let ((v (<lookup> v)))
(<set> (vector-ref v nq) (<lookup> q))
(<set> (vector-ref v na) (<lookup> a))
(<set> (vector-ref v ne) (<lookup> e))
(<set> (vector-ref v nc) (<lookup> c))))
(<set> (vector-ref v ne) (<lookup> e))))
(<define> (set_ACESB v a c e s b)
(let ((v (<lookup> v)))
......@@ -231,14 +244,14 @@
(<set> (vector-ref v ne) (<lookup> s))
(<set> (vector-ref v nb) (<lookup> b))))
(<define> (set_QACESB v q a c e s b)
(<define> (set_QAESBB2 v q a e s b b2)
(let ((v (<lookup> v)))
(<set> (vector-ref v nq) (<lookup> q))
(<set> (vector-ref v na) (<lookup> a))
(<set> (vector-ref v ne) (<lookup> e))
(<set> (vector-ref v nc) (<lookup> c))
(<set> (vector-ref v ne) (<lookup> s))
(<set> (vector-ref v nb) (<lookup> b))))
(<set> (vector-ref v nq ) (<lookup> q ))
(<set> (vector-ref v na ) (<lookup> a ))
(<set> (vector-ref v ne ) (<lookup> e ))
(<set> (vector-ref v ne ) (<lookup> s ))
(<set> (vector-ref v nb ) (<lookup> b ))
(<set> (vector-ref v nb2) (<lookup> b2))))
(<define> (set_ES v e s)
(let ((v (<lookup> v)))
......@@ -262,6 +275,10 @@
(let ((v (<lookup> v)))
(<set> (vector-ref v ne) (<lookup> e))))
(<define> (set_AA v aa)
(let ((v (<lookup> v)))
(<set> (vector-ref v naa) (<lookup> aa))))
(<define> (set_B2E v b2 e)
(let ((v (<lookup> v)))
(<set> (vector-ref v nb2) (<lookup> b2))
......@@ -284,9 +301,14 @@
"
touch_A0([[0|_]]).
touch_A0([[_,_,#t]|L]) :- touch_A0(L).
touch_AA([]).
touch_AA([#t|L]) :- touch_AA(L).
touch_A(V) :-
get_A(V,A),
touch_A0(A).
touch_A0(A),
get_AA(V,AA),
touch_AA(AA).
isCplx(X) :- X==#t.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment