handle negation in tries and add debugging hooks
This commit is contained in:
parent
dbd4c7f50f
commit
59d97f83b4
@ -12,10 +12,10 @@ trie_to_bdd(Trie, BDD, MapList) :-
|
|||||||
%(numbervars(Complex,1,_), writeln(Complex), fail ; true ),
|
%(numbervars(Complex,1,_), writeln(Complex), fail ; true ),
|
||||||
rb_new(Map0),
|
rb_new(Map0),
|
||||||
complex_to_andor(Complex,Map0,Map,Tree),
|
complex_to_andor(Complex,Map0,Map,Tree),
|
||||||
%(numbervars(Tree,1,_), writeln(Tree), fail ; true ),
|
%numbervars(Tree,1,_), writeln(Tree), fail ; true ),
|
||||||
rb_visit(Map, MapList),
|
rb_visit(Map, MapList),
|
||||||
extract_vars(MapList, Vs),
|
extract_vars(MapList, Vs),
|
||||||
bdd_new(Tree, Vs, BDD).
|
bdd_new(Tree, Vs, BDD). %writeln(BDD).
|
||||||
|
|
||||||
tabled_trie_to_bdd(Trie, BDD, MapList) :-
|
tabled_trie_to_bdd(Trie, BDD, MapList) :-
|
||||||
trie_to_list(Trie, Complex),
|
trie_to_list(Trie, Complex),
|
||||||
@ -65,7 +65,6 @@ complex_to_and(functor(not,1,[int(A1,Els)|More]), Map0, MapF, or(NOTV1,O2)) :-
|
|||||||
),
|
),
|
||||||
complex_to_and(functor(not,1,More), MapI2, MapF, O2).
|
complex_to_and(functor(not,1,More), MapI2, MapF, O2).
|
||||||
|
|
||||||
|
|
||||||
tabled_complex_to_andor(T, Map, Map, Tab, Tab, V) :-
|
tabled_complex_to_andor(T, Map, Map, Tab, Tab, V) :-
|
||||||
rb_lookup(T, V, Tab), !,
|
rb_lookup(T, V, Tab), !,
|
||||||
increment_ref_count(V).
|
increment_ref_count(V).
|
||||||
|
Reference in New Issue
Block a user