dve_process_t Class Reference

Class representing a process. More...

#include <dve_process.hh>

Inheritance diagram for dve_process_t:

process_t dve_prob_process_t

List of all members.

Public Member Functions

 dve_process_t (system_t *const system)
 A constructor (initializates the process_t part and DVE specific parts).
 dve_process_t ()
virtual ~dve_process_t ()
 A destructor.
DVE system specific methods
These methods are implemented only in DVE system and they cannot be run using an abstract interface of process_t.

void add_assertion (size_int_t state_lid, dve_expression_t *const assert_expr)
 Associates state with LID `state_lid' with assertion `assert_expr'.
void add_state (const size_int_t state_gid)
void add_variable (const size_int_t var_gid)
bool get_acceptance (size_int_t lid, size_int_t group=0, size_int_t pair_member=1) const
size_int_t get_accepting_group_count () const
property_type_t get_accepting_type () const
 Returns property accepting type.
const dve_expression_tget_assertion (const size_int_t state_lid, const size_int_t index) const
 Returns a constant pointer to expression representing assertion.
dve_expression_tget_assertion (const size_int_t state_lid, const size_int_t index)
 Returns a pointer to expression representing assertion.
size_int_t get_assertion_count (const size_int_t state_lid) const
 Returns a count of assertions associated with state with LID `state_lid'.
bool get_commited (size_int_t lid) const
 Returns, whether state with LID = `lid' is commited or not.
size_int_t get_initial_state () const
 Returns a LID of initial state of this process.
size_int_t get_state_count () const
 Returns a count of process states in this process.
size_int_t get_state_gid (size_int_t lid) const
 Returns a GID of process state with LID `lid'.
dve_symbol_table_tget_symbol_table () const
 Returns a symbol table of the system, where this process is contained.
size_int_t get_trans_count (const sync_mode_t sync_mode) const
 Returns a count of transitions of given synchronization mode.
const dve_transition_tget_transition (const sync_mode_t sync_mode, const size_int_t trans_nbr) const
dve_transition_tget_transition (const sync_mode_t sync_mode, const size_int_t trans_nbr)
bool get_valid () const
 Returns true iff process is valid.
size_int_t get_variable_count () const
 Returns a count of local variables in this process.
size_int_t get_variable_gid (size_int_t lid) const
 Returns a GID of variable with LID `lid'.
void set_acceptance (size_int_t lid, bool is_accepting, size_int_t group=0, size_int_t pair_member=1)
void set_acceptance_type_and_groups (property_type_t prop_type, size_int_t groups_count)
 Sets accepting type and number of accepting groups.
void set_commited (size_int_t lid, bool is_commited)
 Sets, whether state with LID = `lid' is commited or not.
void set_initial_state (const size_int_t state_lid)
 Sets, which process state is initial.
void set_valid (const bool is_valid)
 Sets validity of the process (`true' means valid).
Methods modifying a process
These methods are implemented only if can_transitions() returns true.

virtual void add_transition (transition_t *const transition)
virtual void remove_transition (const size_int_t transition_lid)
 Implements process_t::remove_transition() in DVE system.
Methods for reading a process from a string representation
These methods are implemented and can_read() returns true.

virtual int from_string (std::string &proc_str)
 Implements process_t::from_string() in DVE system.
virtual int read (std::istream &istr)
 Implements process_t::read() in DVE system.
Methods working with transitions of a process
These methods are implemented and can_transitions() returns true.

virtual size_int_t get_trans_count () const
 Implements process_t::get_trans_count() in DVE system.
virtual const transition_tget_transition (const size_int_t lid) const
virtual transition_tget_transition (const size_int_t lid)
Obligatory part of abstact interface


virtual std::string to_string () const
 Implements process_t::to_string() in DVE system.
virtual void write (std::ostream &ostr) const
 Implements process_t::write() in DVE system.

Protected Member Functions

int read_using_given_parser (std::istream &istr, dve_parser_t &parser)
void write_declarations (std::ostream &ostr) const


Detailed Description

Class representing a process.

This class implements the abstract interface process_t

Notice, there are methods, which are not virtual and they are already present in the class process_t (e. g. process_t::get_gid()) and there are also virtual methods with default virtual implementation. They are not changed in dve_transition_t (e. g. process_t::set_gid()).

