|
Mungojerrie
1.1
Mungojerrie
|
Go to the documentation of this file.
54 template<
typename T>
friend class LTS;
66 State getDestination(
void)
const {
return destination; }
68 BDD getLabel(
void)
const {
return label; }
83 template<
typename Tran>
86 using Transition = Tran;
87 using Edge = std::pair<State,Transition>;
88 using EdgeSet = std::set<Edge>;
89 using Delta = std::vector<Transition>;
106 void addState(State s, Delta delta = Delta{});
108 void addTransition(State source, State destination, BDD
const & label);
130 void print(std::ostream & os = std::cout)
const;
132 void letters(StateSet
const & stateset, std::vector<BDD> & lv)
const;
134 std::vector<BDD>
getLetters(std::vector<State>
const & statevec)
const;
144 using SCCs = std::vector<StateSet>;
146 SCCs getSCCs(StateSet
const & init, StateSet
const & restriction,
147 EdgeSet
const & forbiddenEdges)
const;
150 StateSet
const & restriction)
const;
156 void findTransient(std::vector<State> &
transient, StateSet
const & init,
157 StateSet
const & restriction)
const;
159 void findTransient(std::vector<State> &
transient, StateSet
const & restriction)
const;
163 std::map<State,State>
stateEquivalence(std::map<State,unsigned>
const & outputClass)
const;
165 void trim(StateSet
const & targets);
168 void trim(StateSet
const & targets,
SCCs const & sccs);
170 void printDot(std::string graphname = std::string(
"LTS"))
const;
186 EdgeSet
const & forbidden = EdgeSet{})
const;
189 using TransitionMap = std::map<State,Delta>;
193 std::vector<State> states;
195 TransitionMap transitions;
196 std::set<BDD, Util::BddCompare> varSet;
200 class PartitionRefinement;
201 class SubsetConstruction;
209 template<
typename Tran>
bool isDeterministic(bool complete=true) const
Checks whether the LTS is deterministic.
Definition: LTS.cc:280
std::map< State, State > stateEquivalence(std::map< State, unsigned > const &outputClass) const
Returns state equivalence relation.
Definition: LTS.cc:936
SCCs getSCCs(void) const
Computes the SCCs of the LTS.
Definition: LTS.cc:579
const BDD & getEpsilonBDD(void) const
Gets the epsilon proposition for LDBWs.
Definition: LTS.hh:176
std::set< BDD, Util::BddCompare > getAtomicPropositions(void) const
Returns the set of atomic propositions.
Definition: LTS.hh:118
LTS< Tran > product(LTS< Tran > const &first, LTS< Tran > const &second)
Return product of two LTS's.
std::vector< StateSet > SCCs
Type of the collection of SCCs.
Definition: LTS.hh:144
Class that defines a comparison operator for pairs with BDDs.
Definition: Util.hh:101
void makeInitial(State s)
Makes a state initial.
Definition: LTS.cc:84
const_iterator cend()
Returns a const_iterator pointing "just past the last" state.
Definition: LTS.hh:97
void trim(StateSet const &targets)
Removes states with no path to target states.
Definition: LTS.cc:998
bool isComplete(void) const
Checks whether the LTS is complete.
Definition: LTS.cc:316
bool hasEpsilonTransitions(void) const
Checks whether there exist epsilon transitions.
Definition: LTS.hh:178
void setVerbosity(int v)
Sets the verbosity level of the LTS.
Definition: LTS.hh:138
void setEpsilonBDD(BDD const &e)
Sets the epsilon proposition for LDBWs.
Definition: LTS.hh:174
void printDot(std::string graphname=std::string("LTS")) const
Writes LTS in dot format.
Definition: LTS.cc:1006
bool checkTransitions(void) const
Checks sanity of transitions.
Definition: LTS.cc:172
std::string getPropositionName(BDD proposition) const
Returns name of an atomic proposition.
Definition: LTS.cc:104
State getInitial(void) const
Returns the initial state of the LTS.
Definition: LTS.hh:112
std::vector< State >::const_iterator const_iterator
Constant iterator type.
Definition: LTS.hh:93
std::vector< BDD > getLetters(std::vector< State > const &statevec) const
Alternate interface to letters.
Definition: LTS.cc:271
StateSet getEpsilonSuccessors(State source) const
Returns states reachable from source via epsilon transitions.
Definition: LTS.cc:155
std::ostream & operator<<(std::ostream &os, BaseTransition const &p)
Overloads stream insertion operator.
void mergeTransitions(void)
Merge transitions that differ at most in their labels.
Definition: LTS.cc:190
void print(std::ostream &os=std::cout) const
Stream insertion operator helper function.
Definition: LTS.cc:350
Class of labeled transition systems.
Definition: LTS.hh:84
LTS subsetsLTS(std::map< State, StateSet > &subsets) const
Returns the result of the Rabin-Scott subset construction.
Definition: LTS.cc:1172
State getSuccessor(State source, BDD letter) const
Returns successor of source state for input letter in deterministic LTS.
Definition: LTS.cc:119
Base class for the labeled edges of the transition graph.
Definition: LTS.hh:53
size_t numStates(void) const
Returns the number of states in the LTS.
Definition: LTS.hh:102
LTS(Cudd mgr)
Constructor.
Definition: LTS.cc:56
bool operator==(BaseTransition const &) const =delete
Checks whether two transitions have the same endpoints and label.
Cudd getManager(void) const
Returns the BDD manager of the LTS.
Definition: LTS.hh:104
void addAtomicProposition(BDD proposition, std::string name)
Adds atomic proposition to model.
Definition: LTS.cc:91
bool isTrivial(StateSet const &scc, EdgeSet const &forbidden=EdgeSet{}) const
Check whether an SCC is trivial.
Definition: LTS.cc:1035
bool operator<(BaseTransition const &) const =delete
Comparison function used to store transitions in ordered containers.
int readVerbosity(void) const
Returns the verbosity level of the LTS.
Definition: LTS.hh:136
StateSet getSuccessors(State source, BDD letter) const
Returns states reachable from source for input letter.
Definition: LTS.cc:138
void findTransient(std::vector< State > &transient, StateSet const &init, StateSet const &restriction) const
Finds transient states of LTS reachable from init and contained in restriction.
void addTransition(State source, State destination, BDD const &label)
Adds a transition to a state of the LTS.
Definition: LTS.cc:71
std::set< std::pair< State, BDD >, Util::PairWithBddCompare< State > > PairsStateBdd
Type of sets of pairs of state and BDD.
Definition: LTS.hh:91
const_iterator cbegin()
Returns a const_iterator pointing to the first state.
Definition: LTS.hh:95
void pruneVarSet(void)
Prune the variable set of unused atomic propositions.
Definition: LTS.cc:1057
State second
Model state.
Definition: Gym.hh:56
void letters(StateSet const &stateset, std::vector< BDD > &lv) const
Returns the letters in the labels of a set of states.
Definition: LTS.cc:228
void addState(State s, Delta delta=Delta{})
Adds a state to the LTS.
Definition: LTS.cc:60
LTS product(LTS const &second)
Returns the synchronous product of two LTSs.
Definition: LTS.cc:1227