|
|
The execution process may be optimized by not using visitors. Having instructions implement a method that returns a flow action directly.
enum FlowAction { ACCEPT, REJ, DEFAULT } | FlowAction |
A FlowAction is what has to be done with the route. DEFAULT is the default action which is normally "go to the next term", or if the last term, ACCEPT.
RuntimeError (class) | RuntimeError |
The semantic check should get rid of these.
IvExec ()
| IvExec |
~IvExec ()
| ~IvExec |
void set_policies (vector<PolicyInstr*>* policies)
| set_policies |
void set_set_manager (SetManager* sman)
| set_set_manager |
FlowAction run (VarRW* varrw, ostream* os)
| run |
FlowAction runPolicy (PolicyInstr& pi)
| runPolicy |
Execute a policy.
Parameters:
pi | policy to execute |
FlowAction runTerm (TermInstr& ti)
| runTerm |
Execute a term.
Parameters:
ti | term to execute. |
void visit (Push& p)
| visit |
Parameters:
p | push to execute. |
Reimplemented from InstrVisitor.
void visit (PushSet& ps)
| visit |
Parameters:
ps | push of a set to execute. |
Reimplemented from InstrVisitor.
void visit (OnFalseExit& x)
| visit |
Parameters:
x | OnFalseExit to execute. |
Reimplemented from InstrVisitor.
void visit (Load& l)
| visit |
Parameters:
l | Load to execute. |
Reimplemented from InstrVisitor.
void visit (Store& s)
| visit |
Parameters:
s | Store to execute. |
Reimplemented from InstrVisitor.
void visit (Accept& a)
| visit |
Parameters:
a | accept the route. |
Reimplemented from InstrVisitor.
void visit (Reject& r)
| visit |
Parameters:
r | reject the route. |
Reimplemented from InstrVisitor.
void visit (NaryInstr& nary)
| visit |
Parameters:
nary | N-ary instruction to execute. |
Reimplemented from InstrVisitor.
string fa2str (const FlowAction& fa)
| fa2str |
[static]
Parameters:
fa | Flow action to convert. |
Returns: String representation of flow action.