class IvExec

Visitor that executes instructions. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Public Static Methods


Detailed Description

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 (vector<PolicyInstr*>& policies, SetManager& sman, VarRW& varrw, ostream* os)

IvExec

Execute the give policies with the given varrw [i.e. route].

Parameters:

policiespolicies to execute.
smanset manager to use for loading sets.
varrwinterface to read/write route variables.
osif not null, an execution trace will be output to stream.
 ~IvExec ()

~IvExec

FlowAction  run ()

run

Execute the policies.

FlowAction  runPolicy (PolicyInstr& pi)

runPolicy

Execute a policy.

Parameters:

pipolicy to execute
FlowAction  runTerm (TermInstr& ti)

runTerm

Execute a term.

Parameters:

titerm to execute.
void  visit (Push& p)

visit

Parameters:

ppush to execute.

Reimplemented from InstrVisitor.

void  visit (PushSet& ps)

visit

Parameters:

pspush of a set to execute.

Reimplemented from InstrVisitor.

void  visit (OnFalseExit& x)

visit

Parameters:

xOnFalseExit to execute.

Reimplemented from InstrVisitor.

void  visit (Regex& re)

visit

Parameters:

reRegex to execute.

Reimplemented from InstrVisitor.

void  visit (Load& l)

visit

Parameters:

lLoad to execute.

Reimplemented from InstrVisitor.

void  visit (Store& s)

visit

Parameters:

sStore to execute.

Reimplemented from InstrVisitor.

void  visit (Accept& a)

visit

Parameters:

aaccept the route.

Reimplemented from InstrVisitor.

void  visit (Reject& r)

visit

Parameters:

rreject the route.

Reimplemented from InstrVisitor.

void  visit (NaryInstr& nary)

visit

Parameters:

naryN-ary instruction to execute.

Reimplemented from InstrVisitor.

string  fa2str (const FlowAction& fa)

fa2str

[static]

Parameters:

faFlow action to convert.

Returns: String representation of flow action.


Generated by: pavlin on possum.icir.org on Wed Apr 13 21:53:13 2005, using kdoc $.