/*! \file bv_inverter.h
** \verbatim
** Top contributors (to current version):
- ** Mathias Preiner, Andrew Reynolds, Aina Niemetz
+ ** Andrew Reynolds, Mathias Preiner, Aina Niemetz
** This file is part of the CVC4 project.
- ** Copyright (c) 2009-2018 by the authors listed in the file AUTHORS
+ ** Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
** in the top-level source directory) and their institutional affiliations.
** All rights reserved. See the file COPYING in the top-level source
** directory for licensing information.\endverbatim
#include "cvc4_private.h"
-#ifndef __CVC4__BV_INVERTER_H
-#define __CVC4__BV_INVERTER_H
+#ifndef CVC4__BV_INVERTER_H
+#define CVC4__BV_INVERTER_H
#include <map>
#include <unordered_map>
{
public:
BvInverterQuery() {}
- ~BvInverterQuery() {}
+ virtual ~BvInverterQuery() {}
/** returns the current model value of n */
virtual Node getModelValue(Node n) = 0;
/** returns a bound variable of type tn */
* pvs (if pvs is non-null). If return value R is non-null, then :
* lit.path = pv R.path = sv
* R.path' = pvs for all lit.path' = pv, where path' != path
+ *
+ * If the flag projectNl is false, we return the null node if the
+ * literal lit is non-linear with respect to pv.
*/
- Node getPathToPv(
- Node lit, Node pv, Node sv, Node pvs, std::vector<unsigned>& path);
+ Node getPathToPv(Node lit,
+ Node pv,
+ Node sv,
+ Node pvs,
+ std::vector<unsigned>& path,
+ bool projectNl);
/**
* Same as above, but does not linearize lit for pv.
*/
Node getPathToPv(Node lit, Node pv, std::vector<unsigned>& path)
{
- return getPathToPv(lit, pv, pv, Node::null(), path);
+ return getPathToPv(lit, pv, pv, Node::null(), path, false);
}
/** solveBvLit
* non-null node t, then sv = t is the solved form of lit.
*
* If the BvInverterQuery provided to this function call is null, then
- * the solution returned by this call will not contain CHOICE expressions.
- * If the solved form for lit requires introducing a CHOICE expression,
+ * the solution returned by this call will not contain WITNESS expressions.
+ * If the solved form for lit requires introducing a WITNESS expression,
* then this call will return null.
*/
Node solveBvLit(Node sv,
* is a BV tautology where x is getSolveVariable( tn ).
*
* It returns a term of the form:
- * (choice y. cond { x -> y })
+ * (witness y. cond { x -> y })
* where y is a bound variable and x is getSolveVariable( tn ).
*
* In some cases, we may return a term t if cond implies an equality on
} // namespace theory
} // namespace CVC4
-#endif /* __CVC4__BV_INVERTER_H */
+#endif /* CVC4__BV_INVERTER_H */