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 : : { 26 : : /** The assertion expression. */ 27 : : Node d_assertion; 28 : : 29 : : /** Has this assertion been preregistered with this theory. */ 30 : : bool d_isPreregistered; 31 : : 32 : 34484090 : Assertion(TNode assertion, bool isPreregistered) 33 : 34484090 : : d_assertion(assertion), d_isPreregistered(isPreregistered) 34 : : { 35 : 34484090 : } 36 : : 37 : : /** Convert the assertion to a TNode. */ 38 : 25309408 : operator TNode() const { return d_assertion; } 39 : : 40 : : /** Convert the assertion to a Node. */ 41 : 0 : operator Node() const { return d_assertion; } 42 : : 43 : : }; /* struct Assertion */ 44 : : 45 : : std::ostream& operator<<(std::ostream& out, const Assertion& a); 46 : : 47 : : } // namespace theory 48 : : } // namespace cvc5::internal 49 : : 50 : : #endif /* CVC5__THEORY__ASSERTION_H */