0d95db16637fa596fd837a6a89febcc3143c8f1f
1 /********************* */
2 /*! \file ext_theory_callback.h
4 ** Top contributors (to current version):
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
8 ** in the top-level source directory) and their institutional affiliations.
9 ** All rights reserved. See the file COPYING in the top-level source
10 ** directory for licensing information.\endverbatim
12 ** \brief The extended theory callback for non-linear arithmetic
15 #ifndef CVC4__THEORY__ARITH__NL__EXT_THEORY_CALLBACK_H
16 #define CVC4__THEORY__ARITH__NL__EXT_THEORY_CALLBACK_H
18 #include "expr/node.h"
19 #include "theory/ext_theory.h"
26 class NlExtTheoryCallback
: public ExtTheoryCallback
29 NlExtTheoryCallback(eq::EqualityEngine
* ee
);
30 ~NlExtTheoryCallback() {}
31 /** Get current substitution
33 * This function and the one below are
34 * used for context-dependent
35 * simplification, see Section 3.1 of
36 * "Designing Theory Solvers with Extensions"
37 * by Reynolds et al. FroCoS 2017.
39 * effort : an identifier indicating the stage where
40 * we are performing context-dependent simplification,
41 * vars : a set of arithmetic variables.
43 * This function populates subs and exp, such that for 0 <= i < vars.size():
44 * ( exp[vars[i]] ) => vars[i] = subs[i]
45 * where exp[vars[i]] is a set of assertions
46 * that hold in the current context. We call { vars -> subs } a "derivable
47 * substituion" (see Reynolds et al. FroCoS 2017).
49 bool getCurrentSubstitution(int effort
,
50 const std::vector
<Node
>& vars
,
51 std::vector
<Node
>& subs
,
52 std::map
<Node
, std::vector
<Node
>>& exp
) override
;
53 /** Is the term n in reduced form?
55 * Used for context-dependent simplification.
57 * effort : an identifier indicating the stage where
58 * we are performing context-dependent simplification,
59 * on : the original term that we reduced to n,
60 * exp : an explanation such that ( exp => on = n ).
62 * We return a pair ( b, exp' ) such that
64 * n is in reduced form
65 * if exp' is non-null, then ( exp' => on = n )
66 * The second part of the pair is used for constructing
67 * minimal explanations for context-dependent simplifications.
69 bool isExtfReduced(int effort
,
72 std::vector
<Node
>& exp
) override
;
75 /** The underlying equality engine. */
76 eq::EqualityEngine
* d_ee
;
77 /** Commonly used nodes */
86 #endif /* CVC4__THEORY__ARITH__NL__EXT_THEORY_CALLBACK_H */