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 : : * Class to encapsulate preregistration duties 11 : : * 12 : : * This class permits the CNF stream implementation to reach into the theory 13 : : * engine to preregister only those terms with an associated SAT literal (at 14 : : * the point when they get the SAT literal), without having to refer to the 15 : : * TheoryEngine class directly. 16 : : */ 17 : : 18 : : #include "cvc5_private.h" 19 : : 20 : : #ifndef CVC5__PROP__REGISTRAR_H 21 : : #define CVC5__PROP__REGISTRAR_H 22 : : 23 : : #include "expr/node.h" 24 : : 25 : : namespace cvc5::internal { 26 : : namespace prop { 27 : : 28 : : class Registrar 29 : : { 30 : : public: 31 : 91592 : virtual ~Registrar() {} 32 : : /** 33 : : * Called when a SAT literal for atom n has been allocated in the SAT solver. 34 : : * @param n The SAT literal to be notified. 35 : : */ 36 : : virtual void notifySatLiteral(Node n) = 0; 37 : : 38 : : }; /* class Registrar */ 39 : : 40 : : class NullRegistrar : public Registrar 41 : : { 42 : : public: 43 : 2 : void notifySatLiteral(CVC5_UNUSED Node n) override {} 44 : : 45 : : }; /* class NullRegistrar */ 46 : : 47 : : } // namespace prop 48 : : } // namespace cvc5::internal 49 : : 50 : : #endif /* CVC5__PROP__REGISTRAR_H */