From cb046e2ab2e9ab660e22a7d98f46a1d6e47f2517 Mon Sep 17 00:00:00 2001 From: Tomas Pecka <peckato1@fit.cvut.cz> Date: Thu, 21 Mar 2019 09:34:42 +0100 Subject: [PATCH] Data: FormalRTE minor improvements --- alib2data/src/rte/formal/FormalRTEElements.h | 2 +- alib2data/src/rte/formal/FormalRTEIteration.h | 2 +- .../src/rte/formal/FormalRTESubstitution.h | 2 +- examples2/automaton/DFTA_emptyset_case.xml | 59 +++++++++++++++++++ 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 examples2/automaton/DFTA_emptyset_case.xml diff --git a/alib2data/src/rte/formal/FormalRTEElements.h b/alib2data/src/rte/formal/FormalRTEElements.h index a33eea5458..712853adc3 100644 --- a/alib2data/src/rte/formal/FormalRTEElements.h +++ b/alib2data/src/rte/formal/FormalRTEElements.h @@ -8,8 +8,8 @@ #ifndef FORMAL_RTE_ELEMENTS_H_ #define FORMAL_RTE_ELEMENTS_H_ -#include "FormalRTEAlternation.h" #include "FormalRTEElement.h" +#include "FormalRTEAlternation.h" #include "FormalRTEEmpty.h" #include "FormalRTEIteration.h" #include "FormalRTESubstitution.h" diff --git a/alib2data/src/rte/formal/FormalRTEIteration.h b/alib2data/src/rte/formal/FormalRTEIteration.h index 8074be86df..91ff467bc2 100644 --- a/alib2data/src/rte/formal/FormalRTEIteration.h +++ b/alib2data/src/rte/formal/FormalRTEIteration.h @@ -258,7 +258,7 @@ int FormalRTEIteration < SymbolType, RankType >::compare ( const FormalRTEIterat template < class SymbolType, class RankType > void FormalRTEIteration < SymbolType, RankType >::operator >>( std::ostream & out ) const { - out << "(RTEFormalRTEIteration " << m_substitutionSymbol << " " << getElement ( ) << ")"; + out << "(FormalRTEIteration " << m_substitutionSymbol << " " << getElement ( ) << ")"; } template < class SymbolType, class RankType > diff --git a/alib2data/src/rte/formal/FormalRTESubstitution.h b/alib2data/src/rte/formal/FormalRTESubstitution.h index f0e38f0868..b9af983fa9 100644 --- a/alib2data/src/rte/formal/FormalRTESubstitution.h +++ b/alib2data/src/rte/formal/FormalRTESubstitution.h @@ -308,8 +308,8 @@ int FormalRTESubstitution < SymbolType, RankType >::compare ( const FormalRTESub template < class SymbolType, class RankType > void FormalRTESubstitution < SymbolType, RankType >::operator >>( std::ostream & out ) const { out << "(FormalRTESubstitution"; - out << " " << getLeftElement ( ); out << " " << m_substitutionSymbol; + out << " " << getLeftElement ( ); out << " " << getRightElement ( ); out << ")"; } diff --git a/examples2/automaton/DFTA_emptyset_case.xml b/examples2/automaton/DFTA_emptyset_case.xml new file mode 100644 index 0000000000..30a2ecb77f --- /dev/null +++ b/examples2/automaton/DFTA_emptyset_case.xml @@ -0,0 +1,59 @@ +<?xml version="1.0"?> +<DFTA> + <states> + <String>A</String> + <String>B</String> + </states> + <rankedInputAlphabet> + <RankedSymbol> + <String>a</String> + <Unsigned>0</Unsigned> + </RankedSymbol> + <RankedSymbol> + <String>g</String> + <Unsigned>2</Unsigned> + </RankedSymbol> + <RankedSymbol> + <String>d</String> + <Unsigned>1</Unsigned> + </RankedSymbol> + </rankedInputAlphabet> + <finalStates> + <String>B</String> + </finalStates> + <transitions> + <transition> + <input> + <RankedSymbol><String>a</String><Unsigned>0</Unsigned></RankedSymbol> + </input> + <from> + </from> + <to> + <String>A</String> + </to> + </transition> + <transition> + <input> + <RankedSymbol><String>d</String><Unsigned>1</Unsigned></RankedSymbol> + </input> + <from> + <String>A</String> + </from> + <to> + <String>B</String> + </to> + </transition> + <transition> + <input> + <RankedSymbol><String>g</String><Unsigned>2</Unsigned></RankedSymbol> + </input> + <from> + <String>B</String> + <String>A</String> + </from> + <to> + <String>A</String> + </to> + </transition> + </transitions> +</DFTA> -- GitLab