From 496bd348fe0efa531a748cfe36b8e5fa92ef2055 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Sat, 2 Feb 2019 20:23:16 +0100 Subject: [PATCH] user documentation of algorithm properties --- .../properties/AllEpsilonClosure.cpp | 47 +++++++++++++-- .../automaton/properties/EpsilonClosure.cpp | 59 +++++++++++++++++-- .../automaton/properties/ReachableStates.cpp | 47 +++++++++++++-- .../src/automaton/properties/UsefulStates.cpp | 47 +++++++++++++-- 4 files changed, 176 insertions(+), 24 deletions(-) diff --git a/alib2algo/src/automaton/properties/AllEpsilonClosure.cpp b/alib2algo/src/automaton/properties/AllEpsilonClosure.cpp index 87f021d7fd..c94f2e8b8e 100644 --- a/alib2algo/src/automaton/properties/AllEpsilonClosure.cpp +++ b/alib2algo/src/automaton/properties/AllEpsilonClosure.cpp @@ -12,12 +12,47 @@ namespace automaton { namespace properties { -auto AllEpsilonClosureEpsilonNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::EpsilonNFA < > & > ( AllEpsilonClosure::allEpsilonClosure ); -auto AllEpsilonClosureMultiInitialStateNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::MultiInitialStateNFA < > & > ( AllEpsilonClosure::allEpsilonClosure ); -auto AllEpsilonClosureNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::NFA < > & > ( AllEpsilonClosure::allEpsilonClosure ); -auto AllEpsilonClosureDFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::DFA < > & > ( AllEpsilonClosure::allEpsilonClosure ); -auto AllEpsilonClosureExtendedNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::ExtendedNFA < > & > ( AllEpsilonClosure::allEpsilonClosure ); -auto AllEpsilonClosureCompactNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::CompactNFA < > & > ( AllEpsilonClosure::allEpsilonClosure ); +auto AllEpsilonClosureEpsilonNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::EpsilonNFA < > & > ( AllEpsilonClosure::allEpsilonClosure, "fsm" ).setDocumentation ( +"Computes epsilon closure for all states of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using closures (breadth-first search).\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@return mapping of states to set of states representing the epsilon closures for each state of @p fsm" ); + +auto AllEpsilonClosureMultiInitialStateNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::MultiInitialStateNFA < > & > ( AllEpsilonClosure::allEpsilonClosure, "fsm" ).setDocumentation ( +"Computes epsilon closure for all states of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using closures (breadth-first search).\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@return mapping of states to set of states representing the epsilon closures for each state of @p fsm" ); + +auto AllEpsilonClosureNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::NFA < > & > ( AllEpsilonClosure::allEpsilonClosure, "fsm" ).setDocumentation ( +"Computes epsilon closure for all states of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using closures (breadth-first search).\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@return mapping of states to set of states representing the epsilon closures for each state of @p fsm" ); + +auto AllEpsilonClosureDFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::DFA < > & > ( AllEpsilonClosure::allEpsilonClosure, "fsm" ).setDocumentation ( +"Computes epsilon closure for all states of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using closures (breadth-first search).\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@return mapping of states to set of states representing the epsilon closures for each state of @p fsm" ); + +auto AllEpsilonClosureExtendedNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::ExtendedNFA < > & > ( AllEpsilonClosure::allEpsilonClosure, "fsm" ).setDocumentation ( +"Computes epsilon closure for all states of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using closures (breadth-first search).\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@return mapping of states to set of states representing the epsilon closures for each state of @p fsm" ); + +auto AllEpsilonClosureCompactNFA = registration::AbstractRegister < AllEpsilonClosure, ext::map < DefaultStateType, ext::set < DefaultStateType > >, const automaton::CompactNFA < > & > ( AllEpsilonClosure::allEpsilonClosure, "fsm" ).setDocumentation ( +"Computes epsilon closure for all states of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using closures (breadth-first search).\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@return mapping of states to set of states representing the epsilon closures for each state of @p fsm" ); } /* namespace properties */ diff --git a/alib2algo/src/automaton/properties/EpsilonClosure.cpp b/alib2algo/src/automaton/properties/EpsilonClosure.cpp index 43d584169c..d122a9f5f7 100644 --- a/alib2algo/src/automaton/properties/EpsilonClosure.cpp +++ b/alib2algo/src/automaton/properties/EpsilonClosure.cpp @@ -12,12 +12,59 @@ namespace automaton { namespace properties { -auto EpsilonClosureEpsilonNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::EpsilonNFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure ); -auto EpsilonClosureMultiInitialStateNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::MultiInitialStateNFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure ); -auto EpsilonClosureNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::NFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure ); -auto EpsilonClosureDFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::DFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure ); -auto EpsilonClosureExtendedNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::ExtendedNFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure ); -auto EpsilonClosureCompactNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::CompactNFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure ); +auto EpsilonClosureEpsilonNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::EpsilonNFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure, "fsm", "state" ).setDocumentation ( +"Computes epsilon closure for a state of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using breadth-first search.\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@param state state for which we want to compute the closure\n\ +@return set of states representing the epsilon closures of a @p state of @p fsm\n\ +@throws exception::CommonException if state is not in the set of @p fsm states" ); + +auto EpsilonClosureMultiInitialStateNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::MultiInitialStateNFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure, "fsm", "state" ).setDocumentation ( +"Computes epsilon closure for a state of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using breadth-first search.\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@param state state for which we want to compute the closure\n\ +@return set of states representing the epsilon closures of a @p state of @p fsm\n\ +@throws exception::CommonException if state is not in the set of @p fsm states" ); + +auto EpsilonClosureNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::NFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure, "fsm", "state" ).setDocumentation ( +"Computes epsilon closure for a state of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using breadth-first search.\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@param state state for which we want to compute the closure\n\ +@return set of states representing the epsilon closures of a @p state of @p fsm\n\ +@throws exception::CommonException if state is not in the set of @p fsm states" ); + +auto EpsilonClosureDFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::DFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure, "fsm", "state" ).setDocumentation ( +"Computes epsilon closure for a state of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using breadth-first search.\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@param state state for which we want to compute the closure\n\ +@return set of states representing the epsilon closures of a @p state of @p fsm\n\ +@throws exception::CommonException if state is not in the set of @p fsm states" ); + +auto EpsilonClosureExtendedNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::ExtendedNFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure, "fsm", "state" ).setDocumentation ( +"Computes epsilon closure for a state of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using breadth-first search.\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@param state state for which we want to compute the closure\n\ +@return set of states representing the epsilon closures of a @p state of @p fsm\n\ +@throws exception::CommonException if state is not in the set of @p fsm states" ); + +auto EpsilonClosureCompactNFA = registration::AbstractRegister < EpsilonClosure, ext::set < DefaultStateType >, const automaton::CompactNFA < > &, const DefaultStateType & > ( EpsilonClosure::epsilonClosure, "fsm", "state" ).setDocumentation ( +"Computes epsilon closure for a state of a nondeterministic finite automaton with epsilon transitions.\n\ +Implemented using breadth-first search.\n\ +\n\ +@param fsm nondeterministic finite automaton with epsilon transitions\n\ +@param state state for which we want to compute the closure\n\ +@return set of states representing the epsilon closures of a @p state of @p fsm\n\ +@throws exception::CommonException if state is not in the set of @p fsm states" ); } /* namespace properties */ diff --git a/alib2algo/src/automaton/properties/ReachableStates.cpp b/alib2algo/src/automaton/properties/ReachableStates.cpp index bee0e776c1..f04c3130c9 100644 --- a/alib2algo/src/automaton/properties/ReachableStates.cpp +++ b/alib2algo/src/automaton/properties/ReachableStates.cpp @@ -12,12 +12,47 @@ namespace automaton { namespace properties { -auto ReachableStatesEpsilonNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::EpsilonNFA < > & > ( ReachableStates::reachableStates ); -auto ReachableStatesNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::NFA < > & > ( ReachableStates::reachableStates ); -auto ReachableStatesCompactNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::CompactNFA < > & > ( ReachableStates::reachableStates ); -auto ReachableStatesExtendedNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::ExtendedNFA < > & > ( ReachableStates::reachableStates ); -auto ReachableStatesMultiInitialStateNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::MultiInitialStateNFA < > & > ( ReachableStates::reachableStates ); -auto ReachableStatesDFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::DFA < > & > ( ReachableStates::reachableStates ); +auto ReachableStatesEpsilonNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::EpsilonNFA < > & > ( ReachableStates::reachableStates, "fsm" ).setDocumentation ( +"Finds all reachable states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of reachable states from the initial state of @p fsm" ); + +auto ReachableStatesNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::NFA < > & > ( ReachableStates::reachableStates, "fsm" ).setDocumentation ( +"Finds all reachable states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of reachable states from the initial state of @p fsm" ); + +auto ReachableStatesCompactNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::CompactNFA < > & > ( ReachableStates::reachableStates, "fsm" ).setDocumentation ( +"Finds all reachable states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of reachable states from the initial state of @p fsm" ); + +auto ReachableStatesExtendedNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::ExtendedNFA < > & > ( ReachableStates::reachableStates, "fsm" ).setDocumentation ( +"Finds all reachable states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of reachable states from the initial state of @p fsm" ); + +auto ReachableStatesMultiInitialStateNFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::MultiInitialStateNFA < > & > ( ReachableStates::reachableStates, "fsm" ).setDocumentation ( +"Finds all reachable states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of reachable states from the initial state of @p fsm" ); + +auto ReachableStatesDFA = registration::AbstractRegister < ReachableStates, ext::set < DefaultStateType >, const automaton::DFA < > & > ( ReachableStates::reachableStates, "fsm" ).setDocumentation ( +"Finds all reachable states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of reachable states from the initial state of @p fsm" ); } /* namespace properties */ diff --git a/alib2algo/src/automaton/properties/UsefulStates.cpp b/alib2algo/src/automaton/properties/UsefulStates.cpp index f9dc1c02d7..c99e381d10 100644 --- a/alib2algo/src/automaton/properties/UsefulStates.cpp +++ b/alib2algo/src/automaton/properties/UsefulStates.cpp @@ -12,12 +12,47 @@ namespace automaton { namespace properties { -auto UsefulStatesEpsilonNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::EpsilonNFA < > & > ( UsefulStates::usefulStates ); -auto UsefulStatesNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::NFA < > & > ( UsefulStates::usefulStates ); -auto UsefulStatesCompactNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::CompactNFA < > & > ( UsefulStates::usefulStates ); -auto UsefulStatesExtendedNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::ExtendedNFA < > & > ( UsefulStates::usefulStates ); -auto UsefulStatesMultiInitialStateNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::MultiInitialStateNFA < > & > ( UsefulStates::usefulStates ); -auto UsefulStatesDFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::DFA < > & > ( UsefulStates::usefulStates ); +auto UsefulStatesEpsilonNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::EpsilonNFA < > & > ( UsefulStates::usefulStates, "fsm" ).setDocumentation ( +"Finds all useful states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of useful states of @p fsm" ); + +auto UsefulStatesNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::NFA < > & > ( UsefulStates::usefulStates, "fsm" ).setDocumentation ( +"Finds all useful states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of useful states of @p fsm" ); + +auto UsefulStatesCompactNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::CompactNFA < > & > ( UsefulStates::usefulStates, "fsm" ).setDocumentation ( +"Finds all useful states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of useful states of @p fsm" ); + +auto UsefulStatesExtendedNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::ExtendedNFA < > & > ( UsefulStates::usefulStates, "fsm" ).setDocumentation ( +"Finds all useful states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of useful states of @p fsm" ); + +auto UsefulStatesMultiInitialStateNFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::MultiInitialStateNFA < > & > ( UsefulStates::usefulStates, "fsm" ).setDocumentation ( +"Finds all useful states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of useful states of @p fsm" ); + +auto UsefulStatesDFA = registration::AbstractRegister < UsefulStates, ext::set < DefaultStateType >, const automaton::DFA < > & > ( UsefulStates::usefulStates, "fsm" ).setDocumentation ( +"Finds all useful states of a finite automaton.\n\ +Using closure implementation of the BFS algorithm.\n\ +\n\ +@param fsm automaton\n\ +@return set of useful states of @p fsm" ); } /* namespace properties */ -- GitLab