LearnTA  0.0.1
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
learnta::ForwardRegionalElementaryLanguage Class Reference

A forward regional elementary language. More...

#include <forward_regional_elementary_language.hh>

Inheritance diagram for learnta::ForwardRegionalElementaryLanguage:
Inheritance graph
[legend]
Collaboration diagram for learnta::ForwardRegionalElementaryLanguage:
Collaboration graph
[legend]

Public Member Functions

 ForwardRegionalElementaryLanguage ()=default
 Construct the empty language.
 
 ForwardRegionalElementaryLanguage (ElementaryLanguage elementary, FractionalOrder fractionalOrder)
 
 ForwardRegionalElementaryLanguage (const ForwardRegionalElementaryLanguage &language)=default
 
 ForwardRegionalElementaryLanguage (ForwardRegionalElementaryLanguage &&language)=default
 
ForwardRegionalElementaryLanguageoperator= (const ForwardRegionalElementaryLanguage &language)=default
 
ForwardRegionalElementaryLanguageoperator= (ForwardRegionalElementaryLanguage &&language)=default
 
ForwardRegionalElementaryLanguage successor (char action) const
 Construct the discrete successor.
 
ForwardRegionalElementaryLanguage successor () const
 Construct the continuous successor.
 
void successorAssign ()
 Construct the continuous successor.
 
bool hasEqualityN () const
 Return if there is \(\mathbb{T}_{i,N} = c\). More...
 
std::optional< ForwardRegionalElementaryLanguageimmediatePrefix () const
 Return the immediate prefix if exists.
 
std::vector< ForwardRegionalElementaryLanguageprefixes () const
 Return the prefixes in the shorter to the longer order.
 
BackwardRegionalElementaryLanguage suffix (const ForwardRegionalElementaryLanguage &prefix) const
 Return the suffix s such that this \subseteq p \cdot s. More...
 
ForwardRegionalElementaryLanguage applyResets (const TATransition::Resets &resets) const
 
ForwardRegionalElementaryLanguage applyResets (const std::string &newWord, const TATransition::Resets &resets, const std::size_t targetClockSize) const
 Return the language after applying the given reset. More...
 
bool operator== (const ForwardRegionalElementaryLanguage &another) const
 
std::ostream & print (std::ostream &os) const
 
std::size_t hash_value () const
 
- Public Member Functions inherited from learnta::ElementaryLanguage
 ElementaryLanguage (std::string word, TimedCondition timedCondition)
 
bool isSimple () const
 Returns if this elementary language is simple.
 
std::size_t wordSize () const
 Returns the number of the events in this elementary language.
 
ElementaryLanguage operator+ (const ElementaryLanguage &another) const
 Concatenate two elementary languages.
 
void enumerate (std::vector< ElementaryLanguage > &result) const
 Make a vector of simple elementary languages in this elementary language.
 
std::vector< ElementaryLanguageenumerate () const
 Make a vector of simple elementary languages in this elementary language.
 
TimedWord sample () const
 Return a timed word in this elementary language.
 
void removeEqualityUpperBoundAssign ()
 
void removeUpperBoundAssign ()
 
ElementaryLanguage removeUpperBound () const
 
ElementaryLanguage constrain (const TimedWord &prefix) const
 Constrain the valuation using a timed word. More...
 
bool contains (const TimedWord &testedWord) const
 Check if the given the timed word is a member of this elementary languages.
 
const std::string & getWord () const
 
const TimedConditiongetTimedCondition () const
 
bool operator== (const ElementaryLanguage &another) const
 
bool operator!= (const ElementaryLanguage &another) const
 

Static Public Member Functions

static ForwardRegionalElementaryLanguage fromTimedWord (const TimedWord &timedWord)
 Construct the fractional elementary language containing the given timed word.
 
- Static Public Member Functions inherited from learnta::ElementaryLanguage
static ElementaryLanguage empty ()
 Construct the empty elementary language containing only 0.
 
static ElementaryLanguage convexHull (const std::list< ElementaryLanguage > &elementaryLanguages)
 Construct a convex-hull of the given timed conditions. More...
 

Protected Attributes

FractionalOrder fractionalOrder
 
- Protected Attributes inherited from learnta::ElementaryLanguage
std::string word
 
TimedCondition timedCondition
 

Detailed Description

A forward regional elementary language.

A forward regional elementary language is an elementary language \((u, \Lambda)\) with an order over the fractional parts of \(\mathbb{T}_{0,N},\mathbb{T}_{1,N},\dots,\mathbb{T}_{N,N}\), where \(\mathbb{T}_{i,N} = \tau_{i} + \tau_{i+1} \dots \tau_{N}\).

Invariant
elementary.wordSize() + 1 == fractionalOrder.size()

Member Function Documentation

◆ applyResets()

ForwardRegionalElementaryLanguage learnta::ForwardRegionalElementaryLanguage::applyResets ( const std::string &  newWord,
const TATransition::Resets &  resets,
const std::size_t  targetClockSize 
) const
inline

Return the language after applying the given reset.

Parameters
newWordThe word of the generated elementary language
resetsThe applies reset
targetClockSizeThe number of the clock variables in the target language
Precondition
newWord.size() + 1 == targetClockSize
Postcondition
There is a clock valuation corresponding to a word in this language such that its value after reset corresponds to a word in the resulting language.

◆ hasEqualityN()

bool learnta::ForwardRegionalElementaryLanguage::hasEqualityN ( ) const
inline

Return if there is \(\mathbb{T}_{i,N} = c\).

Precondition
the timed condition is simple

◆ suffix()

BackwardRegionalElementaryLanguage learnta::ForwardRegionalElementaryLanguage::suffix ( const ForwardRegionalElementaryLanguage prefix) const
inline

Return the suffix s such that this \subseteq p \cdot s.

Precondition
prefix is simple
this is simple
prefix is a prefix of this

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