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 default model constructor for strings 11 : : */ 12 : : 13 : : #include "cvc5_private.h" 14 : : 15 : : #ifndef CVC5__THEORY__STRINGS__DEFAULT_MODEL_CONS_H 16 : : #define CVC5__THEORY__STRINGS__DEFAULT_MODEL_CONS_H 17 : : 18 : : #include "smt/env_obj.h" 19 : : #include "theory/strings/model_cons.h" 20 : : 21 : : namespace cvc5::internal { 22 : : namespace theory { 23 : : namespace strings { 24 : : 25 : : class SolverState; 26 : : class CoreSolver; 27 : : 28 : : /** 29 : : * Default model construction for strings 30 : : */ 31 : : class ModelConsDefault : public ModelCons 32 : : { 33 : : public: 34 : : ModelConsDefault(Env& env, SolverState& state, CoreSolver& csolver); 35 : 28666 : virtual ~ModelConsDefault() {} 36 : : /** 37 : : * Get string representatives from, which simply takes the representatives 38 : : * of all terms in termSet. 39 : : */ 40 : : void getStringRepresentativesFrom( 41 : : const std::set<Node>& termSet, 42 : : std::unordered_set<TypeNode>& repTypes, 43 : : std::map<TypeNode, std::unordered_set<Node>>& repSet, 44 : : std::vector<Node>& auxEq) override; 45 : : /** 46 : : * Separate by length, which separates the equivalence classes in ns 47 : : * based on the arrangement of their length terms in the equality engine. 48 : : * It furthermore computes the model value for each of these length 49 : : * terms based on the valuation class. 50 : : */ 51 : : void separateByLength(TheoryModel* m, 52 : : const std::vector<Node>& ns, 53 : : std::vector<std::vector<Node>>& cols, 54 : : std::vector<Node>& lts) override; 55 : : /** Get the normal form for n from the core solver */ 56 : : std::vector<Node> getNormalForm(Node n) override; 57 : : 58 : : protected: 59 : : /** The solver state object */ 60 : : SolverState& d_state; 61 : : /** The core solver */ 62 : : CoreSolver& d_csolver; 63 : : }; 64 : : 65 : : } // namespace strings 66 : : } // namespace theory 67 : : } // namespace cvc5::internal 68 : : 69 : : #endif /* CVC5__THEORY__STRINGS__MODEL_CONS_H */