LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/theory/strings - regexp_enumerator.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2025-01-26 14:42:37 Functions: 2 2 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Andrew Reynolds
       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                 :            :  * Enumerators for regular expressions.
      14                 :            :  */
      15                 :            : 
      16                 :            : #include "cvc5_private.h"
      17                 :            : 
      18                 :            : #ifndef CVC5__THEORY__STRINGS__REGEXP_ENUMERATOR_H
      19                 :            : #define CVC5__THEORY__STRINGS__REGEXP_ENUMERATOR_H
      20                 :            : 
      21                 :            : #include <vector>
      22                 :            : 
      23                 :            : #include "expr/node.h"
      24                 :            : #include "expr/type_node.h"
      25                 :            : #include "theory/strings/type_enumerator.h"
      26                 :            : 
      27                 :            : namespace cvc5::internal {
      28                 :            : namespace theory {
      29                 :            : namespace strings {
      30                 :            : 
      31                 :            : /**
      32                 :            :  * Simple regular expression enumerator, generates only singleton language
      33                 :            :  * regular expressions from a string enumeration, in other words:
      34                 :            :  *   (str.to_re s1) ... (str.to_re sn) ....
      35                 :            :  * where s1 ... sn ... is the enumeration for strings.
      36                 :            :  */
      37                 :            : class RegExpEnumerator : public TypeEnumeratorBase<RegExpEnumerator>
      38                 :            : {
      39                 :            :  public:
      40                 :            :   RegExpEnumerator(TypeNode type, TypeEnumeratorProperties* tep = nullptr);
      41                 :            :   RegExpEnumerator(const RegExpEnumerator& enumerator);
      42                 :         16 :   ~RegExpEnumerator() {}
      43                 :            :   /** get the current term */
      44                 :            :   Node operator*() override;
      45                 :            :   /** increment */
      46                 :            :   RegExpEnumerator& operator++() override;
      47                 :            :   /** is this enumerator finished? */
      48                 :            :   bool isFinished() override;
      49                 :            : 
      50                 :            :  private:
      51                 :            :   /** underlying string enumerator */
      52                 :            :   StringEnumerator d_senum;
      53                 :            : };
      54                 :            : 
      55                 :            : }  // namespace strings
      56                 :            : }  // namespace theory
      57                 :            : }  // namespace cvc5::internal
      58                 :            : 
      59                 :            : #endif /* CVC5__THEORY__STRINGS__TYPE_ENUMERATOR_H */

Generated by: LCOV version 1.14