diff options
author | Kshitij Bansal <kshitij@cs.nyu.edu> | 2014-04-30 16:09:32 -0400 |
---|---|---|
committer | Kshitij Bansal <kshitij@cs.nyu.edu> | 2014-04-30 23:50:09 -0400 |
commit | cb12e628b41d11376ff03e5c1a7a5e760e98e2a1 (patch) | |
tree | cc9b80787200a7ed06ae1d11ecf5a4a1b7d1cfbf /src/decision/justification_heuristic.h | |
parent | 221e509c0eb230aa549fe0107ba88514b6944ca2 (diff) |
decision engine: cache start index for and/or nodes
This is done only in "hard" case. Limited testing has not shown
improvement in the "easy" case.
This was triggerred by a benchmark sent by andy/viktor.
performance comparison notes for the change on wiki
http://church.cims.nyu.edu/wiki/User:Kshitij/decisioncacheindex
Diffstat (limited to 'src/decision/justification_heuristic.h')
-rw-r--r-- | src/decision/justification_heuristic.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/decision/justification_heuristic.h b/src/decision/justification_heuristic.h index 01458d9ea..2969c4b86 100644 --- a/src/decision/justification_heuristic.h +++ b/src/decision/justification_heuristic.h @@ -154,6 +154,16 @@ private: /* Get list of all term-ITEs for the atomic formula v */ JustificationHeuristic::IteList getITEs(TNode n); + + /** + * For big and/or nodes, a cache to save starting index into children + * for efficiently. + */ + typedef context::CDHashMap<TNode, int, TNodeHashFunction> StartIndexCache; + StartIndexCache d_startIndexCache; + int getStartIndex(TNode node); + void saveStartIndex(TNode node, int val); + /* Compute all term-ITEs in a node recursively */ void computeITEs(TNode n, IteList &l); |