cpphoafparser library API
|
Traces the function calls to HOAConsumer, prints function name and arguments to stream. More...
#include <hoa_intermediate_trace.hh>
Public Member Functions | |
HOAIntermediateTrace (HOAConsumer::ptr next) | |
Constructor, providing the next HOAConsumer. | |
HOAIntermediateTrace (HOAConsumer::ptr next, std::ostream &out) | |
Constructor, providing the next HOAConsumer. | |
virtual bool | parserResolvesAliases () override |
This function is called by the parser to query the consumer whether aliases should be resolved by the parser (return true or whether the consumer would like to see the aliases unresolved (return false ). More... | |
virtual void | notifyHeaderStart (const std::string &version) override |
Called by the parser for the "HOA: version" item [mandatory, once]. More... | |
virtual void | setNumberOfStates (unsigned int numberOfStates) override |
Called by the parser for the "States: int(numberOfStates)" item [optional, once]. More... | |
virtual void | addStartStates (const int_list &stateConjunction) override |
Called by the parser for each "Start: state-conj" item [optional, multiple]. More... | |
virtual void | addAlias (const std::string &name, label_expr::ptr labelExpr) override |
Called by the parser for each "Alias: alias-def" item [optional, multiple]. More... | |
virtual void | setAPs (const std::vector< std::string > &aps) override |
Called by the parser for the "AP: ap-def" item [optional, once]. More... | |
virtual void | setAcceptanceCondition (unsigned int numberOfSets, acceptance_expr::ptr accExpr) override |
Called by the parser for the "Acceptance: acceptance-def" item [mandatory, once]. More... | |
virtual void | provideAcceptanceName (const std::string &name, const std::vector< IntOrString > &extraInfo) override |
Called by the parser for each "acc-name: ..." item [optional, multiple]. More... | |
virtual void | setName (const std::string &name) override |
Called by the parser for the "name: ..." item [optional, once]. | |
virtual void | setTool (const std::string &name, std::shared_ptr< std::string > version) override |
Called by the parser for the "tool: ..." item [optional, once]. More... | |
virtual void | addProperties (const std::vector< std::string > &properties) override |
Called by the parser for the "properties: ..." item [optional, multiple]. More... | |
virtual void | addMiscHeader (const std::string &name, const std::vector< IntOrString > &content) override |
Called by the parser for each unknown header item [optional, multiple]. More... | |
virtual void | notifyBodyStart () override |
Called by the parser to notify that the BODY of the automaton has started [mandatory, once]. | |
virtual void | addState (unsigned int id, std::shared_ptr< std::string > info, label_expr::ptr labelExpr, std::shared_ptr< int_list > accSignature) override |
Called by the parser for each "State: ..." item [multiple]. More... | |
virtual void | addEdgeImplicit (unsigned int stateId, const int_list &conjSuccessors, std::shared_ptr< int_list > accSignature) override |
Called by the parser for each implicit edge definition [multiple], i.e., where the edge label is deduced from the index of the edge. More... | |
virtual void | addEdgeWithLabel (unsigned int stateId, label_expr::ptr labelExpr, const int_list &conjSuccessors, std::shared_ptr< int_list > accSignature) override |
Called by the parser for each explicit edge definition [optional, multiple], i.e., where the label is either specified for the edge or as a state-label. More... | |
virtual void | notifyEndOfState (unsigned int stateId) override |
Called by the parser to notify the consumer that the definition for state stateId has ended [multiple]. | |
virtual void | notifyEnd () override |
Called by the parser to notify the consumer that the automata definition has ended [mandatory, once]. | |
virtual void | notifyAbort () override |
Called by the parser to notify the consumer that an "ABORT" message has been encountered (at any time, indicating error, the automaton should be discarded). | |
virtual void | notifyWarning (const std::string &warning) override |
Is called whenever a condition is encountered that merits a (non-fatal) warning. More... | |
Public Member Functions inherited from cpphoafparser::HOAIntermediate | |
HOAIntermediate (HOAConsumer::ptr next) | |
Constructor, providing the next HOAConsumer. | |
Public Member Functions inherited from cpphoafparser::HOAConsumer | |
virtual | ~HOAConsumer () |
Destructor. | |
Protected Member Functions | |
void | traceFunction (const std::string &function) |
Trace function call. | |
void | traceArgument (const std::string &name, const std::string &value) |
Trace argument (string) | |
void | traceArgument (const std::string &name, unsigned int value) |
Trace argument (int) | |
template<typename Atom > | |
void | traceArgument (const std::string &name, const BooleanExpression< Atom > &expr) |
Trace argument (BooleanExpression) | |
template<typename T > | |
void | traceArgument (const std::string &name, const std::vector< T > &list) |
Trace argument (vector) | |
template<typename O > | |
void | traceArgument (const std::string &name, typename std::shared_ptr< O > o) |
Trace argument (shared_ptr) | |
Protected Attributes | |
std::ostream & | out |
The output stream. | |
Protected Attributes inherited from cpphoafparser::HOAIntermediate | |
HOAConsumer::ptr | next |
The next consumer. | |
Additional Inherited Members | |
Public Types inherited from cpphoafparser::HOAConsumer | |
typedef std::shared_ptr< HOAConsumer > | ptr |
A shared_ptr wrapping a HOAConsumer. | |
typedef BooleanExpression< AtomLabel > | label_expr |
A label expression. | |
typedef BooleanExpression< AtomAcceptance > | acceptance_expr |
An acceptance expression. | |
typedef std::vector< unsigned int > | int_list |
A list of integers. | |
Traces the function calls to HOAConsumer, prints function name and arguments to stream.
|
inlineoverridevirtual |
Called by the parser for each "Alias: alias-def" item [optional, multiple].
Will be called no matter the return value of parserResolvesAliases()
.
name | the alias name (without @) |
labelExpr | a boolean expression over labels |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for each implicit edge definition [multiple], i.e., where the edge label is deduced from the index of the edge.
If the edges are provided in implicit form, after every addState()
there should be 2^|AP| calls to addEdgeImplicit
. The corresponding boolean expression over labels / BitSet can be obtained by calling BooleanExpression.fromImplicit(i-1) for the i-th call of this function per state.
stateId | the index of the 'from' state |
conjSuccessors | a list of successor state indizes, interpreted as a conjunction |
accSignature | an optional list of acceptance set indizes (transition-labeled acceptance) (empty pointer if not provided) |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for each explicit edge definition [optional, multiple], i.e., where the label is either specified for the edge or as a state-label.
stateId | the index of the 'from' state |
labelExpr | a boolean expression over labels (empty pointer if none provided, only in case of state-labeled states) |
conjSuccessors | a list of successors state indizes, interpreted as a conjunction |
accSignature | an optional list of acceptance set indizes (transition-labeled acceptance) (empty pointer if none provided) |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for each unknown header item [optional, multiple].
name | the name of the header (without ':') |
content | a list of extra information provided by the header |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for the "properties: ..." item [optional, multiple].
properties | a list of properties |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for each "Start: state-conj" item [optional, multiple].
stateConjunction | a list of state indizes, interpreted as a conjunction |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for each "State: ..." item [multiple].
id | the identifier for this state |
info | an optional string providing additional information about the state (empty pointer if not provided) |
labelExpr | an optional boolean expression over labels (state-labeled) (empty pointer if not provided) |
accSignature | an optional list of acceptance set indizes (state-labeled acceptance) (empty pointer if not provided) |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for the "HOA: version" item [mandatory, once].
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Is called whenever a condition is encountered that merits a (non-fatal) warning.
The consumer is free to handle this situation as it wishes.
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
This function is called by the parser to query the consumer whether aliases should be resolved by the parser (return true
or whether the consumer would like to see the aliases unresolved (return false
).
This function should always return a constant value.
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for each "acc-name: ..." item [optional, multiple].
name | the provided name |
extraInfo | the additional information for this item |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for the "Acceptance: acceptance-def" item [mandatory, once].
numberOfSets | the number of acceptance sets used to tag state / transition acceptance |
accExpr | a boolean expression over acceptance atoms |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for the "AP: ap-def" item [optional, once].
aps | the list of atomic propositions |
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for the "States: int(numberOfStates)" item [optional, once].
Reimplemented from cpphoafparser::HOAIntermediate.
|
inlineoverridevirtual |
Called by the parser for the "tool: ..." item [optional, once].
name | the tool name |
version | the tool version (option, empty pointer if not provided) |
Reimplemented from cpphoafparser::HOAIntermediate.