This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/LGPL/chr/guard_entailment.pl
2008-03-27 00:41:33 +00:00

18062 lines
536 KiB
Prolog

/* Generated by CHR bootstrap compiler
From: guard_entailment.chr
Date: Wed Mar 26 03:31:54 2008
DO NOT EDIT. EDIT THE CHR FILE INSTEAD
*/
:-module(guard_entailment,[entails_guard/2,simplify_guards/5]).
:-use_module(chr_runtime).
:-style_check(-discontiguous).
:-include(chr_op).
:-use_module(hprolog).
:-use_module(builtins).
:-use_module(chr_compiler_errors).
entails_guard(A,B) :-
copy_term_nat((A,B),(C,D)),
term_variables(C,E),
variables(E),
sort(C,F),
entails_guard2(F),
!,
test(D),
!,
cleanup.
entails_guard2([]).
entails_guard2([A|B]) :-
known(A),
entails_guard2(B).
simplify_guards(A,B,C,D,E) :-
copy_term_nat((A,C),(F,G)),
term_variables(F,H),
variables(H),
sort(F,I),
entails_guard2(I),
!,
simplify(G,J),
simplified(C,J,D,B,E),
!,
cleanup.
simplified([],[],[],A,A).
simplified([A|B],[keep|C],[A|D],E,F) :-
simplified(B,C,D,E,F).
simplified([_|_],[fail|_],fail,A,A).
simplified([A|B],[true|C],[D|E],F,G) :-
builtins:binds_b(A,H),
term_variables(B,I),
intersect_eq(H,I,J),
!,
( J=[] ->
term_variables(F,K),
intersect_eq(H,K,L),
!,
( L=[] ->
D=true,
G=M
;
D=true,
G=(A,M)
)
;
D=A,
G=M
),
simplified(B,C,E,F,M).
simplify([],[]).
simplify([A|B],[C|D]) :-
( \+try(true,A) ->
C=true
;
builtins:negate_b(A,E),
( \+try(true,E) ->
C=fail
;
C=keep
)
),
known(A),
simplify(B,D).
try(A,B) :-
( known(A) ->
true
;
chr_error(internal,'Entailment Checker: try/2.
',[])
),
( test(B) ->
fail
;
true
).
add_args_unif([],[],true).
add_args_unif([A|B],[C|D],(A=C,E)) :-
add_args_unif(B,D,E).
add_args_nunif([],[],fail).
add_args_nunif([A|B],[C|D],(A\=C;E)) :-
add_args_nunif(B,D,E).
add_args_nmatch([],[],fail).
add_args_nmatch([A|B],[C|D],(A\==C;E)) :-
add_args_nmatch(B,D,E).
all_unique_vars(A,B) :-
all_unique_vars(A,B,[]).
all_unique_vars([],_,_).
all_unique_vars([A|B],C,D) :-
var(A),
\+memberchk_eq(A,C),
\+memberchk_eq(A,D),
all_unique_vars(B,[A|D]).
:-use_module(chr(chr_runtime)).
attach_variables___1([],_).
attach_variables___1([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\1=:=1 ->
B1=v(Y,[C|D],E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/1,
B1=v(Z,[C],E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(1,[C],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]))
),
attach_variables___1(B,C).
detach_variables___1([],_).
detach_variables___1([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\1=:=1 ->
'chr sbag_del_element'(D,C,A1),
( A1==[] ->
Z is Y/\ -2,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,[],E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,A1,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
detach_variables___1(B,C).
'attach_known/1_1_$default___1'([],_).
'attach_known/1_1_$default___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\2=:=2 ->
B1=v(Y,D,[C|E],F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/2,
B1=v(Z,D,[C],F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(2,[],[C],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$default___1'(B,C).
'detach_known/1_1_$default___1'([],_).
'detach_known/1_1_$default___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\2=:=2 ->
'chr sbag_del_element'(E,C,A1),
( A1==[] ->
Z is Y/\ -3,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,[],F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,A1,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$default___1'(B,C).
'attach_known/1_1_$special_;/2___2'([],_).
'attach_known/1_1_$special_;/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\4=:=4 ->
B1=v(Y,D,E,[C|F],G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/4,
B1=v(Z,D,E,[C],G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(4,[],[],[C],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_;/2___2'(B,C).
'detach_known/1_1_$special_;/2___2'([],_).
'detach_known/1_1_$special_;/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\4=:=4 ->
'chr sbag_del_element'(F,C,A1),
( A1==[] ->
Z is Y/\ -5,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,[],G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,A1,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_;/2___2'(B,C).
'attach_known/1_1_$special_nonvar/1___1'([],_).
'attach_known/1_1_$special_nonvar/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\8=:=8 ->
B1=v(Y,D,E,F,[C|G],H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/8,
B1=v(Z,D,E,F,[C],H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(8,[],[],[],[C],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_nonvar/1___1'(B,C).
'detach_known/1_1_$special_nonvar/1___1'([],_).
'detach_known/1_1_$special_nonvar/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\8=:=8 ->
'chr sbag_del_element'(G,C,A1),
( A1==[] ->
Z is Y/\ -9,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,[],H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,A1,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_nonvar/1___1'(B,C).
'attach_known/1_1_$special_var/1___1'([],_).
'attach_known/1_1_$special_var/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\16=:=16 ->
B1=v(Y,D,E,F,G,[C|H],I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/16,
B1=v(Z,D,E,F,G,[C],I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(16,[],[],[],[],[C],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_var/1___1'(B,C).
'detach_known/1_1_$special_var/1___1'([],_).
'detach_known/1_1_$special_var/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\16=:=16 ->
'chr sbag_del_element'(H,C,A1),
( A1==[] ->
Z is Y/\ -17,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,[],I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,A1,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_var/1___1'(B,C).
'attach_known/1_1_$special_atom/1___1'([],_).
'attach_known/1_1_$special_atom/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\32=:=32 ->
B1=v(Y,D,E,F,G,H,[C|I],J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/32,
B1=v(Z,D,E,F,G,H,[C],J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(32,[],[],[],[],[],[C],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_atom/1___1'(B,C).
'detach_known/1_1_$special_atom/1___1'([],_).
'detach_known/1_1_$special_atom/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\32=:=32 ->
'chr sbag_del_element'(I,C,A1),
( A1==[] ->
Z is Y/\ -33,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,[],J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,A1,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_atom/1___1'(B,C).
'attach_known/1_1_$special_atomic/1___1'([],_).
'attach_known/1_1_$special_atomic/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\64=:=64 ->
B1=v(Y,D,E,F,G,H,I,[C|J],K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/64,
B1=v(Z,D,E,F,G,H,I,[C],K,L,M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(64,[],[],[],[],[],[],[C],[],[],[],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_atomic/1___1'(B,C).
'detach_known/1_1_$special_atomic/1___1'([],_).
'detach_known/1_1_$special_atomic/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\64=:=64 ->
'chr sbag_del_element'(J,C,A1),
( A1==[] ->
Z is Y/\ -65,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,[],K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,A1,K,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_atomic/1___1'(B,C).
'attach_known/1_1_$special_compound/1___1'([],_).
'attach_known/1_1_$special_compound/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\128=:=128 ->
B1=v(Y,D,E,F,G,H,I,J,[C|K],L,M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/128,
B1=v(Z,D,E,F,G,H,I,J,[C],L,M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(128,[],[],[],[],[],[],[],[C],[],[],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_compound/1___1'(B,C).
'detach_known/1_1_$special_compound/1___1'([],_).
'detach_known/1_1_$special_compound/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\128=:=128 ->
'chr sbag_del_element'(K,C,A1),
( A1==[] ->
Z is Y/\ -129,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,[],L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,A1,L,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_compound/1___1'(B,C).
'attach_known/1_1_$special_ground/1___1'([],_).
'attach_known/1_1_$special_ground/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\256=:=256 ->
B1=v(Y,D,E,F,G,H,I,J,K,[C|L],M,N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/256,
B1=v(Z,D,E,F,G,H,I,J,K,[C],M,N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(256,[],[],[],[],[],[],[],[],[C],[],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_ground/1___1'(B,C).
'detach_known/1_1_$special_ground/1___1'([],_).
'detach_known/1_1_$special_ground/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\256=:=256 ->
'chr sbag_del_element'(L,C,A1),
( A1==[] ->
Z is Y/\ -257,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,[],M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,A1,M,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_ground/1___1'(B,C).
'attach_known/1_1_$special_integer/1___1'([],_).
'attach_known/1_1_$special_integer/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\512=:=512 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,[C|M],N,O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/512,
B1=v(Z,D,E,F,G,H,I,J,K,L,[C],N,O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(512,[],[],[],[],[],[],[],[],[],[C],[],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_integer/1___1'(B,C).
'detach_known/1_1_$special_integer/1___1'([],_).
'detach_known/1_1_$special_integer/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\512=:=512 ->
'chr sbag_del_element'(M,C,A1),
( A1==[] ->
Z is Y/\ -513,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,[],N,O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,A1,N,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_integer/1___1'(B,C).
'attach_known/1_1_$special_float/1___1'([],_).
'attach_known/1_1_$special_float/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\1024=:=1024 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,[C|N],O,P,Q,R,S,T,U,V,W,X)
;
Z is Y\/1024,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,[C],O,P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(1024,[],[],[],[],[],[],[],[],[],[],[C],[],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_float/1___1'(B,C).
'detach_known/1_1_$special_float/1___1'([],_).
'detach_known/1_1_$special_float/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\1024=:=1024 ->
'chr sbag_del_element'(N,C,A1),
( A1==[] ->
Z is Y/\ -1025,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,[],O,P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,A1,O,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_float/1___1'(B,C).
'attach_known/1_1_$special_number/1___1'([],_).
'attach_known/1_1_$special_number/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\2048=:=2048 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,[C|O],P,Q,R,S,T,U,V,W,X)
;
Z is Y\/2048,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,[C],P,Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(2048,[],[],[],[],[],[],[],[],[],[],[],[C],[],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_number/1___1'(B,C).
'detach_known/1_1_$special_number/1___1'([],_).
'detach_known/1_1_$special_number/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\2048=:=2048 ->
'chr sbag_del_element'(O,C,A1),
( A1==[] ->
Z is Y/\ -2049,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,[],P,Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,A1,P,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_number/1___1'(B,C).
'attach_known/1_1_$special_=\\=/2___2'([],_).
'attach_known/1_1_$special_=\\=/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\4096=:=4096 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,[C|P],Q,R,S,T,U,V,W,X)
;
Z is Y\/4096,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,[C],Q,R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(4096,[],[],[],[],[],[],[],[],[],[],[],[],[C],[],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_=\\=/2___2'(B,C).
'detach_known/1_1_$special_=\\=/2___2'([],_).
'detach_known/1_1_$special_=\\=/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\4096=:=4096 ->
'chr sbag_del_element'(P,C,A1),
( A1==[] ->
Z is Y/\ -4097,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,[],Q,R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,A1,Q,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_=\\=/2___2'(B,C).
'attach_known/1_1_$special_\\+/1___1'([],_).
'attach_known/1_1_$special_\\+/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\8192=:=8192 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,[C|Q],R,S,T,U,V,W,X)
;
Z is Y\/8192,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,[C],R,S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(8192,[],[],[],[],[],[],[],[],[],[],[],[],[],[C],[],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_\\+/1___1'(B,C).
'detach_known/1_1_$special_\\+/1___1'([],_).
'detach_known/1_1_$special_\\+/1___1'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\8192=:=8192 ->
'chr sbag_del_element'(Q,C,A1),
( A1==[] ->
Z is Y/\ -8193,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,[],R,S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,A1,R,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_\\+/1___1'(B,C).
'attach_known/1_1_$special_functor/3___3'([],_).
'attach_known/1_1_$special_functor/3___3'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\16384=:=16384 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,[C|R],S,T,U,V,W,X)
;
Z is Y\/16384,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,[C],S,T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(16384,[],[],[],[],[],[],[],[],[],[],[],[],[],[],[C],[],[],[],[],[],[]))
),
'attach_known/1_1_$special_functor/3___3'(B,C).
'detach_known/1_1_$special_functor/3___3'([],_).
'detach_known/1_1_$special_functor/3___3'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\16384=:=16384 ->
'chr sbag_del_element'(R,C,A1),
( A1==[] ->
Z is Y/\ -16385,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,[],S,T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,A1,S,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_functor/3___3'(B,C).
'attach_known/1_1_$special_\\=/2___2'([],_).
'attach_known/1_1_$special_\\=/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\32768=:=32768 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,[C|S],T,U,V,W,X)
;
Z is Y\/32768,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,[C],T,U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(32768,[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[C],[],[],[],[],[]))
),
'attach_known/1_1_$special_\\=/2___2'(B,C).
'detach_known/1_1_$special_\\=/2___2'([],_).
'detach_known/1_1_$special_\\=/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\32768=:=32768 ->
'chr sbag_del_element'(S,C,A1),
( A1==[] ->
Z is Y/\ -32769,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,[],T,U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,A1,T,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_\\=/2___2'(B,C).
'attach_known/1_1_$special_=/2___2'([],_).
'attach_known/1_1_$special_=/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\65536=:=65536 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,[C|T],U,V,W,X)
;
Z is Y\/65536,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,[C],U,V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(65536,[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[C],[],[],[],[]))
),
'attach_known/1_1_$special_=/2___2'(B,C).
'detach_known/1_1_$special_=/2___2'([],_).
'detach_known/1_1_$special_=/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\65536=:=65536 ->
'chr sbag_del_element'(T,C,A1),
( A1==[] ->
Z is Y/\ -65537,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,[],U,V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,A1,U,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_=/2___2'(B,C).
'attach_known/1_1_$special_\\==/2___2'([],_).
'attach_known/1_1_$special_\\==/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\131072=:=131072 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,[C|U],V,W,X)
;
Z is Y\/131072,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,[C],V,W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(131072,[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[C],[],[],[]))
),
'attach_known/1_1_$special_\\==/2___2'(B,C).
'detach_known/1_1_$special_\\==/2___2'([],_).
'detach_known/1_1_$special_\\==/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\131072=:=131072 ->
'chr sbag_del_element'(U,C,A1),
( A1==[] ->
Z is Y/\ -131073,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,[],V,W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,A1,V,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_\\==/2___2'(B,C).
'attach_known/1_1_$special_==/2___2'([],_).
'attach_known/1_1_$special_==/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\262144=:=262144 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,[C|V],W,X)
;
Z is Y\/262144,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,[C],W,X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(262144,[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[C],[],[]))
),
'attach_known/1_1_$special_==/2___2'(B,C).
'detach_known/1_1_$special_==/2___2'([],_).
'detach_known/1_1_$special_==/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\262144=:=262144 ->
'chr sbag_del_element'(V,C,A1),
( A1==[] ->
Z is Y/\ -262145,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,[],W,X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,A1,W,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_==/2___2'(B,C).
'attach_known/1_1_$special_=</2___2'([],_).
'attach_known/1_1_$special_=</2___2'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\524288=:=524288 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,[C|W],X)
;
Z is Y\/524288,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,[C],X)
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(524288,[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[C],[]))
),
'attach_known/1_1_$special_=</2___2'(B,C).
'detach_known/1_1_$special_=</2___2'([],_).
'detach_known/1_1_$special_=</2___2'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\524288=:=524288 ->
'chr sbag_del_element'(W,C,A1),
( A1==[] ->
Z is Y/\ -524289,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,[],X))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,A1,X))
)
;
true
)
;
true
),
'detach_known/1_1_$special_=</2___2'(B,C).
'attach_known/1_1_$special_=:=/2___2'([],_).
'attach_known/1_1_$special_=:=/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,A1) ->
A1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\1048576=:=1048576 ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,[C|X])
;
Z is Y\/1048576,
B1=v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,[C])
),
put_attr(A,guard_entailment,B1)
;
put_attr(A,guard_entailment,v(1048576,[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[C]))
),
'attach_known/1_1_$special_=:=/2___2'(B,C).
'detach_known/1_1_$special_=:=/2___2'([],_).
'detach_known/1_1_$special_=:=/2___2'([A|B],C) :-
( get_attr(A,guard_entailment,B1) ->
B1=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
( Y/\1048576=:=1048576 ->
'chr sbag_del_element'(X,C,A1),
( A1==[] ->
Z is Y/\ -1048577,
( Z==0 ->
del_attr(A,guard_entailment)
;
put_attr(A,guard_entailment,v(Z,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,[]))
)
;
put_attr(A,guard_entailment,v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,A1))
)
;
true
)
;
true
),
'detach_known/1_1_$special_=:=/2___2'(B,C).
attach_increment([],_).
attach_increment([B|C],A) :-
'chr not_locked'(B),
( get_attr(B,guard_entailment,M3) ->
A=v(Y,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X),
M3=v(U1,Z,A1,B1,C1,D1,E1,F1,G1,H1,I1,J1,K1,L1,M1,N1,O1,P1,Q1,R1,S1,T1),
sort(Z,V1),
'chr merge_attributes'(D,V1,W1),
sort(A1,X1),
'chr merge_attributes'(E,X1,Y1),
sort(B1,Z1),
'chr merge_attributes'(F,Z1,A2),
sort(C1,B2),
'chr merge_attributes'(G,B2,C2),
sort(D1,D2),
'chr merge_attributes'(H,D2,E2),
sort(E1,F2),
'chr merge_attributes'(I,F2,G2),
sort(F1,H2),
'chr merge_attributes'(J,H2,I2),
sort(G1,J2),
'chr merge_attributes'(K,J2,K2),
sort(H1,L2),
'chr merge_attributes'(L,L2,M2),
sort(I1,N2),
'chr merge_attributes'(M,N2,O2),
sort(J1,P2),
'chr merge_attributes'(N,P2,Q2),
sort(K1,R2),
'chr merge_attributes'(O,R2,S2),
sort(L1,T2),
'chr merge_attributes'(P,T2,U2),
sort(M1,V2),
'chr merge_attributes'(Q,V2,W2),
sort(N1,X2),
'chr merge_attributes'(R,X2,Y2),
sort(O1,Z2),
'chr merge_attributes'(S,Z2,A3),
sort(P1,B3),
'chr merge_attributes'(T,B3,C3),
sort(Q1,D3),
'chr merge_attributes'(U,D3,E3),
sort(R1,F3),
'chr merge_attributes'(V,F3,G3),
sort(S1,H3),
'chr merge_attributes'(W,H3,I3),
sort(T1,J3),
'chr merge_attributes'(X,J3,K3),
L3 is Y\/U1,
put_attr(B,guard_entailment,v(L3,W1,Y1,A2,C2,E2,G2,I2,K2,M2,O2,Q2,S2,U2,W2,Y2,A3,C3,E3,G3,I3,K3))
;
put_attr(B,guard_entailment,A)
),
attach_increment(C,A).
attr_unify_hook(v(W,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V),A) :-
sort(B,X),
sort(C,Y),
sort(D,Z),
sort(E,A1),
sort(F,B1),
sort(G,C1),
sort(H,D1),
sort(I,E1),
sort(J,F1),
sort(K,G1),
sort(L,H1),
sort(M,I1),
sort(N,J1),
sort(O,K1),
sort(P,L1),
sort(Q,M1),
sort(R,N1),
sort(S,O1),
sort(T,P1),
sort(U,Q1),
sort(V,R1),
( var(A) ->
( get_attr(A,guard_entailment,F4) ->
F4=v(N2,S1,T1,U1,V1,W1,X1,Y1,Z1,A2,B2,C2,D2,E2,F2,G2,H2,I2,J2,K2,L2,M2),
sort(S1,O2),
'chr merge_attributes'(X,O2,P2),
sort(T1,Q2),
'chr merge_attributes'(Y,Q2,R2),
sort(U1,S2),
'chr merge_attributes'(Z,S2,T2),
sort(V1,U2),
'chr merge_attributes'(A1,U2,V2),
sort(W1,W2),
'chr merge_attributes'(B1,W2,X2),
sort(X1,Y2),
'chr merge_attributes'(C1,Y2,Z2),
sort(Y1,A3),
'chr merge_attributes'(D1,A3,B3),
sort(Z1,C3),
'chr merge_attributes'(E1,C3,D3),
sort(A2,E3),
'chr merge_attributes'(F1,E3,F3),
sort(B2,G3),
'chr merge_attributes'(G1,G3,H3),
sort(C2,I3),
'chr merge_attributes'(H1,I3,J3),
sort(D2,K3),
'chr merge_attributes'(I1,K3,L3),
sort(E2,M3),
'chr merge_attributes'(J1,M3,N3),
sort(F2,O3),
'chr merge_attributes'(K1,O3,P3),
sort(G2,Q3),
'chr merge_attributes'(L1,Q3,R3),
sort(H2,S3),
'chr merge_attributes'(M1,S3,T3),
sort(I2,U3),
'chr merge_attributes'(N1,U3,V3),
sort(J2,W3),
'chr merge_attributes'(O1,W3,X3),
sort(K2,Y3),
'chr merge_attributes'(P1,Y3,Z3),
sort(L2,A4),
'chr merge_attributes'(Q1,A4,B4),
sort(M2,C4),
'chr merge_attributes'(R1,C4,D4),
E4 is W\/N2,
put_attr(A,guard_entailment,v(E4,P2,R2,T2,V2,X2,Z2,B3,D3,F3,H3,J3,L3,N3,P3,R3,T3,V3,X3,Z3,B4,D4)),
'$run_suspensions_variables___1'(X),
'$run_suspensions_known/1_1_$default___1'(Y),
'$run_suspensions_known/1_1_$special_;/2___2'(T2),
'$run_suspensions_known/1_1_$special_nonvar/1___1'(A1),
'$run_suspensions_known/1_1_$special_var/1___1'(B1),
'$run_suspensions_known/1_1_$special_atom/1___1'(C1),
'$run_suspensions_known/1_1_$special_atomic/1___1'(D1),
'$run_suspensions_known/1_1_$special_compound/1___1'(E1),
'$run_suspensions_known/1_1_$special_ground/1___1'(F1),
'$run_suspensions_known/1_1_$special_integer/1___1'(H3),
'$run_suspensions_known/1_1_$special_float/1___1'(J3),
'$run_suspensions_known/1_1_$special_number/1___1'(L3),
'$run_suspensions_known/1_1_$special_=\\=/2___2'(N3),
'$run_suspensions_known/1_1_$special_\\+/1___1'(P3),
'$run_suspensions_known/1_1_$special_functor/3___3'(R3),
'$run_suspensions_known/1_1_$special_\\=/2___2'(T3),
'$run_suspensions_known/1_1_$special_=/2___2'(V3),
'$run_suspensions_known/1_1_$special_\\==/2___2'(X3),
'$run_suspensions_known/1_1_$special_==/2___2'(Z3),
'$run_suspensions_known/1_1_$special_=</2___2'(B4),
'$run_suspensions_known/1_1_$special_=:=/2___2'(D4)
;
put_attr(A,guard_entailment,v(W,X,Y,Z,A1,B1,C1,D1,E1,F1,G1,H1,I1,J1,K1,L1,M1,N1,O1,P1,Q1,R1)),
'$run_suspensions_variables___1'(X),
'$run_suspensions_known/1_1_$default___1'(Y),
'$run_suspensions_known/1_1_$special_;/2___2'(Z),
'$run_suspensions_known/1_1_$special_nonvar/1___1'(A1),
'$run_suspensions_known/1_1_$special_var/1___1'(B1),
'$run_suspensions_known/1_1_$special_atom/1___1'(C1),
'$run_suspensions_known/1_1_$special_atomic/1___1'(D1),
'$run_suspensions_known/1_1_$special_compound/1___1'(E1),
'$run_suspensions_known/1_1_$special_ground/1___1'(F1),
'$run_suspensions_known/1_1_$special_integer/1___1'(G1),
'$run_suspensions_known/1_1_$special_float/1___1'(H1),
'$run_suspensions_known/1_1_$special_number/1___1'(I1),
'$run_suspensions_known/1_1_$special_=\\=/2___2'(J1),
'$run_suspensions_known/1_1_$special_\\+/1___1'(K1),
'$run_suspensions_known/1_1_$special_functor/3___3'(L1),
'$run_suspensions_known/1_1_$special_\\=/2___2'(M1),
'$run_suspensions_known/1_1_$special_=/2___2'(N1),
'$run_suspensions_known/1_1_$special_\\==/2___2'(O1),
'$run_suspensions_known/1_1_$special_==/2___2'(P1),
'$run_suspensions_known/1_1_$special_=</2___2'(Q1),
'$run_suspensions_known/1_1_$special_=:=/2___2'(R1)
)
;
( compound(A) ->
term_variables(A,G4),
attach_increment(G4,v(W,X,Y,Z,A1,B1,C1,D1,E1,F1,G1,H1,I1,J1,K1,L1,M1,N1,O1,P1,Q1,R1))
;
true
),
'$run_suspensions_variables___1'(X),
'$run_suspensions_known/1_1_$default___1'(Y),
'$run_suspensions_known/1_1_$special_;/2___2'(Z),
'$run_suspensions_known/1_1_$special_nonvar/1___1'(A1),
'$run_suspensions_known/1_1_$special_var/1___1'(B1),
'$run_suspensions_known/1_1_$special_atom/1___1'(C1),
'$run_suspensions_known/1_1_$special_atomic/1___1'(D1),
'$run_suspensions_known/1_1_$special_compound/1___1'(E1),
'$run_suspensions_known/1_1_$special_ground/1___1'(F1),
'$run_suspensions_known/1_1_$special_integer/1___1'(G1),
'$run_suspensions_known/1_1_$special_float/1___1'(H1),
'$run_suspensions_known/1_1_$special_number/1___1'(I1),
'$run_suspensions_known/1_1_$special_=\\=/2___2'(J1),
'$run_suspensions_known/1_1_$special_\\+/1___1'(K1),
'$run_suspensions_known/1_1_$special_functor/3___3'(L1),
'$run_suspensions_known/1_1_$special_\\=/2___2'(M1),
'$run_suspensions_known/1_1_$special_=/2___2'(N1),
'$run_suspensions_known/1_1_$special_\\==/2___2'(O1),
'$run_suspensions_known/1_1_$special_==/2___2'(P1),
'$run_suspensions_known/1_1_$special_=</2___2'(Q1),
'$run_suspensions_known/1_1_$special_=:=/2___2'(R1)
).
'$novel_production'(A,B) :-
arg(3,A,C),
( hprolog:get_ds(B,C,_) ->
fail
;
true
).
'$extend_history'(A,B) :-
arg(3,A,C),
hprolog:put_ds(B,C,x,D),
setarg(3,A,D).
'$run_suspensions_variables___1'([]).
'$run_suspensions_variables___1'([A|B]) :-
A=suspension(_,C,_,D),
( C==active ->
setarg(2,A,triggered),
variables___1__0(D,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_variables___1'(B).
'$run_suspensions_known/1_1_$default___1'([]).
'$run_suspensions_known/1_1_$default___1'([A|B]) :-
A=suspension(_,C,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(3,A,F),
'known/1_1_$default___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$default___1'(B).
'$run_suspensions_known/1_1_$special_;/2___2'([]).
'$run_suspensions_known/1_1_$special_;/2___2'([A|B]) :-
A=suspension(_,C,D,_,E,F),
( C==active ->
setarg(2,A,triggered),
G is D+1,
setarg(3,A,G),
'known/1_1_$special_;/2___2__0'(E,F,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_;/2___2'(B).
'$run_suspensions_known/1_1_$special_nonvar/1___1'([]).
'$run_suspensions_known/1_1_$special_nonvar/1___1'([A|B]) :-
A=suspension(_,C,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(3,A,F),
'known/1_1_$special_nonvar/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_nonvar/1___1'(B).
'$run_suspensions_known/1_1_$special_var/1___1'([]).
'$run_suspensions_known/1_1_$special_var/1___1'([A|B]) :-
A=suspension(_,C,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(3,A,F),
'known/1_1_$special_var/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_var/1___1'(B).
'$run_suspensions_known/1_1_$special_atom/1___1'([]).
'$run_suspensions_known/1_1_$special_atom/1___1'([A|B]) :-
A=suspension(_,C,_,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(4,A,F),
'known/1_1_$special_atom/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_atom/1___1'(B).
'$run_suspensions_known/1_1_$special_atomic/1___1'([]).
'$run_suspensions_known/1_1_$special_atomic/1___1'([A|B]) :-
A=suspension(_,C,_,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(4,A,F),
'known/1_1_$special_atomic/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_atomic/1___1'(B).
'$run_suspensions_known/1_1_$special_compound/1___1'([]).
'$run_suspensions_known/1_1_$special_compound/1___1'([A|B]) :-
A=suspension(_,C,_,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(4,A,F),
'known/1_1_$special_compound/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_compound/1___1'(B).
'$run_suspensions_known/1_1_$special_ground/1___1'([]).
'$run_suspensions_known/1_1_$special_ground/1___1'([A|B]) :-
A=suspension(_,C,_,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(4,A,F),
'known/1_1_$special_ground/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_ground/1___1'(B).
'$run_suspensions_known/1_1_$special_integer/1___1'([]).
'$run_suspensions_known/1_1_$special_integer/1___1'([A|B]) :-
A=suspension(_,C,_,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(4,A,F),
'known/1_1_$special_integer/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_integer/1___1'(B).
'$run_suspensions_known/1_1_$special_float/1___1'([]).
'$run_suspensions_known/1_1_$special_float/1___1'([A|B]) :-
A=suspension(_,C,_,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(4,A,F),
'known/1_1_$special_float/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_float/1___1'(B).
'$run_suspensions_known/1_1_$special_number/1___1'([]).
'$run_suspensions_known/1_1_$special_number/1___1'([A|B]) :-
A=suspension(_,C,_,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(4,A,F),
'known/1_1_$special_number/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_number/1___1'(B).
'$run_suspensions_known/1_1_$special_=\\=/2___2'([]).
'$run_suspensions_known/1_1_$special_=\\=/2___2'([A|B]) :-
A=suspension(_,C,_,D,_,E,F),
( C==active ->
setarg(2,A,triggered),
G is D+1,
setarg(4,A,G),
'known/1_1_$special_=\\=/2___2__0'(E,F,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_=\\=/2___2'(B).
'$run_suspensions_known/1_1_$special_\\+/1___1'([]).
'$run_suspensions_known/1_1_$special_\\+/1___1'([A|B]) :-
A=suspension(_,C,D,_,E),
( C==active ->
setarg(2,A,triggered),
F is D+1,
setarg(3,A,F),
'known/1_1_$special_\\+/1___1__0'(E,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_\\+/1___1'(B).
'$run_suspensions_known/1_1_$special_functor/3___3'([]).
'$run_suspensions_known/1_1_$special_functor/3___3'([A|B]) :-
A=suspension(_,C,D,_,E,F,G),
( C==active ->
setarg(2,A,triggered),
H is D+1,
setarg(3,A,H),
'known/1_1_$special_functor/3___3__0'(E,F,G,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_functor/3___3'(B).
'$run_suspensions_known/1_1_$special_\\=/2___2'([]).
'$run_suspensions_known/1_1_$special_\\=/2___2'([A|B]) :-
A=suspension(_,C,_,D,_,E,F),
( C==active ->
setarg(2,A,triggered),
G is D+1,
setarg(4,A,G),
'known/1_1_$special_\\=/2___2__0'(E,F,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_\\=/2___2'(B).
'$run_suspensions_known/1_1_$special_=/2___2'([]).
'$run_suspensions_known/1_1_$special_=/2___2'([A|B]) :-
A=suspension(_,C,D,_,E,F),
( C==active ->
setarg(2,A,triggered),
G is D+1,
setarg(3,A,G),
'known/1_1_$special_=/2___2__0'(E,F,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_=/2___2'(B).
'$run_suspensions_known/1_1_$special_\\==/2___2'([]).
'$run_suspensions_known/1_1_$special_\\==/2___2'([A|B]) :-
A=suspension(_,C,_,D,_,E,F),
( C==active ->
setarg(2,A,triggered),
G is D+1,
setarg(4,A,G),
'known/1_1_$special_\\==/2___2__0'(E,F,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_\\==/2___2'(B).
'$run_suspensions_known/1_1_$special_==/2___2'([]).
'$run_suspensions_known/1_1_$special_==/2___2'([A|B]) :-
A=suspension(_,C,_,D,_,E,F),
( C==active ->
setarg(2,A,triggered),
G is D+1,
setarg(4,A,G),
'known/1_1_$special_==/2___2__0'(E,F,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_==/2___2'(B).
'$run_suspensions_known/1_1_$special_=</2___2'([]).
'$run_suspensions_known/1_1_$special_=</2___2'([A|B]) :-
A=suspension(_,C,_,D,_,E,F),
( C==active ->
setarg(2,A,triggered),
G is D+1,
setarg(4,A,G),
'known/1_1_$special_=</2___2__0'(E,F,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_=</2___2'(B).
'$run_suspensions_known/1_1_$special_=:=/2___2'([]).
'$run_suspensions_known/1_1_$special_=:=/2___2'([A|B]) :-
A=suspension(_,C,_,D,_,E,F),
( C==active ->
setarg(2,A,triggered),
G is D+1,
setarg(4,A,G),
'known/1_1_$special_=:=/2___2__0'(E,F,A),
( C==triggered ->
setarg(2,A,active)
;
true
)
;
true
),
'$run_suspensions_known/1_1_$special_=:=/2___2'(B).
'$enumerate_constraints'(A) :-
( nonvar(A) ->
functor(A,B,_),
'$enumerate_constraints'(B,A)
;
'$enumerate_constraints'(_,A)
).
'$enumerate_constraints'(variables,A) :-
nb_getval('$chr_store_global_list_guard_entailment____variables___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,D),
A=variables(D).
'$enumerate_constraints'('known/1_1_$default',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,D),
A='known/1_1_$default'(D).
'$enumerate_constraints'('known/1_1_$special_;/2',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,D,E),
A='known/1_1_$special_;/2'(D,E).
'$enumerate_constraints'('known/1_1_$special_nonvar/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,D),
A='known/1_1_$special_nonvar/1'(D).
'$enumerate_constraints'('known/1_1_$special_var/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,D),
A='known/1_1_$special_var/1'(D).
'$enumerate_constraints'('known/1_1_$special_atom/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D),
A='known/1_1_$special_atom/1'(D).
'$enumerate_constraints'('known/1_1_$special_atomic/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D),
A='known/1_1_$special_atomic/1'(D).
'$enumerate_constraints'('known/1_1_$special_compound/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D),
A='known/1_1_$special_compound/1'(D).
'$enumerate_constraints'('known/1_1_$special_ground/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D),
A='known/1_1_$special_ground/1'(D).
'$enumerate_constraints'('known/1_1_$special_integer/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D),
A='known/1_1_$special_integer/1'(D).
'$enumerate_constraints'('known/1_1_$special_float/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D),
A='known/1_1_$special_float/1'(D).
'$enumerate_constraints'('known/1_1_$special_number/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D),
A='known/1_1_$special_number/1'(D).
'$enumerate_constraints'('known/1_1_$special_=\\=/2',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D,E),
A='known/1_1_$special_=\\=/2'(D,E).
'$enumerate_constraints'('known/1_1_$special_\\+/1',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,D),
A='known/1_1_$special_\\+/1'(D).
'$enumerate_constraints'('known/1_1_$special_functor/3',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,D,E,F),
A='known/1_1_$special_functor/3'(D,E,F).
'$enumerate_constraints'('known/1_1_$special_\\=/2',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D,E),
A='known/1_1_$special_\\=/2'(D,E).
'$enumerate_constraints'('known/1_1_$special_=/2',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,D,E),
A='known/1_1_$special_=/2'(D,E).
'$enumerate_constraints'('known/1_1_$special_\\==/2',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D,E),
A='known/1_1_$special_\\==/2'(D,E).
'$enumerate_constraints'('known/1_1_$special_==/2',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D,E),
A='known/1_1_$special_==/2'(D,E).
'$enumerate_constraints'('known/1_1_$special_=</2',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D,E),
A='known/1_1_$special_=</2'(D,E).
'$enumerate_constraints'('known/1_1_$special_=:=/2',A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_,_,_,D,E),
A='known/1_1_$special_=:=/2'(D,E).
'$enumerate_constraints'('known/1_1_$special_fail/0',A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,_,_),
A='known/1_1_$special_fail/0'.
'$chr_initialization' :-
nb_setval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',[]),
nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',[]),
nb_setval('$chr_store_global_list_guard_entailment____variables___1',[]).
:-initialization '$chr_initialization'.
:-dynamic user:exception/3.
:-multifile user:exception/3.
user:exception(undefined_global_variable,A,retry) :-
'$chr_prolog_global_variable'(A),
'$chr_initialization'.
'$chr_prolog_global_variable'('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$default___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____variables___1').
known(A) :-
nonvar(A),
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
A=(B;C),
!,
'known/1_1_$special_;/2'(B,C)
;
A=nonvar(D),
!,
'known/1_1_$special_nonvar/1'(D)
)
;
A=var(E),
!,
'known/1_1_$special_var/1'(E)
)
;
A=atom(F),
!,
'known/1_1_$special_atom/1'(F)
)
;
A=atomic(G),
!,
'known/1_1_$special_atomic/1'(G)
)
;
A=compound(H),
!,
'known/1_1_$special_compound/1'(H)
)
;
A=ground(I),
!,
'known/1_1_$special_ground/1'(I)
)
;
A=integer(J),
!,
'known/1_1_$special_integer/1'(J)
)
;
A=float(K),
!,
'known/1_1_$special_float/1'(K)
)
;
A=number(L),
!,
'known/1_1_$special_number/1'(L)
)
;
A=(M=\=N),
!,
'known/1_1_$special_=\\=/2'(M,N)
)
;
A=(\+O),
!,
'known/1_1_$special_\\+/1'(O)
)
;
A=functor(P,Q,R),
!,
'known/1_1_$special_functor/3'(P,Q,R)
)
;
A=(S\=T),
!,
'known/1_1_$special_\\=/2'(S,T)
)
;
A=(U=V),
!,
'known/1_1_$special_=/2'(U,V)
)
;
A=(W,X),
!,
'known/1_1_$special_,/2'(W,X)
)
;
A=(Y\==Z),
!,
'known/1_1_$special_\\==/2'(Y,Z)
)
;
A=(A1==B1),
!,
'known/1_1_$special_==/2'(A1,B1)
)
;
A=(C1 is D1),
!,
'known/1_1_$special_is/2'(C1,D1)
)
;
A=(E1<F1),
!,
'known/1_1_$special_</2'(E1,F1)
)
;
A=(G1>=H1),
!,
'known/1_1_$special_>=/2'(G1,H1)
)
;
A=(I1>J1),
!,
'known/1_1_$special_>/2'(I1,J1)
)
;
A=(K1=<L1),
!,
'known/1_1_$special_=</2'(K1,L1)
)
;
A=(M1=:=N1),
!,
'known/1_1_$special_=:=/2'(M1,N1)
).
known(A) :-
A==fail,
!,
'known/1_1_$special_fail/0'.
known(A) :-
'known/1_1_$default'(A).
test(A) :-
nonvar(A),
(
(
(
(
(
(
(
A=(B,C),
!,
'test/1_1_$special_,/2'(B,C)
;
A=(\+D),
!,
'test/1_1_$special_\\+/1'(D)
)
;
A=integer(E),
!,
'test/1_1_$special_integer/1'(E)
)
;
A=float(F),
!,
'test/1_1_$special_float/1'(F)
)
;
A=number(G),
!,
'test/1_1_$special_number/1'(G)
)
;
A=ground(H),
!,
'test/1_1_$special_ground/1'(H)
)
;
A=(I=:=J),
!,
'test/1_1_$special_=:=/2'(I,J)
)
;
A=(K==L),
!,
'test/1_1_$special_==/2'(K,L)
).
test(A) :-
A==true,
!,
'test/1_1_$special_true/0'.
test(A) :-
nonvar(A),
(
(
(
(
(
(
(
(
(
A=functor(B,C,D),
!,
'test/1_1_$special_functor/3'(B,C,D)
;
A=(E=F),
!,
'test/1_1_$special_=/2'(E,F)
)
;
A=(G;H),
!,
'test/1_1_$special_;/2'(G,H)
)
;
A=(I is J),
!,
'test/1_1_$special_is/2'(I,J)
)
;
A=(K<L),
!,
'test/1_1_$special_</2'(K,L)
)
;
A=(M>=N),
!,
'test/1_1_$special_>=/2'(M,N)
)
;
A=(O>P),
!,
'test/1_1_$special_>/2'(O,P)
)
;
A=(Q=\=R),
!,
'test/1_1_$special_=\\=/2'(Q,R)
)
;
A=(S=<T),
!,
'test/1_1_$special_=</2'(S,T)
)
;
A=(U\==V),
!,
'test/1_1_$special_\\==/2'(U,V)
).
test(A) :-
'test/1_1_$default'(A).
cleanup :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',A),
!,
cleanup___0__0__0__1(A).
cleanup___0__0__0__1([]) :-
cleanup___0__1.
cleanup___0__0__0__1([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(C,A),
cleanup___0__0__0__1(B)
;
cleanup___0__0__0__1(B)
).
cleanup :-
cleanup___0__1.
cleanup___0__1 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',A),
!,
cleanup___0__1__0__2(A).
cleanup___0__1__0__2([]) :-
cleanup___0__2.
cleanup___0__1__0__2([A|B]) :-
( A=suspension(_,active,_,_,_) ->
A=suspension(_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_nonvar/1___1'(C,A),
cleanup___0__1__0__2(B)
;
cleanup___0__1__0__2(B)
).
cleanup___0__1 :-
cleanup___0__2.
cleanup___0__2 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',A),
!,
cleanup___0__2__0__3(A).
cleanup___0__2__0__3([]) :-
cleanup___0__3.
cleanup___0__2__0__3([A|B]) :-
( A=suspension(_,active,_,_,_) ->
A=suspension(_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_var/1___1'(C,A),
cleanup___0__2__0__3(B)
;
cleanup___0__2__0__3(B)
).
cleanup___0__2 :-
cleanup___0__3.
cleanup___0__3 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',A),
!,
cleanup___0__3__0__4(A).
cleanup___0__3__0__4([]) :-
cleanup___0__4.
cleanup___0__3__0__4([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_atom/1___1'(C,A),
cleanup___0__3__0__4(B)
;
cleanup___0__3__0__4(B)
).
cleanup___0__3 :-
cleanup___0__4.
cleanup___0__4 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',A),
!,
cleanup___0__4__0__5(A).
cleanup___0__4__0__5([]) :-
cleanup___0__5.
cleanup___0__4__0__5([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_atomic/1___1'(C,A),
cleanup___0__4__0__5(B)
;
cleanup___0__4__0__5(B)
).
cleanup___0__4 :-
cleanup___0__5.
cleanup___0__5 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',A),
!,
cleanup___0__5__0__6(A).
cleanup___0__5__0__6([]) :-
cleanup___0__6.
cleanup___0__5__0__6([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_compound/1___1'(C,A),
cleanup___0__5__0__6(B)
;
cleanup___0__5__0__6(B)
).
cleanup___0__5 :-
cleanup___0__6.
cleanup___0__6 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',A),
!,
cleanup___0__6__0__7(A).
cleanup___0__6__0__7([]) :-
cleanup___0__7.
cleanup___0__6__0__7([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_ground/1___1'(C,A),
cleanup___0__6__0__7(B)
;
cleanup___0__6__0__7(B)
).
cleanup___0__6 :-
cleanup___0__7.
cleanup___0__7 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',A),
!,
cleanup___0__7__0__8(A).
cleanup___0__7__0__8([]) :-
cleanup___0__8.
cleanup___0__7__0__8([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_integer/1___1'(C,A),
cleanup___0__7__0__8(B)
;
cleanup___0__7__0__8(B)
).
cleanup___0__7 :-
cleanup___0__8.
cleanup___0__8 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',A),
!,
cleanup___0__8__0__9(A).
cleanup___0__8__0__9([]) :-
cleanup___0__9.
cleanup___0__8__0__9([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_float/1___1'(C,A),
cleanup___0__8__0__9(B)
;
cleanup___0__8__0__9(B)
).
cleanup___0__8 :-
cleanup___0__9.
cleanup___0__9 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',A),
!,
cleanup___0__9__0__10(A).
cleanup___0__9__0__10([]) :-
cleanup___0__10.
cleanup___0__9__0__10([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_number/1___1'(C,A),
cleanup___0__9__0__10(B)
;
cleanup___0__9__0__10(B)
).
cleanup___0__9 :-
cleanup___0__10.
cleanup___0__10 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',A),
!,
cleanup___0__10__0__11(A).
cleanup___0__10__0__11([]) :-
cleanup___0__11.
cleanup___0__10__0__11([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(C,A),
cleanup___0__10__0__11(B)
;
cleanup___0__10__0__11(B)
).
cleanup___0__10 :-
cleanup___0__11.
cleanup___0__11 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',A),
!,
cleanup___0__11__0__12(A).
cleanup___0__11__0__12([]) :-
cleanup___0__12.
cleanup___0__11__0__12([A|B]) :-
( A=suspension(_,active,_,_,_) ->
A=suspension(_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(C,A),
cleanup___0__11__0__12(B)
;
cleanup___0__11__0__12(B)
).
cleanup___0__11 :-
cleanup___0__12.
cleanup___0__12 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',A),
!,
cleanup___0__12__0__13(A).
cleanup___0__12__0__13([]) :-
cleanup___0__13.
cleanup___0__12__0__13([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,H,I,J),
setarg(2,A,removed),
term_variables(term(H,I,J),C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(C,A),
cleanup___0__12__0__13(B)
;
cleanup___0__12__0__13(B)
).
cleanup___0__12 :-
cleanup___0__13.
cleanup___0__13 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',A),
!,
cleanup___0__13__0__14(A).
cleanup___0__13__0__14([]) :-
cleanup___0__14.
cleanup___0__13__0__14([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(C,A),
cleanup___0__13__0__14(B)
;
cleanup___0__13__0__14(B)
).
cleanup___0__13 :-
cleanup___0__14.
cleanup___0__14 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',A),
!,
cleanup___0__14__0__15(A).
cleanup___0__14__0__15([]) :-
cleanup___0__15.
cleanup___0__14__0__15([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(C,A),
cleanup___0__14__0__15(B)
;
cleanup___0__14__0__15(B)
).
cleanup___0__14 :-
cleanup___0__15.
cleanup___0__15 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',A),
!,
cleanup___0__15__0__17(A).
cleanup___0__15__0__17([]) :-
cleanup___0__16.
cleanup___0__15__0__17([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(C,A),
cleanup___0__15__0__17(B)
;
cleanup___0__15__0__17(B)
).
cleanup___0__15 :-
cleanup___0__16.
cleanup___0__16 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',A),
!,
cleanup___0__16__0__18(A).
cleanup___0__16__0__18([]) :-
cleanup___0__17.
cleanup___0__16__0__18([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(C,A),
cleanup___0__16__0__18(B)
;
cleanup___0__16__0__18(B)
).
cleanup___0__16 :-
cleanup___0__17.
cleanup___0__17 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',A),
!,
cleanup___0__17__0__23(A).
cleanup___0__17__0__23([]) :-
cleanup___0__18.
cleanup___0__17__0__23([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(C,A),
cleanup___0__17__0__23(B)
;
cleanup___0__17__0__23(B)
).
cleanup___0__17 :-
cleanup___0__18.
cleanup___0__18 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',A),
!,
cleanup___0__18__0__24(A).
cleanup___0__18__0__24([]) :-
cleanup___0__19.
cleanup___0__18__0__24([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(C,A),
cleanup___0__18__0__24(B)
;
cleanup___0__18__0__24(B)
).
cleanup___0__18 :-
cleanup___0__19.
cleanup___0__19 :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',A),
!,
cleanup___0__19__0__25(A).
cleanup___0__19__0__25([]) :-
cleanup___0__20.
cleanup___0__19__0__25([A|B]) :-
( A=suspension(_,active,_) ->
setarg(2,A,removed),
arg(3,A,C),
( var(C) ->
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',D),
D=[_|E],
b_setval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',E),
( E=[F|_] ->
setarg(3,F,_)
;
true
)
;
C=[_,_|E],
setarg(2,C,E),
( E=[F|_] ->
setarg(3,F,C)
;
true
)
),
cleanup___0__19__0__25(B)
;
cleanup___0__19__0__25(B)
).
cleanup___0__19 :-
cleanup___0__20.
cleanup___0__20 :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',A),
!,
cleanup___0__20__0__26(A).
cleanup___0__20__0__26([]) :-
cleanup___0__21.
cleanup___0__20__0__26([A|B]) :-
( A=suspension(_,active,_,_,_) ->
A=suspension(_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$default___1'(C,A),
cleanup___0__20__0__26(B)
;
cleanup___0__20__0__26(B)
).
cleanup___0__20 :-
cleanup___0__21.
cleanup___0__21 :-
nb_getval('$chr_store_global_list_guard_entailment____variables___1',A),
!,
cleanup___0__21__0__27(A).
cleanup___0__21__0__27([]) :-
cleanup___0__22.
cleanup___0__21__0__27([A|B]) :-
( A=suspension(_,active,_,_) ->
A=suspension(_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(3,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____variables___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____variables___1',F),
( F=[G|_] ->
setarg(3,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(3,G,D)
;
true
)
),
detach_variables___1(C,A),
cleanup___0__21__0__27(B)
;
cleanup___0__21__0__27(B)
).
cleanup___0__21 :-
cleanup___0__22.
cleanup___0__22.
variables(A) :-
variables___1__0(A,_).
variables___1__0(A,B) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',G),
'chr sbag_member'(C,G),
C=suspension(_,active,_,_,D,E,F),
ground(F),
ground(E),
var(D),
!,
C=suspension(_,_,_,_,U,V,W),
setarg(2,C,removed),
term_variables(term(U,V,W),J),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(J,C),
( var(B) ->
true
;
B=suspension(_,_,_,P),
setarg(2,B,removed),
term_variables(P,K),
arg(3,B,L),
( var(L) ->
nb_getval('$chr_store_global_list_guard_entailment____variables___1',M),
M=[_|N],
b_setval('$chr_store_global_list_guard_entailment____variables___1',N),
( N=[O|_] ->
setarg(3,O,_)
;
true
)
;
L=[_,_|N],
setarg(2,L,N),
( N=[O|_] ->
setarg(3,O,L)
;
true
)
),
detach_variables___1(K,B)
),
functor(D,E,F),
D=..[_|H],
append(H,A,I),
variables(I).
variables___1__0(A,B) :-
( var(B) ->
B=suspension(D,active,_,A),
term_variables(A,C),
'chr none_locked'(C),
'chr gen_id'(D),
nb_getval('$chr_store_global_list_guard_entailment____variables___1',E),
F=[B|E],
b_setval('$chr_store_global_list_guard_entailment____variables___1',F),
( E=[G|_] ->
setarg(3,G,F)
;
true
),
attach_variables___1(C,B)
;
setarg(2,B,active)
).
'test/1_1_$default'(_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$default'(A) :-
nonvar(A),
(
(
(
(
(
A=nonvar(B),
( 'chr newvia_1'(B,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==B,
!
;
A=var(H),
( 'chr newvia_1'(H,L) ->
get_attr(L,guard_entailment,M),
M=v(_,_,_,_,_,K,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',K)
),
'chr sbag_member'(I,K),
I=suspension(_,active,_,_,J),
J==H,
!
)
;
A=atom(N),
( 'chr newvia_1'(N,R) ->
get_attr(R,guard_entailment,S),
S=v(_,_,_,_,_,_,Q,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',Q)
),
'chr sbag_member'(O,Q),
O=suspension(_,active,_,_,_,P),
P==N,
!
)
;
A=atomic(T),
( 'chr newvia_1'(T,X) ->
get_attr(X,guard_entailment,Y),
Y=v(_,_,_,_,_,_,_,W,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',W)
),
'chr sbag_member'(U,W),
U=suspension(_,active,_,_,_,V),
V==T,
!
)
;
A=compound(Z),
( 'chr newvia_1'(Z,D1) ->
get_attr(D1,guard_entailment,E1),
E1=v(_,_,_,_,_,_,_,_,C1,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',C1)
),
'chr sbag_member'(A1,C1),
A1=suspension(_,active,_,_,_,B1),
B1==Z,
!
)
;
A=(F1\=G1),
( 'chr newvia_2'(F1,G1,L1) ->
get_attr(L1,guard_entailment,M1),
M1=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,K1,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',K1)
),
'chr sbag_member'(H1,K1),
H1=suspension(_,active,_,_,_,I1,J1),
I1==F1,
J1==G1,
!
).
'test/1_1_$default'(A) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',D)
),
'chr sbag_member'(B,D),
B=suspension(_,active,_,_,C),
C==A,
!.
'test/1_1_$default'(A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
'chr sbag_member'(B,E),
B=suspension(_,active,_,_,C,D),
!,
B=suspension(_,_,_,_,L,M),
setarg(2,B,removed),
term_variables(term(L,M),G),
arg(4,B,H),
( var(H) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I),
I=[_|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
( J=[K|_] ->
setarg(4,K,_)
;
true
)
;
H=[_,_|J],
setarg(2,H,J),
( J=[K|_] ->
setarg(4,K,H)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(G,B),
\+try(C,A),
!,
negate_b(C,F),
known(F),
\+try(D,A).
'test/1_1_$default'(_) :-
fail.
'test/1_1_$special_,/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_,/2'(A,B) :-
test(A),
known(A),
test(B).
'test/1_1_$special_\\+/1'(_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_\\+/1'(A) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',D)
),
'chr sbag_member'(B,D),
B=suspension(_,active,_,_,C),
C==A,
!.
'test/1_1_$special_\\+/1'(A) :-
nonvar(A),
(
(
(
(
(
(
(
A=functor(B,C,D),
nonvar(B),
(
'chr lock'(B),
'chr lock'(C),
'chr lock'(D),
functor(B,C,D),
'chr unlock'(B),
'chr unlock'(C),
'chr unlock'(D),
!,
fail
;
!
)
;
A=ground(E),
ground(E),
!,
fail
)
;
A=number(F),
number(F),
!,
fail
)
;
A=float(G),
float(G),
!,
fail
)
;
A=integer(H),
integer(H),
!,
fail
)
;
A=number(I),
nonvar(I),
!
)
;
A=float(J),
nonvar(J),
!
)
;
A=integer(K),
nonvar(K),
!
).
'test/1_1_$special_\\+/1'(A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
'chr sbag_member'(B,E),
B=suspension(_,active,_,_,C,D),
!,
B=suspension(_,_,_,_,L,M),
setarg(2,B,removed),
term_variables(term(L,M),G),
arg(4,B,H),
( var(H) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I),
I=[_|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
( J=[K|_] ->
setarg(4,K,_)
;
true
)
;
H=[_,_|J],
setarg(2,H,J),
( J=[K|_] ->
setarg(4,K,H)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(G,B),
\+try(C,\+A),
!,
negate_b(C,F),
known(F),
\+try(D,\+A).
'test/1_1_$special_\\+/1'(_) :-
fail.
'test/1_1_$special_integer/1'(_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_integer/1'(A) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,D,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',D)
),
'chr sbag_member'(B,D),
B=suspension(_,active,_,_,_,C),
C==A,
!.
'test/1_1_$special_integer/1'(A) :-
integer(A),
!.
'test/1_1_$special_integer/1'(A) :-
nonvar(A),
!,
fail.
'test/1_1_$special_integer/1'(A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
'chr sbag_member'(B,E),
B=suspension(_,active,_,_,C,D),
!,
B=suspension(_,_,_,_,L,M),
setarg(2,B,removed),
term_variables(term(L,M),G),
arg(4,B,H),
( var(H) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I),
I=[_|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
( J=[K|_] ->
setarg(4,K,_)
;
true
)
;
H=[_,_|J],
setarg(2,H,J),
( J=[K|_] ->
setarg(4,K,H)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(G,B),
\+try(C,integer(A)),
!,
negate_b(C,F),
known(F),
\+try(D,integer(A)).
'test/1_1_$special_integer/1'(_) :-
fail.
'test/1_1_$special_float/1'(_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_float/1'(A) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,D,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',D)
),
'chr sbag_member'(B,D),
B=suspension(_,active,_,_,_,C),
C==A,
!.
'test/1_1_$special_float/1'(A) :-
float(A),
!.
'test/1_1_$special_float/1'(A) :-
nonvar(A),
!,
fail.
'test/1_1_$special_float/1'(A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
'chr sbag_member'(B,E),
B=suspension(_,active,_,_,C,D),
!,
B=suspension(_,_,_,_,L,M),
setarg(2,B,removed),
term_variables(term(L,M),G),
arg(4,B,H),
( var(H) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I),
I=[_|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
( J=[K|_] ->
setarg(4,K,_)
;
true
)
;
H=[_,_|J],
setarg(2,H,J),
( J=[K|_] ->
setarg(4,K,H)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(G,B),
\+try(C,float(A)),
!,
negate_b(C,F),
known(F),
\+try(D,float(A)).
'test/1_1_$special_float/1'(_) :-
fail.
'test/1_1_$special_number/1'(_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_number/1'(A) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,D,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',D)
),
'chr sbag_member'(B,D),
B=suspension(_,active,_,_,_,C),
C==A,
!.
'test/1_1_$special_number/1'(A) :-
number(A),
!.
'test/1_1_$special_number/1'(A) :-
nonvar(A),
!,
fail.
'test/1_1_$special_number/1'(A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
'chr sbag_member'(B,E),
B=suspension(_,active,_,_,C,D),
!,
B=suspension(_,_,_,_,L,M),
setarg(2,B,removed),
term_variables(term(L,M),G),
arg(4,B,H),
( var(H) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I),
I=[_|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
( J=[K|_] ->
setarg(4,K,_)
;
true
)
;
H=[_,_|J],
setarg(2,H,J),
( J=[K|_] ->
setarg(4,K,H)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(G,B),
\+try(C,number(A)),
!,
negate_b(C,F),
known(F),
\+try(D,number(A)).
'test/1_1_$special_number/1'(_) :-
fail.
'test/1_1_$special_ground/1'(_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_ground/1'(A) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',D)
),
'chr sbag_member'(B,D),
B=suspension(_,active,_,_,_,C),
C==A,
!.
'test/1_1_$special_ground/1'(A) :-
ground(A),
!.
'test/1_1_$special_ground/1'(A) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
'chr sbag_member'(B,E),
B=suspension(_,active,_,_,C,D),
!,
B=suspension(_,_,_,_,L,M),
setarg(2,B,removed),
term_variables(term(L,M),G),
arg(4,B,H),
( var(H) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I),
I=[_|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
( J=[K|_] ->
setarg(4,K,_)
;
true
)
;
H=[_,_|J],
setarg(2,H,J),
( J=[K|_] ->
setarg(4,K,H)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(G,B),
\+try(C,ground(A)),
!,
negate_b(C,F),
known(F),
\+try(D,ground(A)).
'test/1_1_$special_ground/1'(_) :-
fail.
'test/1_1_$special_=:=/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_=:=/2'(A,B) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==A,
E==B,
!.
'test/1_1_$special_=:=/2'(A,B) :-
A==B,
!.
'test/1_1_$special_=:=/2'(A,B) :-
ground(B),
ground(A),
(
A=:=B,
!
;
!,
fail
).
'test/1_1_$special_=:=/2'(A,B) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,D,E),
!,
C=suspension(_,_,_,_,M,N),
setarg(2,C,removed),
term_variables(term(M,N),H),
arg(4,C,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H,C),
\+try(D,A=:=B),
!,
negate_b(D,G),
known(G),
\+try(E,A=:=B).
'test/1_1_$special_=:=/2'(_,_) :-
fail.
'test/1_1_$special_==/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_==/2'(A,B) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==A,
E==B,
!.
'test/1_1_$special_==/2'(A,B) :-
A==B,
!.
'test/1_1_$special_==/2'(A,B) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,D,E),
!,
C=suspension(_,_,_,_,M,N),
setarg(2,C,removed),
term_variables(term(M,N),H),
arg(4,C,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H,C),
\+try(D,A==B),
!,
negate_b(D,G),
known(G),
\+try(E,A==B).
'test/1_1_$special_==/2'(_,_) :-
fail.
'test/1_1_$special_true/0' :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_true/0'.
'test/1_1_$special_functor/3'(_,_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_functor/3'(A,B,C) :-
( 'chr newvia'([A,B,C],I) ->
get_attr(I,guard_entailment,J),
J=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,H,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',H)
),
'chr sbag_member'(D,H),
D=suspension(_,active,_,_,E,F,G),
E==A,
F==B,
G==C,
!.
'test/1_1_$special_functor/3'(A,B,C) :-
ground(C),
ground(B),
var(A),
nb_getval('$chr_store_global_list_guard_entailment____variables___1',F),
'chr sbag_member'(D,F),
D=suspension(_,active,_,E),
'chr lock'(A),
'chr lock'(E),
\+memberchk_eq(A,E),
'chr unlock'(A),
'chr unlock'(E),
!,
functor(A,B,C).
'test/1_1_$special_functor/3'(A,B,C) :-
nonvar(A),
(
'chr lock'(A),
'chr lock'(B),
'chr lock'(C),
functor(A,B,C),
'chr unlock'(A),
'chr unlock'(B),
'chr unlock'(C),
!
;
!,
fail
).
'test/1_1_$special_functor/3'(A,B,C) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',G),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,E,F),
!,
D=suspension(_,_,_,_,N,O),
setarg(2,D,removed),
term_variables(term(N,O),I),
arg(4,D,J),
( var(J) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K),
K=[_|L],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L),
( L=[M|_] ->
setarg(4,M,_)
;
true
)
;
J=[_,_|L],
setarg(2,J,L),
( L=[M|_] ->
setarg(4,M,J)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,D),
\+try(E,functor(A,B,C)),
!,
negate_b(E,H),
known(H),
\+try(F,functor(A,B,C)).
'test/1_1_$special_functor/3'(_,_,_) :-
fail.
'test/1_1_$special_=/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_=/2'(A,B) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,D,E),
D==A,
E==B,
!.
'test/1_1_$special_=/2'(A,B) :-
ground(B),
ground(A),
!,
A=B.
'test/1_1_$special_=/2'(A,B) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,D,E),
!,
C=suspension(_,_,_,_,M,N),
setarg(2,C,removed),
term_variables(term(M,N),H),
arg(4,C,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H,C),
\+try(D,A=B),
!,
negate_b(D,G),
known(G),
\+try(E,A=B).
'test/1_1_$special_=/2'(_,_) :-
fail.
'test/1_1_$special_;/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_;/2'(A,B) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,F,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,D,E),
D==A,
E==B,
!.
'test/1_1_$special_;/2'(A,B) :-
A==fail,
!,
test(B).
'test/1_1_$special_;/2'(A,B) :-
B==fail,
!,
test(A).
'test/1_1_$special_;/2'(A,B) :-
negate_b(A,C),
negate_b(B,D),
(
known(D),
test(A)
;
known(C),
test(B)
).
'test/1_1_$special_is/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_is/2'(A,B) :-
'test/1_1_$special_=:=/2'(A,B).
'test/1_1_$special_</2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_</2'(A,B) :-
'test/1_1_$special_,/2'(A=<B,A=\=B).
'test/1_1_$special_>=/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_>=/2'(A,B) :-
'test/1_1_$special_=</2'(B,A).
'test/1_1_$special_>/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_>/2'(A,B) :-
'test/1_1_$special_</2'(B,A).
'test/1_1_$special_=\\=/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_=\\=/2'(A,B) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==A,
E==B,
!.
'test/1_1_$special_=\\=/2'(A,B) :-
number(B),
( 'chr newvia_1'(A,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
(
D==A,
number(E),
B>E,
!
;
E==A,
number(D),
B<D,
!
).
'test/1_1_$special_=\\=/2'(A,B) :-
ground(B),
ground(A),
(
A=\=B,
!
;
!,
fail
).
'test/1_1_$special_=\\=/2'(A,B) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,D,E),
!,
C=suspension(_,_,_,_,M,N),
setarg(2,C,removed),
term_variables(term(M,N),H),
arg(4,C,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H,C),
\+try(D,A=\=B),
!,
negate_b(D,G),
known(G),
\+try(E,A=\=B).
'test/1_1_$special_=\\=/2'(_,_) :-
fail.
'test/1_1_$special_=</2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_=</2'(A,B) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==A,
E==B,
!.
'test/1_1_$special_=</2'(A,B) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==A,
E==B,
!.
'test/1_1_$special_=</2'(A,B) :-
number(B),
( 'chr newvia_1'(A,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==A,
number(E),
E=<B,
!.
'test/1_1_$special_=</2'(A,B) :-
number(A),
( 'chr newvia_1'(B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==B,
number(E),
A=<E,
!.
'test/1_1_$special_=</2'(A,B) :-
number(B),
( 'chr newvia_1'(A,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==A,
number(E),
E=<B,
!.
'test/1_1_$special_=</2'(A,B) :-
number(A),
( 'chr newvia_1'(B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
E==B,
number(D),
A=<D,
!.
'test/1_1_$special_=</2'(A,B) :-
A==B,
!.
'test/1_1_$special_=</2'(A,B) :-
ground(B),
ground(A),
(
A=<B,
!
;
!,
fail
).
'test/1_1_$special_=</2'(A,B) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,D,E),
!,
C=suspension(_,_,_,_,M,N),
setarg(2,C,removed),
term_variables(term(M,N),H),
arg(4,C,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H,C),
\+try(D,A=<B),
!,
negate_b(D,G),
known(G),
\+try(E,A=<B).
'test/1_1_$special_=</2'(_,_) :-
fail.
'test/1_1_$special_\\==/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'test/1_1_$special_\\==/2'(A,B) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',F)
),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,_,D,E),
D==A,
E==B,
!.
'test/1_1_$special_\\==/2'(A,B) :-
nonvar(B),
'chr lock'(B),
functor(B,C,D),
'chr unlock'(B),
!,
B=..[_|E],
length(F,D),
G=..[C|F],
add_args_nmatch(F,E,H),
I=(\+functor(A,C,D);functor(A,C,D),A=G,H),
test(I).
'test/1_1_$special_\\==/2'(A,B) :-
nonvar(A),
!,
'test/1_1_$special_\\==/2'(B,A).
'test/1_1_$special_\\==/2'(A,B) :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
'chr sbag_member'(C,F),
C=suspension(_,active,_,_,D,E),
!,
C=suspension(_,_,_,_,M,N),
setarg(2,C,removed),
term_variables(term(M,N),H),
arg(4,C,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H,C),
\+try(D,A\==B),
!,
negate_b(D,G),
known(G),
\+try(E,A\==B).
'test/1_1_$special_\\==/2'(_,_) :-
fail.
'known/1_1_$default'(A) :-
'known/1_1_$default___1__0'(A,_).
'known/1_1_$default___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(4,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$default___1'(H,B)
)
).
'known/1_1_$default___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(4,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$default___1'(D,A)
)
).
'known/1_1_$default___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==A,
!,
C=suspension(_,_,_,_,T),
setarg(2,C,removed),
term_variables(T,H),
arg(4,C,P),
( var(P) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',Q),
Q=[_|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
( R=[S|_] ->
setarg(4,S,_)
;
true
)
;
P=[_,_|R],
setarg(2,P,R),
( R=[S|_] ->
setarg(4,S,P)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(H,C),
( var(B) ->
true
;
B=suspension(_,N,_,_,O),
setarg(2,B,removed),
( N==not_stored_yet ->
I=[]
;
term_variables(O,I),
arg(4,B,J),
( var(J) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',K),
K=[_|L],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',L),
( L=[M|_] ->
setarg(4,M,_)
;
true
)
;
J=[_,_|L],
setarg(2,J,L),
( L=[M|_] ->
setarg(4,M,J)
;
true
)
),
'detach_known/1_1_$default___1'(I,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$default___1__0'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
( var(B) ->
B=suspension(F,not_stored_yet,0,_,A),
'chr gen_id'(F)
;
true
),
'known/1_1_$default___1__0__0__6'(C,A,B).
'known/1_1_$default___1__0__0__6'([],B,A) :-
'known/1_1_$default___1__1'(B,A).
'known/1_1_$default___1__0__0__6'([E|G],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
F==A ->
E=suspension(_,_,_,_,U,V),
setarg(2,E,removed),
term_variables(term(U,V),H),
arg(4,E,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H,E),
arg(2,B,L),
setarg(2,B,active),
arg(3,B,K),
J is K+1,
setarg(3,B,J),
( L==not_stored_yet ->
B=suspension(_,_,_,_,M),
term_variables(M,I),
'chr none_locked'(I),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',N),
O=[B|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',O),
( N=[P|_] ->
setarg(4,P,O)
;
true
),
'attach_known/1_1_$default___1'(I,B)
;
true
),
known(D),
( B=suspension(_,active,J,_,_) ->
setarg(2,B,inactive),
'known/1_1_$default___1__0__0__6'(G,A,B)
;
true
)
;
'known/1_1_$default___1__0__0__6'(G,A,B)
).
'known/1_1_$default___1__0'(A,B) :-
( var(B) ->
B=suspension(C,not_stored_yet,0,_,A),
'chr gen_id'(C)
;
true
),
'known/1_1_$default___1__1'(A,B).
'known/1_1_$default___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$default___1__1__0__7'(C,A,B).
'known/1_1_$default___1__1__0__7'([],B,A) :-
'known/1_1_$default___1__2'(B,A).
'known/1_1_$default___1__1__0__7'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(3,B,L),
K is L+1,
setarg(3,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',P),
( O=[Q|_] ->
setarg(4,Q,P)
;
true
),
'attach_known/1_1_$default___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$default___1__1__0__7'(H,A,B)
;
true
)
;
'known/1_1_$default___1__1__0__7'(H,A,B)
).
'known/1_1_$default___1__1'(A,B) :-
'known/1_1_$default___1__2'(A,B).
'known/1_1_$default___1__2'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(3,A,D),
C is D+1,
setarg(3,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',H),
( G=[I|_] ->
setarg(4,I,H)
;
true
),
'attach_known/1_1_$default___1'(B,A)
;
true
).
'known/1_1_$special_;/2'(A,B) :-
'known/1_1_$special_;/2___2__0'(A,B,_).
'known/1_1_$special_;/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,G,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,E,F),
E==A,
F==B,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(4,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',M),
( M=[N|_] ->
setarg(4,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(4,N,K)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,C)
)
).
'known/1_1_$special_;/2___2__0'(_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,J,K),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(4,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(D,A)
)
).
'known/1_1_$special_;/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
nonvar(E),
E=(I;J),
I==A,
J==B,
!,
D=suspension(_,_,_,_,X),
setarg(2,D,removed),
term_variables(X,K),
arg(4,D,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V),
( V=[W|_] ->
setarg(4,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(4,W,T)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(K,D),
( var(C) ->
true
;
C=suspension(_,Q,_,_,R,S),
setarg(2,C,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S),L),
arg(4,C,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',O),
( O=[P|_] ->
setarg(4,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(4,P,M)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_;/2___2__0'(A,B,C) :-
nonvar(A),
A=(\+D),
nonvar(D),
D=(E;F),
( 'chr newvia_2'(E,F,K) ->
get_attr(K,guard_entailment,L),
L=v(_,_,_,J,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J)
),
'chr sbag_member'(G,J),
G=suspension(_,active,_,_,H,I),
H==E,
I==F,
!,
( var(C) ->
true
;
C=suspension(_,R,_,_,S,T),
setarg(2,C,removed),
( R==not_stored_yet ->
M=[]
;
term_variables(term(S,T),M),
arg(4,C,N),
( var(N) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',O),
O=[_|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',P),
( P=[Q|_] ->
setarg(4,Q,_)
;
true
)
;
N=[_,_|P],
setarg(2,N,P),
( P=[Q|_] ->
setarg(4,Q,N)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(M,C)
)
),
known(B).
'known/1_1_$special_;/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
( var(C) ->
C=suspension(G,not_stored_yet,0,_,A,B),
'chr gen_id'(G)
;
true
),
'known/1_1_$special_;/2___2__0__0__7'(D,A,B,C).
'known/1_1_$special_;/2___2__0__0__7'([],B,C,A) :-
'known/1_1_$special_;/2___2__1'(B,C,A).
'known/1_1_$special_;/2___2__0__0__7'([F|J],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(\+G),
nonvar(G),
G=(H;I),
H==A,
I==B ->
F=suspension(_,_,_,_,Y,Z),
setarg(2,F,removed),
term_variables(term(Y,Z),K),
arg(4,F,U),
( var(U) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V),
V=[_|W],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
( W=[X|_] ->
setarg(4,X,_)
;
true
)
;
U=[_,_|W],
setarg(2,U,W),
( W=[X|_] ->
setarg(4,X,U)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,F),
arg(2,C,O),
setarg(2,C,active),
arg(3,C,N),
M is N+1,
setarg(3,C,M),
( O==not_stored_yet ->
C=suspension(_,_,_,_,P,Q),
term_variables(term(P,Q),L),
'chr none_locked'(L),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',R),
S=[C|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
( R=[T|_] ->
setarg(4,T,S)
;
true
),
'attach_known/1_1_$special_;/2___2'(L,C)
;
true
),
known(E),
( C=suspension(_,active,M,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_;/2___2__0__0__7'(J,A,B,C)
;
true
)
;
'known/1_1_$special_;/2___2__0__0__7'(J,A,B,C)
).
'known/1_1_$special_;/2___2__0'(A,B,C) :-
( var(C) ->
C=suspension(D,not_stored_yet,0,_,A,B),
'chr gen_id'(D)
;
true
),
'known/1_1_$special_;/2___2__1'(A,B,C).
'known/1_1_$special_;/2___2__1'(A,B,C) :-
nonvar(A),
(
A=(\+D),
(
nonvar(D),
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
D=nonvar(E),
( 'chr newvia_1'(E,I) ->
get_attr(I,guard_entailment,J),
J=v(_,_,_,_,H,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',H)
),
'chr sbag_member'(F,H),
F=suspension(_,active,_,_,G),
G==E,
!,
( var(C) ->
true
;
C=suspension(_,Q11,_,_,R11,S11),
setarg(2,C,removed),
( Q11==not_stored_yet ->
K=[]
;
term_variables(term(R11,S11),K),
arg(4,C,M11),
( var(M11) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',N11),
N11=[_|O11],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',O11),
( O11=[P11|_] ->
setarg(4,P11,_)
;
true
)
;
M11=[_,_|O11],
setarg(2,M11,O11),
( O11=[P11|_] ->
setarg(4,P11,M11)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,C)
)
),
known(B)
;
D=var(L),
( 'chr newvia_1'(L,P) ->
get_attr(P,guard_entailment,Q),
Q=v(_,_,_,_,_,O,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',O)
),
'chr sbag_member'(M,O),
M=suspension(_,active,_,_,N),
N==L,
!,
( var(C) ->
true
;
C=suspension(_,J11,_,_,K11,L11),
setarg(2,C,removed),
( J11==not_stored_yet ->
R=[]
;
term_variables(term(K11,L11),R),
arg(4,C,F11),
( var(F11) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',G11),
G11=[_|H11],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',H11),
( H11=[I11|_] ->
setarg(4,I11,_)
;
true
)
;
F11=[_,_|H11],
setarg(2,F11,H11),
( H11=[I11|_] ->
setarg(4,I11,F11)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(R,C)
)
),
known(B)
)
;
D=atom(S),
( 'chr newvia_1'(S,W) ->
get_attr(W,guard_entailment,X),
X=v(_,_,_,_,_,_,V,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',V)
),
'chr sbag_member'(T,V),
T=suspension(_,active,_,_,_,U),
U==S,
!,
( var(C) ->
true
;
C=suspension(_,C11,_,_,D11,E11),
setarg(2,C,removed),
( C11==not_stored_yet ->
Y=[]
;
term_variables(term(D11,E11),Y),
arg(4,C,Y10),
( var(Y10) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Z10),
Z10=[_|A11],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',A11),
( A11=[B11|_] ->
setarg(4,B11,_)
;
true
)
;
Y10=[_,_|A11],
setarg(2,Y10,A11),
( A11=[B11|_] ->
setarg(4,B11,Y10)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Y,C)
)
),
known(B)
)
;
D=atomic(Z),
( 'chr newvia_1'(Z,D1) ->
get_attr(D1,guard_entailment,E1),
E1=v(_,_,_,_,_,_,_,C1,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',C1)
),
'chr sbag_member'(A1,C1),
A1=suspension(_,active,_,_,_,B1),
B1==Z,
!,
( var(C) ->
true
;
C=suspension(_,V10,_,_,W10,X10),
setarg(2,C,removed),
( V10==not_stored_yet ->
F1=[]
;
term_variables(term(W10,X10),F1),
arg(4,C,R10),
( var(R10) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S10),
S10=[_|T10],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T10),
( T10=[U10|_] ->
setarg(4,U10,_)
;
true
)
;
R10=[_,_|T10],
setarg(2,R10,T10),
( T10=[U10|_] ->
setarg(4,U10,R10)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(F1,C)
)
),
known(B)
)
;
D=compound(G1),
( 'chr newvia_1'(G1,K1) ->
get_attr(K1,guard_entailment,L1),
L1=v(_,_,_,_,_,_,_,_,J1,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',J1)
),
'chr sbag_member'(H1,J1),
H1=suspension(_,active,_,_,_,I1),
I1==G1,
!,
( var(C) ->
true
;
C=suspension(_,O10,_,_,P10,Q10),
setarg(2,C,removed),
( O10==not_stored_yet ->
M1=[]
;
term_variables(term(P10,Q10),M1),
arg(4,C,K10),
( var(K10) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L10),
L10=[_|M10],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',M10),
( M10=[N10|_] ->
setarg(4,N10,_)
;
true
)
;
K10=[_,_|M10],
setarg(2,K10,M10),
( M10=[N10|_] ->
setarg(4,N10,K10)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(M1,C)
)
),
known(B)
)
;
D=ground(N1),
( 'chr newvia_1'(N1,R1) ->
get_attr(R1,guard_entailment,S1),
S1=v(_,_,_,_,_,_,_,_,_,Q1,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',Q1)
),
'chr sbag_member'(O1,Q1),
O1=suspension(_,active,_,_,_,P1),
P1==N1,
!,
( var(C) ->
true
;
C=suspension(_,H10,_,_,I10,J10),
setarg(2,C,removed),
( H10==not_stored_yet ->
T1=[]
;
term_variables(term(I10,J10),T1),
arg(4,C,D10),
( var(D10) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E10),
E10=[_|F10],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F10),
( F10=[G10|_] ->
setarg(4,G10,_)
;
true
)
;
D10=[_,_|F10],
setarg(2,D10,F10),
( F10=[G10|_] ->
setarg(4,G10,D10)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(T1,C)
)
),
known(B)
)
;
D=integer(U1),
( 'chr newvia_1'(U1,Y1) ->
get_attr(Y1,guard_entailment,Z1),
Z1=v(_,_,_,_,_,_,_,_,_,_,X1,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',X1)
),
'chr sbag_member'(V1,X1),
V1=suspension(_,active,_,_,_,W1),
W1==U1,
!,
( var(C) ->
true
;
C=suspension(_,A10,_,_,B10,C10),
setarg(2,C,removed),
( A10==not_stored_yet ->
A2=[]
;
term_variables(term(B10,C10),A2),
arg(4,C,W9),
( var(W9) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X9),
X9=[_|Y9],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Y9),
( Y9=[Z9|_] ->
setarg(4,Z9,_)
;
true
)
;
W9=[_,_|Y9],
setarg(2,W9,Y9),
( Y9=[Z9|_] ->
setarg(4,Z9,W9)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(A2,C)
)
),
known(B)
)
;
D=float(B2),
( 'chr newvia_1'(B2,F2) ->
get_attr(F2,guard_entailment,G2),
G2=v(_,_,_,_,_,_,_,_,_,_,_,E2,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',E2)
),
'chr sbag_member'(C2,E2),
C2=suspension(_,active,_,_,_,D2),
D2==B2,
!,
( var(C) ->
true
;
C=suspension(_,T9,_,_,U9,V9),
setarg(2,C,removed),
( T9==not_stored_yet ->
H2=[]
;
term_variables(term(U9,V9),H2),
arg(4,C,P9),
( var(P9) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Q9),
Q9=[_|R9],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',R9),
( R9=[S9|_] ->
setarg(4,S9,_)
;
true
)
;
P9=[_,_|R9],
setarg(2,P9,R9),
( R9=[S9|_] ->
setarg(4,S9,P9)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H2,C)
)
),
known(B)
)
;
D=number(I2),
( 'chr newvia_1'(I2,M2) ->
get_attr(M2,guard_entailment,N2),
N2=v(_,_,_,_,_,_,_,_,_,_,_,_,L2,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',L2)
),
'chr sbag_member'(J2,L2),
J2=suspension(_,active,_,_,_,K2),
K2==I2,
!,
( var(C) ->
true
;
C=suspension(_,M9,_,_,N9,O9),
setarg(2,C,removed),
( M9==not_stored_yet ->
O2=[]
;
term_variables(term(N9,O9),O2),
arg(4,C,I9),
( var(I9) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J9),
J9=[_|K9],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K9),
( K9=[L9|_] ->
setarg(4,L9,_)
;
true
)
;
I9=[_,_|K9],
setarg(2,I9,K9),
( K9=[L9|_] ->
setarg(4,L9,I9)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(O2,C)
)
),
known(B)
)
;
D=(P2=\=Q2),
( 'chr newvia_2'(P2,Q2,V2) ->
get_attr(V2,guard_entailment,W2),
W2=v(_,_,_,_,_,_,_,_,_,_,_,_,_,U2,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',U2)
),
'chr sbag_member'(R2,U2),
R2=suspension(_,active,_,_,_,S2,T2),
S2==P2,
T2==Q2,
!,
( var(C) ->
true
;
C=suspension(_,F9,_,_,G9,H9),
setarg(2,C,removed),
( F9==not_stored_yet ->
X2=[]
;
term_variables(term(G9,H9),X2),
arg(4,C,B9),
( var(B9) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C9),
C9=[_|D9],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D9),
( D9=[E9|_] ->
setarg(4,E9,_)
;
true
)
;
B9=[_,_|D9],
setarg(2,B9,D9),
( D9=[E9|_] ->
setarg(4,E9,B9)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(X2,C)
)
),
known(B)
)
;
D=(\+Y2),
( 'chr newvia_1'(Y2,C3) ->
get_attr(C3,guard_entailment,D3),
D3=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,B3,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',B3)
),
'chr sbag_member'(Z2,B3),
Z2=suspension(_,active,_,_,A3),
A3==Y2,
!,
( var(C) ->
true
;
C=suspension(_,Y8,_,_,Z8,A9),
setarg(2,C,removed),
( Y8==not_stored_yet ->
E3=[]
;
term_variables(term(Z8,A9),E3),
arg(4,C,U8),
( var(U8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V8),
V8=[_|W8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W8),
( W8=[X8|_] ->
setarg(4,X8,_)
;
true
)
;
U8=[_,_|W8],
setarg(2,U8,W8),
( W8=[X8|_] ->
setarg(4,X8,U8)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(E3,C)
)
),
known(B)
)
;
D=functor(F3,G3,H3),
( 'chr newvia'([F3,G3,H3],N3) ->
get_attr(N3,guard_entailment,O3),
O3=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,M3,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',M3)
),
'chr sbag_member'(I3,M3),
I3=suspension(_,active,_,_,J3,K3,L3),
J3==F3,
K3==G3,
L3==H3,
!,
( var(C) ->
true
;
C=suspension(_,R8,_,_,S8,T8),
setarg(2,C,removed),
( R8==not_stored_yet ->
P3=[]
;
term_variables(term(S8,T8),P3),
arg(4,C,N8),
( var(N8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',O8),
O8=[_|P8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',P8),
( P8=[Q8|_] ->
setarg(4,Q8,_)
;
true
)
;
N8=[_,_|P8],
setarg(2,N8,P8),
( P8=[Q8|_] ->
setarg(4,Q8,N8)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(P3,C)
)
),
known(B)
)
;
D=(Q3\=R3),
( 'chr newvia_2'(Q3,R3,W3) ->
get_attr(W3,guard_entailment,X3),
X3=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,V3,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',V3)
),
'chr sbag_member'(S3,V3),
S3=suspension(_,active,_,_,_,T3,U3),
T3==Q3,
U3==R3,
!,
( var(C) ->
true
;
C=suspension(_,K8,_,_,L8,M8),
setarg(2,C,removed),
( K8==not_stored_yet ->
Y3=[]
;
term_variables(term(L8,M8),Y3),
arg(4,C,G8),
( var(G8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',H8),
H8=[_|I8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I8),
( I8=[J8|_] ->
setarg(4,J8,_)
;
true
)
;
G8=[_,_|I8],
setarg(2,G8,I8),
( I8=[J8|_] ->
setarg(4,J8,G8)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Y3,C)
)
),
known(B)
)
;
D=(Z3=A4),
( 'chr newvia_2'(Z3,A4,F4) ->
get_attr(F4,guard_entailment,G4),
G4=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,E4,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',E4)
),
'chr sbag_member'(B4,E4),
B4=suspension(_,active,_,_,C4,D4),
C4==Z3,
D4==A4,
!,
( var(C) ->
true
;
C=suspension(_,D8,_,_,E8,F8),
setarg(2,C,removed),
( D8==not_stored_yet ->
H4=[]
;
term_variables(term(E8,F8),H4),
arg(4,C,Z7),
( var(Z7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',A8),
A8=[_|B8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',B8),
( B8=[C8|_] ->
setarg(4,C8,_)
;
true
)
;
Z7=[_,_|B8],
setarg(2,Z7,B8),
( B8=[C8|_] ->
setarg(4,C8,Z7)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H4,C)
)
),
known(B)
)
;
D=(I4\==J4),
( 'chr newvia_2'(I4,J4,O4) ->
get_attr(O4,guard_entailment,P4),
P4=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,N4,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',N4)
),
'chr sbag_member'(K4,N4),
K4=suspension(_,active,_,_,_,L4,M4),
L4==I4,
M4==J4,
!,
( var(C) ->
true
;
C=suspension(_,W7,_,_,X7,Y7),
setarg(2,C,removed),
( W7==not_stored_yet ->
Q4=[]
;
term_variables(term(X7,Y7),Q4),
arg(4,C,S7),
( var(S7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T7),
T7=[_|U7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U7),
( U7=[V7|_] ->
setarg(4,V7,_)
;
true
)
;
S7=[_,_|U7],
setarg(2,S7,U7),
( U7=[V7|_] ->
setarg(4,V7,S7)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Q4,C)
)
),
known(B)
)
;
D=(R4==S4),
( 'chr newvia_2'(R4,S4,X4) ->
get_attr(X4,guard_entailment,Y4),
Y4=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,W4,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',W4)
),
'chr sbag_member'(T4,W4),
T4=suspension(_,active,_,_,_,U4,V4),
U4==R4,
V4==S4,
!,
( var(C) ->
true
;
C=suspension(_,P7,_,_,Q7,R7),
setarg(2,C,removed),
( P7==not_stored_yet ->
Z4=[]
;
term_variables(term(Q7,R7),Z4),
arg(4,C,L7),
( var(L7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',M7),
M7=[_|N7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',N7),
( N7=[O7|_] ->
setarg(4,O7,_)
;
true
)
;
L7=[_,_|N7],
setarg(2,L7,N7),
( N7=[O7|_] ->
setarg(4,O7,L7)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Z4,C)
)
),
known(B)
)
;
D=(A5=<B5),
( 'chr newvia_2'(A5,B5,G5) ->
get_attr(G5,guard_entailment,H5),
H5=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F5,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F5)
),
'chr sbag_member'(C5,F5),
C5=suspension(_,active,_,_,_,D5,E5),
D5==A5,
E5==B5,
!,
( var(C) ->
true
;
C=suspension(_,I7,_,_,J7,K7),
setarg(2,C,removed),
( I7==not_stored_yet ->
I5=[]
;
term_variables(term(J7,K7),I5),
arg(4,C,E7),
( var(E7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F7),
F7=[_|G7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',G7),
( G7=[H7|_] ->
setarg(4,H7,_)
;
true
)
;
E7=[_,_|G7],
setarg(2,E7,G7),
( G7=[H7|_] ->
setarg(4,H7,E7)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I5,C)
)
),
known(B)
)
;
D=(J5=:=K5),
( 'chr newvia_2'(J5,K5,P5) ->
get_attr(P5,guard_entailment,Q5),
Q5=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,O5)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',O5)
),
'chr sbag_member'(L5,O5),
L5=suspension(_,active,_,_,_,M5,N5),
M5==J5,
N5==K5,
!,
( var(C) ->
true
;
C=suspension(_,B7,_,_,C7,D7),
setarg(2,C,removed),
( B7==not_stored_yet ->
R5=[]
;
term_variables(term(C7,D7),R5),
arg(4,C,X6),
( var(X6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Y6),
Y6=[_|Z6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Z6),
( Z6=[A7|_] ->
setarg(4,A7,_)
;
true
)
;
X6=[_,_|Z6],
setarg(2,X6,Z6),
( Z6=[A7|_] ->
setarg(4,A7,X6)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(R5,C)
)
),
known(B)
)
;
( 'chr newvia_1'(D,V5) ->
get_attr(V5,guard_entailment,W5),
W5=v(_,_,U5,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',U5)
),
'chr sbag_member'(S5,U5),
S5=suspension(_,active,_,_,T5),
T5==D,
!,
( var(C) ->
true
;
C=suspension(_,U6,_,_,V6,W6),
setarg(2,C,removed),
( U6==not_stored_yet ->
X5=[]
;
term_variables(term(V6,W6),X5),
arg(4,C,Q6),
( var(Q6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',R6),
R6=[_|S6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S6),
( S6=[T6|_] ->
setarg(4,T6,_)
;
true
)
;
Q6=[_,_|S6],
setarg(2,Q6,S6),
( S6=[T6|_] ->
setarg(4,T6,Q6)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(X5,C)
)
),
known(B)
)
;
A=(Y5,_),
nonvar(Y5),
Y5=(\+Z5),
nonvar(Z5),
Z5=(A6;B6),
( 'chr newvia_2'(A6,B6,G6) ->
get_attr(G6,guard_entailment,H6),
H6=v(_,_,_,F6,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F6)
),
'chr sbag_member'(C6,F6),
C6=suspension(_,active,_,_,D6,E6),
D6==A6,
E6==B6,
!,
( var(C) ->
true
;
C=suspension(_,N6,_,_,O6,P6),
setarg(2,C,removed),
( N6==not_stored_yet ->
I6=[]
;
term_variables(term(O6,P6),I6),
arg(4,C,J6),
( var(J6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K6),
K6=[_|L6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L6),
( L6=[M6|_] ->
setarg(4,M6,_)
;
true
)
;
J6=[_,_|L6],
setarg(2,J6,L6),
( L6=[M6|_] ->
setarg(4,M6,J6)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I6,C)
)
),
known(B)
).
'known/1_1_$special_;/2___2__1'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_;/2___2__1__0__34'(D,A,B,C).
'known/1_1_$special_;/2___2__1__0__34'([],B,C,A) :-
'known/1_1_$special_;/2___2__2'(B,C,A).
'known/1_1_$special_;/2___2__1__0__34'([F|K],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(G,_),
nonvar(G),
G=(\+H),
nonvar(H),
H=(I;J),
I==A,
J==B ->
F=suspension(_,_,_,_,Z,A1),
setarg(2,F,removed),
term_variables(term(Z,A1),L),
arg(4,F,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,F),
arg(2,C,P),
setarg(2,C,active),
arg(3,C,O),
N is O+1,
setarg(3,C,N),
( P==not_stored_yet ->
C=suspension(_,_,_,_,Q,R),
term_variables(term(Q,R),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
T=[C|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( S=[U|_] ->
setarg(4,U,T)
;
true
),
'attach_known/1_1_$special_;/2___2'(M,C)
;
true
),
known(E),
( C=suspension(_,active,N,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_;/2___2__1__0__34'(K,A,B,C)
;
true
)
;
'known/1_1_$special_;/2___2__1__0__34'(K,A,B,C)
).
'known/1_1_$special_;/2___2__1'(A,B,C) :-
'known/1_1_$special_;/2___2__2'(A,B,C).
'known/1_1_$special_;/2___2__2'(A,B,C) :-
nonvar(A),
A=(D,_),
nonvar(D),
D=(\+E),
(
nonvar(E),
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
E=nonvar(F),
( 'chr newvia_1'(F,J) ->
get_attr(J,guard_entailment,K),
K=v(_,_,_,_,I,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',I)
),
'chr sbag_member'(G,I),
G=suspension(_,active,_,_,H),
H==F,
!,
( var(C) ->
true
;
C=suspension(_,Z10,_,_,A11,B11),
setarg(2,C,removed),
( Z10==not_stored_yet ->
L=[]
;
term_variables(term(A11,B11),L),
arg(4,C,V10),
( var(V10) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W10),
W10=[_|X10],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X10),
( X10=[Y10|_] ->
setarg(4,Y10,_)
;
true
)
;
V10=[_,_|X10],
setarg(2,V10,X10),
( X10=[Y10|_] ->
setarg(4,Y10,V10)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,C)
)
),
known(B)
;
E=var(M),
( 'chr newvia_1'(M,Q) ->
get_attr(Q,guard_entailment,R),
R=v(_,_,_,_,_,P,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',P)
),
'chr sbag_member'(N,P),
N=suspension(_,active,_,_,O),
O==M,
!,
( var(C) ->
true
;
C=suspension(_,S10,_,_,T10,U10),
setarg(2,C,removed),
( S10==not_stored_yet ->
S=[]
;
term_variables(term(T10,U10),S),
arg(4,C,O10),
( var(O10) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',P10),
P10=[_|Q10],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Q10),
( Q10=[R10|_] ->
setarg(4,R10,_)
;
true
)
;
O10=[_,_|Q10],
setarg(2,O10,Q10),
( Q10=[R10|_] ->
setarg(4,R10,O10)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(S,C)
)
),
known(B)
)
;
E=atom(T),
( 'chr newvia_1'(T,X) ->
get_attr(X,guard_entailment,Y),
Y=v(_,_,_,_,_,_,W,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',W)
),
'chr sbag_member'(U,W),
U=suspension(_,active,_,_,_,V),
V==T,
!,
( var(C) ->
true
;
C=suspension(_,L10,_,_,M10,N10),
setarg(2,C,removed),
( L10==not_stored_yet ->
Z=[]
;
term_variables(term(M10,N10),Z),
arg(4,C,H10),
( var(H10) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I10),
I10=[_|J10],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J10),
( J10=[K10|_] ->
setarg(4,K10,_)
;
true
)
;
H10=[_,_|J10],
setarg(2,H10,J10),
( J10=[K10|_] ->
setarg(4,K10,H10)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Z,C)
)
),
known(B)
)
;
E=atomic(A1),
( 'chr newvia_1'(A1,E1) ->
get_attr(E1,guard_entailment,F1),
F1=v(_,_,_,_,_,_,_,D1,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',D1)
),
'chr sbag_member'(B1,D1),
B1=suspension(_,active,_,_,_,C1),
C1==A1,
!,
( var(C) ->
true
;
C=suspension(_,E10,_,_,F10,G10),
setarg(2,C,removed),
( E10==not_stored_yet ->
G1=[]
;
term_variables(term(F10,G10),G1),
arg(4,C,A10),
( var(A10) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',B10),
B10=[_|C10],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C10),
( C10=[D10|_] ->
setarg(4,D10,_)
;
true
)
;
A10=[_,_|C10],
setarg(2,A10,C10),
( C10=[D10|_] ->
setarg(4,D10,A10)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(G1,C)
)
),
known(B)
)
;
E=compound(H1),
( 'chr newvia_1'(H1,L1) ->
get_attr(L1,guard_entailment,M1),
M1=v(_,_,_,_,_,_,_,_,K1,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',K1)
),
'chr sbag_member'(I1,K1),
I1=suspension(_,active,_,_,_,J1),
J1==H1,
!,
( var(C) ->
true
;
C=suspension(_,X9,_,_,Y9,Z9),
setarg(2,C,removed),
( X9==not_stored_yet ->
N1=[]
;
term_variables(term(Y9,Z9),N1),
arg(4,C,T9),
( var(T9) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U9),
U9=[_|V9],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V9),
( V9=[W9|_] ->
setarg(4,W9,_)
;
true
)
;
T9=[_,_|V9],
setarg(2,T9,V9),
( V9=[W9|_] ->
setarg(4,W9,T9)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(N1,C)
)
),
known(B)
)
;
E=ground(O1),
( 'chr newvia_1'(O1,S1) ->
get_attr(S1,guard_entailment,T1),
T1=v(_,_,_,_,_,_,_,_,_,R1,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',R1)
),
'chr sbag_member'(P1,R1),
P1=suspension(_,active,_,_,_,Q1),
Q1==O1,
!,
( var(C) ->
true
;
C=suspension(_,Q9,_,_,R9,S9),
setarg(2,C,removed),
( Q9==not_stored_yet ->
U1=[]
;
term_variables(term(R9,S9),U1),
arg(4,C,M9),
( var(M9) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',N9),
N9=[_|O9],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',O9),
( O9=[P9|_] ->
setarg(4,P9,_)
;
true
)
;
M9=[_,_|O9],
setarg(2,M9,O9),
( O9=[P9|_] ->
setarg(4,P9,M9)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(U1,C)
)
),
known(B)
)
;
E=integer(V1),
( 'chr newvia_1'(V1,Z1) ->
get_attr(Z1,guard_entailment,A2),
A2=v(_,_,_,_,_,_,_,_,_,_,Y1,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',Y1)
),
'chr sbag_member'(W1,Y1),
W1=suspension(_,active,_,_,_,X1),
X1==V1,
!,
( var(C) ->
true
;
C=suspension(_,J9,_,_,K9,L9),
setarg(2,C,removed),
( J9==not_stored_yet ->
B2=[]
;
term_variables(term(K9,L9),B2),
arg(4,C,F9),
( var(F9) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',G9),
G9=[_|H9],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',H9),
( H9=[I9|_] ->
setarg(4,I9,_)
;
true
)
;
F9=[_,_|H9],
setarg(2,F9,H9),
( H9=[I9|_] ->
setarg(4,I9,F9)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(B2,C)
)
),
known(B)
)
;
E=float(C2),
( 'chr newvia_1'(C2,G2) ->
get_attr(G2,guard_entailment,H2),
H2=v(_,_,_,_,_,_,_,_,_,_,_,F2,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',F2)
),
'chr sbag_member'(D2,F2),
D2=suspension(_,active,_,_,_,E2),
E2==C2,
!,
( var(C) ->
true
;
C=suspension(_,C9,_,_,D9,E9),
setarg(2,C,removed),
( C9==not_stored_yet ->
I2=[]
;
term_variables(term(D9,E9),I2),
arg(4,C,Y8),
( var(Y8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Z8),
Z8=[_|A9],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',A9),
( A9=[B9|_] ->
setarg(4,B9,_)
;
true
)
;
Y8=[_,_|A9],
setarg(2,Y8,A9),
( A9=[B9|_] ->
setarg(4,B9,Y8)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I2,C)
)
),
known(B)
)
;
E=number(J2),
( 'chr newvia_1'(J2,N2) ->
get_attr(N2,guard_entailment,O2),
O2=v(_,_,_,_,_,_,_,_,_,_,_,_,M2,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',M2)
),
'chr sbag_member'(K2,M2),
K2=suspension(_,active,_,_,_,L2),
L2==J2,
!,
( var(C) ->
true
;
C=suspension(_,V8,_,_,W8,X8),
setarg(2,C,removed),
( V8==not_stored_yet ->
P2=[]
;
term_variables(term(W8,X8),P2),
arg(4,C,R8),
( var(R8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S8),
S8=[_|T8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T8),
( T8=[U8|_] ->
setarg(4,U8,_)
;
true
)
;
R8=[_,_|T8],
setarg(2,R8,T8),
( T8=[U8|_] ->
setarg(4,U8,R8)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(P2,C)
)
),
known(B)
)
;
E=(Q2=\=R2),
( 'chr newvia_2'(Q2,R2,W2) ->
get_attr(W2,guard_entailment,X2),
X2=v(_,_,_,_,_,_,_,_,_,_,_,_,_,V2,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',V2)
),
'chr sbag_member'(S2,V2),
S2=suspension(_,active,_,_,_,T2,U2),
T2==Q2,
U2==R2,
!,
( var(C) ->
true
;
C=suspension(_,O8,_,_,P8,Q8),
setarg(2,C,removed),
( O8==not_stored_yet ->
Y2=[]
;
term_variables(term(P8,Q8),Y2),
arg(4,C,K8),
( var(K8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L8),
L8=[_|M8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',M8),
( M8=[N8|_] ->
setarg(4,N8,_)
;
true
)
;
K8=[_,_|M8],
setarg(2,K8,M8),
( M8=[N8|_] ->
setarg(4,N8,K8)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Y2,C)
)
),
known(B)
)
;
E=(\+Z2),
( 'chr newvia_1'(Z2,D3) ->
get_attr(D3,guard_entailment,E3),
E3=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,C3,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',C3)
),
'chr sbag_member'(A3,C3),
A3=suspension(_,active,_,_,B3),
B3==Z2,
!,
( var(C) ->
true
;
C=suspension(_,H8,_,_,I8,J8),
setarg(2,C,removed),
( H8==not_stored_yet ->
F3=[]
;
term_variables(term(I8,J8),F3),
arg(4,C,D8),
( var(D8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E8),
E8=[_|F8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F8),
( F8=[G8|_] ->
setarg(4,G8,_)
;
true
)
;
D8=[_,_|F8],
setarg(2,D8,F8),
( F8=[G8|_] ->
setarg(4,G8,D8)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(F3,C)
)
),
known(B)
)
;
E=functor(G3,H3,I3),
( 'chr newvia'([G3,H3,I3],O3) ->
get_attr(O3,guard_entailment,P3),
P3=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,N3,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',N3)
),
'chr sbag_member'(J3,N3),
J3=suspension(_,active,_,_,K3,L3,M3),
K3==G3,
L3==H3,
M3==I3,
!,
( var(C) ->
true
;
C=suspension(_,A8,_,_,B8,C8),
setarg(2,C,removed),
( A8==not_stored_yet ->
Q3=[]
;
term_variables(term(B8,C8),Q3),
arg(4,C,W7),
( var(W7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X7),
X7=[_|Y7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Y7),
( Y7=[Z7|_] ->
setarg(4,Z7,_)
;
true
)
;
W7=[_,_|Y7],
setarg(2,W7,Y7),
( Y7=[Z7|_] ->
setarg(4,Z7,W7)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Q3,C)
)
),
known(B)
)
;
E=(R3\=S3),
( 'chr newvia_2'(R3,S3,X3) ->
get_attr(X3,guard_entailment,Y3),
Y3=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,W3,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',W3)
),
'chr sbag_member'(T3,W3),
T3=suspension(_,active,_,_,_,U3,V3),
U3==R3,
V3==S3,
!,
( var(C) ->
true
;
C=suspension(_,T7,_,_,U7,V7),
setarg(2,C,removed),
( T7==not_stored_yet ->
Z3=[]
;
term_variables(term(U7,V7),Z3),
arg(4,C,P7),
( var(P7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Q7),
Q7=[_|R7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',R7),
( R7=[S7|_] ->
setarg(4,S7,_)
;
true
)
;
P7=[_,_|R7],
setarg(2,P7,R7),
( R7=[S7|_] ->
setarg(4,S7,P7)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Z3,C)
)
),
known(B)
)
;
E=(A4=B4),
( 'chr newvia_2'(A4,B4,G4) ->
get_attr(G4,guard_entailment,H4),
H4=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F4,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',F4)
),
'chr sbag_member'(C4,F4),
C4=suspension(_,active,_,_,D4,E4),
D4==A4,
E4==B4,
!,
( var(C) ->
true
;
C=suspension(_,M7,_,_,N7,O7),
setarg(2,C,removed),
( M7==not_stored_yet ->
I4=[]
;
term_variables(term(N7,O7),I4),
arg(4,C,I7),
( var(I7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J7),
J7=[_|K7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K7),
( K7=[L7|_] ->
setarg(4,L7,_)
;
true
)
;
I7=[_,_|K7],
setarg(2,I7,K7),
( K7=[L7|_] ->
setarg(4,L7,I7)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I4,C)
)
),
known(B)
)
;
E=(J4\==K4),
( 'chr newvia_2'(J4,K4,P4) ->
get_attr(P4,guard_entailment,Q4),
Q4=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,O4,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',O4)
),
'chr sbag_member'(L4,O4),
L4=suspension(_,active,_,_,_,M4,N4),
M4==J4,
N4==K4,
!,
( var(C) ->
true
;
C=suspension(_,F7,_,_,G7,H7),
setarg(2,C,removed),
( F7==not_stored_yet ->
R4=[]
;
term_variables(term(G7,H7),R4),
arg(4,C,B7),
( var(B7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C7),
C7=[_|D7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D7),
( D7=[E7|_] ->
setarg(4,E7,_)
;
true
)
;
B7=[_,_|D7],
setarg(2,B7,D7),
( D7=[E7|_] ->
setarg(4,E7,B7)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(R4,C)
)
),
known(B)
)
;
E=(S4==T4),
( 'chr newvia_2'(S4,T4,Y4) ->
get_attr(Y4,guard_entailment,Z4),
Z4=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,X4,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',X4)
),
'chr sbag_member'(U4,X4),
U4=suspension(_,active,_,_,_,V4,W4),
V4==S4,
W4==T4,
!,
( var(C) ->
true
;
C=suspension(_,Y6,_,_,Z6,A7),
setarg(2,C,removed),
( Y6==not_stored_yet ->
A5=[]
;
term_variables(term(Z6,A7),A5),
arg(4,C,U6),
( var(U6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V6),
V6=[_|W6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W6),
( W6=[X6|_] ->
setarg(4,X6,_)
;
true
)
;
U6=[_,_|W6],
setarg(2,U6,W6),
( W6=[X6|_] ->
setarg(4,X6,U6)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(A5,C)
)
),
known(B)
)
;
E=(B5=<C5),
( 'chr newvia_2'(B5,C5,H5) ->
get_attr(H5,guard_entailment,I5),
I5=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G5,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G5)
),
'chr sbag_member'(D5,G5),
D5=suspension(_,active,_,_,_,E5,F5),
E5==B5,
F5==C5,
!,
( var(C) ->
true
;
C=suspension(_,R6,_,_,S6,T6),
setarg(2,C,removed),
( R6==not_stored_yet ->
J5=[]
;
term_variables(term(S6,T6),J5),
arg(4,C,N6),
( var(N6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',O6),
O6=[_|P6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',P6),
( P6=[Q6|_] ->
setarg(4,Q6,_)
;
true
)
;
N6=[_,_|P6],
setarg(2,N6,P6),
( P6=[Q6|_] ->
setarg(4,Q6,N6)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J5,C)
)
),
known(B)
)
;
E=(K5=:=L5),
( 'chr newvia_2'(K5,L5,Q5) ->
get_attr(Q5,guard_entailment,R5),
R5=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,P5)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',P5)
),
'chr sbag_member'(M5,P5),
M5=suspension(_,active,_,_,_,N5,O5),
N5==K5,
O5==L5,
!,
( var(C) ->
true
;
C=suspension(_,K6,_,_,L6,M6),
setarg(2,C,removed),
( K6==not_stored_yet ->
S5=[]
;
term_variables(term(L6,M6),S5),
arg(4,C,G6),
( var(G6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',H6),
H6=[_|I6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I6),
( I6=[J6|_] ->
setarg(4,J6,_)
;
true
)
;
G6=[_,_|I6],
setarg(2,G6,I6),
( I6=[J6|_] ->
setarg(4,J6,G6)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(S5,C)
)
),
known(B)
)
;
( 'chr newvia_1'(E,W5) ->
get_attr(W5,guard_entailment,X5),
X5=v(_,_,V5,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',V5)
),
'chr sbag_member'(T5,V5),
T5=suspension(_,active,_,_,U5),
U5==E,
!,
( var(C) ->
true
;
C=suspension(_,D6,_,_,E6,F6),
setarg(2,C,removed),
( D6==not_stored_yet ->
Y5=[]
;
term_variables(term(E6,F6),Y5),
arg(4,C,Z5),
( var(Z5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',A6),
A6=[_|B6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',B6),
( B6=[C6|_] ->
setarg(4,C6,_)
;
true
)
;
Z5=[_,_|B6],
setarg(2,Z5,B6),
( B6=[C6|_] ->
setarg(4,C6,Z5)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(Y5,C)
)
),
known(B)
).
'known/1_1_$special_;/2___2__2'(A,B,C) :-
( 'chr newvia_1'(A,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
E==A,
!,
( var(C) ->
true
;
C=suspension(_,N,_,_,O,P),
setarg(2,C,removed),
( N==not_stored_yet ->
I=[]
;
term_variables(term(O,P),I),
arg(4,C,J),
( var(J) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',K),
K=[_|L],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L),
( L=[M|_] ->
setarg(4,M,_)
;
true
)
;
J=[_,_|L],
setarg(2,J,L),
( L=[M|_] ->
setarg(4,M,J)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,C)
)
),
known(B).
'known/1_1_$special_;/2___2__2'(A,B,C) :-
nonvar(A),
A=(D,_),
( 'chr newvia_1'(D,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',G)
),
'chr sbag_member'(E,G),
E=suspension(_,active,_,_,F),
F==D,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(4,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',M),
( M=[N|_] ->
setarg(4,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(4,N,K)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,C)
)
),
known(B).
'known/1_1_$special_;/2___2__2'(A,B,C) :-
A==fail,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(4,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(D,C)
)
),
known(B).
'known/1_1_$special_;/2___2__2'(A,B,C) :-
B==fail,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(4,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(D,C)
)
),
known(A).
'known/1_1_$special_;/2___2__2'(A,_,B) :-
A==true,
!,
( var(B) ->
true
;
B=suspension(_,H,_,_,I,J),
setarg(2,B,removed),
( H==not_stored_yet ->
C=[]
;
term_variables(term(I,J),C),
arg(4,B,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(C,B)
)
).
'known/1_1_$special_;/2___2__2'(_,A,B) :-
A==true,
!,
( var(B) ->
true
;
B=suspension(_,H,_,_,I,J),
setarg(2,B,removed),
( H==not_stored_yet ->
C=[]
;
term_variables(term(I,J),C),
arg(4,B,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(C,B)
)
).
'known/1_1_$special_;/2___2__2'(A,B,C) :-
nonvar(A),
A=(\+D),
nonvar(D),
D=functor(E,F,G),
(
(
( 'chr newvia_1'(E,K) ->
get_attr(K,guard_entailment,L),
L=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,J,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',J)
),
'chr sbag_member'(H,J),
H=suspension(_,active,_,_,I,_,_),
I==E,
!,
( var(C) ->
true
;
C=suspension(_,H1,_,_,I1,J1),
setarg(2,C,removed),
( H1==not_stored_yet ->
M=[]
;
term_variables(term(I1,J1),M),
arg(4,C,D1),
( var(D1) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E1),
E1=[_|F1],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F1),
( F1=[G1|_] ->
setarg(4,G1,_)
;
true
)
;
D1=[_,_|F1],
setarg(2,D1,F1),
( F1=[G1|_] ->
setarg(4,G1,D1)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(M,C)
)
)
;
nonvar(E),
'chr lock'(E),
'chr lock'(F),
'chr lock'(G),
functor(E,F,G),
'chr unlock'(E),
'chr unlock'(F),
'chr unlock'(G),
!,
( var(C) ->
true
;
C=suspension(_,A1,_,_,B1,C1),
setarg(2,C,removed),
( A1==not_stored_yet ->
N=[]
;
term_variables(term(B1,C1),N),
arg(4,C,W),
( var(W) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
X=[_|Y],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Y),
( Y=[Z|_] ->
setarg(4,Z,_)
;
true
)
;
W=[_,_|Y],
setarg(2,W,Y),
( Y=[Z|_] ->
setarg(4,Z,W)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(N,C)
)
),
known(B)
)
;
nonvar(E),
'chr lock'(E),
'chr lock'(F),
'chr lock'(G),
\+functor(E,F,G),
'chr unlock'(E),
'chr unlock'(F),
'chr unlock'(G),
!,
( var(C) ->
true
;
C=suspension(_,T,_,_,U,V),
setarg(2,C,removed),
( T==not_stored_yet ->
O=[]
;
term_variables(term(U,V),O),
arg(4,C,P),
( var(P) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Q),
Q=[_|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',R),
( R=[S|_] ->
setarg(4,S,_)
;
true
)
;
P=[_,_|R],
setarg(2,P,R),
( R=[S|_] ->
setarg(4,S,P)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(O,C)
)
)
).
'known/1_1_$special_;/2___2__2'(_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(3,A,D),
C is D+1,
setarg(3,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,F,G),
term_variables(term(F,G),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',H),
I=[A|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I),
( H=[J|_] ->
setarg(4,J,I)
;
true
),
'attach_known/1_1_$special_;/2___2'(B,A)
;
true
).
'known/1_1_$special_nonvar/1'(A) :-
'known/1_1_$special_nonvar/1___1__0'(A,_).
'known/1_1_$special_nonvar/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(4,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_nonvar/1___1'(H,B)
)
).
'known/1_1_$special_nonvar/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(4,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_nonvar/1___1'(D,A)
)
).
'known/1_1_$special_nonvar/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=nonvar(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(4,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',M),
( M=[N|_] ->
setarg(4,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(4,N,K)
;
true
)
),
'detach_known/1_1_$special_nonvar/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_nonvar/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==A,
!,
C=suspension(_,_,_,_,T),
setarg(2,C,removed),
term_variables(T,H),
arg(4,C,P),
( var(P) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',Q),
Q=[_|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',R),
( R=[S|_] ->
setarg(4,S,_)
;
true
)
;
P=[_,_|R],
setarg(2,P,R),
( R=[S|_] ->
setarg(4,S,P)
;
true
)
),
'detach_known/1_1_$special_var/1___1'(H,C),
( var(B) ->
true
;
B=suspension(_,N,_,_,O),
setarg(2,B,removed),
( N==not_stored_yet ->
I=[]
;
term_variables(O,I),
arg(4,B,J),
( var(J) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',K),
K=[_|L],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',L),
( L=[M|_] ->
setarg(4,M,_)
;
true
)
;
J=[_,_|L],
setarg(2,J,L),
( L=[M|_] ->
setarg(4,M,J)
;
true
)
),
'detach_known/1_1_$special_nonvar/1___1'(I,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_nonvar/1___1__0'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
( var(B) ->
B=suspension(F,not_stored_yet,0,_,A),
'chr gen_id'(F)
;
true
),
'known/1_1_$special_nonvar/1___1__0__0__7'(C,A,B).
'known/1_1_$special_nonvar/1___1__0__0__7'([],B,A) :-
'known/1_1_$special_nonvar/1___1__1'(B,A).
'known/1_1_$special_nonvar/1___1__0__0__7'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=nonvar(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(3,B,L),
K is L+1,
setarg(3,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',P),
( O=[Q|_] ->
setarg(4,Q,P)
;
true
),
'attach_known/1_1_$special_nonvar/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_nonvar/1___1__0__0__7'(H,A,B)
;
true
)
;
'known/1_1_$special_nonvar/1___1__0__0__7'(H,A,B)
).
'known/1_1_$special_nonvar/1___1__0'(A,B) :-
( var(B) ->
B=suspension(C,not_stored_yet,0,_,A),
'chr gen_id'(C)
;
true
),
'known/1_1_$special_nonvar/1___1__1'(A,B).
'known/1_1_$special_nonvar/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_nonvar/1___1__1__0__8'(C,A,B).
'known/1_1_$special_nonvar/1___1__1__0__8'([],B,A) :-
'known/1_1_$special_nonvar/1___1__2'(B,A).
'known/1_1_$special_nonvar/1___1__1__0__8'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=nonvar(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(3,B,M),
L is M+1,
setarg(3,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',Q),
( P=[R|_] ->
setarg(4,R,Q)
;
true
),
'attach_known/1_1_$special_nonvar/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_nonvar/1___1__1__0__8'(I,A,B)
;
true
)
;
'known/1_1_$special_nonvar/1___1__1__0__8'(I,A,B)
).
'known/1_1_$special_nonvar/1___1__1'(A,B) :-
'known/1_1_$special_nonvar/1___1__2'(A,B).
'known/1_1_$special_nonvar/1___1__2'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(3,A,D),
C is D+1,
setarg(3,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',H),
( G=[I|_] ->
setarg(4,I,H)
;
true
),
'attach_known/1_1_$special_nonvar/1___1'(B,A)
;
true
).
'known/1_1_$special_var/1'(A) :-
'known/1_1_$special_var/1___1__0'(A,_).
'known/1_1_$special_var/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(4,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_var/1___1'(H,B)
)
).
'known/1_1_$special_var/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(4,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_var/1___1'(D,A)
)
).
'known/1_1_$special_var/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=var(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(4,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',M),
( M=[N|_] ->
setarg(4,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(4,N,K)
;
true
)
),
'detach_known/1_1_$special_var/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_var/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==A,
!,
C=suspension(_,_,_,_,T),
setarg(2,C,removed),
term_variables(T,H),
arg(4,C,P),
( var(P) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',Q),
Q=[_|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',R),
( R=[S|_] ->
setarg(4,S,_)
;
true
)
;
P=[_,_|R],
setarg(2,P,R),
( R=[S|_] ->
setarg(4,S,P)
;
true
)
),
'detach_known/1_1_$special_nonvar/1___1'(H,C),
( var(B) ->
true
;
B=suspension(_,N,_,_,O),
setarg(2,B,removed),
( N==not_stored_yet ->
I=[]
;
term_variables(O,I),
arg(4,B,J),
( var(J) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',K),
K=[_|L],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',L),
( L=[M|_] ->
setarg(4,M,_)
;
true
)
;
J=[_,_|L],
setarg(2,J,L),
( L=[M|_] ->
setarg(4,M,J)
;
true
)
),
'detach_known/1_1_$special_var/1___1'(I,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_var/1___1__0'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
( var(B) ->
B=suspension(F,not_stored_yet,0,_,A),
'chr gen_id'(F)
;
true
),
'known/1_1_$special_var/1___1__0__0__7'(C,A,B).
'known/1_1_$special_var/1___1__0__0__7'([],B,A) :-
'known/1_1_$special_var/1___1__1'(B,A).
'known/1_1_$special_var/1___1__0__0__7'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=var(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(3,B,L),
K is L+1,
setarg(3,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',P),
( O=[Q|_] ->
setarg(4,Q,P)
;
true
),
'attach_known/1_1_$special_var/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_var/1___1__0__0__7'(H,A,B)
;
true
)
;
'known/1_1_$special_var/1___1__0__0__7'(H,A,B)
).
'known/1_1_$special_var/1___1__0'(A,B) :-
( var(B) ->
B=suspension(C,not_stored_yet,0,_,A),
'chr gen_id'(C)
;
true
),
'known/1_1_$special_var/1___1__1'(A,B).
'known/1_1_$special_var/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_var/1___1__1__0__8'(C,A,B).
'known/1_1_$special_var/1___1__1__0__8'([],B,A) :-
'known/1_1_$special_var/1___1__2'(B,A).
'known/1_1_$special_var/1___1__1__0__8'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=var(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(3,B,M),
L is M+1,
setarg(3,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',Q),
( P=[R|_] ->
setarg(4,R,Q)
;
true
),
'attach_known/1_1_$special_var/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_var/1___1__1__0__8'(I,A,B)
;
true
)
;
'known/1_1_$special_var/1___1__1__0__8'(I,A,B)
).
'known/1_1_$special_var/1___1__1'(A,B) :-
'known/1_1_$special_var/1___1__2'(A,B).
'known/1_1_$special_var/1___1__2'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(3,A,D),
C is D+1,
setarg(3,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',H),
( G=[I|_] ->
setarg(4,I,H)
;
true
),
'attach_known/1_1_$special_var/1___1'(B,A)
;
true
).
'known/1_1_$special_atom/1'(A) :-
'known/1_1_$special_atom/1___1__0'(A,_).
'known/1_1_$special_atom/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(5,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_atom/1___1'(H,B)
)
).
'known/1_1_$special_atom/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_atom/1___1'(D,A)
)
).
'known/1_1_$special_atom/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=atom(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(5,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_atom/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_atom/1___1__0'(A,B) :-
( var(B) ->
B=suspension(E,not_stored_yet,t,0,_,A),
'chr gen_id'(E)
;
true
),
(
'$novel_production'(B,239),
!,
'$extend_history'(B,239),
arg(2,B,G),
setarg(2,B,active),
arg(4,B,F),
D is F+1,
setarg(4,B,D),
( G==not_stored_yet ->
B=suspension(_,_,_,_,_,H),
term_variables(H,C),
'chr none_locked'(C),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',I),
J=[B|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',J),
( I=[K|_] ->
setarg(5,K,J)
;
true
),
'attach_known/1_1_$special_atom/1___1'(C,B)
;
true
),
'known/1_1_$special_nonvar/1'(A),
( B=suspension(_,active,_,D,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_atom/1___1__1'(A,B)
;
true
)
;
'known/1_1_$special_atom/1___1__1'(A,B)
).
'known/1_1_$special_atom/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_atom/1___1__1__0__7'(C,A,B).
'known/1_1_$special_atom/1___1__1__0__7'([],B,A) :-
'known/1_1_$special_atom/1___1__2'(B,A).
'known/1_1_$special_atom/1___1__1__0__7'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=atom(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(4,B,L),
K is L+1,
setarg(4,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_atom/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,_,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_atom/1___1__1__0__7'(H,A,B)
;
true
)
;
'known/1_1_$special_atom/1___1__1__0__7'(H,A,B)
).
'known/1_1_$special_atom/1___1__1'(A,B) :-
'known/1_1_$special_atom/1___1__2'(A,B).
'known/1_1_$special_atom/1___1__2'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_atom/1___1__2__0__8'(C,A,B).
'known/1_1_$special_atom/1___1__2__0__8'([],B,A) :-
'known/1_1_$special_atom/1___1__3'(B,A).
'known/1_1_$special_atom/1___1__2__0__8'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=atom(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(4,B,M),
L is M+1,
setarg(4,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',Q),
( P=[R|_] ->
setarg(5,R,Q)
;
true
),
'attach_known/1_1_$special_atom/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,_,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_atom/1___1__2__0__8'(I,A,B)
;
true
)
;
'known/1_1_$special_atom/1___1__2__0__8'(I,A,B)
).
'known/1_1_$special_atom/1___1__2'(A,B) :-
'known/1_1_$special_atom/1___1__3'(A,B).
'known/1_1_$special_atom/1___1__3'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',H),
( G=[I|_] ->
setarg(5,I,H)
;
true
),
'attach_known/1_1_$special_atom/1___1'(B,A)
;
true
).
'known/1_1_$special_atomic/1'(A) :-
'known/1_1_$special_atomic/1___1__0'(A,_).
'known/1_1_$special_atomic/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(5,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_atomic/1___1'(H,B)
)
).
'known/1_1_$special_atomic/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_atomic/1___1'(D,A)
)
).
'known/1_1_$special_atomic/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=atomic(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(5,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_atomic/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_atomic/1___1__0'(A,B) :-
( var(B) ->
B=suspension(E,not_stored_yet,t,0,_,A),
'chr gen_id'(E)
;
true
),
(
'$novel_production'(B,237),
!,
'$extend_history'(B,237),
arg(2,B,G),
setarg(2,B,active),
arg(4,B,F),
D is F+1,
setarg(4,B,D),
( G==not_stored_yet ->
B=suspension(_,_,_,_,_,H),
term_variables(H,C),
'chr none_locked'(C),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',I),
J=[B|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',J),
( I=[K|_] ->
setarg(5,K,J)
;
true
),
'attach_known/1_1_$special_atomic/1___1'(C,B)
;
true
),
'known/1_1_$special_nonvar/1'(A),
( B=suspension(_,active,_,D,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_atomic/1___1__1'(A,B)
;
true
)
;
'known/1_1_$special_atomic/1___1__1'(A,B)
).
'known/1_1_$special_atomic/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_atomic/1___1__1__0__7'(C,A,B).
'known/1_1_$special_atomic/1___1__1__0__7'([],B,A) :-
'known/1_1_$special_atomic/1___1__2'(B,A).
'known/1_1_$special_atomic/1___1__1__0__7'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=atomic(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(4,B,L),
K is L+1,
setarg(4,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_atomic/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,_,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_atomic/1___1__1__0__7'(H,A,B)
;
true
)
;
'known/1_1_$special_atomic/1___1__1__0__7'(H,A,B)
).
'known/1_1_$special_atomic/1___1__1'(A,B) :-
'known/1_1_$special_atomic/1___1__2'(A,B).
'known/1_1_$special_atomic/1___1__2'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_atomic/1___1__2__0__8'(C,A,B).
'known/1_1_$special_atomic/1___1__2__0__8'([],B,A) :-
'known/1_1_$special_atomic/1___1__3'(B,A).
'known/1_1_$special_atomic/1___1__2__0__8'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=atomic(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(4,B,M),
L is M+1,
setarg(4,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',Q),
( P=[R|_] ->
setarg(5,R,Q)
;
true
),
'attach_known/1_1_$special_atomic/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,_,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_atomic/1___1__2__0__8'(I,A,B)
;
true
)
;
'known/1_1_$special_atomic/1___1__2__0__8'(I,A,B)
).
'known/1_1_$special_atomic/1___1__2'(A,B) :-
'known/1_1_$special_atomic/1___1__3'(A,B).
'known/1_1_$special_atomic/1___1__3'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',H),
( G=[I|_] ->
setarg(5,I,H)
;
true
),
'attach_known/1_1_$special_atomic/1___1'(B,A)
;
true
).
'known/1_1_$special_compound/1'(A) :-
'known/1_1_$special_compound/1___1__0'(A,_).
'known/1_1_$special_compound/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(5,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_compound/1___1'(H,B)
)
).
'known/1_1_$special_compound/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_compound/1___1'(D,A)
)
).
'known/1_1_$special_compound/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=compound(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(5,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_compound/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_compound/1___1__0'(A,B) :-
( var(B) ->
B=suspension(E,not_stored_yet,t,0,_,A),
'chr gen_id'(E)
;
true
),
(
'$novel_production'(B,236),
!,
'$extend_history'(B,236),
arg(2,B,G),
setarg(2,B,active),
arg(4,B,F),
D is F+1,
setarg(4,B,D),
( G==not_stored_yet ->
B=suspension(_,_,_,_,_,H),
term_variables(H,C),
'chr none_locked'(C),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',I),
J=[B|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',J),
( I=[K|_] ->
setarg(5,K,J)
;
true
),
'attach_known/1_1_$special_compound/1___1'(C,B)
;
true
),
'known/1_1_$special_nonvar/1'(A),
( B=suspension(_,active,_,D,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_compound/1___1__1'(A,B)
;
true
)
;
'known/1_1_$special_compound/1___1__1'(A,B)
).
'known/1_1_$special_compound/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_compound/1___1__1__0__7'(C,A,B).
'known/1_1_$special_compound/1___1__1__0__7'([],B,A) :-
'known/1_1_$special_compound/1___1__2'(B,A).
'known/1_1_$special_compound/1___1__1__0__7'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=compound(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(4,B,L),
K is L+1,
setarg(4,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_compound/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,_,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_compound/1___1__1__0__7'(H,A,B)
;
true
)
;
'known/1_1_$special_compound/1___1__1__0__7'(H,A,B)
).
'known/1_1_$special_compound/1___1__1'(A,B) :-
'known/1_1_$special_compound/1___1__2'(A,B).
'known/1_1_$special_compound/1___1__2'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_compound/1___1__2__0__8'(C,A,B).
'known/1_1_$special_compound/1___1__2__0__8'([],B,A) :-
'known/1_1_$special_compound/1___1__3'(B,A).
'known/1_1_$special_compound/1___1__2__0__8'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=compound(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(4,B,M),
L is M+1,
setarg(4,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',Q),
( P=[R|_] ->
setarg(5,R,Q)
;
true
),
'attach_known/1_1_$special_compound/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,_,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_compound/1___1__2__0__8'(I,A,B)
;
true
)
;
'known/1_1_$special_compound/1___1__2__0__8'(I,A,B)
).
'known/1_1_$special_compound/1___1__2'(A,B) :-
'known/1_1_$special_compound/1___1__3'(A,B).
'known/1_1_$special_compound/1___1__3'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',H),
( G=[I|_] ->
setarg(5,I,H)
;
true
),
'attach_known/1_1_$special_compound/1___1'(B,A)
;
true
).
'known/1_1_$special_ground/1'(A) :-
'known/1_1_$special_ground/1___1__0'(A,_).
'known/1_1_$special_ground/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(5,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_ground/1___1'(H,B)
)
).
'known/1_1_$special_ground/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_ground/1___1'(D,A)
)
).
'known/1_1_$special_ground/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=ground(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(5,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_ground/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_ground/1___1__0'(A,B) :-
( var(B) ->
B=suspension(E,not_stored_yet,t,0,_,A),
'chr gen_id'(E)
;
true
),
(
'$novel_production'(B,235),
!,
'$extend_history'(B,235),
arg(2,B,G),
setarg(2,B,active),
arg(4,B,F),
D is F+1,
setarg(4,B,D),
( G==not_stored_yet ->
B=suspension(_,_,_,_,_,H),
term_variables(H,C),
'chr none_locked'(C),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',I),
J=[B|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',J),
( I=[K|_] ->
setarg(5,K,J)
;
true
),
'attach_known/1_1_$special_ground/1___1'(C,B)
;
true
),
'known/1_1_$special_nonvar/1'(A),
( B=suspension(_,active,_,D,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_ground/1___1__1'(A,B)
;
true
)
;
'known/1_1_$special_ground/1___1__1'(A,B)
).
'known/1_1_$special_ground/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_ground/1___1__1__0__7'(C,A,B).
'known/1_1_$special_ground/1___1__1__0__7'([],B,A) :-
'known/1_1_$special_ground/1___1__2'(B,A).
'known/1_1_$special_ground/1___1__1__0__7'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=ground(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(4,B,L),
K is L+1,
setarg(4,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_ground/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,_,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_ground/1___1__1__0__7'(H,A,B)
;
true
)
;
'known/1_1_$special_ground/1___1__1__0__7'(H,A,B)
).
'known/1_1_$special_ground/1___1__1'(A,B) :-
'known/1_1_$special_ground/1___1__2'(A,B).
'known/1_1_$special_ground/1___1__2'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_ground/1___1__2__0__8'(C,A,B).
'known/1_1_$special_ground/1___1__2__0__8'([],B,A) :-
'known/1_1_$special_ground/1___1__3'(B,A).
'known/1_1_$special_ground/1___1__2__0__8'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=ground(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(4,B,M),
L is M+1,
setarg(4,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',Q),
( P=[R|_] ->
setarg(5,R,Q)
;
true
),
'attach_known/1_1_$special_ground/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,_,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_ground/1___1__2__0__8'(I,A,B)
;
true
)
;
'known/1_1_$special_ground/1___1__2__0__8'(I,A,B)
).
'known/1_1_$special_ground/1___1__2'(A,B) :-
'known/1_1_$special_ground/1___1__3'(A,B).
'known/1_1_$special_ground/1___1__3'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',H),
( G=[I|_] ->
setarg(5,I,H)
;
true
),
'attach_known/1_1_$special_ground/1___1'(B,A)
;
true
).
'known/1_1_$special_integer/1'(A) :-
'known/1_1_$special_integer/1___1__0'(A,_).
'known/1_1_$special_integer/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(5,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_integer/1___1'(H,B)
)
).
'known/1_1_$special_integer/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_integer/1___1'(D,A)
)
).
'known/1_1_$special_integer/1___1__0'(A,B) :-
nonvar(A),
\+integer(A),
!,
( var(B) ->
true
;
B=suspension(_,H,_,_,_,I),
setarg(2,B,removed),
( H==not_stored_yet ->
C=[]
;
term_variables(I,C),
arg(5,B,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_integer/1___1'(C,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_integer/1___1__0'(A,B) :-
( var(B) ->
B=suspension(E,not_stored_yet,t,0,_,A),
'chr gen_id'(E)
;
true
),
(
'$novel_production'(B,199),
!,
'$extend_history'(B,199),
arg(2,B,G),
setarg(2,B,active),
arg(4,B,F),
D is F+1,
setarg(4,B,D),
( G==not_stored_yet ->
B=suspension(_,_,_,_,_,H),
term_variables(H,C),
'chr none_locked'(C),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',I),
J=[B|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',J),
( I=[K|_] ->
setarg(5,K,J)
;
true
),
'attach_known/1_1_$special_integer/1___1'(C,B)
;
true
),
'known/1_1_$special_number/1'(A),
( B=suspension(_,active,_,D,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_integer/1___1__1'(A,B)
;
true
)
;
'known/1_1_$special_integer/1___1__1'(A,B)
).
'known/1_1_$special_integer/1___1__1'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=integer(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(5,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_integer/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_integer/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_integer/1___1__1__0__8'(C,A,B).
'known/1_1_$special_integer/1___1__1__0__8'([],B,A) :-
'known/1_1_$special_integer/1___1__2'(B,A).
'known/1_1_$special_integer/1___1__1__0__8'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=integer(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(4,B,L),
K is L+1,
setarg(4,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_integer/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,_,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_integer/1___1__1__0__8'(H,A,B)
;
true
)
;
'known/1_1_$special_integer/1___1__1__0__8'(H,A,B)
).
'known/1_1_$special_integer/1___1__1'(A,B) :-
'known/1_1_$special_integer/1___1__2'(A,B).
'known/1_1_$special_integer/1___1__2'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_integer/1___1__2__0__9'(C,A,B).
'known/1_1_$special_integer/1___1__2__0__9'([],B,A) :-
'known/1_1_$special_integer/1___1__3'(B,A).
'known/1_1_$special_integer/1___1__2__0__9'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=integer(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(4,B,M),
L is M+1,
setarg(4,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',Q),
( P=[R|_] ->
setarg(5,R,Q)
;
true
),
'attach_known/1_1_$special_integer/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,_,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_integer/1___1__2__0__9'(I,A,B)
;
true
)
;
'known/1_1_$special_integer/1___1__2__0__9'(I,A,B)
).
'known/1_1_$special_integer/1___1__2'(A,B) :-
'known/1_1_$special_integer/1___1__3'(A,B).
'known/1_1_$special_integer/1___1__3'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',H),
( G=[I|_] ->
setarg(5,I,H)
;
true
),
'attach_known/1_1_$special_integer/1___1'(B,A)
;
true
).
'known/1_1_$special_float/1'(A) :-
'known/1_1_$special_float/1___1__0'(A,_).
'known/1_1_$special_float/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(5,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_float/1___1'(H,B)
)
).
'known/1_1_$special_float/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_float/1___1'(D,A)
)
).
'known/1_1_$special_float/1___1__0'(A,B) :-
nonvar(A),
\+float(A),
!,
( var(B) ->
true
;
B=suspension(_,H,_,_,_,I),
setarg(2,B,removed),
( H==not_stored_yet ->
C=[]
;
term_variables(I,C),
arg(5,B,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_float/1___1'(C,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_float/1___1__0'(A,B) :-
( var(B) ->
B=suspension(E,not_stored_yet,t,0,_,A),
'chr gen_id'(E)
;
true
),
(
'$novel_production'(B,200),
!,
'$extend_history'(B,200),
arg(2,B,G),
setarg(2,B,active),
arg(4,B,F),
D is F+1,
setarg(4,B,D),
( G==not_stored_yet ->
B=suspension(_,_,_,_,_,H),
term_variables(H,C),
'chr none_locked'(C),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',I),
J=[B|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',J),
( I=[K|_] ->
setarg(5,K,J)
;
true
),
'attach_known/1_1_$special_float/1___1'(C,B)
;
true
),
'known/1_1_$special_number/1'(A),
( B=suspension(_,active,_,D,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_float/1___1__1'(A,B)
;
true
)
;
'known/1_1_$special_float/1___1__1'(A,B)
).
'known/1_1_$special_float/1___1__1'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=float(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(5,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_float/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_float/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_float/1___1__1__0__8'(C,A,B).
'known/1_1_$special_float/1___1__1__0__8'([],B,A) :-
'known/1_1_$special_float/1___1__2'(B,A).
'known/1_1_$special_float/1___1__1__0__8'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=float(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(4,B,L),
K is L+1,
setarg(4,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_float/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,_,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_float/1___1__1__0__8'(H,A,B)
;
true
)
;
'known/1_1_$special_float/1___1__1__0__8'(H,A,B)
).
'known/1_1_$special_float/1___1__1'(A,B) :-
'known/1_1_$special_float/1___1__2'(A,B).
'known/1_1_$special_float/1___1__2'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_float/1___1__2__0__9'(C,A,B).
'known/1_1_$special_float/1___1__2__0__9'([],B,A) :-
'known/1_1_$special_float/1___1__3'(B,A).
'known/1_1_$special_float/1___1__2__0__9'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=float(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(4,B,M),
L is M+1,
setarg(4,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',Q),
( P=[R|_] ->
setarg(5,R,Q)
;
true
),
'attach_known/1_1_$special_float/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,_,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_float/1___1__2__0__9'(I,A,B)
;
true
)
;
'known/1_1_$special_float/1___1__2__0__9'(I,A,B)
).
'known/1_1_$special_float/1___1__2'(A,B) :-
'known/1_1_$special_float/1___1__3'(A,B).
'known/1_1_$special_float/1___1__3'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',H),
( G=[I|_] ->
setarg(5,I,H)
;
true
),
'attach_known/1_1_$special_float/1___1'(B,A)
;
true
).
'known/1_1_$special_number/1'(A) :-
'known/1_1_$special_number/1___1__0'(A,_).
'known/1_1_$special_number/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(5,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_number/1___1'(H,B)
)
).
'known/1_1_$special_number/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_number/1___1'(D,A)
)
).
'known/1_1_$special_number/1___1__0'(A,B) :-
nonvar(A),
\+number(A),
!,
( var(B) ->
true
;
B=suspension(_,H,_,_,_,I),
setarg(2,B,removed),
( H==not_stored_yet ->
C=[]
;
term_variables(I,C),
arg(5,B,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_number/1___1'(C,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_number/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=number(H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(5,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_number/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_number/1___1__0'(A,B) :-
( var(B) ->
B=suspension(E,not_stored_yet,t,0,_,A),
'chr gen_id'(E)
;
true
),
(
'$novel_production'(B,238),
!,
'$extend_history'(B,238),
arg(2,B,G),
setarg(2,B,active),
arg(4,B,F),
D is F+1,
setarg(4,B,D),
( G==not_stored_yet ->
B=suspension(_,_,_,_,_,H),
term_variables(H,C),
'chr none_locked'(C),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',I),
J=[B|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',J),
( I=[K|_] ->
setarg(5,K,J)
;
true
),
'attach_known/1_1_$special_number/1___1'(C,B)
;
true
),
'known/1_1_$special_nonvar/1'(A),
( B=suspension(_,active,_,D,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_number/1___1__1'(A,B)
;
true
)
;
'known/1_1_$special_number/1___1__1'(A,B)
).
'known/1_1_$special_number/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_number/1___1__1__0__8'(C,A,B).
'known/1_1_$special_number/1___1__1__0__8'([],B,A) :-
'known/1_1_$special_number/1___1__2'(B,A).
'known/1_1_$special_number/1___1__1__0__8'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=number(G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(4,B,L),
K is L+1,
setarg(4,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_number/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,_,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_number/1___1__1__0__8'(H,A,B)
;
true
)
;
'known/1_1_$special_number/1___1__1__0__8'(H,A,B)
).
'known/1_1_$special_number/1___1__1'(A,B) :-
'known/1_1_$special_number/1___1__2'(A,B).
'known/1_1_$special_number/1___1__2'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_number/1___1__2__0__9'(C,A,B).
'known/1_1_$special_number/1___1__2__0__9'([],B,A) :-
'known/1_1_$special_number/1___1__3'(B,A).
'known/1_1_$special_number/1___1__2__0__9'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=number(H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(4,B,M),
L is M+1,
setarg(4,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',Q),
( P=[R|_] ->
setarg(5,R,Q)
;
true
),
'attach_known/1_1_$special_number/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,_,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_number/1___1__2__0__9'(I,A,B)
;
true
)
;
'known/1_1_$special_number/1___1__2__0__9'(I,A,B)
).
'known/1_1_$special_number/1___1__2'(A,B) :-
'known/1_1_$special_number/1___1__3'(A,B).
'known/1_1_$special_number/1___1__3'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',H),
( G=[I|_] ->
setarg(5,I,H)
;
true
),
'attach_known/1_1_$special_number/1___1'(B,A)
;
true
).
'known/1_1_$special_=\\=/2'(A,B) :-
'known/1_1_$special_=\\=/2___2__0'(A,B,_).
'known/1_1_$special_=\\=/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(5,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(J,C)
)
).
'known/1_1_$special_=\\=/2___2__0'(_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J,K),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(D,A)
)
).
'known/1_1_$special_=\\=/2___2__0'(A,B,C) :-
( 'chr newvia_1'(B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,D,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',D)
),
!,
( var(C) ->
C=suspension(G,not_stored_yet,t,0,_,A,B),
'chr gen_id'(G)
;
true
),
'known/1_1_$special_=\\=/2___2__0__0__5'(D,A,B,C).
'known/1_1_$special_=\\=/2___2__0__0__5'([],B,C,A) :-
'known/1_1_$special_=\\=/2___2__1'(B,C,A).
'known/1_1_$special_=\\=/2___2__0__0__5'([F|J],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
D==C,
( 'chr newvia_2'(C,E,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G)
) ->
'known/1_1_$special_=\\=/2___2__0__1__5'(G,E,F,J,B,C,A)
;
'known/1_1_$special_=\\=/2___2__0__0__5'(J,B,C,A)
).
'known/1_1_$special_=\\=/2___2__0__1__5'([],_,_,A,C,D,B) :-
'known/1_1_$special_=\\=/2___2__0__0__5'(A,C,D,B).
'known/1_1_$special_=\\=/2___2__0__1__5'([I|M],F,A,B,D,E,C) :-
( I=suspension(_,active,_,_,_,G,H),
G==E,
H==F,
( 'chr newvia_2'(D,E,K) ->
get_attr(K,guard_entailment,L),
L=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,J,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',J)
) ->
'known/1_1_$special_=\\=/2___2__0__2__5'(J,I,M,F,A,B,D,E,C)
;
'known/1_1_$special_=\\=/2___2__0__1__5'(M,F,A,B,D,E,C)
).
'known/1_1_$special_=\\=/2___2__0__2__5'([],_,A,G,B,C,E,F,D) :-
'known/1_1_$special_=\\=/2___2__0__1__5'(A,G,B,C,E,F,D).
'known/1_1_$special_=\\=/2___2__0__2__5'([K|L],A,B,H,C,D,F,G,E) :-
( K=suspension(_,active,_,_,_,I,J),
K\==A,
I==F,
J==G,
O=t(188,K,E,A,C),
'$novel_production'(K,O),
'$novel_production'(E,O),
'$novel_production'(A,O),
'$novel_production'(C,O) ->
'$extend_history'(E,O),
arg(2,E,Q),
setarg(2,E,active),
arg(4,E,P),
N is P+1,
setarg(4,E,N),
( Q==not_stored_yet ->
E=suspension(_,_,_,_,_,R,S),
term_variables(term(R,S),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',T),
U=[E|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',U),
( T=[V|_] ->
setarg(5,V,U)
;
true
),
'attach_known/1_1_$special_=\\=/2___2'(M,E)
;
true
),
'known/1_1_$special_=\\=/2'(F,H),
( E=suspension(_,active,_,N,_,_,_) ->
setarg(2,E,inactive),
'known/1_1_$special_=\\=/2___2__0__2__5'(L,A,B,H,C,D,F,G,E)
;
true
)
;
'known/1_1_$special_=\\=/2___2__0__2__5'(L,A,B,H,C,D,F,G,E)
).
'known/1_1_$special_=\\=/2___2__0'(A,B,C) :-
( var(C) ->
C=suspension(D,not_stored_yet,t,0,_,A,B),
'chr gen_id'(D)
;
true
),
'known/1_1_$special_=\\=/2___2__1'(A,B,C).
'known/1_1_$special_=\\=/2___2__1'(A,B,C) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',D)
),
!,
'known/1_1_$special_=\\=/2___2__1__0__6'(D,A,B,C).
'known/1_1_$special_=\\=/2___2__1__0__6'([],B,C,A) :-
'known/1_1_$special_=\\=/2___2__2'(B,C,A).
'known/1_1_$special_=\\=/2___2__1__0__6'([F|J],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
E==B,
( 'chr newvia_2'(B,C,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G)
) ->
'known/1_1_$special_=\\=/2___2__1__1__6'(G,D,F,J,B,C,A)
;
'known/1_1_$special_=\\=/2___2__1__0__6'(J,B,C,A)
).
'known/1_1_$special_=\\=/2___2__1__1__6'([],_,_,A,C,D,B) :-
'known/1_1_$special_=\\=/2___2__1__0__6'(A,C,D,B).
'known/1_1_$special_=\\=/2___2__1__1__6'([I|M],F,A,B,D,E,C) :-
( I=suspension(_,active,_,_,_,G,H),
I\==A,
G==D,
H==E,
( 'chr newvia_2'(F,D,K) ->
get_attr(K,guard_entailment,L),
L=v(_,_,_,_,_,_,_,_,_,_,_,_,_,J,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',J)
) ->
'known/1_1_$special_=\\=/2___2__1__2__6'(J,I,M,F,A,B,D,E,C)
;
'known/1_1_$special_=\\=/2___2__1__1__6'(M,F,A,B,D,E,C)
).
'known/1_1_$special_=\\=/2___2__1__2__6'([],_,A,G,B,C,E,F,D) :-
'known/1_1_$special_=\\=/2___2__1__1__6'(A,G,B,C,E,F,D).
'known/1_1_$special_=\\=/2___2__1__2__6'([K|L],A,B,H,C,D,F,G,E) :-
( K=suspension(_,active,_,_,_,I,J),
I==H,
J==F,
O=t(188,C,K,A,E),
'$novel_production'(C,O),
'$novel_production'(K,O),
'$novel_production'(A,O),
'$novel_production'(E,O) ->
'$extend_history'(E,O),
arg(2,E,Q),
setarg(2,E,active),
arg(4,E,P),
N is P+1,
setarg(4,E,N),
( Q==not_stored_yet ->
E=suspension(_,_,_,_,_,R,S),
term_variables(term(R,S),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',T),
U=[E|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',U),
( T=[V|_] ->
setarg(5,V,U)
;
true
),
'attach_known/1_1_$special_=\\=/2___2'(M,E)
;
true
),
'known/1_1_$special_=\\=/2'(H,G),
( E=suspension(_,active,_,N,_,_,_) ->
setarg(2,E,inactive),
'known/1_1_$special_=\\=/2___2__1__2__6'(L,A,B,H,C,D,F,G,E)
;
true
)
;
'known/1_1_$special_=\\=/2___2__1__2__6'(L,A,B,H,C,D,F,G,E)
).
'known/1_1_$special_=\\=/2___2__1'(A,B,C) :-
'known/1_1_$special_=\\=/2___2__2'(A,B,C).
'known/1_1_$special_=\\=/2___2__2'(A,B,C) :-
number(B),
number(A),
A=:=B,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(D,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=\\=/2___2__2'(A,B,C) :-
B==A,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(D,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=\\=/2___2__2'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
D=suspension(_,_,_,_,_,W,X),
setarg(2,D,removed),
term_variables(term(W,X),J),
arg(5,D,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',U),
( U=[V|_] ->
setarg(5,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(5,V,S)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(J,D),
( var(C) ->
true
;
C=suspension(_,P,_,_,_,Q,R),
setarg(2,C,removed),
( P==not_stored_yet ->
K=[]
;
term_variables(term(Q,R),K),
arg(5,C,L),
( var(L) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',M),
M=[_|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',N),
( N=[O|_] ->
setarg(5,O,_)
;
true
)
;
L=[_,_|N],
setarg(2,L,N),
( N=[O|_] ->
setarg(5,O,L)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(K,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=\\=/2___2__2'(A,B,C) :-
'$novel_production'(C,195),
!,
'$extend_history'(C,195),
arg(2,C,G),
setarg(2,C,active),
arg(4,C,F),
E is F+1,
setarg(4,C,E),
( G==not_stored_yet ->
C=suspension(_,_,_,_,_,H,I),
term_variables(term(H,I),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',J),
K=[C|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',K),
( J=[L|_] ->
setarg(5,L,K)
;
true
),
'attach_known/1_1_$special_=\\=/2___2'(D,C)
;
true
),
'known/1_1_$special_=\\=/2'(B,A),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=\\=/2___2__3'(A,B,C)
;
true
).
'known/1_1_$special_=\\=/2___2__2'(A,B,C) :-
'known/1_1_$special_=\\=/2___2__3'(A,B,C).
'known/1_1_$special_=\\=/2___2__3'(A,B,C) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
nonvar(E),
E=(I=\=J),
I==A,
J==B,
!,
D=suspension(_,_,_,_,X),
setarg(2,D,removed),
term_variables(X,K),
arg(4,D,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V),
( V=[W|_] ->
setarg(4,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(4,W,T)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(K,D),
( var(C) ->
true
;
C=suspension(_,Q,_,_,_,R,S),
setarg(2,C,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S),L),
arg(5,C,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',O),
( O=[P|_] ->
setarg(5,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(5,P,M)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(L,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=\\=/2___2__3'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_=\\=/2___2__3__0__12'(D,A,B,C).
'known/1_1_$special_=\\=/2___2__3__0__12'([],B,C,A) :-
'known/1_1_$special_=\\=/2___2__4'(B,C,A).
'known/1_1_$special_=\\=/2___2__3__0__12'([F|J],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(\+G),
nonvar(G),
G=(H=\=I),
H==A,
I==B ->
F=suspension(_,_,_,_,Y,Z),
setarg(2,F,removed),
term_variables(term(Y,Z),K),
arg(4,F,U),
( var(U) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V),
V=[_|W],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
( W=[X|_] ->
setarg(4,X,_)
;
true
)
;
U=[_,_|W],
setarg(2,U,W),
( W=[X|_] ->
setarg(4,X,U)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,F),
arg(2,C,O),
setarg(2,C,active),
arg(4,C,N),
M is N+1,
setarg(4,C,M),
( O==not_stored_yet ->
C=suspension(_,_,_,_,_,P,Q),
term_variables(term(P,Q),L),
'chr none_locked'(L),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',R),
S=[C|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',S),
( R=[T|_] ->
setarg(5,T,S)
;
true
),
'attach_known/1_1_$special_=\\=/2___2'(L,C)
;
true
),
known(E),
( C=suspension(_,active,_,M,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=\\=/2___2__3__0__12'(J,A,B,C)
;
true
)
;
'known/1_1_$special_=\\=/2___2__3__0__12'(J,A,B,C)
).
'known/1_1_$special_=\\=/2___2__3'(A,B,C) :-
'known/1_1_$special_=\\=/2___2__4'(A,B,C).
'known/1_1_$special_=\\=/2___2__4'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_=\\=/2___2__4__0__13'(D,A,B,C).
'known/1_1_$special_=\\=/2___2__4__0__13'([],B,C,A) :-
'known/1_1_$special_=\\=/2___2__5'(B,C,A).
'known/1_1_$special_=\\=/2___2__4__0__13'([F|K],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(G,_),
nonvar(G),
G=(\+H),
nonvar(H),
H=(I=\=J),
I==A,
J==B ->
F=suspension(_,_,_,_,Z,A1),
setarg(2,F,removed),
term_variables(term(Z,A1),L),
arg(4,F,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,F),
arg(2,C,P),
setarg(2,C,active),
arg(4,C,O),
N is O+1,
setarg(4,C,N),
( P==not_stored_yet ->
C=suspension(_,_,_,_,_,Q,R),
term_variables(term(Q,R),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',S),
T=[C|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',T),
( S=[U|_] ->
setarg(5,U,T)
;
true
),
'attach_known/1_1_$special_=\\=/2___2'(M,C)
;
true
),
known(E),
( C=suspension(_,active,_,N,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=\\=/2___2__4__0__13'(K,A,B,C)
;
true
)
;
'known/1_1_$special_=\\=/2___2__4__0__13'(K,A,B,C)
).
'known/1_1_$special_=\\=/2___2__4'(A,B,C) :-
'known/1_1_$special_=\\=/2___2__5'(A,B,C).
'known/1_1_$special_=\\=/2___2__5'(_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F,G),
term_variables(term(F,G),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',H),
I=[A|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',I),
( H=[J|_] ->
setarg(5,J,I)
;
true
),
'attach_known/1_1_$special_=\\=/2___2'(B,A)
;
true
).
'known/1_1_$special_\\+/1'(A) :-
'known/1_1_$special_\\+/1___1__0'(A,_).
'known/1_1_$special_\\+/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==A,
!,
( var(B) ->
true
;
B=suspension(_,M,_,_,N),
setarg(2,B,removed),
( M==not_stored_yet ->
H=[]
;
term_variables(N,H),
arg(4,B,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',K),
( K=[L|_] ->
setarg(4,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(4,L,I)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(H,B)
)
).
'known/1_1_$special_\\+/1___1__0'(_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,J),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(J,D),
arg(4,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(D,A)
)
).
'known/1_1_$special_\\+/1___1__0'(A,B) :-
nonvar(A),
(
(
(
(
(
(
(
(
(
(
(
A=functor(C,D,E),
nonvar(C),
'chr lock'(C),
'chr lock'(D),
'chr lock'(E),
functor(C,D,E),
'chr unlock'(C),
'chr unlock'(D),
'chr unlock'(E),
!,
( var(B) ->
true
;
B=suspension(_,R8,_,_,S8),
setarg(2,B,removed),
( R8==not_stored_yet ->
F=[]
;
term_variables(S8,F),
arg(4,B,N8),
( var(N8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',O8),
O8=[_|P8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',P8),
( P8=[Q8|_] ->
setarg(4,Q8,_)
;
true
)
;
N8=[_,_|P8],
setarg(2,N8,P8),
( P8=[Q8|_] ->
setarg(4,Q8,N8)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(F,B)
)
),
'known/1_1_$special_fail/0'
;
A=(G;H),
( 'chr newvia_2'(G,H,M) ->
get_attr(M,guard_entailment,N),
N=v(_,_,_,L,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L)
),
'chr sbag_member'(I,L),
I=suspension(_,active,_,_,J,K),
J==G,
K==H,
!,
I=suspension(_,_,_,_,L8,M8),
setarg(2,I,removed),
term_variables(term(L8,M8),O),
arg(4,I,H8),
( var(H8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',I8),
I8=[_|J8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',J8),
( J8=[K8|_] ->
setarg(4,K8,_)
;
true
)
;
H8=[_,_|J8],
setarg(2,H8,J8),
( J8=[K8|_] ->
setarg(4,K8,H8)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(O,I),
( var(B) ->
true
;
B=suspension(_,F8,_,_,G8),
setarg(2,B,removed),
( F8==not_stored_yet ->
P=[]
;
term_variables(G8,P),
arg(4,B,B8),
( var(B8) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',C8),
C8=[_|D8],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',D8),
( D8=[E8|_] ->
setarg(4,E8,_)
;
true
)
;
B8=[_,_|D8],
setarg(2,B8,D8),
( D8=[E8|_] ->
setarg(4,E8,B8)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(P,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=nonvar(Q),
( 'chr newvia_1'(Q,U) ->
get_attr(U,guard_entailment,V),
V=v(_,_,_,_,T,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',T)
),
'chr sbag_member'(R,T),
R=suspension(_,active,_,_,S),
S==Q,
!,
R=suspension(_,_,_,_,A8),
setarg(2,R,removed),
term_variables(A8,W),
arg(4,R,W7),
( var(W7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',X7),
X7=[_|Y7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',Y7),
( Y7=[Z7|_] ->
setarg(4,Z7,_)
;
true
)
;
W7=[_,_|Y7],
setarg(2,W7,Y7),
( Y7=[Z7|_] ->
setarg(4,Z7,W7)
;
true
)
),
'detach_known/1_1_$special_nonvar/1___1'(W,R),
( var(B) ->
true
;
B=suspension(_,U7,_,_,V7),
setarg(2,B,removed),
( U7==not_stored_yet ->
X=[]
;
term_variables(V7,X),
arg(4,B,Q7),
( var(Q7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R7),
R7=[_|S7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S7),
( S7=[T7|_] ->
setarg(4,T7,_)
;
true
)
;
Q7=[_,_|S7],
setarg(2,Q7,S7),
( S7=[T7|_] ->
setarg(4,T7,Q7)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(X,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=var(Y),
( 'chr newvia_1'(Y,C1) ->
get_attr(C1,guard_entailment,D1),
D1=v(_,_,_,_,_,B1,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',B1)
),
'chr sbag_member'(Z,B1),
Z=suspension(_,active,_,_,A1),
A1==Y,
!,
Z=suspension(_,_,_,_,P7),
setarg(2,Z,removed),
term_variables(P7,E1),
arg(4,Z,L7),
( var(L7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',M7),
M7=[_|N7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',N7),
( N7=[O7|_] ->
setarg(4,O7,_)
;
true
)
;
L7=[_,_|N7],
setarg(2,L7,N7),
( N7=[O7|_] ->
setarg(4,O7,L7)
;
true
)
),
'detach_known/1_1_$special_var/1___1'(E1,Z),
( var(B) ->
true
;
B=suspension(_,J7,_,_,K7),
setarg(2,B,removed),
( J7==not_stored_yet ->
F1=[]
;
term_variables(K7,F1),
arg(4,B,F7),
( var(F7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',G7),
G7=[_|H7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',H7),
( H7=[I7|_] ->
setarg(4,I7,_)
;
true
)
;
F7=[_,_|H7],
setarg(2,F7,H7),
( H7=[I7|_] ->
setarg(4,I7,F7)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(F1,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=atom(G1),
( 'chr newvia_1'(G1,K1) ->
get_attr(K1,guard_entailment,L1),
L1=v(_,_,_,_,_,_,J1,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',J1)
),
'chr sbag_member'(H1,J1),
H1=suspension(_,active,_,_,_,I1),
I1==G1,
!,
H1=suspension(_,_,_,_,_,E7),
setarg(2,H1,removed),
term_variables(E7,M1),
arg(5,H1,A7),
( var(A7) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',B7),
B7=[_|C7],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',C7),
( C7=[D7|_] ->
setarg(5,D7,_)
;
true
)
;
A7=[_,_|C7],
setarg(2,A7,C7),
( C7=[D7|_] ->
setarg(5,D7,A7)
;
true
)
),
'detach_known/1_1_$special_atom/1___1'(M1,H1),
( var(B) ->
true
;
B=suspension(_,Y6,_,_,Z6),
setarg(2,B,removed),
( Y6==not_stored_yet ->
N1=[]
;
term_variables(Z6,N1),
arg(4,B,U6),
( var(U6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V6),
V6=[_|W6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',W6),
( W6=[X6|_] ->
setarg(4,X6,_)
;
true
)
;
U6=[_,_|W6],
setarg(2,U6,W6),
( W6=[X6|_] ->
setarg(4,X6,U6)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(N1,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=atomic(O1),
( 'chr newvia_1'(O1,S1) ->
get_attr(S1,guard_entailment,T1),
T1=v(_,_,_,_,_,_,_,R1,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',R1)
),
'chr sbag_member'(P1,R1),
P1=suspension(_,active,_,_,_,Q1),
Q1==O1,
!,
P1=suspension(_,_,_,_,_,T6),
setarg(2,P1,removed),
term_variables(T6,U1),
arg(5,P1,P6),
( var(P6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',Q6),
Q6=[_|R6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',R6),
( R6=[S6|_] ->
setarg(5,S6,_)
;
true
)
;
P6=[_,_|R6],
setarg(2,P6,R6),
( R6=[S6|_] ->
setarg(5,S6,P6)
;
true
)
),
'detach_known/1_1_$special_atomic/1___1'(U1,P1),
( var(B) ->
true
;
B=suspension(_,N6,_,_,O6),
setarg(2,B,removed),
( N6==not_stored_yet ->
V1=[]
;
term_variables(O6,V1),
arg(4,B,J6),
( var(J6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',K6),
K6=[_|L6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',L6),
( L6=[M6|_] ->
setarg(4,M6,_)
;
true
)
;
J6=[_,_|L6],
setarg(2,J6,L6),
( L6=[M6|_] ->
setarg(4,M6,J6)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(V1,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=compound(W1),
( 'chr newvia_1'(W1,A2) ->
get_attr(A2,guard_entailment,B2),
B2=v(_,_,_,_,_,_,_,_,Z1,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',Z1)
),
'chr sbag_member'(X1,Z1),
X1=suspension(_,active,_,_,_,Y1),
Y1==W1,
!,
X1=suspension(_,_,_,_,_,I6),
setarg(2,X1,removed),
term_variables(I6,C2),
arg(5,X1,E6),
( var(E6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',F6),
F6=[_|G6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',G6),
( G6=[H6|_] ->
setarg(5,H6,_)
;
true
)
;
E6=[_,_|G6],
setarg(2,E6,G6),
( G6=[H6|_] ->
setarg(5,H6,E6)
;
true
)
),
'detach_known/1_1_$special_compound/1___1'(C2,X1),
( var(B) ->
true
;
B=suspension(_,C6,_,_,D6),
setarg(2,B,removed),
( C6==not_stored_yet ->
D2=[]
;
term_variables(D6,D2),
arg(4,B,Y5),
( var(Y5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',Z5),
Z5=[_|A6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',A6),
( A6=[B6|_] ->
setarg(4,B6,_)
;
true
)
;
Y5=[_,_|A6],
setarg(2,Y5,A6),
( A6=[B6|_] ->
setarg(4,B6,Y5)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(D2,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=ground(E2),
( 'chr newvia_1'(E2,I2) ->
get_attr(I2,guard_entailment,J2),
J2=v(_,_,_,_,_,_,_,_,_,H2,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',H2)
),
'chr sbag_member'(F2,H2),
F2=suspension(_,active,_,_,_,G2),
G2==E2,
!,
F2=suspension(_,_,_,_,_,X5),
setarg(2,F2,removed),
term_variables(X5,K2),
arg(5,F2,T5),
( var(T5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',U5),
U5=[_|V5],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',V5),
( V5=[W5|_] ->
setarg(5,W5,_)
;
true
)
;
T5=[_,_|V5],
setarg(2,T5,V5),
( V5=[W5|_] ->
setarg(5,W5,T5)
;
true
)
),
'detach_known/1_1_$special_ground/1___1'(K2,F2),
( var(B) ->
true
;
B=suspension(_,R5,_,_,S5),
setarg(2,B,removed),
( R5==not_stored_yet ->
L2=[]
;
term_variables(S5,L2),
arg(4,B,N5),
( var(N5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',O5),
O5=[_|P5],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',P5),
( P5=[Q5|_] ->
setarg(4,Q5,_)
;
true
)
;
N5=[_,_|P5],
setarg(2,N5,P5),
( P5=[Q5|_] ->
setarg(4,Q5,N5)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(L2,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=integer(M2),
( 'chr newvia_1'(M2,Q2) ->
get_attr(Q2,guard_entailment,R2),
R2=v(_,_,_,_,_,_,_,_,_,_,P2,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',P2)
),
'chr sbag_member'(N2,P2),
N2=suspension(_,active,_,_,_,O2),
O2==M2,
!,
N2=suspension(_,_,_,_,_,M5),
setarg(2,N2,removed),
term_variables(M5,S2),
arg(5,N2,I5),
( var(I5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',J5),
J5=[_|K5],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',K5),
( K5=[L5|_] ->
setarg(5,L5,_)
;
true
)
;
I5=[_,_|K5],
setarg(2,I5,K5),
( K5=[L5|_] ->
setarg(5,L5,I5)
;
true
)
),
'detach_known/1_1_$special_integer/1___1'(S2,N2),
( var(B) ->
true
;
B=suspension(_,G5,_,_,H5),
setarg(2,B,removed),
( G5==not_stored_yet ->
T2=[]
;
term_variables(H5,T2),
arg(4,B,C5),
( var(C5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',D5),
D5=[_|E5],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E5),
( E5=[F5|_] ->
setarg(4,F5,_)
;
true
)
;
C5=[_,_|E5],
setarg(2,C5,E5),
( E5=[F5|_] ->
setarg(4,F5,C5)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(T2,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=float(U2),
( 'chr newvia_1'(U2,Y2) ->
get_attr(Y2,guard_entailment,Z2),
Z2=v(_,_,_,_,_,_,_,_,_,_,_,X2,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',X2)
),
'chr sbag_member'(V2,X2),
V2=suspension(_,active,_,_,_,W2),
W2==U2,
!,
V2=suspension(_,_,_,_,_,B5),
setarg(2,V2,removed),
term_variables(B5,A3),
arg(5,V2,X4),
( var(X4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',Y4),
Y4=[_|Z4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',Z4),
( Z4=[A5|_] ->
setarg(5,A5,_)
;
true
)
;
X4=[_,_|Z4],
setarg(2,X4,Z4),
( Z4=[A5|_] ->
setarg(5,A5,X4)
;
true
)
),
'detach_known/1_1_$special_float/1___1'(A3,V2),
( var(B) ->
true
;
B=suspension(_,V4,_,_,W4),
setarg(2,B,removed),
( V4==not_stored_yet ->
B3=[]
;
term_variables(W4,B3),
arg(4,B,R4),
( var(R4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S4),
S4=[_|T4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',T4),
( T4=[U4|_] ->
setarg(4,U4,_)
;
true
)
;
R4=[_,_|T4],
setarg(2,R4,T4),
( T4=[U4|_] ->
setarg(4,U4,R4)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(B3,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=number(C3),
( 'chr newvia_1'(C3,G3) ->
get_attr(G3,guard_entailment,H3),
H3=v(_,_,_,_,_,_,_,_,_,_,_,_,F3,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',F3)
),
'chr sbag_member'(D3,F3),
D3=suspension(_,active,_,_,_,E3),
E3==C3,
!,
D3=suspension(_,_,_,_,_,Q4),
setarg(2,D3,removed),
term_variables(Q4,I3),
arg(5,D3,M4),
( var(M4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',N4),
N4=[_|O4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',O4),
( O4=[P4|_] ->
setarg(5,P4,_)
;
true
)
;
M4=[_,_|O4],
setarg(2,M4,O4),
( O4=[P4|_] ->
setarg(5,P4,M4)
;
true
)
),
'detach_known/1_1_$special_number/1___1'(I3,D3),
( var(B) ->
true
;
B=suspension(_,K4,_,_,L4),
setarg(2,B,removed),
( K4==not_stored_yet ->
J3=[]
;
term_variables(L4,J3),
arg(4,B,G4),
( var(G4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',H4),
H4=[_|I4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',I4),
( I4=[J4|_] ->
setarg(4,J4,_)
;
true
)
;
G4=[_,_|I4],
setarg(2,G4,I4),
( I4=[J4|_] ->
setarg(4,J4,G4)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(J3,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=(K3=\=L3),
( 'chr newvia_2'(K3,L3,Q3) ->
get_attr(Q3,guard_entailment,R3),
R3=v(_,_,_,_,_,_,_,_,_,_,_,_,_,P3,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',P3)
),
'chr sbag_member'(M3,P3),
M3=suspension(_,active,_,_,_,N3,O3),
N3==K3,
O3==L3,
!,
M3=suspension(_,_,_,_,_,E4,F4),
setarg(2,M3,removed),
term_variables(term(E4,F4),S3),
arg(5,M3,A4),
( var(A4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',B4),
B4=[_|C4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',C4),
( C4=[D4|_] ->
setarg(5,D4,_)
;
true
)
;
A4=[_,_|C4],
setarg(2,A4,C4),
( C4=[D4|_] ->
setarg(5,D4,A4)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(S3,M3),
( var(B) ->
true
;
B=suspension(_,Y3,_,_,Z3),
setarg(2,B,removed),
( Y3==not_stored_yet ->
T3=[]
;
term_variables(Z3,T3),
arg(4,B,U3),
( var(U3) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V3),
V3=[_|W3],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',W3),
( W3=[X3|_] ->
setarg(4,X3,_)
;
true
)
;
U3=[_,_|W3],
setarg(2,U3,W3),
( W3=[X3|_] ->
setarg(4,X3,U3)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(T3,B)
)
),
'known/1_1_$special_fail/0'
).
'known/1_1_$special_\\+/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
nonvar(D),
D=(\+H),
H==A,
!,
C=suspension(_,_,_,_,U),
setarg(2,C,removed),
term_variables(U,I),
arg(4,C,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,C),
( var(B) ->
true
;
B=suspension(_,O,_,_,P),
setarg(2,B,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(P,J),
arg(4,B,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',M),
( M=[N|_] ->
setarg(4,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(4,N,K)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_\\+/1___1__0'(A,B) :-
nonvar(A),
(
(
(
(
(
(
(
A=(\+C),
( 'chr newvia_1'(C,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
E==C,
!,
D=suspension(_,_,_,_,V6),
setarg(2,D,removed),
term_variables(V6,I),
arg(4,D,R6),
( var(R6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S6),
S6=[_|T6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',T6),
( T6=[U6|_] ->
setarg(4,U6,_)
;
true
)
;
R6=[_,_|T6],
setarg(2,R6,T6),
( T6=[U6|_] ->
setarg(4,U6,R6)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,D),
( var(B) ->
true
;
B=suspension(_,P6,_,_,Q6),
setarg(2,B,removed),
( P6==not_stored_yet ->
J=[]
;
term_variables(Q6,J),
arg(4,B,L6),
( var(L6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',M6),
M6=[_|N6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',N6),
( N6=[O6|_] ->
setarg(4,O6,_)
;
true
)
;
L6=[_,_|N6],
setarg(2,L6,N6),
( N6=[O6|_] ->
setarg(4,O6,L6)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(J,B)
)
),
'known/1_1_$special_fail/0'
;
A=functor(K,L,M),
( 'chr newvia'([K,L,M],S) ->
get_attr(S,guard_entailment,T),
T=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,R,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',R)
),
'chr sbag_member'(N,R),
N=suspension(_,active,_,_,O,P,Q),
O==K,
P==L,
Q==M,
!,
N=suspension(_,_,_,_,I6,J6,K6),
setarg(2,N,removed),
term_variables(term(I6,J6,K6),U),
arg(4,N,E6),
( var(E6) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',F6),
F6=[_|G6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',G6),
( G6=[H6|_] ->
setarg(4,H6,_)
;
true
)
;
E6=[_,_|G6],
setarg(2,E6,G6),
( G6=[H6|_] ->
setarg(4,H6,E6)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(U,N),
( var(B) ->
true
;
B=suspension(_,C6,_,_,D6),
setarg(2,B,removed),
( C6==not_stored_yet ->
V=[]
;
term_variables(D6,V),
arg(4,B,Y5),
( var(Y5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',Z5),
Z5=[_|A6],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',A6),
( A6=[B6|_] ->
setarg(4,B6,_)
;
true
)
;
Y5=[_,_|A6],
setarg(2,Y5,A6),
( A6=[B6|_] ->
setarg(4,B6,Y5)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(V,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=(W\=X),
( 'chr newvia_2'(W,X,C1) ->
get_attr(C1,guard_entailment,D1),
D1=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,B1,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',B1)
),
'chr sbag_member'(Y,B1),
Y=suspension(_,active,_,_,_,Z,A1),
Z==W,
A1==X,
!,
Y=suspension(_,_,_,_,_,W5,X5),
setarg(2,Y,removed),
term_variables(term(W5,X5),E1),
arg(5,Y,S5),
( var(S5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',T5),
T5=[_|U5],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',U5),
( U5=[V5|_] ->
setarg(5,V5,_)
;
true
)
;
S5=[_,_|U5],
setarg(2,S5,U5),
( U5=[V5|_] ->
setarg(5,V5,S5)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(E1,Y),
( var(B) ->
true
;
B=suspension(_,Q5,_,_,R5),
setarg(2,B,removed),
( Q5==not_stored_yet ->
F1=[]
;
term_variables(R5,F1),
arg(4,B,M5),
( var(M5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',N5),
N5=[_|O5],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',O5),
( O5=[P5|_] ->
setarg(4,P5,_)
;
true
)
;
M5=[_,_|O5],
setarg(2,M5,O5),
( O5=[P5|_] ->
setarg(4,P5,M5)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(F1,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=(G1=H1),
( 'chr newvia_2'(G1,H1,M1) ->
get_attr(M1,guard_entailment,N1),
N1=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,L1,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',L1)
),
'chr sbag_member'(I1,L1),
I1=suspension(_,active,_,_,J1,K1),
J1==G1,
K1==H1,
!,
I1=suspension(_,_,_,_,K5,L5),
setarg(2,I1,removed),
term_variables(term(K5,L5),O1),
arg(4,I1,G5),
( var(G5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',H5),
H5=[_|I5],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',I5),
( I5=[J5|_] ->
setarg(4,J5,_)
;
true
)
;
G5=[_,_|I5],
setarg(2,G5,I5),
( I5=[J5|_] ->
setarg(4,J5,G5)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(O1,I1),
( var(B) ->
true
;
B=suspension(_,E5,_,_,F5),
setarg(2,B,removed),
( E5==not_stored_yet ->
P1=[]
;
term_variables(F5,P1),
arg(4,B,A5),
( var(A5) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',B5),
B5=[_|C5],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',C5),
( C5=[D5|_] ->
setarg(4,D5,_)
;
true
)
;
A5=[_,_|C5],
setarg(2,A5,C5),
( C5=[D5|_] ->
setarg(4,D5,A5)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(P1,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=(Q1\==R1),
( 'chr newvia_2'(Q1,R1,W1) ->
get_attr(W1,guard_entailment,X1),
X1=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,V1,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',V1)
),
'chr sbag_member'(S1,V1),
S1=suspension(_,active,_,_,_,T1,U1),
T1==Q1,
U1==R1,
!,
S1=suspension(_,_,_,_,_,Y4,Z4),
setarg(2,S1,removed),
term_variables(term(Y4,Z4),Y1),
arg(5,S1,U4),
( var(U4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',V4),
V4=[_|W4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',W4),
( W4=[X4|_] ->
setarg(5,X4,_)
;
true
)
;
U4=[_,_|W4],
setarg(2,U4,W4),
( W4=[X4|_] ->
setarg(5,X4,U4)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(Y1,S1),
( var(B) ->
true
;
B=suspension(_,S4,_,_,T4),
setarg(2,B,removed),
( S4==not_stored_yet ->
Z1=[]
;
term_variables(T4,Z1),
arg(4,B,O4),
( var(O4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',P4),
P4=[_|Q4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',Q4),
( Q4=[R4|_] ->
setarg(4,R4,_)
;
true
)
;
O4=[_,_|Q4],
setarg(2,O4,Q4),
( Q4=[R4|_] ->
setarg(4,R4,O4)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(Z1,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=(A2==B2),
( 'chr newvia_2'(A2,B2,G2) ->
get_attr(G2,guard_entailment,H2),
H2=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,F2,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',F2)
),
'chr sbag_member'(C2,F2),
C2=suspension(_,active,_,_,_,D2,E2),
D2==A2,
E2==B2,
!,
C2=suspension(_,_,_,_,_,M4,N4),
setarg(2,C2,removed),
term_variables(term(M4,N4),I2),
arg(5,C2,I4),
( var(I4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',J4),
J4=[_|K4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',K4),
( K4=[L4|_] ->
setarg(5,L4,_)
;
true
)
;
I4=[_,_|K4],
setarg(2,I4,K4),
( K4=[L4|_] ->
setarg(5,L4,I4)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(I2,C2),
( var(B) ->
true
;
B=suspension(_,G4,_,_,H4),
setarg(2,B,removed),
( G4==not_stored_yet ->
J2=[]
;
term_variables(H4,J2),
arg(4,B,C4),
( var(C4) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',D4),
D4=[_|E4],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E4),
( E4=[F4|_] ->
setarg(4,F4,_)
;
true
)
;
C4=[_,_|E4],
setarg(2,C4,E4),
( E4=[F4|_] ->
setarg(4,F4,C4)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(J2,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=(K2=<L2),
( 'chr newvia_2'(K2,L2,Q2) ->
get_attr(Q2,guard_entailment,R2),
R2=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,P2,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',P2)
),
'chr sbag_member'(M2,P2),
M2=suspension(_,active,_,_,_,N2,O2),
N2==K2,
O2==L2,
!,
M2=suspension(_,_,_,_,_,A4,B4),
setarg(2,M2,removed),
term_variables(term(A4,B4),S2),
arg(5,M2,W3),
( var(W3) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',X3),
X3=[_|Y3],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',Y3),
( Y3=[Z3|_] ->
setarg(5,Z3,_)
;
true
)
;
W3=[_,_|Y3],
setarg(2,W3,Y3),
( Y3=[Z3|_] ->
setarg(5,Z3,W3)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(S2,M2),
( var(B) ->
true
;
B=suspension(_,U3,_,_,V3),
setarg(2,B,removed),
( U3==not_stored_yet ->
T2=[]
;
term_variables(V3,T2),
arg(4,B,Q3),
( var(Q3) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',R3),
R3=[_|S3],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',S3),
( S3=[T3|_] ->
setarg(4,T3,_)
;
true
)
;
Q3=[_,_|S3],
setarg(2,Q3,S3),
( S3=[T3|_] ->
setarg(4,T3,Q3)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(T2,B)
)
),
'known/1_1_$special_fail/0'
)
;
A=(U2=:=V2),
( 'chr newvia_2'(U2,V2,A3) ->
get_attr(A3,guard_entailment,B3),
B3=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,Z2)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',Z2)
),
'chr sbag_member'(W2,Z2),
W2=suspension(_,active,_,_,_,X2,Y2),
X2==U2,
Y2==V2,
!,
W2=suspension(_,_,_,_,_,O3,P3),
setarg(2,W2,removed),
term_variables(term(O3,P3),C3),
arg(5,W2,K3),
( var(K3) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',L3),
L3=[_|M3],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',M3),
( M3=[N3|_] ->
setarg(5,N3,_)
;
true
)
;
K3=[_,_|M3],
setarg(2,K3,M3),
( M3=[N3|_] ->
setarg(5,N3,K3)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(C3,W2),
( var(B) ->
true
;
B=suspension(_,I3,_,_,J3),
setarg(2,B,removed),
( I3==not_stored_yet ->
D3=[]
;
term_variables(J3,D3),
arg(4,B,E3),
( var(E3) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F3),
F3=[_|G3],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',G3),
( G3=[H3|_] ->
setarg(4,H3,_)
;
true
)
;
E3=[_,_|G3],
setarg(2,E3,G3),
( G3=[H3|_] ->
setarg(4,H3,E3)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(D3,B)
)
),
'known/1_1_$special_fail/0'
).
'known/1_1_$special_\\+/1___1__0'(A,B) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',E)
),
'chr sbag_member'(C,E),
C=suspension(_,active,_,_,D),
D==A,
!,
C=suspension(_,_,_,_,T),
setarg(2,C,removed),
term_variables(T,H),
arg(4,C,P),
( var(P) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',Q),
Q=[_|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',R),
( R=[S|_] ->
setarg(4,S,_)
;
true
)
;
P=[_,_|R],
setarg(2,P,R),
( R=[S|_] ->
setarg(4,S,P)
;
true
)
),
'detach_known/1_1_$default___1'(H,C),
( var(B) ->
true
;
B=suspension(_,N,_,_,O),
setarg(2,B,removed),
( N==not_stored_yet ->
I=[]
;
term_variables(O,I),
arg(4,B,J),
( var(J) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',K),
K=[_|L],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',L),
( L=[M|_] ->
setarg(4,M,_)
;
true
)
;
J=[_,_|L],
setarg(2,J,L),
( L=[M|_] ->
setarg(4,M,J)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(I,B)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_\\+/1___1__0'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
( var(B) ->
B=suspension(F,not_stored_yet,0,_,A),
'chr gen_id'(F)
;
true
),
'known/1_1_$special_\\+/1___1__0__0__33'(C,A,B).
'known/1_1_$special_\\+/1___1__0__0__33'([],B,A) :-
'known/1_1_$special_\\+/1___1__1'(B,A).
'known/1_1_$special_\\+/1___1__0__0__33'([E|H],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(\+F),
nonvar(F),
F=(\+G),
G==A ->
E=suspension(_,_,_,_,V,W),
setarg(2,E,removed),
term_variables(term(V,W),I),
arg(4,E,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
( T=[U|_] ->
setarg(4,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(4,U,R)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(I,E),
arg(2,B,M),
setarg(2,B,active),
arg(3,B,L),
K is L+1,
setarg(3,B,K),
( M==not_stored_yet ->
B=suspension(_,_,_,_,N),
term_variables(N,J),
'chr none_locked'(J),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',O),
P=[B|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',P),
( O=[Q|_] ->
setarg(4,Q,P)
;
true
),
'attach_known/1_1_$special_\\+/1___1'(J,B)
;
true
),
known(D),
( B=suspension(_,active,K,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_\\+/1___1__0__0__33'(H,A,B)
;
true
)
;
'known/1_1_$special_\\+/1___1__0__0__33'(H,A,B)
).
'known/1_1_$special_\\+/1___1__0'(A,B) :-
( var(B) ->
B=suspension(C,not_stored_yet,0,_,A),
'chr gen_id'(C)
;
true
),
'known/1_1_$special_\\+/1___1__1'(A,B).
'known/1_1_$special_\\+/1___1__1'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_\\+/1___1__1__0__34'(C,A,B).
'known/1_1_$special_\\+/1___1__1__0__34'([],B,A) :-
'known/1_1_$special_\\+/1___1__2'(B,A).
'known/1_1_$special_\\+/1___1__1__0__34'([E|I],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
nonvar(F),
F=(\+G),
nonvar(G),
G=(\+H),
H==A ->
E=suspension(_,_,_,_,W,X),
setarg(2,E,removed),
term_variables(term(W,X),J),
arg(4,E,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',U),
( U=[V|_] ->
setarg(4,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(4,V,S)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,E),
arg(2,B,N),
setarg(2,B,active),
arg(3,B,M),
L is M+1,
setarg(3,B,L),
( N==not_stored_yet ->
B=suspension(_,_,_,_,O),
term_variables(O,K),
'chr none_locked'(K),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',P),
Q=[B|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',Q),
( P=[R|_] ->
setarg(4,R,Q)
;
true
),
'attach_known/1_1_$special_\\+/1___1'(K,B)
;
true
),
known(D),
( B=suspension(_,active,L,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_\\+/1___1__1__0__34'(I,A,B)
;
true
)
;
'known/1_1_$special_\\+/1___1__1__0__34'(I,A,B)
).
'known/1_1_$special_\\+/1___1__1'(A,B) :-
'known/1_1_$special_\\+/1___1__2'(A,B).
'known/1_1_$special_\\+/1___1__2'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_\\+/1___1__2__0__35'(C,A,B).
'known/1_1_$special_\\+/1___1__2__0__35'([],B,A) :-
'known/1_1_$special_\\+/1___1__3'(B,A).
'known/1_1_$special_\\+/1___1__2__0__35'([E|F],A,B) :-
( E=suspension(_,active,_,_,C,D),
C==A ->
E=suspension(_,_,_,_,T,U),
setarg(2,E,removed),
term_variables(term(T,U),G),
arg(4,E,P),
( var(P) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Q),
Q=[_|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',R),
( R=[S|_] ->
setarg(4,S,_)
;
true
)
;
P=[_,_|R],
setarg(2,P,R),
( R=[S|_] ->
setarg(4,S,P)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(G,E),
arg(2,B,K),
setarg(2,B,active),
arg(3,B,J),
I is J+1,
setarg(3,B,I),
( K==not_stored_yet ->
B=suspension(_,_,_,_,L),
term_variables(L,H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',M),
N=[B|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',N),
( M=[O|_] ->
setarg(4,O,N)
;
true
),
'attach_known/1_1_$special_\\+/1___1'(H,B)
;
true
),
known(D),
( B=suspension(_,active,I,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_\\+/1___1__2__0__35'(F,A,B)
;
true
)
;
'known/1_1_$special_\\+/1___1__2__0__35'(F,A,B)
).
'known/1_1_$special_\\+/1___1__2'(A,B) :-
'known/1_1_$special_\\+/1___1__3'(A,B).
'known/1_1_$special_\\+/1___1__3'(A,B) :-
( 'chr newvia_1'(A,D) ->
get_attr(D,guard_entailment,E),
E=v(_,_,_,C,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',C)
),
!,
'known/1_1_$special_\\+/1___1__3__0__36'(C,A,B).
'known/1_1_$special_\\+/1___1__3__0__36'([],B,A) :-
'known/1_1_$special_\\+/1___1__4'(B,A).
'known/1_1_$special_\\+/1___1__3__0__36'([E|G],A,B) :-
( E=suspension(_,active,_,_,C,D),
nonvar(C),
C=(F,_),
F==A ->
E=suspension(_,_,_,_,U,V),
setarg(2,E,removed),
term_variables(term(U,V),H),
arg(4,E,Q),
( var(Q) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',R),
R=[_|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',S),
( S=[T|_] ->
setarg(4,T,_)
;
true
)
;
Q=[_,_|S],
setarg(2,Q,S),
( S=[T|_] ->
setarg(4,T,Q)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(H,E),
arg(2,B,L),
setarg(2,B,active),
arg(3,B,K),
J is K+1,
setarg(3,B,J),
( L==not_stored_yet ->
B=suspension(_,_,_,_,M),
term_variables(M,I),
'chr none_locked'(I),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',N),
O=[B|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',O),
( N=[P|_] ->
setarg(4,P,O)
;
true
),
'attach_known/1_1_$special_\\+/1___1'(I,B)
;
true
),
known(D),
( B=suspension(_,active,J,_,_) ->
setarg(2,B,inactive),
'known/1_1_$special_\\+/1___1__3__0__36'(G,A,B)
;
true
)
;
'known/1_1_$special_\\+/1___1__3__0__36'(G,A,B)
).
'known/1_1_$special_\\+/1___1__3'(A,B) :-
'known/1_1_$special_\\+/1___1__4'(A,B).
'known/1_1_$special_\\+/1___1__4'(_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(3,A,D),
C is D+1,
setarg(3,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,F),
term_variables(F,B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',G),
H=[A|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',H),
( G=[I|_] ->
setarg(4,I,H)
;
true
),
'attach_known/1_1_$special_\\+/1___1'(B,A)
;
true
).
'known/1_1_$special_functor/3'(A,B,C) :-
'known/1_1_$special_functor/3___3__0'(A,B,C,_).
'known/1_1_$special_functor/3___3__0'(A,B,C,D) :-
( 'chr newvia'([A,B,C],J) ->
get_attr(J,guard_entailment,K),
K=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,I,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',I)
),
'chr sbag_member'(E,I),
E=suspension(_,active,_,_,F,G,H),
F==A,
G==B,
H==C,
!,
( var(D) ->
true
;
D=suspension(_,Q,_,_,R,S,T),
setarg(2,D,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S,T),L),
arg(4,D,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',O),
( O=[P|_] ->
setarg(4,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(4,P,M)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(L,D)
)
).
'known/1_1_$special_functor/3___3__0'(_,_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,J,K,L),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K,L),D),
arg(4,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(D,A)
)
).
'known/1_1_$special_functor/3___3__0'(A,B,C,D) :-
ground(C),
ground(B),
var(A),
nb_getval('$chr_store_global_list_guard_entailment____variables___1',G),
'chr sbag_member'(E,G),
E=suspension(_,active,_,F),
!,
E=suspension(_,_,_,X),
setarg(2,E,removed),
term_variables(X,J),
arg(3,E,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____variables___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____variables___1',V),
( V=[W|_] ->
setarg(3,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(3,W,T)
;
true
)
),
detach_variables___1(J,E),
( var(D) ->
true
;
D=suspension(_,P,_,_,Q,R,S),
setarg(2,D,removed),
( P==not_stored_yet ->
K=[]
;
term_variables(term(Q,R,S),K),
arg(4,D,L),
( var(L) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',M),
M=[_|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',N),
( N=[O|_] ->
setarg(4,O,_)
;
true
)
;
L=[_,_|N],
setarg(2,L,N),
( N=[O|_] ->
setarg(4,O,L)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(K,D)
)
),
functor(A,B,C),
A=..[_|H],
append(H,F,I),
variables(I).
'known/1_1_$special_functor/3___3__0'(A,B,C,D) :-
nonvar(A),
'chr lock'(A),
'chr lock'(B),
'chr lock'(C),
\+functor(A,B,C),
'chr unlock'(A),
'chr unlock'(B),
'chr unlock'(C),
!,
( var(D) ->
true
;
D=suspension(_,J,_,_,K,L,M),
setarg(2,D,removed),
( J==not_stored_yet ->
E=[]
;
term_variables(term(K,L,M),E),
arg(4,D,F),
( var(F) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',G),
G=[_|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',H),
( H=[I|_] ->
setarg(4,I,_)
;
true
)
;
F=[_,_|H],
setarg(2,F,H),
( H=[I|_] ->
setarg(4,I,F)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(E,D)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_functor/3___3__0'(A,B,C,D) :-
nonvar(C),
nonvar(B),
( 'chr newvia_1'(A,J) ->
get_attr(J,guard_entailment,K),
K=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,I,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',I)
),
'chr sbag_member'(E,I),
E=suspension(_,active,_,_,F,G,H),
F==A,
nonvar(H),
nonvar(G),
!,
E=suspension(_,_,_,_,Z,A1,B1),
setarg(2,E,removed),
term_variables(term(Z,A1,B1),L),
arg(4,E,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(L,E),
( var(D) ->
true
;
D=suspension(_,R,_,_,S,T,U),
setarg(2,D,removed),
( R==not_stored_yet ->
M=[]
;
term_variables(term(S,T,U),M),
arg(4,D,N),
( var(N) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',O),
O=[_|P],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',P),
( P=[Q|_] ->
setarg(4,Q,_)
;
true
)
;
N=[_,_|P],
setarg(2,N,P),
( P=[Q|_] ->
setarg(4,Q,N)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(M,D)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_functor/3___3__0'(A,B,C,D) :-
( 'chr newvia'([A,B,C],H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',G)
),
'chr sbag_member'(E,G),
E=suspension(_,active,_,_,F),
nonvar(F),
F=functor(J,K,L),
J==A,
K==B,
L==C,
!,
E=suspension(_,_,_,_,A1),
setarg(2,E,removed),
term_variables(A1,M),
arg(4,E,W),
( var(W) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',X),
X=[_|Y],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',Y),
( Y=[Z|_] ->
setarg(4,Z,_)
;
true
)
;
W=[_,_|Y],
setarg(2,W,Y),
( Y=[Z|_] ->
setarg(4,Z,W)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(M,E),
( var(D) ->
true
;
D=suspension(_,S,_,_,T,U,V),
setarg(2,D,removed),
( S==not_stored_yet ->
N=[]
;
term_variables(term(T,U,V),N),
arg(4,D,O),
( var(O) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',P),
P=[_|Q],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',Q),
( Q=[R|_] ->
setarg(4,R,_)
;
true
)
;
O=[_,_|Q],
setarg(2,O,Q),
( Q=[R|_] ->
setarg(4,R,O)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(N,D)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_functor/3___3__0'(A,B,C,D) :-
( 'chr newvia'([A,B,C],F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E)
),
!,
( var(D) ->
D=suspension(H,not_stored_yet,0,_,A,B,C),
'chr gen_id'(H)
;
true
),
'known/1_1_$special_functor/3___3__0__0__10'(E,A,B,C,D).
'known/1_1_$special_functor/3___3__0__0__10'([],B,C,D,A) :-
'known/1_1_$special_functor/3___3__1'(B,C,D,A).
'known/1_1_$special_functor/3___3__0__0__10'([G|L],A,B,C,D) :-
( G=suspension(_,active,_,_,E,F),
nonvar(E),
E=(\+H),
nonvar(H),
H=functor(I,J,K),
I==A,
J==B,
K==C ->
G=suspension(_,_,_,_,B1,C1),
setarg(2,G,removed),
term_variables(term(B1,C1),M),
arg(4,G,X),
( var(X) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Y),
Y=[_|Z],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Z),
( Z=[A1|_] ->
setarg(4,A1,_)
;
true
)
;
X=[_,_|Z],
setarg(2,X,Z),
( Z=[A1|_] ->
setarg(4,A1,X)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(M,G),
arg(2,D,Q),
setarg(2,D,active),
arg(3,D,P),
O is P+1,
setarg(3,D,O),
( Q==not_stored_yet ->
D=suspension(_,_,_,_,R,S,T),
term_variables(term(R,S,T),N),
'chr none_locked'(N),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',U),
V=[D|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',V),
( U=[W|_] ->
setarg(4,W,V)
;
true
),
'attach_known/1_1_$special_functor/3___3'(N,D)
;
true
),
known(F),
( D=suspension(_,active,O,_,_,_,_) ->
setarg(2,D,inactive),
'known/1_1_$special_functor/3___3__0__0__10'(L,A,B,C,D)
;
true
)
;
'known/1_1_$special_functor/3___3__0__0__10'(L,A,B,C,D)
).
'known/1_1_$special_functor/3___3__0'(A,B,C,D) :-
( var(D) ->
D=suspension(E,not_stored_yet,0,_,A,B,C),
'chr gen_id'(E)
;
true
),
'known/1_1_$special_functor/3___3__1'(A,B,C,D).
'known/1_1_$special_functor/3___3__1'(A,B,C,D) :-
( 'chr newvia'([A,B,C],F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E)
),
!,
'known/1_1_$special_functor/3___3__1__0__11'(E,A,B,C,D).
'known/1_1_$special_functor/3___3__1__0__11'([],B,C,D,A) :-
'known/1_1_$special_functor/3___3__2'(B,C,D,A).
'known/1_1_$special_functor/3___3__1__0__11'([G|M],A,B,C,D) :-
( G=suspension(_,active,_,_,E,F),
nonvar(E),
E=(H,_),
nonvar(H),
H=(\+I),
nonvar(I),
I=functor(J,K,L),
J==A,
K==B,
L==C ->
G=suspension(_,_,_,_,C1,D1),
setarg(2,G,removed),
term_variables(term(C1,D1),N),
arg(4,G,Y),
( var(Y) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',Z),
Z=[_|A1],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',A1),
( A1=[B1|_] ->
setarg(4,B1,_)
;
true
)
;
Y=[_,_|A1],
setarg(2,Y,A1),
( A1=[B1|_] ->
setarg(4,B1,Y)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(N,G),
arg(2,D,R),
setarg(2,D,active),
arg(3,D,Q),
P is Q+1,
setarg(3,D,P),
( R==not_stored_yet ->
D=suspension(_,_,_,_,S,T,U),
term_variables(term(S,T,U),O),
'chr none_locked'(O),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',V),
W=[D|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',W),
( V=[X|_] ->
setarg(4,X,W)
;
true
),
'attach_known/1_1_$special_functor/3___3'(O,D)
;
true
),
known(F),
( D=suspension(_,active,P,_,_,_,_) ->
setarg(2,D,inactive),
'known/1_1_$special_functor/3___3__1__0__11'(M,A,B,C,D)
;
true
)
;
'known/1_1_$special_functor/3___3__1__0__11'(M,A,B,C,D)
).
'known/1_1_$special_functor/3___3__1'(A,B,C,D) :-
'known/1_1_$special_functor/3___3__2'(A,B,C,D).
'known/1_1_$special_functor/3___3__2'(A,B,C,D) :-
( 'chr newvia_1'(A,F) ->
get_attr(F,guard_entailment,G),
G=v(_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E)
),
!,
'known/1_1_$special_functor/3___3__2__0__12'(E,A,B,C,D).
'known/1_1_$special_functor/3___3__2__0__12'([],B,C,D,A) :-
'known/1_1_$special_functor/3___3__3'(B,C,D,A).
'known/1_1_$special_functor/3___3__2__0__12'([F|I],A,B,C,D) :-
( F=suspension(_,active,_,_,E,_),
nonvar(E),
E=(\+G),
nonvar(G),
G=functor(H,_,_),
H==A ->
F=suspension(_,_,_,_,O,P),
setarg(2,F,removed),
term_variables(term(O,P),J),
arg(4,F,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',M),
( M=[N|_] ->
setarg(4,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(4,N,K)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(J,F),
'known/1_1_$special_functor/3___3__2__0__12'(I,A,B,C,D)
;
'known/1_1_$special_functor/3___3__2__0__12'(I,A,B,C,D)
).
'known/1_1_$special_functor/3___3__2'(A,B,C,D) :-
'known/1_1_$special_functor/3___3__3'(A,B,C,D).
'known/1_1_$special_functor/3___3__3'(_,_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(3,A,D),
C is D+1,
setarg(3,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,F,G,H),
term_variables(term(F,G,H),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',I),
J=[A|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',J),
( I=[K|_] ->
setarg(4,K,J)
;
true
),
'attach_known/1_1_$special_functor/3___3'(B,A)
;
true
).
'known/1_1_$special_\\=/2'(A,B) :-
'known/1_1_$special_\\=/2___2__0'(A,B,_).
'known/1_1_$special_\\=/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(5,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(J,C)
)
).
'known/1_1_$special_\\=/2___2__0'(_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J,K),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(D,A)
)
).
'known/1_1_$special_\\=/2___2__0'(A,B,C) :-
ground(B),
ground(A),
'chr lock'(A),
'chr lock'(B),
A=B,
'chr unlock'(A),
'chr unlock'(B),
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(D,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_\\=/2___2__0'(A,B,C) :-
B==A,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(D,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_\\=/2___2__0'(A,B,C) :-
nonvar(B),
(
var(A),
'chr lock'(B),
functor(B,D,E),
E>0,
'chr unlock'(B),
!,
( var(C) ->
true
;
C=suspension(_,C1,_,_,_,D1,E1),
setarg(2,C,removed),
( C1==not_stored_yet ->
K=[]
;
term_variables(term(D1,E1),K),
arg(5,C,Y),
( var(Y) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',Z),
Z=[_|A1],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',A1),
( A1=[B1|_] ->
setarg(5,B1,_)
;
true
)
;
Y=[_,_|A1],
setarg(2,Y,A1),
( A1=[B1|_] ->
setarg(5,B1,Y)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(K,C)
)
),
length(F,E),
B=..[D|G],
H=..[D|F],
add_args_nunif(G,F,I),
J=(\+functor(A,D,E);A=H,I),
known(J)
;
nonvar(A),
'chr lock'(A),
functor(A,L,M),
'chr unlock'(A),
!,
( var(C) ->
true
;
C=suspension(_,V,_,_,_,W,X),
setarg(2,C,removed),
( V==not_stored_yet ->
Q=[]
;
term_variables(term(W,X),Q),
arg(5,C,R),
( var(R) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',S),
S=[_|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',T),
( T=[U|_] ->
setarg(5,U,_)
;
true
)
;
R=[_,_|T],
setarg(2,R,T),
( T=[U|_] ->
setarg(5,U,R)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(Q,C)
)
),
( functor(B,L,M) ->
A=..[L|N],
B=..[L|O],
add_args_nunif(N,O,P),
known(P)
;
true
)
).
'known/1_1_$special_\\=/2___2__0'(A,B,C) :-
( var(C) ->
C=suspension(F,not_stored_yet,t,0,_,A,B),
'chr gen_id'(F)
;
true
),
(
'$novel_production'(C,182),
!,
'$extend_history'(C,182),
arg(2,C,H),
setarg(2,C,active),
arg(4,C,G),
E is G+1,
setarg(4,C,E),
( H==not_stored_yet ->
C=suspension(_,_,_,_,_,I,J),
term_variables(term(I,J),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',K),
L=[C|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',L),
( K=[M|_] ->
setarg(5,M,L)
;
true
),
'attach_known/1_1_$special_\\=/2___2'(D,C)
;
true
),
'known/1_1_$special_\\=/2'(B,A),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\=/2___2__1'(A,B,C)
;
true
)
;
'known/1_1_$special_\\=/2___2__1'(A,B,C)
).
'known/1_1_$special_\\=/2___2__1'(A,B,C) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
nonvar(E),
E=(I\=J),
I==A,
J==B,
!,
D=suspension(_,_,_,_,X),
setarg(2,D,removed),
term_variables(X,K),
arg(4,D,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V),
( V=[W|_] ->
setarg(4,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(4,W,T)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(K,D),
( var(C) ->
true
;
C=suspension(_,Q,_,_,_,R,S),
setarg(2,C,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S),L),
arg(5,C,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',O),
( O=[P|_] ->
setarg(5,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(5,P,M)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(L,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_\\=/2___2__1'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_\\=/2___2__1__0__11'(D,A,B,C).
'known/1_1_$special_\\=/2___2__1__0__11'([],B,C,A) :-
'known/1_1_$special_\\=/2___2__2'(B,C,A).
'known/1_1_$special_\\=/2___2__1__0__11'([F|J],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(\+G),
nonvar(G),
G=(H\=I),
H==A,
I==B ->
F=suspension(_,_,_,_,Y,Z),
setarg(2,F,removed),
term_variables(term(Y,Z),K),
arg(4,F,U),
( var(U) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V),
V=[_|W],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
( W=[X|_] ->
setarg(4,X,_)
;
true
)
;
U=[_,_|W],
setarg(2,U,W),
( W=[X|_] ->
setarg(4,X,U)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,F),
arg(2,C,O),
setarg(2,C,active),
arg(4,C,N),
M is N+1,
setarg(4,C,M),
( O==not_stored_yet ->
C=suspension(_,_,_,_,_,P,Q),
term_variables(term(P,Q),L),
'chr none_locked'(L),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',R),
S=[C|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',S),
( R=[T|_] ->
setarg(5,T,S)
;
true
),
'attach_known/1_1_$special_\\=/2___2'(L,C)
;
true
),
known(E),
( C=suspension(_,active,_,M,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\=/2___2__1__0__11'(J,A,B,C)
;
true
)
;
'known/1_1_$special_\\=/2___2__1__0__11'(J,A,B,C)
).
'known/1_1_$special_\\=/2___2__1'(A,B,C) :-
'known/1_1_$special_\\=/2___2__2'(A,B,C).
'known/1_1_$special_\\=/2___2__2'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_\\=/2___2__2__0__12'(D,A,B,C).
'known/1_1_$special_\\=/2___2__2__0__12'([],B,C,A) :-
'known/1_1_$special_\\=/2___2__3'(B,C,A).
'known/1_1_$special_\\=/2___2__2__0__12'([F|K],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(G,_),
nonvar(G),
G=(\+H),
nonvar(H),
H=(I\=J),
I==A,
J==B ->
F=suspension(_,_,_,_,Z,A1),
setarg(2,F,removed),
term_variables(term(Z,A1),L),
arg(4,F,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,F),
arg(2,C,P),
setarg(2,C,active),
arg(4,C,O),
N is O+1,
setarg(4,C,N),
( P==not_stored_yet ->
C=suspension(_,_,_,_,_,Q,R),
term_variables(term(Q,R),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',S),
T=[C|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',T),
( S=[U|_] ->
setarg(5,U,T)
;
true
),
'attach_known/1_1_$special_\\=/2___2'(M,C)
;
true
),
known(E),
( C=suspension(_,active,_,N,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\=/2___2__2__0__12'(K,A,B,C)
;
true
)
;
'known/1_1_$special_\\=/2___2__2__0__12'(K,A,B,C)
).
'known/1_1_$special_\\=/2___2__2'(A,B,C) :-
'known/1_1_$special_\\=/2___2__3'(A,B,C).
'known/1_1_$special_\\=/2___2__3'(_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F,G),
term_variables(term(F,G),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',H),
I=[A|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',I),
( H=[J|_] ->
setarg(5,J,I)
;
true
),
'attach_known/1_1_$special_\\=/2___2'(B,A)
;
true
).
'known/1_1_$special_=/2'(A,B) :-
'known/1_1_$special_=/2___2__0'(A,B,_).
'known/1_1_$special_=/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,E,F),
E==A,
F==B,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(4,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',M),
( M=[N|_] ->
setarg(4,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(4,N,K)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(J,C)
)
).
'known/1_1_$special_=/2___2__0'(_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,J,K),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(4,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(D,A)
)
).
'known/1_1_$special_=/2___2__0'(A,B,C) :-
B==A,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(4,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(D,C)
)
).
'known/1_1_$special_=/2___2__0'(A,B,C) :-
var(A),
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(4,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(D,C)
)
),
A=B.
'known/1_1_$special_=/2___2__0'(A,B,C) :-
var(B),
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(4,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',G),
( G=[H|_] ->
setarg(4,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(4,H,E)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(D,C)
)
),
A=B.
'known/1_1_$special_=/2___2__0'(A,B,C) :-
'chr lock'(A),
functor(A,D,E),
'chr unlock'(A),
!,
( var(C) ->
true
;
C=suspension(_,K,_,_,L,M),
setarg(2,C,removed),
( K==not_stored_yet ->
F=[]
;
term_variables(term(L,M),F),
arg(4,C,G),
( var(G) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',H),
H=[_|I],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',I),
( I=[J|_] ->
setarg(4,J,_)
;
true
)
;
G=[_,_|I],
setarg(2,G,I),
( I=[J|_] ->
setarg(4,J,G)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(F,C)
)
),
( functor(B,D,E),
A=B ->
true
;
'known/1_1_$special_fail/0'
).
'known/1_1_$special_=/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
nonvar(E),
E=(I=J),
I==A,
J==B,
!,
D=suspension(_,_,_,_,X),
setarg(2,D,removed),
term_variables(X,K),
arg(4,D,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V),
( V=[W|_] ->
setarg(4,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(4,W,T)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(K,D),
( var(C) ->
true
;
C=suspension(_,Q,_,_,R,S),
setarg(2,C,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S),L),
arg(4,C,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',O),
( O=[P|_] ->
setarg(4,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(4,P,M)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(L,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
( var(C) ->
C=suspension(G,not_stored_yet,0,_,A,B),
'chr gen_id'(G)
;
true
),
'known/1_1_$special_=/2___2__0__0__10'(D,A,B,C).
'known/1_1_$special_=/2___2__0__0__10'([],B,C,A) :-
'known/1_1_$special_=/2___2__1'(B,C,A).
'known/1_1_$special_=/2___2__0__0__10'([F|J],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(\+G),
nonvar(G),
G=(H=I),
H==A,
I==B ->
F=suspension(_,_,_,_,Y,Z),
setarg(2,F,removed),
term_variables(term(Y,Z),K),
arg(4,F,U),
( var(U) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V),
V=[_|W],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
( W=[X|_] ->
setarg(4,X,_)
;
true
)
;
U=[_,_|W],
setarg(2,U,W),
( W=[X|_] ->
setarg(4,X,U)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,F),
arg(2,C,O),
setarg(2,C,active),
arg(3,C,N),
M is N+1,
setarg(3,C,M),
( O==not_stored_yet ->
C=suspension(_,_,_,_,P,Q),
term_variables(term(P,Q),L),
'chr none_locked'(L),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',R),
S=[C|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',S),
( R=[T|_] ->
setarg(4,T,S)
;
true
),
'attach_known/1_1_$special_=/2___2'(L,C)
;
true
),
known(E),
( C=suspension(_,active,M,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=/2___2__0__0__10'(J,A,B,C)
;
true
)
;
'known/1_1_$special_=/2___2__0__0__10'(J,A,B,C)
).
'known/1_1_$special_=/2___2__0'(A,B,C) :-
( var(C) ->
C=suspension(D,not_stored_yet,0,_,A,B),
'chr gen_id'(D)
;
true
),
'known/1_1_$special_=/2___2__1'(A,B,C).
'known/1_1_$special_=/2___2__1'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_=/2___2__1__0__11'(D,A,B,C).
'known/1_1_$special_=/2___2__1__0__11'([],B,C,A) :-
'known/1_1_$special_=/2___2__2'(B,C,A).
'known/1_1_$special_=/2___2__1__0__11'([F|K],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(G,_),
nonvar(G),
G=(\+H),
nonvar(H),
H=(I=J),
I==A,
J==B ->
F=suspension(_,_,_,_,Z,A1),
setarg(2,F,removed),
term_variables(term(Z,A1),L),
arg(4,F,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,F),
arg(2,C,P),
setarg(2,C,active),
arg(3,C,O),
N is O+1,
setarg(3,C,N),
( P==not_stored_yet ->
C=suspension(_,_,_,_,Q,R),
term_variables(term(Q,R),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',S),
T=[C|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',T),
( S=[U|_] ->
setarg(4,U,T)
;
true
),
'attach_known/1_1_$special_=/2___2'(M,C)
;
true
),
known(E),
( C=suspension(_,active,N,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=/2___2__1__0__11'(K,A,B,C)
;
true
)
;
'known/1_1_$special_=/2___2__1__0__11'(K,A,B,C)
).
'known/1_1_$special_=/2___2__1'(A,B,C) :-
'known/1_1_$special_=/2___2__2'(A,B,C).
'known/1_1_$special_=/2___2__2'(_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(3,A,D),
C is D+1,
setarg(3,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,F,G),
term_variables(term(F,G),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',H),
I=[A|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',I),
( H=[J|_] ->
setarg(4,J,I)
;
true
),
'attach_known/1_1_$special_=/2___2'(B,A)
;
true
).
'known/1_1_$special_,/2'(_,_) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'known/1_1_$special_,/2'(A,B) :-
known(A),
known(B).
'known/1_1_$special_\\==/2'(A,B) :-
'known/1_1_$special_\\==/2___2__0'(A,B,_).
'known/1_1_$special_\\==/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(5,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(J,C)
)
).
'known/1_1_$special_\\==/2___2__0'(A,B,C) :-
( var(C) ->
C=suspension(F,not_stored_yet,t,0,_,A,B),
'chr gen_id'(F)
;
true
),
(
'$novel_production'(C,138),
number(A),
!,
'$extend_history'(C,138),
arg(2,C,H),
setarg(2,C,active),
arg(4,C,G),
E is G+1,
setarg(4,C,E),
( H==not_stored_yet ->
C=suspension(_,_,_,_,_,I,J),
term_variables(term(I,J),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',K),
L=[C|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',L),
( K=[M|_] ->
setarg(5,M,L)
;
true
),
'attach_known/1_1_$special_\\==/2___2'(D,C)
;
true
),
'known/1_1_$special_=\\=/2'(A,B),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\==/2___2__1'(A,B,C)
;
true
)
;
'known/1_1_$special_\\==/2___2__1'(A,B,C)
).
'known/1_1_$special_\\==/2___2__1'(A,B,C) :-
'$novel_production'(C,139),
number(B),
!,
'$extend_history'(C,139),
arg(2,C,G),
setarg(2,C,active),
arg(4,C,F),
E is F+1,
setarg(4,C,E),
( G==not_stored_yet ->
C=suspension(_,_,_,_,_,H,I),
term_variables(term(H,I),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',J),
K=[C|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',K),
( J=[L|_] ->
setarg(5,L,K)
;
true
),
'attach_known/1_1_$special_\\==/2___2'(D,C)
;
true
),
'known/1_1_$special_=\\=/2'(A,B),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\==/2___2__2'(A,B,C)
;
true
).
'known/1_1_$special_\\==/2___2__1'(A,B,C) :-
'known/1_1_$special_\\==/2___2__2'(A,B,C).
'known/1_1_$special_\\==/2___2__2'(_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J,K),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(D,A)
)
).
'known/1_1_$special_\\==/2___2__2'(A,B,C) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
nonvar(E),
E=(I\==J),
I==A,
J==B,
!,
D=suspension(_,_,_,_,X),
setarg(2,D,removed),
term_variables(X,K),
arg(4,D,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V),
( V=[W|_] ->
setarg(4,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(4,W,T)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(K,D),
( var(C) ->
true
;
C=suspension(_,Q,_,_,_,R,S),
setarg(2,C,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S),L),
arg(5,C,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',O),
( O=[P|_] ->
setarg(5,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(5,P,M)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(L,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_\\==/2___2__2'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
D=suspension(_,_,_,_,_,W,X),
setarg(2,D,removed),
term_variables(term(W,X),J),
arg(5,D,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',U),
( U=[V|_] ->
setarg(5,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(5,V,S)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(J,D),
( var(C) ->
true
;
C=suspension(_,P,_,_,_,Q,R),
setarg(2,C,removed),
( P==not_stored_yet ->
K=[]
;
term_variables(term(Q,R),K),
arg(5,C,L),
( var(L) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',M),
M=[_|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',N),
( N=[O|_] ->
setarg(5,O,_)
;
true
)
;
L=[_,_|N],
setarg(2,L,N),
( N=[O|_] ->
setarg(5,O,L)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(K,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_\\==/2___2__2'(A,B,C) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',D)
),
!,
'known/1_1_$special_\\==/2___2__2__0__9'(D,A,B,C).
'known/1_1_$special_\\==/2___2__2__0__9'([],B,C,A) :-
'known/1_1_$special_\\==/2___2__3'(B,C,A).
'known/1_1_$special_\\==/2___2__2__0__9'([F|G],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
E==B,
J=t(229,F,A),
'$novel_production'(F,J),
'$novel_production'(A,J) ->
'$extend_history'(A,J),
arg(2,A,L),
setarg(2,A,active),
arg(4,A,K),
I is K+1,
setarg(4,A,I),
( L==not_stored_yet ->
A=suspension(_,_,_,_,_,M,N),
term_variables(term(M,N),H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',O),
P=[A|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_\\==/2___2'(H,A)
;
true
),
'known/1_1_$special_\\==/2'(D,C),
( A=suspension(_,active,_,I,_,_,_) ->
setarg(2,A,inactive),
'known/1_1_$special_\\==/2___2__2__0__9'(G,B,C,A)
;
true
)
;
'known/1_1_$special_\\==/2___2__2__0__9'(G,B,C,A)
).
'known/1_1_$special_\\==/2___2__2'(A,B,C) :-
'known/1_1_$special_\\==/2___2__3'(A,B,C).
'known/1_1_$special_\\==/2___2__3'(A,B,C) :-
'$novel_production'(C,231),
!,
'$extend_history'(C,231),
arg(2,C,G),
setarg(2,C,active),
arg(4,C,F),
E is F+1,
setarg(4,C,E),
( G==not_stored_yet ->
C=suspension(_,_,_,_,_,H,I),
term_variables(term(H,I),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',J),
K=[C|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',K),
( J=[L|_] ->
setarg(5,L,K)
;
true
),
'attach_known/1_1_$special_\\==/2___2'(D,C)
;
true
),
'known/1_1_$special_\\==/2'(B,A),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\==/2___2__4'(A,B,C)
;
true
).
'known/1_1_$special_\\==/2___2__3'(A,B,C) :-
'known/1_1_$special_\\==/2___2__4'(A,B,C).
'known/1_1_$special_\\==/2___2__4'(A,B,C) :-
B==A,
'$novel_production'(C,232),
!,
'$extend_history'(C,232),
arg(2,C,G),
setarg(2,C,active),
arg(4,C,F),
E is F+1,
setarg(4,C,E),
( G==not_stored_yet ->
C=suspension(_,_,_,_,_,H,I),
term_variables(term(H,I),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',J),
K=[C|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',K),
( J=[L|_] ->
setarg(5,L,K)
;
true
),
'attach_known/1_1_$special_\\==/2___2'(D,C)
;
true
),
'known/1_1_$special_fail/0',
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\==/2___2__5'(A,B,C)
;
true
).
'known/1_1_$special_\\==/2___2__4'(A,B,C) :-
'known/1_1_$special_\\==/2___2__5'(A,B,C).
'known/1_1_$special_\\==/2___2__5'(A,B,C) :-
nonvar(B),
nonvar(A),
'chr lock'(A),
functor(A,D,E),
'chr unlock'(A),
!,
( var(C) ->
true
;
C=suspension(_,N,_,_,_,O,P),
setarg(2,C,removed),
( N==not_stored_yet ->
I=[]
;
term_variables(term(O,P),I),
arg(5,C,J),
( var(J) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',K),
K=[_|L],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',L),
( L=[M|_] ->
setarg(5,M,_)
;
true
)
;
J=[_,_|L],
setarg(2,J,L),
( L=[M|_] ->
setarg(5,M,J)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(I,C)
)
),
( functor(B,D,E) ->
A=..[D|F],
B=..[D|G],
add_args_nmatch(F,G,H),
known(H)
;
true
).
'known/1_1_$special_\\==/2___2__5'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_\\==/2___2__5__0__13'(D,A,B,C).
'known/1_1_$special_\\==/2___2__5__0__13'([],B,C,A) :-
'known/1_1_$special_\\==/2___2__6'(B,C,A).
'known/1_1_$special_\\==/2___2__5__0__13'([F|J],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(\+G),
nonvar(G),
G=(H\==I),
H==A,
I==B ->
F=suspension(_,_,_,_,Y,Z),
setarg(2,F,removed),
term_variables(term(Y,Z),K),
arg(4,F,U),
( var(U) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V),
V=[_|W],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
( W=[X|_] ->
setarg(4,X,_)
;
true
)
;
U=[_,_|W],
setarg(2,U,W),
( W=[X|_] ->
setarg(4,X,U)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,F),
arg(2,C,O),
setarg(2,C,active),
arg(4,C,N),
M is N+1,
setarg(4,C,M),
( O==not_stored_yet ->
C=suspension(_,_,_,_,_,P,Q),
term_variables(term(P,Q),L),
'chr none_locked'(L),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',R),
S=[C|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',S),
( R=[T|_] ->
setarg(5,T,S)
;
true
),
'attach_known/1_1_$special_\\==/2___2'(L,C)
;
true
),
known(E),
( C=suspension(_,active,_,M,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\==/2___2__5__0__13'(J,A,B,C)
;
true
)
;
'known/1_1_$special_\\==/2___2__5__0__13'(J,A,B,C)
).
'known/1_1_$special_\\==/2___2__5'(A,B,C) :-
'known/1_1_$special_\\==/2___2__6'(A,B,C).
'known/1_1_$special_\\==/2___2__6'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_\\==/2___2__6__0__14'(D,A,B,C).
'known/1_1_$special_\\==/2___2__6__0__14'([],B,C,A) :-
'known/1_1_$special_\\==/2___2__7'(B,C,A).
'known/1_1_$special_\\==/2___2__6__0__14'([F|K],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(G,_),
nonvar(G),
G=(\+H),
nonvar(H),
H=(I\==J),
I==A,
J==B ->
F=suspension(_,_,_,_,Z,A1),
setarg(2,F,removed),
term_variables(term(Z,A1),L),
arg(4,F,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,F),
arg(2,C,P),
setarg(2,C,active),
arg(4,C,O),
N is O+1,
setarg(4,C,N),
( P==not_stored_yet ->
C=suspension(_,_,_,_,_,Q,R),
term_variables(term(Q,R),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',S),
T=[C|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',T),
( S=[U|_] ->
setarg(5,U,T)
;
true
),
'attach_known/1_1_$special_\\==/2___2'(M,C)
;
true
),
known(E),
( C=suspension(_,active,_,N,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_\\==/2___2__6__0__14'(K,A,B,C)
;
true
)
;
'known/1_1_$special_\\==/2___2__6__0__14'(K,A,B,C)
).
'known/1_1_$special_\\==/2___2__6'(A,B,C) :-
'known/1_1_$special_\\==/2___2__7'(A,B,C).
'known/1_1_$special_\\==/2___2__7'(_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F,G),
term_variables(term(F,G),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',H),
I=[A|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',I),
( H=[J|_] ->
setarg(5,J,I)
;
true
),
'attach_known/1_1_$special_\\==/2___2'(B,A)
;
true
).
'known/1_1_$special_==/2'(A,B) :-
'known/1_1_$special_==/2___2__0'(A,B,_).
'known/1_1_$special_==/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(5,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(J,C)
)
).
'known/1_1_$special_==/2___2__0'(A,B,C) :-
( var(C) ->
C=suspension(F,not_stored_yet,t,0,_,A,B),
'chr gen_id'(F)
;
true
),
(
'$novel_production'(C,136),
number(A),
!,
'$extend_history'(C,136),
arg(2,C,H),
setarg(2,C,active),
arg(4,C,G),
E is G+1,
setarg(4,C,E),
( H==not_stored_yet ->
C=suspension(_,_,_,_,_,I,J),
term_variables(term(I,J),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',K),
L=[C|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',L),
( K=[M|_] ->
setarg(5,M,L)
;
true
),
'attach_known/1_1_$special_==/2___2'(D,C)
;
true
),
'known/1_1_$special_=:=/2'(A,B),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_==/2___2__1'(A,B,C)
;
true
)
;
'known/1_1_$special_==/2___2__1'(A,B,C)
).
'known/1_1_$special_==/2___2__1'(A,B,C) :-
'$novel_production'(C,137),
number(B),
!,
'$extend_history'(C,137),
arg(2,C,G),
setarg(2,C,active),
arg(4,C,F),
E is F+1,
setarg(4,C,E),
( G==not_stored_yet ->
C=suspension(_,_,_,_,_,H,I),
term_variables(term(H,I),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',J),
K=[C|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',K),
( J=[L|_] ->
setarg(5,L,K)
;
true
),
'attach_known/1_1_$special_==/2___2'(D,C)
;
true
),
'known/1_1_$special_=:=/2'(A,B),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_==/2___2__2'(A,B,C)
;
true
).
'known/1_1_$special_==/2___2__1'(A,B,C) :-
'known/1_1_$special_==/2___2__2'(A,B,C).
'known/1_1_$special_==/2___2__2'(_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J,K),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(D,A)
)
).
'known/1_1_$special_==/2___2__2'(A,B,C) :-
B==A,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(D,C)
)
).
'known/1_1_$special_==/2___2__2'(A,B,C) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
nonvar(E),
E=(I==J),
I==A,
J==B,
!,
D=suspension(_,_,_,_,X),
setarg(2,D,removed),
term_variables(X,K),
arg(4,D,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V),
( V=[W|_] ->
setarg(4,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(4,W,T)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(K,D),
( var(C) ->
true
;
C=suspension(_,Q,_,_,_,R,S),
setarg(2,C,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S),L),
arg(5,C,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',O),
( O=[P|_] ->
setarg(5,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(5,P,M)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(L,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_==/2___2__2'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
D=suspension(_,_,_,_,_,W,X),
setarg(2,D,removed),
term_variables(term(W,X),J),
arg(5,D,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',U),
( U=[V|_] ->
setarg(5,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(5,V,S)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(J,D),
( var(C) ->
true
;
C=suspension(_,P,_,_,_,Q,R),
setarg(2,C,removed),
( P==not_stored_yet ->
K=[]
;
term_variables(term(Q,R),K),
arg(5,C,L),
( var(L) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',M),
M=[_|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',N),
( N=[O|_] ->
setarg(5,O,_)
;
true
)
;
L=[_,_|N],
setarg(2,L,N),
( N=[O|_] ->
setarg(5,O,L)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(K,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_==/2___2__2'(A,B,C) :-
( 'chr newvia_1'(B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',D)
),
!,
'known/1_1_$special_==/2___2__2__0__10'(D,A,B,C).
'known/1_1_$special_==/2___2__2__0__10'([],B,C,A) :-
'known/1_1_$special_==/2___2__3'(B,C,A).
'known/1_1_$special_==/2___2__2__0__10'([F|G],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
D==C,
J=t(228,A,F),
'$novel_production'(A,J),
'$novel_production'(F,J) ->
'$extend_history'(A,J),
arg(2,A,L),
setarg(2,A,active),
arg(4,A,K),
I is K+1,
setarg(4,A,I),
( L==not_stored_yet ->
A=suspension(_,_,_,_,_,M,N),
term_variables(term(M,N),H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',O),
P=[A|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_==/2___2'(H,A)
;
true
),
'known/1_1_$special_==/2'(B,E),
( A=suspension(_,active,_,I,_,_,_) ->
setarg(2,A,inactive),
'known/1_1_$special_==/2___2__2__0__10'(G,B,C,A)
;
true
)
;
'known/1_1_$special_==/2___2__2__0__10'(G,B,C,A)
).
'known/1_1_$special_==/2___2__2'(A,B,C) :-
'known/1_1_$special_==/2___2__3'(A,B,C).
'known/1_1_$special_==/2___2__3'(A,B,C) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',D)
),
!,
'known/1_1_$special_==/2___2__3__0__11'(D,A,B,C).
'known/1_1_$special_==/2___2__3__0__11'([],B,C,A) :-
'known/1_1_$special_==/2___2__4'(B,C,A).
'known/1_1_$special_==/2___2__3__0__11'([F|G],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
E==B,
J=t(228,F,A),
'$novel_production'(F,J),
'$novel_production'(A,J) ->
'$extend_history'(A,J),
arg(2,A,L),
setarg(2,A,active),
arg(4,A,K),
I is K+1,
setarg(4,A,I),
( L==not_stored_yet ->
A=suspension(_,_,_,_,_,M,N),
term_variables(term(M,N),H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',O),
P=[A|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_==/2___2'(H,A)
;
true
),
'known/1_1_$special_==/2'(D,C),
( A=suspension(_,active,_,I,_,_,_) ->
setarg(2,A,inactive),
'known/1_1_$special_==/2___2__3__0__11'(G,B,C,A)
;
true
)
;
'known/1_1_$special_==/2___2__3__0__11'(G,B,C,A)
).
'known/1_1_$special_==/2___2__3'(A,B,C) :-
'known/1_1_$special_==/2___2__4'(A,B,C).
'known/1_1_$special_==/2___2__4'(A,B,C) :-
( 'chr newvia_1'(B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',D)
),
!,
'known/1_1_$special_==/2___2__4__0__12'(D,A,B,C).
'known/1_1_$special_==/2___2__4__0__12'([],B,C,A) :-
'known/1_1_$special_==/2___2__5'(B,C,A).
'known/1_1_$special_==/2___2__4__0__12'([F|G],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
D==C,
J=t(229,A,F),
'$novel_production'(A,J),
'$novel_production'(F,J) ->
'$extend_history'(A,J),
arg(2,A,L),
setarg(2,A,active),
arg(4,A,K),
I is K+1,
setarg(4,A,I),
( L==not_stored_yet ->
A=suspension(_,_,_,_,_,M,N),
term_variables(term(M,N),H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',O),
P=[A|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_==/2___2'(H,A)
;
true
),
'known/1_1_$special_\\==/2'(B,E),
( A=suspension(_,active,_,I,_,_,_) ->
setarg(2,A,inactive),
'known/1_1_$special_==/2___2__4__0__12'(G,B,C,A)
;
true
)
;
'known/1_1_$special_==/2___2__4__0__12'(G,B,C,A)
).
'known/1_1_$special_==/2___2__4'(A,B,C) :-
'known/1_1_$special_==/2___2__5'(A,B,C).
'known/1_1_$special_==/2___2__5'(A,B,C) :-
'$novel_production'(C,230),
!,
'$extend_history'(C,230),
arg(2,C,G),
setarg(2,C,active),
arg(4,C,F),
E is F+1,
setarg(4,C,E),
( G==not_stored_yet ->
C=suspension(_,_,_,_,_,H,I),
term_variables(term(H,I),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',J),
K=[C|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',K),
( J=[L|_] ->
setarg(5,L,K)
;
true
),
'attach_known/1_1_$special_==/2___2'(D,C)
;
true
),
'known/1_1_$special_==/2'(B,A),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_==/2___2__6'(A,B,C)
;
true
).
'known/1_1_$special_==/2___2__5'(A,B,C) :-
'known/1_1_$special_==/2___2__6'(A,B,C).
'known/1_1_$special_==/2___2__6'(A,B,C) :-
'$novel_production'(C,234),
!,
'$extend_history'(C,234),
arg(2,C,G),
setarg(2,C,active),
arg(4,C,F),
E is F+1,
setarg(4,C,E),
( G==not_stored_yet ->
C=suspension(_,_,_,_,_,H,I),
term_variables(term(H,I),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',J),
K=[C|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',K),
( J=[L|_] ->
setarg(5,L,K)
;
true
),
'attach_known/1_1_$special_==/2___2'(D,C)
;
true
),
'known/1_1_$special_=/2'(A,B),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_==/2___2__7'(A,B,C)
;
true
).
'known/1_1_$special_==/2___2__6'(A,B,C) :-
'known/1_1_$special_==/2___2__7'(A,B,C).
'known/1_1_$special_==/2___2__7'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_==/2___2__7__0__15'(D,A,B,C).
'known/1_1_$special_==/2___2__7__0__15'([],B,C,A) :-
'known/1_1_$special_==/2___2__8'(B,C,A).
'known/1_1_$special_==/2___2__7__0__15'([F|J],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(\+G),
nonvar(G),
G=(H==I),
H==A,
I==B ->
F=suspension(_,_,_,_,Y,Z),
setarg(2,F,removed),
term_variables(term(Y,Z),K),
arg(4,F,U),
( var(U) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V),
V=[_|W],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
( W=[X|_] ->
setarg(4,X,_)
;
true
)
;
U=[_,_|W],
setarg(2,U,W),
( W=[X|_] ->
setarg(4,X,U)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,F),
arg(2,C,O),
setarg(2,C,active),
arg(4,C,N),
M is N+1,
setarg(4,C,M),
( O==not_stored_yet ->
C=suspension(_,_,_,_,_,P,Q),
term_variables(term(P,Q),L),
'chr none_locked'(L),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',R),
S=[C|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',S),
( R=[T|_] ->
setarg(5,T,S)
;
true
),
'attach_known/1_1_$special_==/2___2'(L,C)
;
true
),
known(E),
( C=suspension(_,active,_,M,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_==/2___2__7__0__15'(J,A,B,C)
;
true
)
;
'known/1_1_$special_==/2___2__7__0__15'(J,A,B,C)
).
'known/1_1_$special_==/2___2__7'(A,B,C) :-
'known/1_1_$special_==/2___2__8'(A,B,C).
'known/1_1_$special_==/2___2__8'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_==/2___2__8__0__16'(D,A,B,C).
'known/1_1_$special_==/2___2__8__0__16'([],B,C,A) :-
'known/1_1_$special_==/2___2__9'(B,C,A).
'known/1_1_$special_==/2___2__8__0__16'([F|K],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(G,_),
nonvar(G),
G=(\+H),
nonvar(H),
H=(I==J),
I==A,
J==B ->
F=suspension(_,_,_,_,Z,A1),
setarg(2,F,removed),
term_variables(term(Z,A1),L),
arg(4,F,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,F),
arg(2,C,P),
setarg(2,C,active),
arg(4,C,O),
N is O+1,
setarg(4,C,N),
( P==not_stored_yet ->
C=suspension(_,_,_,_,_,Q,R),
term_variables(term(Q,R),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',S),
T=[C|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',T),
( S=[U|_] ->
setarg(5,U,T)
;
true
),
'attach_known/1_1_$special_==/2___2'(M,C)
;
true
),
known(E),
( C=suspension(_,active,_,N,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_==/2___2__8__0__16'(K,A,B,C)
;
true
)
;
'known/1_1_$special_==/2___2__8__0__16'(K,A,B,C)
).
'known/1_1_$special_==/2___2__8'(A,B,C) :-
'known/1_1_$special_==/2___2__9'(A,B,C).
'known/1_1_$special_==/2___2__9'(_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F,G),
term_variables(term(F,G),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',H),
I=[A|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',I),
( H=[J|_] ->
setarg(5,J,I)
;
true
),
'attach_known/1_1_$special_==/2___2'(B,A)
;
true
).
'known/1_1_$special_is/2'(A,B) :-
'known/1_1_$special_=:=/2'(A,B).
'known/1_1_$special_</2'(A,B) :-
'known/1_1_$special_=</2'(A,B),
'known/1_1_$special_=\\=/2'(A,B).
'known/1_1_$special_>=/2'(A,B) :-
'known/1_1_$special_=</2'(B,A).
'known/1_1_$special_>/2'(A,B) :-
'known/1_1_$special_</2'(B,A).
'known/1_1_$special_=</2'(A,B) :-
'known/1_1_$special_=</2___2__0'(A,B,_).
'known/1_1_$special_=</2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(5,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(J,C)
)
).
'known/1_1_$special_=</2___2__0'(_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J,K),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(D,A)
)
).
'known/1_1_$special_=</2___2__0'(A,B,C) :-
B==A,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(D,C)
)
).
'known/1_1_$special_=</2___2__0'(A,B,C) :-
number(B),
(
number(A),
A>B,
!,
( var(C) ->
true
;
C=suspension(_,W,_,_,_,X,Y),
setarg(2,C,removed),
( W==not_stored_yet ->
D=[]
;
term_variables(term(X,Y),D),
arg(5,C,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',U),
( U=[V|_] ->
setarg(5,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(5,V,S)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(D,C)
)
),
'known/1_1_$special_fail/0'
;
( 'chr newvia_1'(A,I) ->
get_attr(I,guard_entailment,J),
J=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,H,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',H)
),
'chr sbag_member'(E,H),
E=suspension(_,active,_,_,_,F,G),
F==A,
number(G),
G=<B,
!,
( var(C) ->
true
;
C=suspension(_,P,_,_,_,Q,R),
setarg(2,C,removed),
( P==not_stored_yet ->
K=[]
;
term_variables(term(Q,R),K),
arg(5,C,L),
( var(L) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',M),
M=[_|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',N),
( N=[O|_] ->
setarg(5,O,_)
;
true
)
;
L=[_,_|N],
setarg(2,L,N),
( N=[O|_] ->
setarg(5,O,L)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(K,C)
)
)
).
'known/1_1_$special_=</2___2__0'(A,B,C) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',D)
),
!,
'known/1_1_$special_=</2___2__0__0__12'(D,A,B,C).
'known/1_1_$special_=</2___2__0__0__12'([],B,C,A) :-
'known/1_1_$special_=</2___2__1'(B,C,A).
'known/1_1_$special_=</2___2__0__0__12'([F|G],A,B,C) :-
( F=suspension(_,active,_,_,_,D,E),
D==A,
number(E),
number(B),
B=<E ->
F=suspension(_,_,_,_,_,M,N),
setarg(2,F,removed),
term_variables(term(M,N),H),
arg(5,F,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(H,F),
'known/1_1_$special_=</2___2__0__0__12'(G,A,B,C)
;
'known/1_1_$special_=</2___2__0__0__12'(G,A,B,C)
).
'known/1_1_$special_=</2___2__0'(A,B,C) :-
'known/1_1_$special_=</2___2__1'(A,B,C).
'known/1_1_$special_=</2___2__1'(A,B,C) :-
number(A),
( 'chr newvia_1'(B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
F==B,
number(E),
A=<E,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(5,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(J,C)
)
).
'known/1_1_$special_=</2___2__1'(A,B,C) :-
( 'chr newvia_1'(B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',D)
),
!,
'known/1_1_$special_=</2___2__1__0__14'(D,A,B,C).
'known/1_1_$special_=</2___2__1__0__14'([],B,C,A) :-
'known/1_1_$special_=</2___2__2'(B,C,A).
'known/1_1_$special_=</2___2__1__0__14'([F|G],A,B,C) :-
( F=suspension(_,active,_,_,_,D,E),
E==B,
number(A),
number(D),
D=<A ->
F=suspension(_,_,_,_,_,M,N),
setarg(2,F,removed),
term_variables(term(M,N),H),
arg(5,F,I),
( var(I) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',J),
J=[_|K],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',K),
( K=[L|_] ->
setarg(5,L,_)
;
true
)
;
I=[_,_|K],
setarg(2,I,K),
( K=[L|_] ->
setarg(5,L,I)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(H,F),
'known/1_1_$special_=</2___2__1__0__14'(G,A,B,C)
;
'known/1_1_$special_=</2___2__1__0__14'(G,A,B,C)
).
'known/1_1_$special_=</2___2__1'(A,B,C) :-
'known/1_1_$special_=</2___2__2'(A,B,C).
'known/1_1_$special_=</2___2__2'(A,B,C) :-
( 'chr newvia_2'(B,A,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==B,
F==A,
!,
D=suspension(_,_,_,_,_,W,X),
setarg(2,D,removed),
term_variables(term(W,X),J),
arg(5,D,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',U),
( U=[V|_] ->
setarg(5,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(5,V,S)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(J,D),
( var(C) ->
true
;
C=suspension(_,P,_,_,_,Q,R),
setarg(2,C,removed),
( P==not_stored_yet ->
K=[]
;
term_variables(term(Q,R),K),
arg(5,C,L),
( var(L) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',M),
M=[_|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',N),
( N=[O|_] ->
setarg(5,O,_)
;
true
)
;
L=[_,_|N],
setarg(2,L,N),
( N=[O|_] ->
setarg(5,O,L)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(K,C)
)
),
'known/1_1_$special_=:=/2'(A,B).
'known/1_1_$special_=</2___2__2'(A,B,C) :-
( 'chr newvia_1'(B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',D)
),
!,
( var(C) ->
C=suspension(G,not_stored_yet,t,0,_,A,B),
'chr gen_id'(G)
;
true
),
'known/1_1_$special_=</2___2__2__0__17'(D,A,B,C).
'known/1_1_$special_=</2___2__2__0__17'([],B,C,A) :-
'known/1_1_$special_=</2___2__3'(B,C,A).
'known/1_1_$special_=</2___2__2__0__17'([F|G],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
D==C,
J=t(187,A,F),
'$novel_production'(A,J),
'$novel_production'(F,J) ->
'$extend_history'(A,J),
arg(2,A,L),
setarg(2,A,active),
arg(4,A,K),
I is K+1,
setarg(4,A,I),
( L==not_stored_yet ->
A=suspension(_,_,_,_,_,M,N),
term_variables(term(M,N),H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',O),
P=[A|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_=</2___2'(H,A)
;
true
),
'known/1_1_$special_=</2'(B,E),
( A=suspension(_,active,_,I,_,_,_) ->
setarg(2,A,inactive),
'known/1_1_$special_=</2___2__2__0__17'(G,B,C,A)
;
true
)
;
'known/1_1_$special_=</2___2__2__0__17'(G,B,C,A)
).
'known/1_1_$special_=</2___2__2'(A,B,C) :-
( var(C) ->
C=suspension(D,not_stored_yet,t,0,_,A,B),
'chr gen_id'(D)
;
true
),
'known/1_1_$special_=</2___2__3'(A,B,C).
'known/1_1_$special_=</2___2__3'(A,B,C) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',D)
),
!,
'known/1_1_$special_=</2___2__3__0__18'(D,A,B,C).
'known/1_1_$special_=</2___2__3__0__18'([],B,C,A) :-
'known/1_1_$special_=</2___2__4'(B,C,A).
'known/1_1_$special_=</2___2__3__0__18'([F|G],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
E==B,
J=t(187,F,A),
'$novel_production'(F,J),
'$novel_production'(A,J) ->
'$extend_history'(A,J),
arg(2,A,L),
setarg(2,A,active),
arg(4,A,K),
I is K+1,
setarg(4,A,I),
( L==not_stored_yet ->
A=suspension(_,_,_,_,_,M,N),
term_variables(term(M,N),H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',O),
P=[A|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_=</2___2'(H,A)
;
true
),
'known/1_1_$special_=</2'(D,C),
( A=suspension(_,active,_,I,_,_,_) ->
setarg(2,A,inactive),
'known/1_1_$special_=</2___2__3__0__18'(G,B,C,A)
;
true
)
;
'known/1_1_$special_=</2___2__3__0__18'(G,B,C,A)
).
'known/1_1_$special_=</2___2__3'(A,B,C) :-
'known/1_1_$special_=</2___2__4'(A,B,C).
'known/1_1_$special_=</2___2__4'(A,B,C) :-
( 'chr newvia_1'(B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,D,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',D)
),
!,
'known/1_1_$special_=</2___2__4__0__19'(D,A,B,C).
'known/1_1_$special_=</2___2__4__0__19'([],B,C,A) :-
'known/1_1_$special_=</2___2__5'(B,C,A).
'known/1_1_$special_=</2___2__4__0__19'([F|J],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
D==C,
( 'chr newvia_2'(C,E,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',G)
) ->
'known/1_1_$special_=</2___2__4__1__19'(G,E,F,J,B,C,A)
;
'known/1_1_$special_=</2___2__4__0__19'(J,B,C,A)
).
'known/1_1_$special_=</2___2__4__1__19'([],_,_,A,C,D,B) :-
'known/1_1_$special_=</2___2__4__0__19'(A,C,D,B).
'known/1_1_$special_=</2___2__4__1__19'([I|M],F,A,B,D,E,C) :-
( I=suspension(_,active,_,_,_,G,H),
G==E,
H==F,
( 'chr newvia_2'(D,E,K) ->
get_attr(K,guard_entailment,L),
L=v(_,_,_,_,_,_,_,_,_,_,_,_,_,J,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',J)
) ->
'known/1_1_$special_=</2___2__4__2__19'(J,I,M,F,A,B,D,E,C)
;
'known/1_1_$special_=</2___2__4__1__19'(M,F,A,B,D,E,C)
).
'known/1_1_$special_=</2___2__4__2__19'([],_,A,G,B,C,E,F,D) :-
'known/1_1_$special_=</2___2__4__1__19'(A,G,B,C,E,F,D).
'known/1_1_$special_=</2___2__4__2__19'([K|L],A,B,H,C,D,F,G,E) :-
( K=suspension(_,active,_,_,_,I,J),
K\==C,
I==F,
J==G,
O=t(188,E,K,A,C),
'$novel_production'(E,O),
'$novel_production'(K,O),
'$novel_production'(A,O),
'$novel_production'(C,O) ->
'$extend_history'(E,O),
arg(2,E,Q),
setarg(2,E,active),
arg(4,E,P),
N is P+1,
setarg(4,E,N),
( Q==not_stored_yet ->
E=suspension(_,_,_,_,_,R,S),
term_variables(term(R,S),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',T),
U=[E|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',U),
( T=[V|_] ->
setarg(5,V,U)
;
true
),
'attach_known/1_1_$special_=</2___2'(M,E)
;
true
),
'known/1_1_$special_=\\=/2'(F,H),
( E=suspension(_,active,_,N,_,_,_) ->
setarg(2,E,inactive),
'known/1_1_$special_=</2___2__4__2__19'(L,A,B,H,C,D,F,G,E)
;
true
)
;
'known/1_1_$special_=</2___2__4__2__19'(L,A,B,H,C,D,F,G,E)
).
'known/1_1_$special_=</2___2__4'(A,B,C) :-
'known/1_1_$special_=</2___2__5'(A,B,C).
'known/1_1_$special_=</2___2__5'(A,B,C) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',D)
),
!,
'known/1_1_$special_=</2___2__5__0__20'(D,A,B,C).
'known/1_1_$special_=</2___2__5__0__20'([],B,C,A) :-
'known/1_1_$special_=</2___2__6'(B,C,A).
'known/1_1_$special_=</2___2__5__0__20'([F|J],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
E==B,
( 'chr newvia_2'(B,C,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',G)
) ->
'known/1_1_$special_=</2___2__5__1__20'(G,D,F,J,B,C,A)
;
'known/1_1_$special_=</2___2__5__0__20'(J,B,C,A)
).
'known/1_1_$special_=</2___2__5__1__20'([],_,_,A,C,D,B) :-
'known/1_1_$special_=</2___2__5__0__20'(A,C,D,B).
'known/1_1_$special_=</2___2__5__1__20'([I|M],F,A,B,D,E,C) :-
( I=suspension(_,active,_,_,_,G,H),
G==D,
H==E,
( 'chr newvia_2'(F,D,K) ->
get_attr(K,guard_entailment,L),
L=v(_,_,_,_,_,_,_,_,_,_,_,_,_,J,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',J)
) ->
'known/1_1_$special_=</2___2__5__2__20'(J,I,M,F,A,B,D,E,C)
;
'known/1_1_$special_=</2___2__5__1__20'(M,F,A,B,D,E,C)
).
'known/1_1_$special_=</2___2__5__2__20'([],_,A,G,B,C,E,F,D) :-
'known/1_1_$special_=</2___2__5__1__20'(A,G,B,C,E,F,D).
'known/1_1_$special_=</2___2__5__2__20'([K|L],A,B,H,C,D,F,G,E) :-
( K=suspension(_,active,_,_,_,I,J),
K\==A,
I==H,
J==F,
O=t(188,C,K,E,A),
'$novel_production'(C,O),
'$novel_production'(K,O),
'$novel_production'(E,O),
'$novel_production'(A,O) ->
'$extend_history'(E,O),
arg(2,E,Q),
setarg(2,E,active),
arg(4,E,P),
N is P+1,
setarg(4,E,N),
( Q==not_stored_yet ->
E=suspension(_,_,_,_,_,R,S),
term_variables(term(R,S),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',T),
U=[E|T],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',U),
( T=[V|_] ->
setarg(5,V,U)
;
true
),
'attach_known/1_1_$special_=</2___2'(M,E)
;
true
),
'known/1_1_$special_=\\=/2'(H,G),
( E=suspension(_,active,_,N,_,_,_) ->
setarg(2,E,inactive),
'known/1_1_$special_=</2___2__5__2__20'(L,A,B,H,C,D,F,G,E)
;
true
)
;
'known/1_1_$special_=</2___2__5__2__20'(L,A,B,H,C,D,F,G,E)
).
'known/1_1_$special_=</2___2__5'(A,B,C) :-
'known/1_1_$special_=</2___2__6'(A,B,C).
'known/1_1_$special_=</2___2__6'(A,B,C) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
nonvar(E),
E=(I=<J),
I==A,
J==B,
!,
D=suspension(_,_,_,_,X),
setarg(2,D,removed),
term_variables(X,K),
arg(4,D,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V),
( V=[W|_] ->
setarg(4,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(4,W,T)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(K,D),
( var(C) ->
true
;
C=suspension(_,Q,_,_,_,R,S),
setarg(2,C,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S),L),
arg(5,C,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',O),
( O=[P|_] ->
setarg(5,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(5,P,M)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(L,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=</2___2__6'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_=</2___2__6__0__22'(D,A,B,C).
'known/1_1_$special_=</2___2__6__0__22'([],B,C,A) :-
'known/1_1_$special_=</2___2__7'(B,C,A).
'known/1_1_$special_=</2___2__6__0__22'([F|J],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(\+G),
nonvar(G),
G=(H=<I),
H==A,
I==B ->
F=suspension(_,_,_,_,Y,Z),
setarg(2,F,removed),
term_variables(term(Y,Z),K),
arg(4,F,U),
( var(U) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V),
V=[_|W],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
( W=[X|_] ->
setarg(4,X,_)
;
true
)
;
U=[_,_|W],
setarg(2,U,W),
( W=[X|_] ->
setarg(4,X,U)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,F),
arg(2,C,O),
setarg(2,C,active),
arg(4,C,N),
M is N+1,
setarg(4,C,M),
( O==not_stored_yet ->
C=suspension(_,_,_,_,_,P,Q),
term_variables(term(P,Q),L),
'chr none_locked'(L),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',R),
S=[C|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',S),
( R=[T|_] ->
setarg(5,T,S)
;
true
),
'attach_known/1_1_$special_=</2___2'(L,C)
;
true
),
known(E),
( C=suspension(_,active,_,M,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=</2___2__6__0__22'(J,A,B,C)
;
true
)
;
'known/1_1_$special_=</2___2__6__0__22'(J,A,B,C)
).
'known/1_1_$special_=</2___2__6'(A,B,C) :-
'known/1_1_$special_=</2___2__7'(A,B,C).
'known/1_1_$special_=</2___2__7'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_=</2___2__7__0__23'(D,A,B,C).
'known/1_1_$special_=</2___2__7__0__23'([],B,C,A) :-
'known/1_1_$special_=</2___2__8'(B,C,A).
'known/1_1_$special_=</2___2__7__0__23'([F|K],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(G,_),
nonvar(G),
G=(\+H),
nonvar(H),
H=(I=<J),
I==A,
J==B ->
F=suspension(_,_,_,_,Z,A1),
setarg(2,F,removed),
term_variables(term(Z,A1),L),
arg(4,F,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,F),
arg(2,C,P),
setarg(2,C,active),
arg(4,C,O),
N is O+1,
setarg(4,C,N),
( P==not_stored_yet ->
C=suspension(_,_,_,_,_,Q,R),
term_variables(term(Q,R),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',S),
T=[C|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',T),
( S=[U|_] ->
setarg(5,U,T)
;
true
),
'attach_known/1_1_$special_=</2___2'(M,C)
;
true
),
known(E),
( C=suspension(_,active,_,N,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=</2___2__7__0__23'(K,A,B,C)
;
true
)
;
'known/1_1_$special_=</2___2__7__0__23'(K,A,B,C)
).
'known/1_1_$special_=</2___2__7'(A,B,C) :-
'known/1_1_$special_=</2___2__8'(A,B,C).
'known/1_1_$special_=</2___2__8'(_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F,G),
term_variables(term(F,G),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',H),
I=[A|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',I),
( H=[J|_] ->
setarg(5,J,I)
;
true
),
'attach_known/1_1_$special_=</2___2'(B,A)
;
true
).
'known/1_1_$special_=:=/2'(A,B) :-
'known/1_1_$special_=:=/2___2__0'(A,B,_).
'known/1_1_$special_=:=/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,G)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
( var(C) ->
true
;
C=suspension(_,O,_,_,_,P,Q),
setarg(2,C,removed),
( O==not_stored_yet ->
J=[]
;
term_variables(term(P,Q),J),
arg(5,C,K),
( var(K) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',L),
L=[_|M],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',M),
( M=[N|_] ->
setarg(5,N,_)
;
true
)
;
K=[_,_|M],
setarg(2,K,M),
( M=[N|_] ->
setarg(5,N,K)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(J,C)
)
).
'known/1_1_$special_=:=/2___2__0'(_,_,A) :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
'chr sbag_member'(B,C),
B=suspension(_,active,_),
!,
( var(A) ->
true
;
A=suspension(_,I,_,_,_,J,K),
setarg(2,A,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,A,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(D,A)
)
).
'known/1_1_$special_=:=/2___2__0'(A,B,C) :-
B==A,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(D,C)
)
).
'known/1_1_$special_=:=/2___2__0'(A,B,C) :-
number(B),
number(A),
A=\=B,
!,
( var(C) ->
true
;
C=suspension(_,I,_,_,_,J,K),
setarg(2,C,removed),
( I==not_stored_yet ->
D=[]
;
term_variables(term(J,K),D),
arg(5,C,E),
( var(E) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F),
F=[_|G],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',G),
( G=[H|_] ->
setarg(5,H,_)
;
true
)
;
E=[_,_|G],
setarg(2,E,G),
( G=[H|_] ->
setarg(5,H,E)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(D,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=:=/2___2__0'(A,B,C) :-
( 'chr newvia_2'(A,B,H) ->
get_attr(H,guard_entailment,I),
I=v(_,_,_,_,_,_,_,_,_,_,_,_,_,G,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',G)
),
'chr sbag_member'(D,G),
D=suspension(_,active,_,_,_,E,F),
E==A,
F==B,
!,
D=suspension(_,_,_,_,_,W,X),
setarg(2,D,removed),
term_variables(term(W,X),J),
arg(5,D,S),
( var(S) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',T),
T=[_|U],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',U),
( U=[V|_] ->
setarg(5,V,_)
;
true
)
;
S=[_,_|U],
setarg(2,S,U),
( U=[V|_] ->
setarg(5,V,S)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(J,D),
( var(C) ->
true
;
C=suspension(_,P,_,_,_,Q,R),
setarg(2,C,removed),
( P==not_stored_yet ->
K=[]
;
term_variables(term(Q,R),K),
arg(5,C,L),
( var(L) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',M),
M=[_|N],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',N),
( N=[O|_] ->
setarg(5,O,_)
;
true
)
;
L=[_,_|N],
setarg(2,L,N),
( N=[O|_] ->
setarg(5,O,L)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(K,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=:=/2___2__0'(A,B,C) :-
( 'chr newvia_1'(B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',D)
),
!,
( var(C) ->
C=suspension(G,not_stored_yet,t,0,_,A,B),
'chr gen_id'(G)
;
true
),
'known/1_1_$special_=:=/2___2__0__0__11'(D,A,B,C).
'known/1_1_$special_=:=/2___2__0__0__11'([],B,C,A) :-
'known/1_1_$special_=:=/2___2__1'(B,C,A).
'known/1_1_$special_=:=/2___2__0__0__11'([F|G],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
D==C,
J=t(193,A,F),
'$novel_production'(A,J),
'$novel_production'(F,J),
B\==E ->
'$extend_history'(A,J),
arg(2,A,L),
setarg(2,A,active),
arg(4,A,K),
I is K+1,
setarg(4,A,I),
( L==not_stored_yet ->
A=suspension(_,_,_,_,_,M,N),
term_variables(term(M,N),H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',O),
P=[A|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_=:=/2___2'(H,A)
;
true
),
'known/1_1_$special_=:=/2'(B,E),
( A=suspension(_,active,_,I,_,_,_) ->
setarg(2,A,inactive),
'known/1_1_$special_=:=/2___2__0__0__11'(G,B,C,A)
;
true
)
;
'known/1_1_$special_=:=/2___2__0__0__11'(G,B,C,A)
).
'known/1_1_$special_=:=/2___2__0'(A,B,C) :-
( var(C) ->
C=suspension(D,not_stored_yet,t,0,_,A,B),
'chr gen_id'(D)
;
true
),
'known/1_1_$special_=:=/2___2__1'(A,B,C).
'known/1_1_$special_=:=/2___2__1'(A,B,C) :-
( 'chr newvia_1'(A,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,D)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',D)
),
!,
'known/1_1_$special_=:=/2___2__1__0__12'(D,A,B,C).
'known/1_1_$special_=:=/2___2__1__0__12'([],B,C,A) :-
'known/1_1_$special_=:=/2___2__2'(B,C,A).
'known/1_1_$special_=:=/2___2__1__0__12'([F|G],B,C,A) :-
( F=suspension(_,active,_,_,_,D,E),
E==B,
J=t(193,F,A),
'$novel_production'(F,J),
'$novel_production'(A,J),
D\==C ->
'$extend_history'(A,J),
arg(2,A,L),
setarg(2,A,active),
arg(4,A,K),
I is K+1,
setarg(4,A,I),
( L==not_stored_yet ->
A=suspension(_,_,_,_,_,M,N),
term_variables(term(M,N),H),
'chr none_locked'(H),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',O),
P=[A|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',P),
( O=[Q|_] ->
setarg(5,Q,P)
;
true
),
'attach_known/1_1_$special_=:=/2___2'(H,A)
;
true
),
'known/1_1_$special_=:=/2'(D,C),
( A=suspension(_,active,_,I,_,_,_) ->
setarg(2,A,inactive),
'known/1_1_$special_=:=/2___2__1__0__12'(G,B,C,A)
;
true
)
;
'known/1_1_$special_=:=/2___2__1__0__12'(G,B,C,A)
).
'known/1_1_$special_=:=/2___2__1'(A,B,C) :-
'known/1_1_$special_=:=/2___2__2'(A,B,C).
'known/1_1_$special_=:=/2___2__2'(A,B,C) :-
'$novel_production'(C,194),
!,
'$extend_history'(C,194),
arg(2,C,G),
setarg(2,C,active),
arg(4,C,F),
E is F+1,
setarg(4,C,E),
( G==not_stored_yet ->
C=suspension(_,_,_,_,_,H,I),
term_variables(term(H,I),D),
'chr none_locked'(D),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',J),
K=[C|J],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',K),
( J=[L|_] ->
setarg(5,L,K)
;
true
),
'attach_known/1_1_$special_=:=/2___2'(D,C)
;
true
),
'known/1_1_$special_=:=/2'(B,A),
( C=suspension(_,active,_,E,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=:=/2___2__3'(A,B,C)
;
true
).
'known/1_1_$special_=:=/2___2__2'(A,B,C) :-
'known/1_1_$special_=:=/2___2__3'(A,B,C).
'known/1_1_$special_=:=/2___2__3'(A,B,C) :-
( 'chr newvia_2'(A,B,G) ->
get_attr(G,guard_entailment,H),
H=v(_,_,_,_,_,_,_,_,_,_,_,_,_,_,F,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F)
),
'chr sbag_member'(D,F),
D=suspension(_,active,_,_,E),
nonvar(E),
E=(I=:=J),
I==A,
J==B,
!,
D=suspension(_,_,_,_,X),
setarg(2,D,removed),
term_variables(X,K),
arg(4,D,T),
( var(T) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',U),
U=[_|V],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',V),
( V=[W|_] ->
setarg(4,W,_)
;
true
)
;
T=[_,_|V],
setarg(2,T,V),
( V=[W|_] ->
setarg(4,W,T)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(K,D),
( var(C) ->
true
;
C=suspension(_,Q,_,_,_,R,S),
setarg(2,C,removed),
( Q==not_stored_yet ->
L=[]
;
term_variables(term(R,S),L),
arg(5,C,M),
( var(M) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',N),
N=[_|O],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',O),
( O=[P|_] ->
setarg(5,P,_)
;
true
)
;
M=[_,_|O],
setarg(2,M,O),
( O=[P|_] ->
setarg(5,P,M)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(L,C)
)
),
'known/1_1_$special_fail/0'.
'known/1_1_$special_=:=/2___2__3'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_=:=/2___2__3__0__15'(D,A,B,C).
'known/1_1_$special_=:=/2___2__3__0__15'([],B,C,A) :-
'known/1_1_$special_=:=/2___2__4'(B,C,A).
'known/1_1_$special_=:=/2___2__3__0__15'([F|J],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(\+G),
nonvar(G),
G=(H=:=I),
H==A,
I==B ->
F=suspension(_,_,_,_,Y,Z),
setarg(2,F,removed),
term_variables(term(Y,Z),K),
arg(4,F,U),
( var(U) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',V),
V=[_|W],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
( W=[X|_] ->
setarg(4,X,_)
;
true
)
;
U=[_,_|W],
setarg(2,U,W),
( W=[X|_] ->
setarg(4,X,U)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(K,F),
arg(2,C,O),
setarg(2,C,active),
arg(4,C,N),
M is N+1,
setarg(4,C,M),
( O==not_stored_yet ->
C=suspension(_,_,_,_,_,P,Q),
term_variables(term(P,Q),L),
'chr none_locked'(L),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',R),
S=[C|R],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',S),
( R=[T|_] ->
setarg(5,T,S)
;
true
),
'attach_known/1_1_$special_=:=/2___2'(L,C)
;
true
),
known(E),
( C=suspension(_,active,_,M,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=:=/2___2__3__0__15'(J,A,B,C)
;
true
)
;
'known/1_1_$special_=:=/2___2__3__0__15'(J,A,B,C)
).
'known/1_1_$special_=:=/2___2__3'(A,B,C) :-
'known/1_1_$special_=:=/2___2__4'(A,B,C).
'known/1_1_$special_=:=/2___2__4'(A,B,C) :-
( 'chr newvia_2'(A,B,E) ->
get_attr(E,guard_entailment,F),
F=v(_,_,_,D,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)
;
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',D)
),
!,
'known/1_1_$special_=:=/2___2__4__0__16'(D,A,B,C).
'known/1_1_$special_=:=/2___2__4__0__16'([],B,C,A) :-
'known/1_1_$special_=:=/2___2__5'(B,C,A).
'known/1_1_$special_=:=/2___2__4__0__16'([F|K],A,B,C) :-
( F=suspension(_,active,_,_,D,E),
nonvar(D),
D=(G,_),
nonvar(G),
G=(\+H),
nonvar(H),
H=(I=:=J),
I==A,
J==B ->
F=suspension(_,_,_,_,Z,A1),
setarg(2,F,removed),
term_variables(term(Z,A1),L),
arg(4,F,V),
( var(V) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',W),
W=[_|X],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',X),
( X=[Y|_] ->
setarg(4,Y,_)
;
true
)
;
V=[_,_|X],
setarg(2,V,X),
( X=[Y|_] ->
setarg(4,Y,V)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(L,F),
arg(2,C,P),
setarg(2,C,active),
arg(4,C,O),
N is O+1,
setarg(4,C,N),
( P==not_stored_yet ->
C=suspension(_,_,_,_,_,Q,R),
term_variables(term(Q,R),M),
'chr none_locked'(M),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',S),
T=[C|S],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',T),
( S=[U|_] ->
setarg(5,U,T)
;
true
),
'attach_known/1_1_$special_=:=/2___2'(M,C)
;
true
),
known(E),
( C=suspension(_,active,_,N,_,_,_) ->
setarg(2,C,inactive),
'known/1_1_$special_=:=/2___2__4__0__16'(K,A,B,C)
;
true
)
;
'known/1_1_$special_=:=/2___2__4__0__16'(K,A,B,C)
).
'known/1_1_$special_=:=/2___2__4'(A,B,C) :-
'known/1_1_$special_=:=/2___2__5'(A,B,C).
'known/1_1_$special_=:=/2___2__5'(_,_,A) :-
arg(2,A,E),
setarg(2,A,active),
arg(4,A,D),
C is D+1,
setarg(4,A,C),
( E==not_stored_yet ->
A=suspension(_,_,_,_,_,F,G),
term_variables(term(F,G),B),
'chr none_locked'(B),
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',H),
I=[A|H],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',I),
( H=[J|_] ->
setarg(5,J,I)
;
true
),
'attach_known/1_1_$special_=:=/2___2'(B,A)
;
true
).
'known/1_1_$special_fail/0' :-
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',B),
'chr sbag_member'(A,B),
A=suspension(_,active,_),
!.
'known/1_1_$special_fail/0' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',A),
!,
'known/1_1_$special_fail/0___0__0__0__24'(A).
'known/1_1_$special_fail/0___0__0__0__24'([]) :-
'known/1_1_$special_fail/0___0__1'.
'known/1_1_$special_fail/0___0__0__0__24'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_;/2___2'(C,A),
'known/1_1_$special_fail/0___0__0__0__24'(B)
;
'known/1_1_$special_fail/0___0__0__0__24'(B)
).
'known/1_1_$special_fail/0' :-
'known/1_1_$special_fail/0___0__1'.
'known/1_1_$special_fail/0___0__1' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',A),
!,
'known/1_1_$special_fail/0___0__1__0__25'(A).
'known/1_1_$special_fail/0___0__1__0__25'([]) :-
'known/1_1_$special_fail/0___0__2'.
'known/1_1_$special_fail/0___0__1__0__25'([A|B]) :-
( A=suspension(_,active,_,_,_) ->
A=suspension(_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_nonvar/1___1'(C,A),
'known/1_1_$special_fail/0___0__1__0__25'(B)
;
'known/1_1_$special_fail/0___0__1__0__25'(B)
).
'known/1_1_$special_fail/0___0__1' :-
'known/1_1_$special_fail/0___0__2'.
'known/1_1_$special_fail/0___0__2' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',A),
!,
'known/1_1_$special_fail/0___0__2__0__26'(A).
'known/1_1_$special_fail/0___0__2__0__26'([]) :-
'known/1_1_$special_fail/0___0__3'.
'known/1_1_$special_fail/0___0__2__0__26'([A|B]) :-
( A=suspension(_,active,_,_,_) ->
A=suspension(_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_var/1___1'(C,A),
'known/1_1_$special_fail/0___0__2__0__26'(B)
;
'known/1_1_$special_fail/0___0__2__0__26'(B)
).
'known/1_1_$special_fail/0___0__2' :-
'known/1_1_$special_fail/0___0__3'.
'known/1_1_$special_fail/0___0__3' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',A),
!,
'known/1_1_$special_fail/0___0__3__0__27'(A).
'known/1_1_$special_fail/0___0__3__0__27'([]) :-
'known/1_1_$special_fail/0___0__4'.
'known/1_1_$special_fail/0___0__3__0__27'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_atom/1___1'(C,A),
'known/1_1_$special_fail/0___0__3__0__27'(B)
;
'known/1_1_$special_fail/0___0__3__0__27'(B)
).
'known/1_1_$special_fail/0___0__3' :-
'known/1_1_$special_fail/0___0__4'.
'known/1_1_$special_fail/0___0__4' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',A),
!,
'known/1_1_$special_fail/0___0__4__0__28'(A).
'known/1_1_$special_fail/0___0__4__0__28'([]) :-
'known/1_1_$special_fail/0___0__5'.
'known/1_1_$special_fail/0___0__4__0__28'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_atomic/1___1'(C,A),
'known/1_1_$special_fail/0___0__4__0__28'(B)
;
'known/1_1_$special_fail/0___0__4__0__28'(B)
).
'known/1_1_$special_fail/0___0__4' :-
'known/1_1_$special_fail/0___0__5'.
'known/1_1_$special_fail/0___0__5' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',A),
!,
'known/1_1_$special_fail/0___0__5__0__29'(A).
'known/1_1_$special_fail/0___0__5__0__29'([]) :-
'known/1_1_$special_fail/0___0__6'.
'known/1_1_$special_fail/0___0__5__0__29'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_compound/1___1'(C,A),
'known/1_1_$special_fail/0___0__5__0__29'(B)
;
'known/1_1_$special_fail/0___0__5__0__29'(B)
).
'known/1_1_$special_fail/0___0__5' :-
'known/1_1_$special_fail/0___0__6'.
'known/1_1_$special_fail/0___0__6' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',A),
!,
'known/1_1_$special_fail/0___0__6__0__30'(A).
'known/1_1_$special_fail/0___0__6__0__30'([]) :-
'known/1_1_$special_fail/0___0__7'.
'known/1_1_$special_fail/0___0__6__0__30'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_ground/1___1'(C,A),
'known/1_1_$special_fail/0___0__6__0__30'(B)
;
'known/1_1_$special_fail/0___0__6__0__30'(B)
).
'known/1_1_$special_fail/0___0__6' :-
'known/1_1_$special_fail/0___0__7'.
'known/1_1_$special_fail/0___0__7' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',A),
!,
'known/1_1_$special_fail/0___0__7__0__31'(A).
'known/1_1_$special_fail/0___0__7__0__31'([]) :-
'known/1_1_$special_fail/0___0__8'.
'known/1_1_$special_fail/0___0__7__0__31'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_integer/1___1'(C,A),
'known/1_1_$special_fail/0___0__7__0__31'(B)
;
'known/1_1_$special_fail/0___0__7__0__31'(B)
).
'known/1_1_$special_fail/0___0__7' :-
'known/1_1_$special_fail/0___0__8'.
'known/1_1_$special_fail/0___0__8' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',A),
!,
'known/1_1_$special_fail/0___0__8__0__32'(A).
'known/1_1_$special_fail/0___0__8__0__32'([]) :-
'known/1_1_$special_fail/0___0__9'.
'known/1_1_$special_fail/0___0__8__0__32'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_float/1___1'(C,A),
'known/1_1_$special_fail/0___0__8__0__32'(B)
;
'known/1_1_$special_fail/0___0__8__0__32'(B)
).
'known/1_1_$special_fail/0___0__8' :-
'known/1_1_$special_fail/0___0__9'.
'known/1_1_$special_fail/0___0__9' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',A),
!,
'known/1_1_$special_fail/0___0__9__0__33'(A).
'known/1_1_$special_fail/0___0__9__0__33'([]) :-
'known/1_1_$special_fail/0___0__10'.
'known/1_1_$special_fail/0___0__9__0__33'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_number/1___1'(C,A),
'known/1_1_$special_fail/0___0__9__0__33'(B)
;
'known/1_1_$special_fail/0___0__9__0__33'(B)
).
'known/1_1_$special_fail/0___0__9' :-
'known/1_1_$special_fail/0___0__10'.
'known/1_1_$special_fail/0___0__10' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',A),
!,
'known/1_1_$special_fail/0___0__10__0__34'(A).
'known/1_1_$special_fail/0___0__10__0__34'([]) :-
'known/1_1_$special_fail/0___0__11'.
'known/1_1_$special_fail/0___0__10__0__34'([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_=\\=/2___2'(C,A),
'known/1_1_$special_fail/0___0__10__0__34'(B)
;
'known/1_1_$special_fail/0___0__10__0__34'(B)
).
'known/1_1_$special_fail/0___0__10' :-
'known/1_1_$special_fail/0___0__11'.
'known/1_1_$special_fail/0___0__11' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',A),
!,
'known/1_1_$special_fail/0___0__11__0__35'(A).
'known/1_1_$special_fail/0___0__11__0__35'([]) :-
'known/1_1_$special_fail/0___0__12'.
'known/1_1_$special_fail/0___0__11__0__35'([A|B]) :-
( A=suspension(_,active,_,_,_) ->
A=suspension(_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_\\+/1___1'(C,A),
'known/1_1_$special_fail/0___0__11__0__35'(B)
;
'known/1_1_$special_fail/0___0__11__0__35'(B)
).
'known/1_1_$special_fail/0___0__11' :-
'known/1_1_$special_fail/0___0__12'.
'known/1_1_$special_fail/0___0__12' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',A),
!,
'known/1_1_$special_fail/0___0__12__0__36'(A).
'known/1_1_$special_fail/0___0__12__0__36'([]) :-
'known/1_1_$special_fail/0___0__13'.
'known/1_1_$special_fail/0___0__12__0__36'([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,H,I,J),
setarg(2,A,removed),
term_variables(term(H,I,J),C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_functor/3___3'(C,A),
'known/1_1_$special_fail/0___0__12__0__36'(B)
;
'known/1_1_$special_fail/0___0__12__0__36'(B)
).
'known/1_1_$special_fail/0___0__12' :-
'known/1_1_$special_fail/0___0__13'.
'known/1_1_$special_fail/0___0__13' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',A),
!,
'known/1_1_$special_fail/0___0__13__0__37'(A).
'known/1_1_$special_fail/0___0__13__0__37'([]) :-
'known/1_1_$special_fail/0___0__14'.
'known/1_1_$special_fail/0___0__13__0__37'([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_\\=/2___2'(C,A),
'known/1_1_$special_fail/0___0__13__0__37'(B)
;
'known/1_1_$special_fail/0___0__13__0__37'(B)
).
'known/1_1_$special_fail/0___0__13' :-
'known/1_1_$special_fail/0___0__14'.
'known/1_1_$special_fail/0___0__14' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',A),
!,
'known/1_1_$special_fail/0___0__14__0__38'(A).
'known/1_1_$special_fail/0___0__14__0__38'([]) :-
'known/1_1_$special_fail/0___0__15'.
'known/1_1_$special_fail/0___0__14__0__38'([A|B]) :-
( A=suspension(_,active,_,_,_,_) ->
A=suspension(_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$special_=/2___2'(C,A),
'known/1_1_$special_fail/0___0__14__0__38'(B)
;
'known/1_1_$special_fail/0___0__14__0__38'(B)
).
'known/1_1_$special_fail/0___0__14' :-
'known/1_1_$special_fail/0___0__15'.
'known/1_1_$special_fail/0___0__15' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',A),
!,
'known/1_1_$special_fail/0___0__15__0__40'(A).
'known/1_1_$special_fail/0___0__15__0__40'([]) :-
'known/1_1_$special_fail/0___0__16'.
'known/1_1_$special_fail/0___0__15__0__40'([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_\\==/2___2'(C,A),
'known/1_1_$special_fail/0___0__15__0__40'(B)
;
'known/1_1_$special_fail/0___0__15__0__40'(B)
).
'known/1_1_$special_fail/0___0__15' :-
'known/1_1_$special_fail/0___0__16'.
'known/1_1_$special_fail/0___0__16' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',A),
!,
'known/1_1_$special_fail/0___0__16__0__41'(A).
'known/1_1_$special_fail/0___0__16__0__41'([]) :-
'known/1_1_$special_fail/0___0__17'.
'known/1_1_$special_fail/0___0__16__0__41'([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_==/2___2'(C,A),
'known/1_1_$special_fail/0___0__16__0__41'(B)
;
'known/1_1_$special_fail/0___0__16__0__41'(B)
).
'known/1_1_$special_fail/0___0__16' :-
'known/1_1_$special_fail/0___0__17'.
'known/1_1_$special_fail/0___0__17' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',A),
!,
'known/1_1_$special_fail/0___0__17__0__46'(A).
'known/1_1_$special_fail/0___0__17__0__46'([]) :-
'known/1_1_$special_fail/0___0__18'.
'known/1_1_$special_fail/0___0__17__0__46'([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_=</2___2'(C,A),
'known/1_1_$special_fail/0___0__17__0__46'(B)
;
'known/1_1_$special_fail/0___0__17__0__46'(B)
).
'known/1_1_$special_fail/0___0__17' :-
'known/1_1_$special_fail/0___0__18'.
'known/1_1_$special_fail/0___0__18' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',A),
!,
'known/1_1_$special_fail/0___0__18__0__47'(A).
'known/1_1_$special_fail/0___0__18__0__47'([]) :-
'known/1_1_$special_fail/0___0__19'.
'known/1_1_$special_fail/0___0__18__0__47'([A|B]) :-
( A=suspension(_,active,_,_,_,_,_) ->
A=suspension(_,_,_,_,_,H,I),
setarg(2,A,removed),
term_variables(term(H,I),C),
arg(5,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',F),
( F=[G|_] ->
setarg(5,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(5,G,D)
;
true
)
),
'detach_known/1_1_$special_=:=/2___2'(C,A),
'known/1_1_$special_fail/0___0__18__0__47'(B)
;
'known/1_1_$special_fail/0___0__18__0__47'(B)
).
'known/1_1_$special_fail/0___0__18' :-
'known/1_1_$special_fail/0___0__19'.
'known/1_1_$special_fail/0___0__19' :-
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',A),
!,
'known/1_1_$special_fail/0___0__19__0__50'(A).
'known/1_1_$special_fail/0___0__19__0__50'([]) :-
'known/1_1_$special_fail/0___0__20'.
'known/1_1_$special_fail/0___0__19__0__50'([A|B]) :-
( A=suspension(_,active,_,_,_) ->
A=suspension(_,_,_,_,H),
setarg(2,A,removed),
term_variables(H,C),
arg(4,A,D),
( var(D) ->
nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',E),
E=[_|F],
b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',F),
( F=[G|_] ->
setarg(4,G,_)
;
true
)
;
D=[_,_|F],
setarg(2,D,F),
( F=[G|_] ->
setarg(4,G,D)
;
true
)
),
'detach_known/1_1_$default___1'(C,A),
'known/1_1_$special_fail/0___0__19__0__50'(B)
;
'known/1_1_$special_fail/0___0__19__0__50'(B)
).
'known/1_1_$special_fail/0___0__19' :-
'known/1_1_$special_fail/0___0__20'.
'known/1_1_$special_fail/0___0__20' :-
A=suspension(B,active,_),
'chr gen_id'(B),
nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',C),
D=[A|C],
b_setval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',D),
( C=[E|_] ->
setarg(3,E,D)
;
true
).
:-multifile chr:'$chr_module'/1.
chr:'$chr_module'(guard_entailment).
end_of_file.