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 : : * Utilities for management of equality engines. 11 : : */ 12 : : 13 : : #include "theory/ee_manager.h" 14 : : 15 : : #include "theory/theory_model.h" 16 : : 17 : : namespace cvc5::internal { 18 : : namespace theory { 19 : : 20 : 51003 : EqEngineManager::EqEngineManager(Env& env, TheoryEngine& te, SharedSolver& shs) 21 : 51003 : : EnvObj(env), d_te(te), d_sharedSolver(shs) 22 : : { 23 : 51003 : } 24 : : 25 : 714042 : const EeTheoryInfo* EqEngineManager::getEeTheoryInfo(TheoryId tid) const 26 : : { 27 : 714042 : std::map<TheoryId, EeTheoryInfo>::const_iterator it = d_einfo.find(tid); 28 [ + - ]: 714042 : if (it != d_einfo.end()) 29 : : { 30 : 714042 : return &it->second; 31 : : } 32 : 0 : return nullptr; 33 : : } 34 : : 35 : 662299 : eq::EqualityEngine* EqEngineManager::allocateEqualityEngine(EeSetupInfo& esi, 36 : : context::Context* c) 37 : : { 38 [ + + ]: 662299 : if (esi.d_notify != nullptr) 39 : : { 40 : : return new eq::EqualityEngine( 41 : 611296 : d_env, c, *esi.d_notify, esi.d_name, esi.d_constantsAreTriggers); 42 : : } 43 : : // the theory doesn't care about explicit notifications 44 : : return new eq::EqualityEngine( 45 : 51003 : d_env, c, esi.d_name, esi.d_constantsAreTriggers); 46 : : } 47 : : 48 : : } // namespace theory 49 : : } // namespace cvc5::internal