This PR removes spurious theory method calls that are not implemented.
It also renames a common "propagate(TNode lit)" pattern to "propagateLit(TNode lit)" to avoid confusion with "propagate(Effort e)".
typechecker "theory/arrays/theory_arrays_type_rules.h"
properties polite stable-infinite parametric
-properties check propagate presolve
+properties check presolve
rewriter ::CVC4::theory::arrays::TheoryArraysRewriter "theory/arrays/theory_arrays_rewriter.h"
// T-PROPAGATION / REGISTRATION
/////////////////////////////////////////////////////////////////////////////
-
-bool TheoryArrays::propagate(TNode literal)
+bool TheoryArrays::propagateLit(TNode literal)
{
- Debug("arrays") << spaces(getSatContext()->getLevel()) << "TheoryArrays::propagate(" << literal << ")" << std::endl;
+ Debug("arrays") << spaces(getSatContext()->getLevel())
+ << "TheoryArrays::propagateLit(" << literal << ")"
+ << std::endl;
// If already in conflict, no more propagation
if (d_conflict) {
- Debug("arrays") << spaces(getSatContext()->getLevel()) << "TheoryArrays::propagate(" << literal << "): already in conflict" << std::endl;
+ Debug("arrays") << spaces(getSatContext()->getLevel())
+ << "TheoryArrays::propagateLit(" << literal
+ << "): already in conflict" << std::endl;
return false;
}
}
}
-
-void TheoryArrays::propagate(Effort e)
-{
- // direct propagation now
-}
-
TrustNode TheoryArrays::explain(TNode literal)
{
Node explanation = explain(literal, NULL);
context::CDO<unsigned> d_literalsToPropagateIndex;
/** Should be called to propagate the literal. */
- bool propagate(TNode literal);
+ bool propagateLit(TNode literal);
/** Explain why this literal is true by adding assumptions */
void explain(TNode literal, std::vector<TNode>& assumptions,
public:
void preRegisterTerm(TNode n) override;
- void propagate(Effort e) override;
Node explain(TNode n, eq::EqProof* proof);
TrustNode explain(TNode n) override;
<< (value ? "true" : "false") << ")" << std::endl;
// Just forward to arrays
if (value) {
- return d_arrays.propagate(predicate);
+ return d_arrays.propagateLit(predicate);
}
- return d_arrays.propagate(predicate.notNode());
+ return d_arrays.propagateLit(predicate.notNode());
}
bool eqNotifyTriggerTermEquality(TheoryId tag,
}
}
// Propagate equality between shared terms
- return d_arrays.propagate(t1.eqNode(t2));
+ return d_arrays.propagateLit(t1.eqNode(t2));
} else {
if (t1.getType().isArray()) {
if (!d_arrays.isShared(t1) || !d_arrays.isShared(t2)) {
return true;
}
}
- return d_arrays.propagate(t1.eqNode(t2).notNode());
+ return d_arrays.propagateLit(t1.eqNode(t2).notNode());
}
return true;
}
theory THEORY_DATATYPES ::CVC4::theory::datatypes::TheoryDatatypes "theory/datatypes/theory_datatypes.h"
typechecker "theory/datatypes/theory_datatypes_type_rules.h"
-properties check presolve parametric propagate
+properties check parametric
rewriter ::CVC4::theory::datatypes::DatatypesRewriter "theory/datatypes/datatypes_rewriter.h"
return TrustNode::null();
}
-void TheoryDatatypes::presolve()
-{
- Debug("datatypes") << "TheoryDatatypes::presolve()" << endl;
-}
-
TrustNode TheoryDatatypes::ppRewrite(TNode in)
{
Debug("tuprec") << "TheoryDatatypes::ppRewrite(" << in << ")" << endl;
Debug("datatypes") << "TheoryDatatypes::addSharedTerm() finished" << std::endl;
}
-/** propagate */
-void TheoryDatatypes::propagate(Effort effort){
-
-}
-
-/** propagate */
-bool TheoryDatatypes::propagate(TNode literal){
- Debug("dt::propagate") << "TheoryDatatypes::propagate(" << literal << ")" << std::endl;
+bool TheoryDatatypes::propagateLit(TNode literal)
+{
+ Debug("dt::propagate") << "TheoryDatatypes::propagateLit(" << literal << ")"
+ << std::endl;
// If already in conflict, no more propagation
if (d_conflict) {
- Debug("dt::propagate") << "TheoryDatatypes::propagate(" << literal << "): already in conflict" << std::endl;
+ Debug("dt::propagate") << "TheoryDatatypes::propagateLit(" << literal
+ << "): already in conflict" << std::endl;
return false;
}
Trace("dt-prop") << "dtPropagate " << literal << std::endl;
{
Debug("dt") << "NotifyClass::eqNotifyTriggerPredicate(" << predicate << ", " << (value ? "true" : "false") << ")" << std::endl;
if (value) {
- return d_dt.propagate(predicate);
+ return d_dt.propagateLit(predicate);
}
- return d_dt.propagate(predicate.notNode());
+ return d_dt.propagateLit(predicate.notNode());
}
bool eqNotifyTriggerTermEquality(TheoryId tag,
TNode t1,
{
Debug("dt") << "NotifyClass::eqNotifyTriggerTermMerge(" << tag << ", " << t1 << ", " << t2 << ")" << std::endl;
if (value) {
- return d_dt.propagate(t1.eqNode(t2));
- } else {
- return d_dt.propagate(t1.eqNode(t2).notNode());
+ return d_dt.propagateLit(t1.eqNode(t2));
}
+ return d_dt.propagateLit(t1.eqNode(t2).notNode());
}
void eqNotifyConstantTermMerge(TNode t1, TNode t2) override
{
//--------------------------------- end initialization
/** propagate */
- void propagate(Effort effort) override;
- /** propagate */
- bool propagate(TNode literal);
+ bool propagateLit(TNode literal);
/** explain */
void addAssumptions( std::vector<TNode>& assumptions, std::vector<TNode>& tassumptions );
void explainEquality( TNode a, TNode b, bool polarity, std::vector<TNode>& assumptions );
void preRegisterTerm(TNode n) override;
TrustNode expandDefinition(Node n) override;
TrustNode ppRewrite(TNode n) override;
- void presolve() override;
void addSharedTerm(TNode t) override;
EqualityStatus getEqualityStatus(TNode a, TNode b) override;
bool collectModelInfo(TheoryModel* m) override;
typechecker "theory/sep/theory_sep_type_rules.h"
properties polite stable-infinite parametric
-properties check propagate presolve
+properties check presolve
rewriter ::CVC4::theory::sep::TheorySepRewriter "theory/sep/theory_sep_rewriter.h"
// T-PROPAGATION / REGISTRATION
/////////////////////////////////////////////////////////////////////////////
-
-bool TheorySep::propagate(TNode literal)
+bool TheorySep::propagateLit(TNode literal)
{
- Debug("sep") << "TheorySep::propagate(" << literal << ")" << std::endl;
+ Debug("sep") << "TheorySep::propagateLit(" << literal << ")" << std::endl;
// If already in conflict, no more propagation
if (d_conflict) {
- Debug("sep") << "TheorySep::propagate(" << literal << "): already in conflict" << std::endl;
+ Debug("sep") << "TheorySep::propagateLit(" << literal
+ << "): already in conflict" << std::endl;
return false;
}
bool ok = d_out->propagate(literal);
}
}
-
-void TheorySep::propagate(Effort e){
-
-}
-
TrustNode TheorySep::explain(TNode literal)
{
Debug("sep") << "TheorySep::explain(" << literal << ")" << std::endl;
private:
/** Should be called to propagate the literal. */
- bool propagate(TNode literal);
+ bool propagateLit(TNode literal);
/** Explain why this literal is true by adding assumptions */
void explain(TNode literal, std::vector<TNode>& assumptions);
public:
- void propagate(Effort e) override;
TrustNode explain(TNode n) override;
public:
// Just forward to sep
if (value)
{
- return d_sep.propagate(predicate);
+ return d_sep.propagateLit(predicate);
}
- return d_sep.propagate(predicate.notNode());
+ return d_sep.propagateLit(predicate.notNode());
}
bool eqNotifyTriggerTermEquality(TheoryId tag,
TNode t1,
if (value)
{
// Propagate equality between shared terms
- return d_sep.propagate(t1.eqNode(t2));
+ return d_sep.propagateLit(t1.eqNode(t2));
}
- else
- {
- return d_sep.propagate(t1.eqNode(t2).notNode());
- }
- return true;
+ return d_sep.propagateLit(t1.eqNode(t2).notNode());
}
void eqNotifyConstantTermMerge(TNode t1, TNode t2) override
"theory/sets/theory_sets_rewriter.h"
properties parametric
-properties check propagate presolve
+properties check presolve
# constants
constant EMPTYSET \
d_internal->presolve();
}
-void TheorySets::propagate(Effort e) {
- d_internal->propagate(e);
-}
-
bool TheorySets::isEntailed( Node n, bool pol ) {
return d_internal->isEntailed( n, pol );
}
TrustNode expandDefinition(Node n) override;
PPAssertStatus ppAssert(TNode in, SubstitutionMap& outSubstitutions) override;
void presolve() override;
- void propagate(Effort) override;
bool isEntailed(Node n, bool pol);
private:
/** Functions to handle callbacks from equality engine */
return conjunction;
} /* mkAnd() */
-void TheorySetsPrivate::propagate(Theory::Effort effort) {}
-
bool TheorySetsPrivate::propagate(TNode literal)
{
Debug("sets-prop") << " propagate(" << literal << ")" << std::endl;
void presolve();
- void propagate(Theory::Effort);
-
/** get default output channel */
OutputChannel* getOutputChannel();
/** get the valuation */
theory THEORY_STRINGS ::CVC4::theory::strings::TheoryStrings "theory/strings/theory_strings.h"
-properties check parametric propagate presolve
+properties check parametric presolve
rewriter ::CVC4::theory::strings::SequencesRewriter "theory/strings/sequences_rewriter.h"
return EQUALITY_UNKNOWN;
}
-void TheoryStrings::propagate(Effort e) {
- // direct propagation now
-}
-
-bool TheoryStrings::propagate(TNode literal) {
- Debug("strings-propagate") << "TheoryStrings::propagate(" << literal << ")" << std::endl;
+bool TheoryStrings::propagateLit(TNode literal)
+{
+ Debug("strings-propagate")
+ << "TheoryStrings::propagateLit(" << literal << ")" << std::endl;
// If already in conflict, no more propagation
if (d_state.isInConflict())
{
- Debug("strings-propagate") << "TheoryStrings::propagate(" << literal << "): already in conflict" << std::endl;
+ Debug("strings-propagate") << "TheoryStrings::propagateLit(" << literal
+ << "): already in conflict" << std::endl;
return false;
}
// Propagate out
//--------------------------------- end initialization
/** Identify this theory */
std::string identify() const override;
- /** Propagate */
- void propagate(Effort e) override;
/** Explain */
TrustNode explain(TNode literal) override;
/** Get current substitution */
{
Debug("strings") << "NotifyClass::eqNotifyTriggerPredicate(" << predicate << ", " << (value ? "true" : "false") << ")" << std::endl;
if (value) {
- return d_str.propagate(predicate);
+ return d_str.propagateLit(predicate);
}
- return d_str.propagate(predicate.notNode());
+ return d_str.propagateLit(predicate.notNode());
}
bool eqNotifyTriggerTermEquality(TheoryId tag,
TNode t1,
{
Debug("strings") << "NotifyClass::eqNotifyTriggerTermMerge(" << tag << ", " << t1 << ", " << t2 << ")" << std::endl;
if (value) {
- return d_str.propagate(t1.eqNode(t2));
- } else {
- return d_str.propagate(t1.eqNode(t2).notNode());
+ return d_str.propagateLit(t1.eqNode(t2));
}
+ return d_str.propagateLit(t1.eqNode(t2).notNode());
}
void eqNotifyConstantTermMerge(TNode t1, TNode t2) override
{
SolverState& d_state;
};/* class TheoryStrings::NotifyClass */
/** propagate method */
- bool propagate(TNode literal);
+ bool propagateLit(TNode literal);
/** compute care graph */
void computeCareGraph() override;
/**
typechecker "theory/uf/theory_uf_type_rules.h"
properties stable-infinite parametric
-properties check propagate ppStaticLearn presolve
+properties check ppStaticLearn presolve
rewriter ::CVC4::theory::uf::TheoryUfRewriter "theory/uf/theory_uf_rewriter.h"
parameterized APPLY_UF VARIABLE 1: "application of an uninterpreted function; first parameter is the function, remaining ones are parameters to that function"
}
}/* TheoryUF::preRegisterTerm() */
-bool TheoryUF::propagate(TNode literal) {
- Debug("uf::propagate") << "TheoryUF::propagate(" << literal << ")" << std::endl;
+bool TheoryUF::propagateLit(TNode literal)
+{
+ Debug("uf::propagate") << "TheoryUF::propagateLit(" << literal << ")"
+ << std::endl;
// If already in conflict, no more propagation
if (d_conflict) {
- Debug("uf::propagate") << "TheoryUF::propagate(" << literal << "): already in conflict" << std::endl;
+ Debug("uf::propagate") << "TheoryUF::propagateLit(" << literal
+ << "): already in conflict" << std::endl;
return false;
}
// Propagate out
return ok;
}/* TheoryUF::propagate(TNode) */
-void TheoryUF::propagate(Effort effort) {
- //if (d_thss != NULL) {
- // return d_thss->propagate(effort);
- //}
-}
-
void TheoryUF::explain(TNode literal, std::vector<TNode>& assumptions, eq::EqProof* pf) {
// Do the work
bool polarity = literal.getKind() != kind::NOT;
{
Debug("uf") << "NotifyClass::eqNotifyTriggerPredicate(" << predicate << ", " << (value ? "true" : "false") << ")" << std::endl;
if (value) {
- return d_uf.propagate(predicate);
- } else {
- return d_uf.propagate(predicate.notNode());
+ return d_uf.propagateLit(predicate);
}
+ return d_uf.propagateLit(predicate.notNode());
}
bool eqNotifyTriggerTermEquality(TheoryId tag,
{
Debug("uf") << "NotifyClass::eqNotifyTriggerTermMerge(" << tag << ", " << t1 << ", " << t2 << ")" << std::endl;
if (value) {
- return d_uf.propagate(t1.eqNode(t2));
- } else {
- return d_uf.propagate(t1.eqNode(t2).notNode());
+ return d_uf.propagateLit(t1.eqNode(t2));
}
+ return d_uf.propagateLit(t1.eqNode(t2).notNode());
}
void eqNotifyConstantTermMerge(TNode t1, TNode t2) override
* Should be called to propagate the literal. We use a node here
* since some of the propagated literals are not kept anywhere.
*/
- bool propagate(TNode literal);
+ bool propagateLit(TNode literal);
/**
* Explain why this literal is true by adding assumptions
void addSharedTerm(TNode n) override;
void computeCareGraph() override;
- void propagate(Effort effort) override;
-
EqualityStatus getEqualityStatus(TNode a, TNode b) override;
std::string identify() const override { return "THEORY_UF"; }