Share

bddbddb: BDD-Based Deductive Database

Tracker: Bugs

5 findbestorder results in NullPointerException - ID: 1738163
Last Update: Tracker Item Submitted ( luke_simon )

findbestorder results in a NullPointerException if the Datalog program does
not specify a bddvarorder. Maybe the bddvarorder should by default be
internally initialized to an empty string as opposed to null?
Alternatively, maybe bddvarorder could by default by internally initialized
to a random ordering?


-------------------------------

[lsimon@bear test]$ java -cp
.:/home/lsimon/workspace/bddbddb:/home/lsimon/workspace/bddbddb/jdom.jar:/h
ome/lsimon/workspace/bddbddb/weka.jar:/home/lsimon/workspace/JavaBDD/javabd
d-2.0.jar:/home/lsimon/workspace/jwutil/target/classes -Xmx1024m
-Dfindbestorder=yes -Dfbotrials=700
-Dtrialfile=/home/lsimon/test/trials.xml -Dsingleignore=yes
-Dbasedir=./pa.joeq net.sf.bddbddb.Solver
/home/lsimon/workspace/bddbddb_examples/pa_noorder.datalog
Initializing BDD library (500000 nodes, cache size 125000, min free 0.2%)
Using BDD library BuDDy - release 2.4 rev476
Opening Datalog program
"/home/lsimon/workspace/bddbddb_examples/pa_noorder.datalog"
WARNING: Cannot load mapfile "./pa.joeq/class.map", skipping.
11 field domains.
18 relations.
9 rules.
Splitting rules: done.
Initializing solver: Trials filename=/home/lsimon/test/trials.xml
done.
Loading initial relations: Loading BDD from file: vP0.bdd Garbage
collection #1: 1009 nodes / 16 free / 0.01s / 0.01s total
Resizing node table from 1009 to 2017
Garbage collection #2: 2017 nodes / 0 free / 0.0s / 0.01s total
Resizing node table from 2017 to 4027
Garbage collection #3: 4027 nodes / 0 free / 0.0s / 0.01s total
Resizing node table from 4027 to 8053
Garbage collection #4: 8053 nodes / 0 free / 0.01s / 0.02s total
Resizing node table from 8053 to 16103
Garbage collection #5: 16103 nodes / 0 free / 0.0s / 0.02s total
Resizing node table from 16103 to 32203
Garbage collection #6: 32203 nodes / 0 free / 0.01s / 0.03s total
Resizing node table from 32203 to 64403
Garbage collection #7: 64403 nodes / 0 free / 0.01s / 0.04s total
Resizing node table from 64403 to 128767
Garbage collection #8: 128767 nodes / 0 free / 0.02s / 0.06s total
Resizing node table from 128767 to 257519
33445 nodes, 9528.0 elements.
Loading BDD from file: A.bdd Garbage collection #9: 257519 nodes / 211018
free / 0.01s / 0.07s total
12111 nodes, 7580.0 elements.
Loading BDD from file: S.bdd Garbage collection #10: 257519 nodes / 189817
free / 0.02s / 0.09s total
Garbage collection #11: 257519 nodes / 0 free / 0.04s / 0.13s total
Resizing node table from 257519 to 514967
Garbage collection #12: 514967 nodes / 0 free / 0.06s / 0.19s total
Resizing node table from 514967 to 1029929
36622 nodes, 3793.0 elements.
Loading BDD from file: L.bdd Garbage collection #13: 1029929 nodes / 726867
free / 0.06s / 0.25s total
36948 nodes, 2188.0 elements.
Loading BDD from file: vT.bdd Garbage collection #14: 1029929 nodes /
776627 free / 0.06s / 0.31s total
21252 nodes, 32299.0 elements.
Loading BDD from file: hT.bdd 5441 nodes, 5458.0 elements.
Loading BDD from file: aT.bdd 4326 nodes, 4050.0 elements.
Loading BDD from file: actual.bdd Garbage collection #15: 1029929 nodes /
340586 free / 0.1s / 0.41s total
Garbage collection #16: 1029929 nodes / 0 free / 0.15s / 0.56s total
Resizing node table from 1029929 to 2059843
75966 nodes, 18234.0 elements.
Loading BDD from file: formal.bdd Garbage collection #17: 2059843 nodes /
1548340 free / 0.1s / 0.66s total
47863 nodes, 5805.0 elements.
Loading BDD from file: Mret.bdd 11112 nodes, 1546.0 elements.
Loading BDD from file: Mthr.bdd 24115 nodes, 11627.0 elements.
Loading BDD from file: Iret.bdd 31693 nodes, 4360.0 elements.
Loading BDD from file: Ithr.bdd Garbage collection #18: 2059843 nodes /
1311111 free / 0.14s / 0.8s total
56999 nodes, 11035.0 elements.
Loading BDD from file: IE0.bdd 28227 nodes, 16222.0 elements.
done. (7881 ms)
Stratifying:
Discovering stratum, 0 SCCs visited so far
Finished discovery of 38 SCCs in 1 strata
done. (38 ms)
Solving:
list1:
list2:
IE(i:I0,m:M0) :- IE0(i:I0,m:M0).
A(v2:V0,v1:V1) :- Mthr(m:M0,v1:V1), IE(i:I0,m:M0), Ithr(i:I0,v2:V0).
A(v2:V0,v1:V1) :- Mret(m:M0,v1:V1), IE(i:I0,m:M0), Iret(i:I0,v2:V0).
A(v1:V0,v2:V1) :- formal(m:M0,z:Z0,v1:V0), IE(i:I0,m:M0),
actual(i:I0,z:Z0,v2:V1).
vPfilter(v:V0,h:H0) :- vT(v:V0,tv:T0), aT(tv:T0,th:T1),
hT(h:H0,th:T1).
vP(v:V0,h:H0) :- vP0(v:V0,h:H0).
loop3:
loop5:
vP(v1:V0,h:H0) :- A(v1:V0,v2:V1), vP(v2:V1,h:H0),
vPfilter(v1:V0,h:H0).
vP_5_0(f:F0,v2:V1,h1:H0) :- L(v1:V0,f:F0,v2:V1), vP(v1:V0,h1:H0).
hP(h1:H0,f:F0,h2:H1) :- S(v1:V0,f:F0,v2:V1), vP(v1:V0,h1:H0),
vP(v2:V1,h2:H1).
vP_5_1(v2:V1,h2:H1) :- vP_5_0(f:F0,v2:V1,h1:H0),
hP(h1:H0,f:F0,h2:H1).
vP(v2:V1,h2:H1) :- vP_5_1(v2:V1,h2:H1), vPfilter(v2:V1,h2:H1).

