handle negation in tries and add debugging hooks

This commit is contained in:
Vitor Santos Costa 2013-02-26 09:39:18 -06:00
parent dbd4c7f50f
commit 59d97f83b4

View File

@ -12,10 +12,10 @@ trie_to_bdd(Trie, BDD, MapList) :-
%(numbervars(Complex,1,_), writeln(Complex), fail ; true ),
rb_new(Map0),
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),
extract_vars(MapList, Vs),
bdd_new(Tree, Vs, BDD).
bdd_new(Tree, Vs, BDD). %writeln(BDD).
tabled_trie_to_bdd(Trie, BDD, MapList) :-
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).
tabled_complex_to_andor(T, Map, Map, Tab, Tab, V) :-
rb_lookup(T, V, Tab), !,
increment_ref_count(V).