(proof-new) Make CombinationEngine proof producing (#4955)
[cvc5.git] / src / theory / theory_engine.h
1 /********************* */
2 /*! \file theory_engine.h
3 ** \verbatim
4 ** Top contributors (to current version):
5 ** Dejan Jovanovic, Andrew Reynolds, Morgan Deters
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
11 **
12 ** \brief The theory engine
13 **
14 ** The theory engine.
15 **/
16
17 #include "cvc4_private.h"
18
19 #ifndef CVC4__THEORY_ENGINE_H
20 #define CVC4__THEORY_ENGINE_H
21
22 #include <deque>
23 #include <memory>
24 #include <set>
25 #include <unordered_map>
26 #include <utility>
27 #include <vector>
28
29 #include "base/check.h"
30 #include "context/cdhashset.h"
31 #include "expr/node.h"
32 #include "options/options.h"
33 #include "options/smt_options.h"
34 #include "options/theory_options.h"
35 #include "prop/prop_engine.h"
36 #include "smt/command.h"
37 #include "theory/atom_requests.h"
38 #include "theory/engine_output_channel.h"
39 #include "theory/interrupted.h"
40 #include "theory/rewriter.h"
41 #include "theory/sort_inference.h"
42 #include "theory/substitutions.h"
43 #include "theory/term_registration_visitor.h"
44 #include "theory/theory.h"
45 #include "theory/theory_preprocessor.h"
46 #include "theory/uf/equality_engine.h"
47 #include "theory/valuation.h"
48 #include "util/hash.h"
49 #include "util/resource_manager.h"
50 #include "util/statistics_registry.h"
51 #include "util/unsafe_interrupt_exception.h"
52
53 namespace CVC4 {
54
55 class ResourceManager;
56 class LemmaProofRecipe;
57
58 /**
59 * A pair of a theory and a node. This is used to mark the flow of
60 * propagations between theories.
61 */
62 struct NodeTheoryPair {
63 Node d_node;
64 theory::TheoryId d_theory;
65 size_t d_timestamp;
66 NodeTheoryPair(TNode n, theory::TheoryId t, size_t ts = 0)
67 : d_node(n), d_theory(t), d_timestamp(ts)
68 {
69 }
70 NodeTheoryPair() : d_theory(theory::THEORY_LAST), d_timestamp() {}
71 // Comparison doesn't take into account the timestamp
72 bool operator == (const NodeTheoryPair& pair) const {
73 return d_node == pair.d_node && d_theory == pair.d_theory;
74 }
75 };/* struct NodeTheoryPair */
76
77 struct NodeTheoryPairHashFunction {
78 NodeHashFunction hashFunction;
79 // Hash doesn't take into account the timestamp
80 size_t operator()(const NodeTheoryPair& pair) const {
81 uint64_t hash = fnv1a::fnv1a_64(NodeHashFunction()(pair.d_node));
82 return static_cast<size_t>(fnv1a::fnv1a_64(pair.d_theory, hash));
83 }
84 };/* struct NodeTheoryPairHashFunction */
85
86
87 /* Forward declarations */
88 namespace theory {
89 class TheoryModel;
90 class CombinationEngine;
91 class DecisionManager;
92 class RelevanceManager;
93
94 namespace eq {
95 class EqualityEngine;
96 } // namespace eq
97
98 namespace quantifiers {
99 class TermDb;
100 }
101
102 class EntailmentCheckParameters;
103 class EntailmentCheckSideEffects;
104 }/* CVC4::theory namespace */
105
106 class RemoveTermFormulas;
107
108 /**
109 * This is essentially an abstraction for a collection of theories. A
110 * TheoryEngine provides services to a PropEngine, making various
111 * T-solvers look like a single unit to the propositional part of
112 * CVC4.
113 */
114 class TheoryEngine {
115
116 /** Shared terms database can use the internals notify the theories */
117 friend class SharedTermsDatabase;
118 friend class theory::CombinationEngine;
119 friend class theory::quantifiers::TermDb;
120 friend class theory::EngineOutputChannel;
121 friend class theory::CombinationEngine;
122
123 /** Associated PropEngine engine */
124 prop::PropEngine* d_propEngine;
125
126 /** Our context */
127 context::Context* d_context;
128
129 /** Our user context */
130 context::UserContext* d_userContext;
131
132 /**
133 * A table of from theory IDs to theory pointers. Never use this table
134 * directly, use theoryOf() instead.
135 */
136 theory::Theory* d_theoryTable[theory::THEORY_LAST];
137
138 /**
139 * A collection of theories that are "active" for the current run.
140 * This set is provided by the user (as a logic string, say, in SMT-LIBv2
141 * format input), or else by default it's all-inclusive. This is important
142 * because we can optimize for single-theory runs (no sharing), can reduce
143 * the cost of walking the DAG on registration, etc.
144 */
145 const LogicInfo& d_logicInfo;
146
147 //--------------------------------- new proofs
148 /** Proof node manager used by this theory engine, if proofs are enabled */
149 ProofNodeManager* d_pnm;
150 //--------------------------------- end new proofs
151
152 /**
153 * The database of shared terms.
154 */
155 SharedTermsDatabase d_sharedTerms;
156
157 /** The combination manager we are using */
158 std::unique_ptr<theory::CombinationEngine> d_tc;
159 /**
160 * The quantifiers engine
161 */
162 theory::QuantifiersEngine* d_quantEngine;
163 /**
164 * The decision manager
165 */
166 std::unique_ptr<theory::DecisionManager> d_decManager;
167 /** The relevance manager */
168 std::unique_ptr<theory::RelevanceManager> d_relManager;
169
170 /** Default visitor for pre-registration */
171 PreRegisterVisitor d_preRegistrationVisitor;
172
173 /** Visitor for collecting shared terms */
174 SharedTermsVisitor d_sharedTermsVisitor;
175
176 /** are we in eager model building mode? (see setEagerModelBuilding). */
177 bool d_eager_model_building;
178
179 typedef std::unordered_map<Node, Node, NodeHashFunction> NodeMap;
180 typedef std::unordered_map<TNode, Node, TNodeHashFunction> TNodeMap;
181
182 /**
183 * Used for "missed-t-propagations" dumping mode only. A set of all
184 * theory-propagable literals.
185 */
186 context::CDList<TNode> d_possiblePropagations;
187
188 /**
189 * Used for "missed-t-propagations" dumping mode only. A
190 * context-dependent set of those theory-propagable literals that
191 * have been propagated.
192 */
193 context::CDHashSet<Node, NodeHashFunction> d_hasPropagated;
194
195 /**
196 * Output channels for individual theories.
197 */
198 theory::EngineOutputChannel* d_theoryOut[theory::THEORY_LAST];
199
200 /**
201 * Are we in conflict.
202 */
203 context::CDO<bool> d_inConflict;
204
205 /**
206 * Are we in "SAT mode"? In this state, the user can query for the model.
207 * This corresponds to the state in Figure 4.1, page 52 of the SMT-LIB
208 * standard, version 2.6.
209 */
210 bool d_inSatMode;
211
212 /**
213 * Called by the theories to notify of a conflict.
214 */
215 void conflict(TNode conflict, theory::TheoryId theoryId);
216
217 /**
218 * Debugging flag to ensure that shutdown() is called before the
219 * destructor.
220 */
221 bool d_hasShutDown;
222
223 /**
224 * True if a theory has notified us of incompleteness (at this
225 * context level or below).
226 */
227 context::CDO<bool> d_incomplete;
228
229 /**
230 * Called by the theories to notify that the current branch is incomplete.
231 */
232 void setIncomplete(theory::TheoryId theory) {
233 d_incomplete = true;
234 }
235
236 /**
237 * Mapping of propagations from recievers to senders.
238 */
239 typedef context::CDHashMap<NodeTheoryPair, NodeTheoryPair, NodeTheoryPairHashFunction> PropagationMap;
240 PropagationMap d_propagationMap;
241
242 /**
243 * Timestamp of propagations
244 */
245 context::CDO<size_t> d_propagationMapTimestamp;
246
247 /**
248 * Literals that are propagated by the theory. Note that these are TNodes.
249 * The theory can only propagate nodes that have an assigned literal in the
250 * SAT solver and are hence referenced in the SAT solver.
251 */
252 context::CDList<TNode> d_propagatedLiterals;
253
254 /**
255 * The index of the next literal to be propagated by a theory.
256 */
257 context::CDO<unsigned> d_propagatedLiteralsIndex;
258
259 /**
260 * Called by the output channel to propagate literals and facts
261 * @return false if immediate conflict
262 */
263 bool propagate(TNode literal, theory::TheoryId theory);
264
265 /**
266 * Internal method to call the propagation routines and collect the
267 * propagated literals.
268 */
269 void propagate(theory::Theory::Effort effort);
270
271 /**
272 * A variable to mark if we added any lemmas.
273 */
274 bool d_lemmasAdded;
275
276 /**
277 * A variable to mark if the OutputChannel was "used" by any theory
278 * since the start of the last check. If it has been, we require
279 * a FULL_EFFORT check before exiting and reporting SAT.
280 *
281 * See the documentation for the needCheck() function, below.
282 */
283 bool d_outputChannelUsed;
284
285 /** Atom requests from lemmas */
286 AtomRequests d_atomRequests;
287
288 /**
289 * Adds a new lemma, returning its status.
290 * @param node the lemma
291 * @param negated should the lemma be asserted negated
292 * @param p the properties of the lemma.
293 */
294 theory::LemmaStatus lemma(TNode node,
295 ProofRule rule,
296 bool negated,
297 theory::LemmaProperty p,
298 theory::TheoryId atomsTo);
299
300 /** Enusre that the given atoms are send to the given theory */
301 void ensureLemmaAtoms(const std::vector<TNode>& atoms, theory::TheoryId theory);
302
303 /** sort inference module */
304 SortInference d_sortInfer;
305
306 /** The theory preprocessor */
307 theory::TheoryPreprocessor d_tpp;
308
309 /** Time spent in theory combination */
310 TimerStat d_combineTheoriesTime;
311
312 Node d_true;
313 Node d_false;
314
315 /** Whether we were just interrupted (or not) */
316 bool d_interrupted;
317 ResourceManager* d_resourceManager;
318
319 public:
320 /** Constructs a theory engine */
321 TheoryEngine(context::Context* context,
322 context::UserContext* userContext,
323 ResourceManager* rm,
324 RemoveTermFormulas& iteRemover,
325 const LogicInfo& logic);
326
327 /** Destroys a theory engine */
328 ~TheoryEngine();
329
330 void interrupt();
331
332 /** "Spend" a resource during a search or preprocessing.*/
333 void spendResource(ResourceManager::Resource r);
334
335 /**
336 * Adds a theory. Only one theory per TheoryId can be present, so if
337 * there is another theory it will be deleted.
338 */
339 template <class TheoryClass>
340 inline void addTheory(theory::TheoryId theoryId)
341 {
342 Assert(d_theoryTable[theoryId] == NULL && d_theoryOut[theoryId] == NULL);
343 d_theoryOut[theoryId] = new theory::EngineOutputChannel(this, theoryId);
344 d_theoryTable[theoryId] = new TheoryClass(d_context,
345 d_userContext,
346 *d_theoryOut[theoryId],
347 theory::Valuation(this),
348 d_logicInfo,
349 nullptr);
350 theory::Rewriter::registerTheoryRewriter(
351 theoryId, d_theoryTable[theoryId]->getTheoryRewriter());
352 }
353
354 void setPropEngine(prop::PropEngine* propEngine)
355 {
356 d_propEngine = propEngine;
357 }
358
359 /**
360 * Called when all initialization of options/logic is done, after theory
361 * objects have been created.
362 *
363 * This initializes the quantifiers engine, the "official" equality engines
364 * of each theory as required, and the model and model builder utilities.
365 */
366 void finishInit();
367
368 /**
369 * Get a pointer to the underlying propositional engine.
370 */
371 inline prop::PropEngine* getPropEngine() const {
372 return d_propEngine;
373 }
374
375 /**
376 * Get a pointer to the underlying sat context.
377 */
378 inline context::Context* getSatContext() const {
379 return d_context;
380 }
381
382 /**
383 * Get a pointer to the underlying user context.
384 */
385 inline context::Context* getUserContext() const {
386 return d_userContext;
387 }
388
389 /**
390 * Get a pointer to the underlying quantifiers engine.
391 */
392 theory::QuantifiersEngine* getQuantifiersEngine() const {
393 return d_quantEngine;
394 }
395 /**
396 * Get a pointer to the underlying decision manager.
397 */
398 theory::DecisionManager* getDecisionManager() const
399 {
400 return d_decManager.get();
401 }
402
403 private:
404 /**
405 * Queue of nodes for pre-registration.
406 */
407 std::queue<TNode> d_preregisterQueue;
408
409 /**
410 * Boolean flag denoting we are in pre-registration.
411 */
412 bool d_inPreregister;
413
414 /**
415 * Did the theories get any new facts since the last time we called
416 * check()
417 */
418 context::CDO<bool> d_factsAsserted;
419
420 /**
421 * Assert the formula to the given theory.
422 * @param assertion the assertion to send (not necesserily normalized)
423 * @param original the assertion as it was sent in from the propagating theory
424 * @param toTheoryId the theory to assert to
425 * @param fromTheoryId the theory that sent it
426 */
427 void assertToTheory(TNode assertion, TNode originalAssertion, theory::TheoryId toTheoryId, theory::TheoryId fromTheoryId);
428
429 /**
430 * Marks a theory propagation from a theory to a theory where a
431 * theory could be the THEORY_SAT_SOLVER for literals coming from
432 * or being propagated to the SAT solver. If the receiving theory
433 * already recieved the literal, the method returns false, otherwise
434 * it returns true.
435 *
436 * @param assertion the normalized assertion being sent
437 * @param originalAssertion the actual assertion that was sent
438 * @param toTheoryId the theory that is on the receiving end
439 * @param fromTheoryId the theory that sent the assertion
440 * @return true if a new assertion, false if theory already got it
441 */
442 bool markPropagation(TNode assertion, TNode originalAssertions, theory::TheoryId toTheoryId, theory::TheoryId fromTheoryId);
443
444 /**
445 * Computes the explanation by travarsing the propagation graph and
446 * asking relevant theories to explain the propagations. Initially
447 * the explanation vector should contain only the element (node, theory)
448 * where the node is the one to be explained, and the theory is the
449 * theory that sent the literal. The lemmaProofRecipe will contain a list
450 * of the explanation steps required to produce the original node.
451 */
452 void getExplanation(std::vector<NodeTheoryPair>& explanationVector, LemmaProofRecipe* lemmaProofRecipe);
453
454 public:
455 /**
456 * Signal the start of a new round of assertion preprocessing
457 */
458 void preprocessStart();
459
460 /**
461 * Runs theory specific preprocessing on the non-Boolean parts of
462 * the formula. This is only called on input assertions, after ITEs
463 * have been removed.
464 */
465 Node preprocess(TNode node);
466
467 /** Notify (preprocessed) assertions. */
468 void notifyPreprocessedAssertions(const std::vector<Node>& assertions);
469
470 /** Return whether or not we are incomplete (in the current context). */
471 inline bool isIncomplete() const { return d_incomplete; }
472
473 /**
474 * Returns true if we need another round of checking. If this
475 * returns true, check(FULL_EFFORT) _must_ be called by the
476 * propositional layer before reporting SAT.
477 *
478 * This is especially necessary for incomplete theories that lazily
479 * output some lemmas on FULL_EFFORT check (e.g. quantifier reasoning
480 * outputing quantifier instantiations). In such a case, a lemma can
481 * be asserted that is simplified away (perhaps it's already true).
482 * However, we must maintain the invariant that, if a theory uses the
483 * OutputChannel, it implicitly requests that another check(FULL_EFFORT)
484 * be performed before exit, even if no new facts are on its fact queue,
485 * as it might decide to further instantiate some lemmas, precluding
486 * a SAT response.
487 */
488 inline bool needCheck() const {
489 return d_outputChannelUsed || d_lemmasAdded;
490 }
491 /**
492 * Is the literal lit (possibly) critical for satisfying the input formula in
493 * the current context? This call is applicable only during collectModelInfo
494 * or during LAST_CALL effort.
495 */
496 bool isRelevant(Node lit) const;
497 /**
498 * This is called at shutdown time by the SmtEngine, just before
499 * destruction. It is important because there are destruction
500 * ordering issues between PropEngine and Theory.
501 */
502 void shutdown();
503
504 /**
505 * Solve the given literal with a theory that owns it.
506 */
507 theory::Theory::PPAssertStatus solve(TNode literal,
508 theory::SubstitutionMap& substitutionOut);
509
510 /**
511 * Preregister a Theory atom with the responsible theory (or
512 * theories).
513 */
514 void preRegister(TNode preprocessed);
515
516 /**
517 * Assert the formula to the appropriate theory.
518 * @param node the assertion
519 */
520 void assertFact(TNode node);
521
522 /**
523 * Check all (currently-active) theories for conflicts.
524 * @param effort the effort level to use
525 */
526 void check(theory::Theory::Effort effort);
527
528 /**
529 * Calls ppStaticLearn() on all theories, accumulating their
530 * combined contributions in the "learned" builder.
531 */
532 void ppStaticLearn(TNode in, NodeBuilder<>& learned);
533
534 /**
535 * Calls presolve() on all theories and returns true
536 * if one of the theories discovers a conflict.
537 */
538 bool presolve();
539
540 /**
541 * Calls postsolve() on all theories.
542 */
543 void postsolve();
544
545 /**
546 * Calls notifyRestart() on all active theories.
547 */
548 void notifyRestart();
549
550 void getPropagatedLiterals(std::vector<TNode>& literals) {
551 for (; d_propagatedLiteralsIndex < d_propagatedLiterals.size(); d_propagatedLiteralsIndex = d_propagatedLiteralsIndex + 1) {
552 Debug("getPropagatedLiterals") << "TheoryEngine::getPropagatedLiterals: propagating: " << d_propagatedLiterals[d_propagatedLiteralsIndex] << std::endl;
553 literals.push_back(d_propagatedLiterals[d_propagatedLiteralsIndex]);
554 }
555 }
556
557 /**
558 * Returns the next decision request, or null if none exist. The next
559 * decision request is a literal that this theory engine prefers the SAT
560 * solver to make as its next decision. Decision requests are managed by
561 * the decision manager d_decManager.
562 */
563 Node getNextDecisionRequest();
564
565 bool properConflict(TNode conflict) const;
566
567 /**
568 * Returns an explanation of the node propagated to the SAT solver.
569 */
570 Node getExplanation(TNode node);
571
572 /**
573 * Returns an explanation of the node propagated to the SAT solver and the theory
574 * that propagated it.
575 */
576 Node getExplanationAndRecipe(TNode node, LemmaProofRecipe* proofRecipe);
577
578 /**
579 * Get the pointer to the model object used by this theory engine.
580 */
581 theory::TheoryModel* getModel();
582 /**
583 * Get the current model for the current set of assertions. This method
584 * should only be called immediately after a satisfiable or unknown
585 * response to a check-sat call, and only if produceModels is true.
586 *
587 * If the model is not already built, this will cause this theory engine
588 * to build the model.
589 *
590 * If the model is not available (for instance, if the last call to check-sat
591 * was interrupted), then this returns the null pointer.
592 */
593 theory::TheoryModel* getBuiltModel();
594 /**
595 * This forces the model maintained by the combination engine to be built
596 * if it has not been done so already. This should be called only during a
597 * last call effort check after theory combination is run.
598 *
599 * @return true if the model was successfully built (possibly prior to this
600 * call).
601 */
602 bool buildModel();
603 /** set eager model building
604 *
605 * If this method is called, then this TheoryEngine will henceforth build
606 * its model immediately after every satisfiability check that results
607 * in a satisfiable or unknown result. The motivation for this mode is to
608 * accomodate API users that get the model object from the TheoryEngine,
609 * where we want to ensure that this model is always valid.
610 * TODO (#2648): revisit this.
611 */
612 void setEagerModelBuilding() { d_eager_model_building = true; }
613
614 /** get synth solutions
615 *
616 * This method returns true if there is a synthesis solution available. This
617 * is the case if the last call to check satisfiability originated in a
618 * check-synth call, and the synthesis solver successfully found a solution
619 * for all active synthesis conjectures.
620 *
621 * This method adds entries to sol_map that map functions-to-synthesize with
622 * their solutions, for all active conjectures. This should be called
623 * immediately after the solver answers unsat for sygus input.
624 *
625 * For details on what is added to sol_map, see
626 * SynthConjecture::getSynthSolutions.
627 */
628 bool getSynthSolutions(std::map<Node, std::map<Node, Node> >& sol_map);
629
630 /**
631 * Get the theory associated to a given Node.
632 *
633 * @returns the theory, or NULL if the TNode is
634 * of built-in type.
635 */
636 inline theory::Theory* theoryOf(TNode node) const {
637 return d_theoryTable[theory::Theory::theoryOf(node)];
638 }
639
640 /**
641 * Get the theory associated to a the given theory id.
642 *
643 * @returns the theory
644 */
645 inline theory::Theory* theoryOf(theory::TheoryId theoryId) const {
646 Assert(theoryId < theory::THEORY_LAST);
647 return d_theoryTable[theoryId];
648 }
649
650 inline bool isTheoryEnabled(theory::TheoryId theoryId) const {
651 return d_logicInfo.isTheoryEnabled(theoryId);
652 }
653 /** get the logic info used by this theory engine */
654 const LogicInfo& getLogicInfo() const;
655 /**
656 * Returns the equality status of the two terms, from the theory
657 * that owns the domain type. The types of a and b must be the same.
658 */
659 theory::EqualityStatus getEqualityStatus(TNode a, TNode b);
660
661 /**
662 * Returns the value that a theory that owns the type of var currently
663 * has (or null if none);
664 */
665 Node getModelValue(TNode var);
666
667 /**
668 * Takes a literal and returns an equivalent literal that is guaranteed to be a SAT literal
669 */
670 Node ensureLiteral(TNode n);
671
672 /**
673 * Print all instantiations made by the quantifiers module.
674 */
675 void printInstantiations( std::ostream& out );
676
677 /**
678 * Print solution for synthesis conjectures found by ce_guided_instantiation module
679 */
680 void printSynthSolution( std::ostream& out );
681
682 /**
683 * Get list of quantified formulas that were instantiated
684 */
685 void getInstantiatedQuantifiedFormulas( std::vector< Node >& qs );
686
687 /**
688 * Get instantiation methods
689 * first inputs forall x.q[x] and returns ( q[a], ..., q[z] )
690 * second inputs forall x.q[x] and returns ( a, ..., z )
691 * third and fourth return mappings e.g. forall x.q1[x] -> ( q1[a]...q1[z] ) , ... , forall x.qn[x] -> ( qn[a]...qn[z] )
692 */
693 void getInstantiations( Node q, std::vector< Node >& insts );
694 void getInstantiationTermVectors( Node q, std::vector< std::vector< Node > >& tvecs );
695 void getInstantiations( std::map< Node, std::vector< Node > >& insts );
696 void getInstantiationTermVectors( std::map< Node, std::vector< std::vector< Node > > >& insts );
697
698 /**
699 * Get instantiated conjunction, returns q[t1] ^ ... ^ q[tn] where t1...tn are current set of instantiations for q.
700 * Can be used for quantifier elimination when satisfiable and q[t1] ^ ... ^ q[tn] |= q
701 */
702 Node getInstantiatedConjunction( Node q );
703
704 /**
705 * Forwards an entailment check according to the given theoryOfMode.
706 * See theory.h for documentation on entailmentCheck().
707 */
708 std::pair<bool, Node> entailmentCheck(options::TheoryOfMode mode, TNode lit);
709
710 private:
711
712 /** Dump the assertions to the dump */
713 void dumpAssertions(const char* tag);
714
715 /** For preprocessing pass lifting bit-vectors of size 1 to booleans */
716 public:
717
718 SortInference* getSortInference() { return &d_sortInfer; }
719
720 /** Prints the assertions to the debug stream */
721 void printAssertions(const char* tag);
722
723 private:
724
725 std::map< std::string, std::vector< theory::Theory* > > d_attr_handle;
726
727 public:
728 /** Set user attribute.
729 *
730 * This function is called when an attribute is set by a user. In SMT-LIBv2
731 * this is done via the syntax (! n :attr)
732 */
733 void setUserAttribute(const std::string& attr,
734 Node n,
735 const std::vector<Node>& node_values,
736 const std::string& str_value);
737
738 /** Handle user attribute.
739 *
740 * Associates theory t with the attribute attr. Theory t will be
741 * notified whenever an attribute of name attr is set.
742 */
743 void handleUserAttribute(const char* attr, theory::Theory* t);
744
745 /**
746 * Check that the theory assertions are satisfied in the model.
747 * This function is called from the smt engine's checkModel routine.
748 */
749 void checkTheoryAssertionsWithModel(bool hardFailure);
750
751 private:
752 IntStat d_arithSubstitutionsAdded;
753
754 };/* class TheoryEngine */
755
756 }/* CVC4 namespace */
757
758 #endif /* CVC4__THEORY_ENGINE_H */