Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * This file is part of the cvc5 project. 3 : : * 4 : : * Copyright (c) 2009-2026 by the authors listed in the file AUTHORS 5 : : * in the top-level source directory and their institutional affiliations. 6 : : * All rights reserved. See the file COPYING in the top-level source 7 : : * directory for licensing information. 8 : : * **************************************************************************** 9 : : * 10 : : * The representation of the assertions sent to theories. 11 : : */ 12 : : 13 : : #include "cvc5_private.h" 14 : : 15 : : #ifndef CVC5__THEORY__ASSERTION_H 16 : : #define CVC5__THEORY__ASSERTION_H 17 : : 18 : : #include "expr/node.h" 19 : : 20 : : namespace cvc5::internal { 21 : : namespace theory { 22 : : 23 : : /** Information about an assertion for the theories. */ 24 : : struct Assertion { 25 : : /** The assertion expression. */ 26 : : Node d_assertion; 27 : : 28 : : /** Has this assertion been preregistered with this theory. */ 29 : : bool d_isPreregistered; 30 : : 31 : 34373433 : Assertion(TNode assertion, bool isPreregistered) 32 : 34373433 : : d_assertion(assertion), d_isPreregistered(isPreregistered) 33 : : { 34 : 34373433 : } 35 : : 36 : : /** Convert the assertion to a TNode. */ 37 : 25211754 : operator TNode() const { return d_assertion; } 38 : : 39 : : /** Convert the assertion to a Node. */ 40 : 0 : operator Node() const { return d_assertion; } 41 : : 42 : : }; /* struct Assertion */ 43 : : 44 : : std::ostream& operator<<(std::ostream& out, const Assertion& a); 45 : : 46 : : } // namespace theory 47 : : } // namespace cvc5::internal 48 : : 49 : : #endif /* CVC5__THEORY__ASSERTION_H */