1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| package org.sat4j.minisat.core; |
29 |
| |
30 |
| import java.io.PrintStream; |
31 |
| import java.io.Serializable; |
32 |
| |
33 |
| |
34 |
| |
35 |
| |
36 |
| |
37 |
| |
38 |
| public class SolverStats implements Serializable { |
39 |
| private static final long serialVersionUID = 1L; |
40 |
| |
41 |
| public int starts; |
42 |
| |
43 |
| public long decisions; |
44 |
| |
45 |
| public long propagations; |
46 |
| |
47 |
| public long inspects; |
48 |
| |
49 |
| public long conflicts; |
50 |
| |
51 |
| public long learnedliterals; |
52 |
| |
53 |
| public long learnedbinaryclauses; |
54 |
| |
55 |
| public long learnedternaryclauses; |
56 |
| |
57 |
| public long learnedclauses; |
58 |
| |
59 |
| public long rootSimplifications; |
60 |
| |
61 |
| public long reducedliterals; |
62 |
| |
63 |
| public long changedreason; |
64 |
| |
65 |
| public int reduceddb; |
66 |
| |
67 |
2018
| public void reset() {
|
68 |
2018
| starts = 0;
|
69 |
2018
| decisions = 0;
|
70 |
2018
| propagations = 0;
|
71 |
2018
| inspects = 0;
|
72 |
2018
| conflicts = 0;
|
73 |
2018
| learnedliterals = 0;
|
74 |
2018
| learnedclauses = 0;
|
75 |
2018
| learnedbinaryclauses = 0;
|
76 |
2018
| learnedternaryclauses = 0;
|
77 |
2018
| rootSimplifications = 0;
|
78 |
2018
| reducedliterals=0;
|
79 |
2018
| changedreason=0;
|
80 |
2018
| reduceddb=0;
|
81 |
| } |
82 |
| |
83 |
0
| public void printStat(PrintStream out, String prefix) {
|
84 |
0
| out.println(prefix + "starts\t\t: " + starts);
|
85 |
0
| out.println(prefix + "conflicts\t\t: " + conflicts);
|
86 |
0
| out.println(prefix + "decisions\t\t: " + decisions);
|
87 |
0
| out.println(prefix + "propagations\t\t: " + propagations);
|
88 |
0
| out.println(prefix + "inspects\t\t: " + inspects);
|
89 |
0
| out.println(prefix + "learnt literals\t: " + learnedliterals);
|
90 |
0
| out.println(prefix + "learnt binary clauses\t: "
|
91 |
| + learnedbinaryclauses); |
92 |
0
| out.println(prefix + "learnt ternary clauses\t: "
|
93 |
| + learnedternaryclauses); |
94 |
0
| out.println(prefix + "learnt clauses\t: " + learnedclauses);
|
95 |
0
| out.println(prefix + "root simplifications\t: "
|
96 |
| + rootSimplifications); |
97 |
0
| out.println(prefix + "removed literals (reason simplification)\t: "
|
98 |
| + reducedliterals); |
99 |
0
| out.println(prefix + "reason swapping (by a shorter reason)\t: "
|
100 |
| + changedreason); |
101 |
0
| out.println(prefix + "Calls to reduceDB\t: "
|
102 |
| + reduceddb); |
103 |
| } |
104 |
| } |