CIRCT 23.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
circt::reduce::MetasyntacticNameGenerator Class Reference

A utility class that generates metasyntactic variable names for use in reductions. More...

#include <ReductionUtils.h>

Collaboration diagram for circt::reduce::MetasyntacticNameGenerator:
Collaboration graph
[legend]

Public Member Functions

 MetasyntacticNameGenerator ()=default
 
const char * getNextName ()
 Get the next metasyntactic name in the sequence.
 
void reset ()
 Reset the generator to start from the beginning of the sequence.
 

Private Attributes

size_t index = 0
 

Static Private Attributes

static constexpr const char * names [48]
 

Detailed Description

A utility class that generates metasyntactic variable names for use in reductions.

This provides a consistent naming scheme across different reduction patterns.

Definition at line 28 of file ReductionUtils.h.

Constructor & Destructor Documentation

◆ MetasyntacticNameGenerator()

circt::reduce::MetasyntacticNameGenerator::MetasyntacticNameGenerator ( )
default

Member Function Documentation

◆ getNextName()

const char * MetasyntacticNameGenerator::getNextName ( )

Get the next metasyntactic name in the sequence.

Definition at line 22 of file ReductionUtils.cpp.

References index, and names.

Referenced by ModuleNameSanitizer::rewrite().

◆ reset()

void circt::reduce::MetasyntacticNameGenerator::reset ( )
inline

Reset the generator to start from the beginning of the sequence.

Definition at line 36 of file ReductionUtils.h.

References index.

Member Data Documentation

◆ index

size_t circt::reduce::MetasyntacticNameGenerator::index = 0
private

Definition at line 39 of file ReductionUtils.h.

Referenced by getNextName(), and reset().

◆ names

constexpr const char* circt::reduce::MetasyntacticNameGenerator::names[48]
staticconstexprprivate
Initial value:
= {
"Foo", "Bar", "Baz", "Qux", "Quux", "Quuux", "Quuuux",
"Quz", "Corge", "Grault", "Bazola", "Ztesch", "Thud", "Grunt",
"Bletch", "Fum", "Fred", "Jim", "Sheila", "Barney", "Flarp",
"Zxc", "Spqr", "Wombat", "Shme", "Bongo", "Spam", "Eggs",
"Snork", "Zot", "Blarg", "Wibble", "Toto", "Titi", "Tata",
"Tutu", "Pippo", "Pluto", "Paperino", "Aap", "Noot", "Mies",
"Oogle", "Foogle", "Boogle", "Zork", "Gork", "Bork"}

Definition at line 40 of file ReductionUtils.h.

Referenced by getNextName().


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