Applying inference rule:
IE(i:I0,m:M0) :- IE0(i:I0,m:M0). (1)
Applying inference rule:
A(v2:V0,v1:V1) :- Mthr(m:M0,v1:V1), IE(i:I0,m:M0), Ithr(i:I0,v2:V0).
(1)
Exception in thread "main" java.lang.NullPointerException
at
net.sf.bddbddb.BDDInferenceRule$VarOrderComparator.compare(BDDInferenceRule
.java:1046)
at java.util.Arrays.mergeSort(Arrays.java:1270)
at java.util.Arrays.sort(Arrays.java:1210)
at
net.sf.bddbddb.FindBestDomainOrder.findBestDomainOrder(FindBestDomainOrder.
java:2061)
at
net.sf.bddbddb.BDDInferenceRule.evalRelations(BDDInferenceRule.java:480)
at
net.sf.bddbddb.BDDInferenceRule.update(BDDInferenceRule.java:373)
at
net.sf.bddbddb.ir.BDDInterpreter.interpret(BDDInterpreter.java:70)
at
net.sf.bddbddb.ir.BDDInterpreter.interpret(BDDInterpreter.java:50)
at net.sf.bddbddb.BDDSolver.solve(BDDSolver.java:395)
at net.sf.bddbddb.Solver.run(Solver.java:388)
at net.sf.bddbddb.Solver.main2(Solver.java:441)
at net.sf.bddbddb.Solver.main(Solver.java:1108)


Luke ( luke_simon ) - 2007-06-15 23:11

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.