diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2016-03-30 14:06:27 -0500 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2016-03-30 14:06:34 -0500 |
commit | 2abcda1cfcb0c6388c00d65f8a6b3e63de9d96df (patch) | |
tree | 6c72c3145cef49e76b1f8e5577947d441e14f938 /src/theory/quantifiers/quant_util.cpp | |
parent | f7c6707fa38a850d6798c747b3c45ef10769fa7c (diff) |
Updates to E-matching to avoid entailed instantiations earlier. Minor updates to datatypes lemmas, other minor changes.
Diffstat (limited to 'src/theory/quantifiers/quant_util.cpp')
-rw-r--r-- | src/theory/quantifiers/quant_util.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/theory/quantifiers/quant_util.cpp b/src/theory/quantifiers/quant_util.cpp index 1f1efa2a8..eb92b0f70 100644 --- a/src/theory/quantifiers/quant_util.cpp +++ b/src/theory/quantifiers/quant_util.cpp @@ -377,3 +377,20 @@ void QuantPhaseReq::getPolarity( Node n, int child, bool hasPol, bool pol, bool& newPol = pol; } } + +void QuantPhaseReq::getEntailPolarity( Node n, int child, bool hasPol, bool pol, bool& newHasPol, bool& newPol ) { + if( n.getKind()==AND || n.getKind()==OR ){ + newHasPol = hasPol && pol==( n.getKind()==AND ); + newPol = pol; + }else if( n.getKind()==IMPLIES ){ + newHasPol = hasPol && !pol; + newPol = child==0 ? !pol : pol; + }else if( n.getKind()==NOT ){ + newHasPol = hasPol; + newPol = !pol; + }else{ + newHasPol = false; + newPol = pol; + } +} + |