LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/theory/strings - code_point_solver.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2026-02-19 12:02:37 Functions: 1 2 50.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Andrew Reynolds, Andres Noetzli
       4                 :            :  *
       5                 :            :  * This file is part of the cvc5 project.
       6                 :            :  *
       7                 :            :  * Copyright (c) 2009-2025 by the authors listed in the file AUTHORS
       8                 :            :  * in the top-level source directory and their institutional affiliations.
       9                 :            :  * All rights reserved.  See the file COPYING in the top-level source
      10                 :            :  * directory for licensing information.
      11                 :            :  * ****************************************************************************
      12                 :            :  *
      13                 :            :  * Subsolver for handling code points
      14                 :            :  */
      15                 :            : 
      16                 :            : #include "cvc5_private.h"
      17                 :            : 
      18                 :            : #ifndef CVC5__THEORY__STRINGS__CODE_POINT_SOLVER_H
      19                 :            : #define CVC5__THEORY__STRINGS__CODE_POINT_SOLVER_H
      20                 :            : 
      21                 :            : #include "smt/env_obj.h"
      22                 :            : 
      23                 :            : namespace cvc5::internal {
      24                 :            : namespace theory {
      25                 :            : namespace strings {
      26                 :            : 
      27                 :            : class BaseSolver;
      28                 :            : class CoreSolver;
      29                 :            : class InferenceManager;
      30                 :            : class TermRegistry;
      31                 :            : class SolverState;
      32                 :            : 
      33                 :            : /**
      34                 :            :  * Subsolver for handling code points, see "A Decision Procedure for String to
      35                 :            :  * Code Point Conversion", Reynolds et al IJCAR 2020.
      36                 :            :  */
      37                 :            : class CodePointSolver : protected EnvObj
      38                 :            : {
      39                 :            :  public:
      40                 :            :   CodePointSolver(Env& env,
      41                 :            :                   SolverState& s,
      42                 :            :                   InferenceManager& im,
      43                 :            :                   TermRegistry& tr,
      44                 :            :                   BaseSolver& bs,
      45                 :            :                   CoreSolver& cs);
      46                 :      49554 :   ~CodePointSolver() {}
      47                 :            :   /** check codes
      48                 :            :    *
      49                 :            :    * This inference schema ensures that constraints between str.code terms
      50                 :            :    * are satisfied by models that correspond to extensions of the current
      51                 :            :    * assignment. In particular, this method ensures that str.code can be
      52                 :            :    * given an interpretation that is injective for string arguments with length
      53                 :            :    * one. It may add lemmas of the form:
      54                 :            :    *   str.code(x) == -1 V str.code(x) != str.code(y) V x == y
      55                 :            :    */
      56                 :            :   void checkCodes();
      57                 :            : 
      58                 :            :  protected:
      59                 :            :   /** The solver state object */
      60                 :            :   SolverState& d_state;
      61                 :            :   /** The (custom) output channel of the theory of strings */
      62                 :            :   InferenceManager& d_im;
      63                 :            :   /** Reference to the term registry of theory of strings */
      64                 :            :   TermRegistry& d_termReg;
      65                 :            :   /** reference to the base solver, used for certain queries */
      66                 :            :   BaseSolver& d_bsolver;
      67                 :            :   /** The core solver */
      68                 :            :   CoreSolver& d_csolver;
      69                 :            :   /** Commonly used constants */
      70                 :            :   Node d_negOne;
      71                 :            : };
      72                 :            : 
      73                 :            : }  // namespace strings
      74                 :            : }  // namespace theory
      75                 :            : }  // namespace cvc5::internal
      76                 :            : 
      77                 :            : #endif /* CVC5__THEORY__STRINGS__CODE_POINT_SOLVER_H */

Generated by: LCOV version 1.14