Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

pdl_rule.h File Reference

Include file for using the pdl rules. More...

#include "pdl.h"

Include dependency graph for pdl_rule.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  rule_s
 Structure keeps track of the state and the true/false braches. More...


Typedefs

typedef struct rule_s  rule_t
 Structure keeps track of the state and the true/false braches. More...


Enumerations

enum  rule_type_t { STATE, TRUE_BRANCH, FALSE_BRANCH }
 Which type is the current rule. More...

enum  recursion_t { NO_RECURSION = 0x00, RECURSION = 0x01, RECURSION_HANDLED = 0x02 }
 Tell something about recursion in rules. More...

enum  side_t { left_side, right_side }
 Given a rule, which side of the rule are we working on. More...


Functions

rule_tadd_rule (record_t *state, record_t *true_branch, record_t *false_branch)
void free_rules (rule_t *rule)
void show_rules (const rule_t *rule)
void start_new_rules (void)
const rule_tget_top_rule (void)
void allow_new_rules (BOOL allow)
void set_top_rule (const rule_t *rule)
BOOL check_rule_for_recursion (const rule_t *rule)
void reduce_rule (rule_t *rule)


Detailed Description

Include file for using the pdl rules.

Author:
G.M. Venekamp (venekamp@nikhef.nl)
Version:
Revision:
1.11
Date:
Date:
2003/07/31 10:33:00

Definition in file pdl_rule.h.


Typedef Documentation

typedef struct rule_s rule_t
 

Structure keeps track of the state and the true/false braches.


Enumeration Type Documentation

enum recursion_t
 

Tell something about recursion in rules.

Enumeration values:
NO_RECURSION   There is no known recursion.
RECURSION   Recursion has been found.
RECURSION_HANDLED   Recursion has been found and handled/reported.

Definition at line 62 of file pdl_rule.h.

enum rule_type_t
 

Which type is the current rule.

Enumeration values:
STATE   State.
TRUE_BRANCH   True branch.
FALSE_BRANCH   False branch.

Definition at line 52 of file pdl_rule.h.

enum side_t
 

Given a rule, which side of the rule are we working on.

Enumeration values:
left_side   left side, i.e. state part of the rule.
right_side   right side, i.e. either true or false branch.

Definition at line 72 of file pdl_rule.h.


Function Documentation

rule_t* add_rule ( record_t * state,
record_t * true_branch,
record_t * false_branch )
 

Add a new rule to the list of rules. This function acts as a wrapper function for _add_rule().

Parameters:
state   Starting state
true_branch   True transit state
false_branch   False transit state

Definition at line 86 of file pdl_rule.c.

void allow_new_rules ( BOOL allow )
 

Is it allowed to add new rules?

Parameters:
allows   TRUE if adding new rules is allowed, FALSE otherwise.

Definition at line 71 of file pdl_rule.c.

Referenced by allow_rules().

BOOL check_rule_for_recursion ( const rule_t * rule )
 

Check the rule for occurances of recursion.

Returns:
TRUE if a recursion have been found, FALSE otherwise.

Definition at line 220 of file pdl_rule.c.

Referenced by check_policies_for_recursion().

void free_rules ( rule_t * rule )
 

Free all resource associated with the rule.

Parameters:
rule   Rule for which the resources must be freed.

Definition at line 637 of file pdl_rule.c.

Referenced by add_policy(), and free_policies().

const rule_t* get_top_rule ( void )
 

Get the top rule.

Returns:
Top rule.

Definition at line 658 of file pdl_rule.c.

void reduce_rule ( rule_t * rule )
 

Reduce a rule to its elementry form, i.e. all variables in the rule are substituted by their respective values.

Parameters:
rule   Rule to reduce.

Definition at line 558 of file pdl_rule.c.

Referenced by reduce_policies().

void set_top_rule ( const rule_t * rule )
 

Set the top rule to a new value.

Parameters:
rule   New value of top rule.

Definition at line 670 of file pdl_rule.c.

Referenced by reduce_policies().

void show_rules ( const rule_t * rule )
 

Show a rule and its descendants.

Parameters:
rule   Rule to display.

Definition at line 615 of file pdl_rule.c.

Referenced by show_policies().

void start_new_rules ( void )
 

Start a new list of rules.

Definition at line 58 of file pdl_rule.c.


Generated at Thu Mar 4 17:39:42 2004 for edg-lcmaps by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001