It supports the full set of methods of an abstract interface and adds many DVE specific methods to this class, corresponding to the DVE point of view to transitions of processes.


Constructor & Destructor Documentation

dve_process_t (  ) 

IMPLEMENTATION OF VIRTUAL INTERFACE ///// A constructor (initializates the process_t part and DVE specific parts)


Member Function Documentation

void add_assertion ( size_int_t  state_lid,
dve_expression_t *const   assert_expr 
)

Associates state with LID `state_lid' with assertion `assert_expr'.

Several assertions can be associated with the same state

References array_t::back(), and array_t::extend().

Referenced by dve_parser_t::assertion_create().

void add_state ( const size_int_t  state_gid  ) 

This function should not be used if the process is the part of the system Otherwise is may cause inconsistencies in a system.

References array_t::back(), array_t::extend(), dve_symbol_table_t::get_state(), get_symbol_table(), array_t::push_back(), and dve_symbol_t::set_lid().

void add_transition ( transition_t *const   transition  )  [virtual]

Implements process_t::add_transition() in DVE system, but see also implementation specific notes below

This method modifies the added transition because it has to set transition LID and Partial ID.

Implements process_t.

References dve_transition_t::get_sync_mode(), array_t::push_back(), transition_t::set_lid(), dve_transition_t::set_partial_id(), and array_t::size().

void add_variable ( const size_int_t  var_gid  ) 

This function should not be used if the process is the part of the system Otherwise is may cause inconsistencies in a system.

bool get_acceptance ( size_int_t  lid,
size_int_t  group = 0,
size_int_t  pair_member = 1 
) const [inline]

Returns, whether state with LID = `lid' in accepting group `group' and pair member `pair_member' is s accepting or not.

Referenced by dve_process_decomposition_t::parse_process().

size_int_t get_accepting_group_count (  )  const [inline]

Returns number of accepting groups. Accepting groups correspond to the number of sets in accepting condition of generalized Buchi automaton or number of pairs in accepting conditions of Rabin and Streett automata.

const dve_expression_t* get_assertion ( const size_int_t  state_lid,
const size_int_t  index 
) const [inline]

Returns a constant pointer to expression representing assertion.

Parameters:
state_lid = LID of state, which the assertion is associated with
index = number from 0 to get_assertion_count(state_lid)-1

dve_expression_t* get_assertion ( const size_int_t  state_lid,
const size_int_t  index 
) [inline]

Returns a pointer to expression representing assertion.

Parameters:
state_lid = LID of state, which the assertion is associated with
index = number from 0 to get_assertion_count(state_lid)-1

size_int_t get_trans_count ( const sync_mode_t  sync_mode  )  const [inline]

Returns a count of transitions of given synchronization mode.

Returns a count of transitions of synchronization mode given by parameter sync_mode

Partial ID then can be from 0 to (get_trans_count(sync_mode) - 1)

const dve_transition_t* get_transition ( const sync_mode_t  sync_mode,
const size_int_t  trans_nbr 
) const [inline]

Returns a pointer to the selected constant transition. For further informations see get_transition(const sync_mode_t sync_mode, const size_int_t trans_nbr) above.

dve_transition_t* get_transition ( const sync_mode_t  sync_mode,
const size_int_t  trans_nbr 
) [inline]

Returns a pointer to the transition given by the synchronization and Partial ID.

Returns a pointer to the transition given by parameters:

Parameters:
sync_mode = synchronization mode of the transition (SYNC_NO_SYNC, SYNC_ASK or SYNC_EXCLAIM)
trans_nbr = ID of the transition in this process

virtual const transition_t* get_transition ( const size_int_t  lid  )  const [inline, virtual]

virtual transition_t* get_transition ( const size_int_t  lid  )  [inline, virtual]

void set_acceptance ( size_int_t  lid,
bool  is_accepting,
size_int_t  group = 0,
size_int_t  pair_member = 1 
) [inline]

Sets, whether state with LID = `lid' in accepting group `group' and pair member `pair_member' is s accepting or not.

Referenced by dve_parser_t::accept_type().

void set_initial_state ( const size_int_t  state_lid  )  [inline]

Sets, which process state is initial.

Sets, which process state is initial.

Parameters:
state_lid = LID of initial state.

Referenced by dve_parser_t::state_init().


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

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