From 2652b8363540f0d3410f7713c0fc886e374f884f Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Tue, 6 Feb 2018 15:20:09 +0100 Subject: [PATCH] fix normalize of RHPDA --- alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h | 4 ++-- alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h index 92ca44b7cb..e97e795fcb 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h @@ -869,12 +869,12 @@ struct normalize < automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, static automaton::RealTimeHeightDeterministicDPDA < > eval ( automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > && value ) { ext::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getInputAlphabet ( ) ); ext::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getPushdownStoreAlphabet ( ) ); - DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( value ).getInitialSymbol ( ) ); + DefaultSymbolType bottomOfTheStackSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( value ).getBottomOfTheStackSymbol ( ) ); ext::set < DefaultStateType > states = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getStates ( ) ); DefaultStateType initialState = automaton::AutomatonNormalize::normalizeState ( std::move ( value ).getInitialState ( ) ); ext::set < DefaultStateType > finalStates = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getFinalStates ( ) ); - automaton::RealTimeHeightDeterministicDPDA < > res ( std::move ( states ), std::move ( alphabet ), std::move ( pushdownAlphabet ), std::move ( initialState ), std::move ( initialSymbol ), std::move ( finalStates ) ); + automaton::RealTimeHeightDeterministicDPDA < > res ( std::move ( states ), std::move ( alphabet ), std::move ( pushdownAlphabet ), std::move ( initialState ), std::move ( bottomOfTheStackSymbol ), std::move ( finalStates ) ); for ( std::pair < ext::pair < StateType, ext::variant < EpsilonType, InputSymbolType > >, ext::pair < StateType, PushdownStoreSymbolType > > && transition : ext::make_moveable_map ( std::move ( value ).getCallTransitions ( ) ) ) { DefaultStateType to = automaton::AutomatonNormalize::normalizeState ( std::move ( transition.second.first ) ); diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h index a1b9fce7bd..1a530cf099 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h @@ -912,12 +912,12 @@ struct normalize < automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, static automaton::RealTimeHeightDeterministicNPDA < > eval ( automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > && value ) { ext::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getInputAlphabet ( ) ); ext::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getPushdownStoreAlphabet ( ) ); - DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( value ).getInitialSymbol ( ) ); + DefaultSymbolType bottomOfTheStackSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( value ).getBottomOfTheStackSymbol ( ) ); ext::set < DefaultStateType > states = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getStates ( ) ); ext::set < DefaultStateType > initialStates = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getInitialStates ( ) ); ext::set < DefaultStateType > finalStates = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getFinalStates ( ) ); - automaton::RealTimeHeightDeterministicNPDA < > res ( std::move ( states ), std::move ( alphabet ), std::move ( pushdownAlphabet ), std::move ( initialStates ), std::move ( initialSymbol ), std::move ( finalStates ) ); + automaton::RealTimeHeightDeterministicNPDA < > res ( std::move ( states ), std::move ( alphabet ), std::move ( pushdownAlphabet ), std::move ( initialStates ), std::move ( bottomOfTheStackSymbol ), std::move ( finalStates ) ); for ( std::pair < ext::pair < StateType, ext::variant < EpsilonType, InputSymbolType > >, ext::set < ext::pair < StateType, PushdownStoreSymbolType > > > && transition : ext::make_moveable_map ( std::move ( value ).getCallTransitions ( ) ) ) { ext::set < ext::pair < DefaultStateType, DefaultSymbolType > > targets; -- GitLab