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 : : * Preprocess equality rewriter for arithmetic 11 : : */ 12 : : 13 : : #include "cvc5_private.h" 14 : : 15 : : #ifndef CVC5__THEORY__ARITH__PP_REWRITE_EQ__H 16 : : #define CVC5__THEORY__ARITH__PP_REWRITE_EQ__H 17 : : 18 : : #include "context/context.h" 19 : : #include "expr/node.h" 20 : : #include "proof/eager_proof_generator.h" 21 : : #include "proof/proof_node_manager.h" 22 : : #include "smt/env_obj.h" 23 : : 24 : : namespace cvc5::internal { 25 : : namespace theory { 26 : : namespace arith { 27 : : 28 : : /** 29 : : * This class is responsible for rewriting arithmetic equalities based on the 30 : : * current options. 31 : : * 32 : : * In particular, we may rewrite (= x y) to (and (>= x y) (<= x y)). 33 : : */ 34 : : class PreprocessRewriteEq : protected EnvObj 35 : : { 36 : : public: 37 : : PreprocessRewriteEq(Env& env); 38 : 50703 : ~PreprocessRewriteEq() {} 39 : : /** 40 : : * Preprocess equality, applies ppRewrite for equalities. This method is 41 : : * distinct from ppRewrite since it is not allowed to construct lemmas. 42 : : */ 43 : : TrustNode ppRewriteEq(TNode eq); 44 : : 45 : : private: 46 : : /** Used to prove pp-rewrites */ 47 : : EagerProofGenerator d_ppPfGen; 48 : : }; 49 : : 50 : : } // namespace arith 51 : : } // namespace theory 52 : : } // namespace cvc5::internal 53 : : 54 : : #endif