CBMC
recursive_enumerator_placeholdert Class Reference

Placeholders for actual enumerators, which represent nonterminals. More...

#include <expr_enumerator.h>

+ Inheritance diagram for recursive_enumerator_placeholdert:
+ Collaboration diagram for recursive_enumerator_placeholdert:

Public Member Functions

 recursive_enumerator_placeholdert (enumerator_factoryt &factory, const std::string &id, const namespacet &ns)
 
expr_sett enumerate (const std::size_t size) const override
 
- Public Member Functions inherited from enumerator_baset
 enumerator_baset (const namespacet &ns)
 
 enumerator_baset (const enumerator_baset &other)=delete
 
enumerator_basetoperator= (const enumerator_baset &other)=delete
 
virtual ~enumerator_baset ()=default
 

Public Attributes

const std::string identifier
 

Protected Attributes

const enumerator_factorytfactory
 
- Protected Attributes inherited from enumerator_baset
const namespacetns
 

Detailed Description

Placeholders for actual enumerators, which represent nonterminals.

Example: consider the grammar S -> N + N, N -> N + 1 | 1. The symbol N represents an enumerator in the lhs of the second production, while it represents a placeholder in the rhs of both productions.

Definition at line 335 of file expr_enumerator.h.

Constructor & Destructor Documentation

◆ recursive_enumerator_placeholdert()

recursive_enumerator_placeholdert::recursive_enumerator_placeholdert ( enumerator_factoryt factory,
const std::string &  id,
const namespacet ns 
)
inline
Parameters
factorythe enumerator factory—a grammar—this enumerator belongs to.
idthe identifier of this placeholder.
nsnamespace used for simplify_expr.

Definition at line 342 of file expr_enumerator.h.

Member Function Documentation

◆ enumerate()

expr_sett recursive_enumerator_placeholdert::enumerate ( const std::size_t  size) const
overridevirtual

Implements enumerator_baset.

Definition at line 419 of file expr_enumerator.cpp.

Member Data Documentation

◆ factory

const enumerator_factoryt& recursive_enumerator_placeholdert::factory
protected

Definition at line 356 of file expr_enumerator.h.

◆ identifier

const std::string recursive_enumerator_placeholdert::identifier

Definition at line 353 of file expr_enumerator.h.


The documentation for this class was generated from the following files: