faudes::LangK Class Reference
[Pushdown PlugIn]

This class is used to find all words that can be found when traversing a maximum of k transitions of a given generator. More...

#include <pd_lang_k.h>

List of all members.

Public Member Functions

 LangK (const PushdownGenerator &gen)
 Constructor.
std::set< std::string > FindLangK (uint k, bool showStack=false)
 find all words that can be generated by traversing k transitions
void PrintWords ()
 Print the words that were found in the last execution of FindLangK.

Private Member Functions

void Traverse (Idx i, std::string word, std::vector< Idx > stack, uint depth, bool showStack)
 Recursively traverse the generator and build new words until word length is k.

Private Attributes

std::set< std::string > words
 storage for the words
const PushdownGenerator pd
 the generator
uint k
 maximum word length

Detailed Description

This class is used to find all words that can be found when traversing a maximum of k transitions of a given generator.

It is intended mainly for debugging purposes, not for finding whole languages.

Note: length k can include "empty" (lambda) strings

Overview

Overview

Contents

Contents

Definition at line 40 of file pd_lang_k.h.


Constructor & Destructor Documentation

faudes::LangK::LangK ( const PushdownGenerator gen  )  [inline]

Constructor.

Parameters:
gen the generator

Definition at line 50 of file pd_lang_k.h.


Member Function Documentation

std::set< std::string > faudes::LangK::FindLangK ( uint  k,
bool  showStack = false 
)

find all words that can be generated by traversing k transitions

Parameters:
k number of transitions to traverse
showStack show stack while traversing, defaults to false

Definition at line 14 of file pd_lang_k.cpp.

void faudes::LangK::PrintWords (  ) 

Print the words that were found in the last execution of FindLangK.

Definition at line 27 of file pd_lang_k.cpp.

void faudes::LangK::Traverse ( Idx  i,
std::string  word,
std::vector< Idx stack,
uint  depth,
bool  showStack 
) [private]

Recursively traverse the generator and build new words until word length is k.

Parameters:
i Index of the current state
word current word
stack current stack
depth current length
showStack indicator whether to print the stack or not

Definition at line 35 of file pd_lang_k.cpp.


Member Data Documentation

maximum word length

Definition at line 74 of file pd_lang_k.h.

the generator

Definition at line 72 of file pd_lang_k.h.

std::set<std::string> faudes::LangK::words [private]

storage for the words

Definition at line 70 of file pd_lang_k.h.


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

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen