explicit_system_t Class Reference

#include <explicit_system.hh>

Inheritance diagram for explicit_system_t:

system_t bymoc_explicit_system_t dve_explicit_system_t prob_explicit_system_t dve_prob_explicit_system_t dve_prob_explicit_system_t

List of all members.

Public Member Functions

bool can_evaluate_expressions ()
bool can_system_transitions ()
 explicit_system_t (error_vector_t &evect)
 A constructor.
virtual ~explicit_system_t ()
 A destructor.
Methods for expression evaluation
These methods are implemented only if can_evaluate_expressions() returns true

virtual bool eval_expr (const expression_t *const expr, const state_t state, data_t &data) const =0
 Evaluates an expression.
Methods working with system transitions and enabled transitions
These methods are implemented only if can_system_transitions() returns true

virtual int get_enabled_ith_trans (const state_t state, const size_int_t i, enabled_trans_t &enb_trans)=0
 Computes the i-th enabled transition in a state `state'.
virtual int get_enabled_trans (const state_t state, enabled_trans_container_t &enb_trans)=0
 Creates a list of enabled transitions in a state `state'.
virtual int get_enabled_trans_count (const state_t state, size_int_t &count)=0
 Computes the count of transitions in a state `state'.
virtual bool get_enabled_trans_succ (const state_t state, const enabled_trans_t &enabled, state_t &new_state)=0
 Generates a successor of `state' using enabled transition `enabled'.
virtual bool get_enabled_trans_succs (const state_t state, succ_container_t &succs, const enabled_trans_container_t &enabled_trans)=0
virtual int get_succs (state_t state, succ_container_t &succs, enabled_trans_container_t &etc)=0
 Creates successors of state `state'.
virtual enabled_trans_tnew_enabled_trans () const =0
 Creates an instance of enabled transition.
Obligatory part of abstact interface
A destructor.

These methods have to implemented in each implementation of explicit_system_t

virtual state_t get_initial_state ()=0
 Returns an initial state of the system.
virtual int get_ith_succ (state_t state, const int i, state_t &succ)=0
 Computes i-th successor of `state'.
virtual size_int_t get_preallocation_count () const =0
 Returns a count of successors to preallocate in successor container.
virtual int get_succs (state_t state, succ_container_t &succs)=0
 Creates successors of state `state'.
virtual bool is_accepting (state_t state, size_int_t acc_group=0, size_int_t pair_member=1)=0
virtual bool is_erroneous (state_t state)=0
 Returns, whether the state of the system is erroneous.
virtual void print_state (state_t state, std::ostream &outs=std::cout)=0
 Prints the standard text representation of a state of the system.
virtual size_int_t violated_assertion_count (const state_t state) const =0
 Returns a count of assertions violated in the state `state'.
virtual std::string violated_assertion_string (const state_t state, const size_int_t index) const =0
virtual bool violates_assertion (const state_t state) const =0
 Returns, whether any assertion is violated in the state `state'.


Detailed Description

Abstract interface of a class represinting a state generator based on the model of system stored in system_t

The role of explicit system implemented by explicit_system_t is to provide an interface to the generator of states of a model of the system stored in the parent class system_t.

The most important methods are get_initial_state() and get_succs(). Values returned from get_succs() can be analyzed by succs_normal(), succs_error() and succs_deadlock().


Constructor & Destructor Documentation

explicit_system_t ( error_vector_t evect  )  [inline]

A constructor.

Parameters:
evect = error vector used for reporting of error messages


Member Function Documentation

bool can_evaluate_expressions (  )  [inline]

Tells whether the implementation of explicit_system_t interface can evaluate expressions

bool can_system_transitions (  )  [inline]

Tells whether the implementation of explicit_system_t interface can work with system_trans_t and enabled_trans_t

virtual bool eval_expr ( const expression_t *const   expr,
const state_t  state,
data_t data 
) const [pure virtual]

Evaluates an expression.

Parameters:
expr = expression to evaluate
state = state of the system, in which we want to evaluate the expression expr
data = computed value of the expression
Returns:
false iff no error occured during the evaluation of the expression
This method is implemented only if can_evaluate_expressions() returns true.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual int get_enabled_ith_trans ( const state_t  state,
const size_int_t  i,
enabled_trans_t enb_trans 
) [pure virtual]

Computes the i-th enabled transition in a state `state'.

Computes the i-th enabled transition in a state state.

Parameters:
state = state of the system
i = the index of the enabled transition (0..get_async_enabled_trans_count)
enb_trans = the variable for storing computed transition
Returns:
bitwise OR of SUCC_NORMAL, SUCC_ERROR and SUCC_DEADLOCK (use functions succs_normal(), succs_error() and succs_deadlock() for testing)
This method is implemented only if can_system_transitions() returns true.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual int get_enabled_trans ( const state_t  state,
enabled_trans_container_t enb_trans 
) [pure virtual]

Creates a list of enabled transitions in a state `state'.

Creates a list of enabled transitions in a state state and stores it to the container enb_trans (see enabled_trans_container_t).

Parameters:
state = state of the system
enb_trans = container for storing enabled transitions (see Enabled transitions for details)
Returns:
bitwise OR of SUCC_NORMAL, SUCC_ERROR and SUCC_DEADLOCK (use functions succs_normal(), succs_error() and succs_deadlock() for testing)
This method is implemented only if can_system_transitions() returns true.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual int get_enabled_trans_count ( const state_t  state,
size_int_t &  count 
) [pure virtual]

Computes the count of transitions in a state `state'.

Computes the count of transitions in a state state.

Parameters:
state = state of the system
count = computed count of enabled transitions
Returns:
bitwise OR of SUCC_NORMAL, SUCC_ERROR and SUCC_DEADLOCK (use functions succs_normal(), succs_error() and succs_deadlock() for testing)
Note:
In fact the count of transitions in state `state' is equal to the number of successors of state `state'.
This method is implemented only if can_system_transitions() returns true.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual bool get_enabled_trans_succ ( const state_t  state,
const enabled_trans_t enabled,
state_t new_state 
) [pure virtual]

Generates a successor of `state' using enabled transition `enabled'.

Parameters:
state = state of system
enabled = enabled transition to use for generation of successor
new_state = state to rewrite by the successor of state
This method is implemented only if can_system_transitions() returns true.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual bool get_enabled_trans_succs ( const state_t  state,
succ_container_t succs,
const enabled_trans_container_t enabled_trans 
) [pure virtual]

Generates successors of `state' using list of enabled transitions `enabled_trans'

Parameters:
state = state of system
succs = container for storage of successors of state
enabled_trans = list of enabled transitions to use for generation of successors
This method is implemented only if can_system_transitions() returns true.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual state_t get_initial_state (  )  [pure virtual]

Returns an initial state of the system.

This method takes a model of the system stored in system_t (parent of this class) and computes the initial state of the system.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual size_int_t get_preallocation_count (  )  const [pure virtual]

Returns a count of successors to preallocate in successor container.

succ_container_t uses this method to estimate an amount of memory to preallocate. Repeated reallocation is slow - therefore good estimation is useful, but not necessary.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual int get_succs ( state_t  state,
succ_container_t succs,
enabled_trans_container_t etc 
) [pure virtual]

Creates successors of state `state'.

Creates successors of state state and saves them to successor container (see succ_container_t). Furthermore it stores enabled transitions of the systems which are used to generate successors of state

Parameters:
state = state of the system
succs = successors container for storage of successors of state
etc = container of enabled transitions (see enabled_trans_container_t and enabled_trans_t)
Returns:
bitwise OR of SUCC_NORMAL, SUCC_ERROR and SUCC_DEADLOCK (use functions succs_normal(), succs_error() and succs_deadlock() for testing)
This method is implemented only if can_system_transitions() returns true.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual int get_succs ( state_t  state,
succ_container_t succs 
) [pure virtual]

Creates successors of state `state'.

Creates successors of state state and saves them to successor container (see succ_container_t).

Parameters:
state = state of the system
succs = successors container for storage of successors of state
Returns:
bitwise OR of SUCC_NORMAL, SUCC_ERROR and SUCC_DEADLOCK (use functions succs_normal(), succs_error() and succs_deadlock() for testing)

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual bool is_accepting ( state_t  state,
size_int_t  acc_group = 0,
size_int_t  pair_member = 1 
) [pure virtual]

Returns, whether the state is accepting in the specifed accepting group of Buchi or generalized Buchi automata, or whether the state belongs to the first or second component of the specified accepting pair of Rabin or Streett automata.

Parameters:
state = state of the system
Returns:
whether state (i.e. its property automaton projection) belongs to specified accepting group of Buchi or generalized Buchi automaton, or whether it belongs to the first (`pair_member=1') or second (`pair_member=2') component of the specified accepting pair of Rabin and Streett automata.
Note:
If the system is specified without property process, false is returned.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual bool is_erroneous ( state_t  state  )  [pure virtual]

Returns, whether the state of the system is erroneous.

An erroneous state is a special state that is unique in the whole system. It is reached by bad model specification (model that permits variable/index overflow synchronization collision etc.)

Parameters:
state = state of the system
Returns:
true iff any of processes is in the state `error'.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual enabled_trans_t* new_enabled_trans (  )  const [pure virtual]

Creates an instance of enabled transition.

This method is needed by enabled_trans_container_t, which cannot allocate enabled transitions itself, because it does not know their concrete type. The abstract type enabled_trans_t is not sufficient for creation because of its purely abstract methods.

{ Example - implementation of this method in DVE system:}

This method is implemented only if can_system_transitions() returns true.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual size_int_t violated_assertion_count ( const state_t  state  )  const [pure virtual]

Returns a count of assertions violated in the state `state'.

If an implementation of explicit_system_t do not support assertions, this method can be implemented so that it returns always 0.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual std::string violated_assertion_string ( const state_t  state,
const size_int_t  index 
) const [pure virtual]

Returns a string representation of index-th assertion violated in the state `state'

If an implementation of explicit_system_t do not support assertions, this method can be implemented so that it returns always empty string.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.

virtual bool violates_assertion ( const state_t  state  )  const [pure virtual]

Returns, whether any assertion is violated in the state `state'.

If an implementation of explicit_system_t do not support assertions, this method can be implemented so that it returns always false.

Implemented in bymoc_explicit_system_t, and dve_explicit_system_t.


The documentation for this class was generated from the following file:

Reference Manual for Library, 2006 developed in ParaDiSe laboratory, Faculty of Informatics, Masaryk University