system_t Class Reference

Abstract interface of a class representing a model of a system. More...

#include <system.hh>

Inheritance diagram for system_t:

bymoc_system_t dve_system_t explicit_system_t prob_system_t bymoc_explicit_system_t dve_explicit_system_t bymoc_explicit_system_t dve_explicit_system_t prob_explicit_system_t prob_explicit_system_t dve_prob_explicit_system_t dve_prob_explicit_system_t dve_prob_explicit_system_t dve_prob_explicit_system_t

List of all members.

Public Member Functions

bool can_be_modified () const
 Tells, whether current system can be modified.
bool can_decompose_property () const
 Tells, whether current system is able to work with processes.
bool can_processes () const
 Tells, whether current system is able to work with processes.
bool can_property_process () const
 Tells, whether current system is able to work with property process.
bool can_transitions () const
 Tells, whether current system is able to work with transitions.
const system_abilities_tget_abilities () const
 Returns a structure storing a list of abilities of current system.
system_abilities_tget_abilities ()
 Returns a structure storing a list of abilities of current system.
const error_vector_tget_error_vector () const
 Returns a constant reference to the error_vector_t inside of system_t.
error_vector_tget_error_vector ()
 Returns a reference to the error_vector_t inside of system_t.
bool get_with_property () const
 Returns, whether a property process is specified or not.
void set_with_property (const bool is_with)
 Sets, wheter system is the system with a property process.
 system_t (error_vector_t &evect=gerr)
 A constructor.
virtual ~system_t ()
 A destructor.
Methods modifying a system
These methods are implemented only if can_be_modified() returns true.

virtual void add_process (process_t *const process)=0
 Method for adding of process to system.
virtual void remove_process (const size_int_t process_id)=0
 Method for removing of process from system.
Obligatory part of abstact interface
These methods have to implemented in each implementation of system_t

virtual slong_int_t from_string (const std::string str)=0
 Method for reading a model of a system from a source stored in a string.
virtual property_type_t get_property_type ()=0
virtual slong_int_t read (const char *const filename)=0
 Method for reading a model of a system from a file.
virtual slong_int_t read (std::istream &ins=std::cin)=0
 Method for reading a model of a system from a stream.
virtual std::string to_string ()=0
virtual void write (std::ostream &outs=std::cout)=0
virtual bool write (const char *const filename)=0
 Method for writing currently stored model of a system to a file.
Methods working with processes
These methods are implemented only if can_processes() returns true.

virtual const process_tget_process (const size_int_t gid) const =0
 Returns a constant instance of a process with process GID `gid'.
virtual process_tget_process (const size_int_t gid)=0
 Returns a process with process GID `gid'.
virtual size_int_t get_process_count () const =0
 Returns a count of processes in the system.
Methods to check the SCCs of property process graph
virtual process_decomposition_tget_property_decomposition ()
 Returns property decomposition, or 0, if subsystem is not available.
Methods working with property process
These methods are implemented only if can_property_process() returns true.

virtual size_int_t get_property_gid () const =0
 Returns GID of property process.
virtual const process_tget_property_process () const =0
 Returns a pointer to the constant instance of property process.
virtual process_tget_property_process ()=0
 Returns a pointer to the property process.
virtual void set_property_gid (const size_int_t gid)=0
 Sets, which process is a property process.
Methods working with transitions
These methods are implemented only if can_transitions() returns true.

virtual size_int_t get_trans_count () const =0
 Returns the count of all transitions in the system.
virtual const transition_tget_transition (size_int_t gid) const =0
 Returns a constant instance of transition with transition GID = `gid'.
virtual transition_tget_transition (size_int_t gid)=0
 Returns a transition with transition GID = `gid'.

Static Public Attributes

static const ERR_id_t ERR_FILE_NOT_OPEN = 65134
static const ERR_type_t ERR_TYPE_SYSTEM = 100

Protected Member Functions

void copy_private_part (const system_t &second)

Protected Attributes

system_abilities_t abilities
error_vector_tterr
bool with_property


Detailed Description

Abstract interface of a class representing a model of a system.

This class provides an interface to the model of system. Depending on abilities (see get_abilities()) you can more or less deeply analyse the model.

Furthermore you can generate states of the system using child class explitcit_system_t (and its children)


Constructor & Destructor Documentation

system_t ( error_vector_t evect = gerr  )  [inline]

A constructor.

Parameters:
evect = the error vector, that will be used by created instance of system_t


Member Function Documentation

virtual void add_process ( process_t *const   process  )  [pure virtual]

Method for adding of process to system.

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

Implemented in bymoc_system_t, and dve_system_t.

bool can_be_modified (  )  const [inline]

Tells, whether current system can be modified.

Generally thr system can be modified using add_process() and remove_process() together with methods modifying processes

virtual slong_int_t from_string ( const std::string  str  )  [pure virtual]

Method for reading a model of a system from a source stored in a string.

Parameters:
str = string to read
Returns:
... 0 iff no error occurs, non-zero value in a case of error during a reading.

Implemented in bymoc_system_t, and dve_system_t.

const system_abilities_t& get_abilities (  )  const [inline]

Returns a structure storing a list of abilities of current system.

It also stores the list of abilites of processes and transitions, which are a part of a system and abilities of explicit system

system_abilities_t& get_abilities (  )  [inline]

Returns a structure storing a list of abilities of current system.

It also stores the list of abilites of processes and transitions, which are a part of a system and abilities of explicit system

Referenced by bymoc_explicit_system_t::bymoc_explicit_system_t(), transition_t::can_be_modified(), process_t::can_be_modified(), transition_t::can_read(), process_t::can_read(), process_t::can_transitions(), dve_explicit_system_t::dve_explicit_system_t(), and dve_system_t::dve_system_t().

virtual const process_t* get_process ( const size_int_t  gid  )  const [pure virtual]

Returns a constant instance of a process with process GID `gid'.

Parameters:
gid = process GID of a process (can be any from an interval 0..(get_process_count()-1) )
Returns:
process (represented by a pointer to process_t)
This method is implemented only if can_processes_true_methods() returns true.

Implemented in bymoc_system_t, and dve_system_t.

virtual process_t* get_process ( const size_int_t  gid  )  [pure virtual]

Returns a process with process GID `gid'.

Parameters:
gid = process GID of a process (can be any from an interval 0..(get_process_count()-1) )
Returns:
process (represented by a pointer to process_t)
This method is implemented only if can_processes_true_methods() returns true.

Implemented in bymoc_system_t, and dve_system_t.

Referenced by prob_system_t::consolidate().

virtual size_int_t get_process_count (  )  const [pure virtual]

Returns a count of processes in the system.

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

Implemented in bymoc_system_t, and dve_system_t.

Referenced by prob_system_t::consolidate(), and enabled_trans_container_t::enabled_trans_container_t().

virtual size_int_t get_property_gid (  )  const [pure virtual]

Returns GID of property process.

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

Implemented in bymoc_system_t, and dve_system_t.

virtual const process_t* get_property_process (  )  const [pure virtual]

Returns a pointer to the constant instance of property process.

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

Implemented in bymoc_system_t, and dve_system_t.

virtual process_t* get_property_process (  )  [pure virtual]

Returns a pointer to the property process.

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

Implemented in bymoc_system_t, and dve_system_t.

virtual property_type_t get_property_type (  )  [pure virtual]

Method for identifying type of the accepting condition of the property process. Possible types are NONE, BUCHI, GENBUCHI, MULLER, RABIN, STREETT.

Implemented in bymoc_explicit_system_t, bymoc_system_t, and dve_system_t.

virtual size_int_t get_trans_count (  )  const [pure virtual]

Returns the count of all transitions in the system.

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

Note:
Returned value is the sum of returned values obtained by calling process_t::get_trans_count() for all processes of the system

Implemented in bymoc_system_t, and dve_system_t.

Referenced by prob_system_t::consolidate().

virtual const transition_t* get_transition ( size_int_t  gid  )  const [pure virtual]

Returns a constant instance of transition with transition GID = `gid'.

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

Implemented in bymoc_system_t, and dve_system_t.

virtual transition_t* get_transition ( size_int_t  gid  )  [pure virtual]

Returns a transition with transition GID = `gid'.

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

Implemented in bymoc_system_t, and dve_system_t.

virtual slong_int_t read ( const char *const   filename  )  [pure virtual]

Method for reading a model of a system from a file.

Parameters:
filename = path to a source of a model
Returns:
0 iff successfuly opens the file and successfuly parses it. Otherwise it returns non-zero value. If the error was caused by the impossibility to open a file, it returns system_t::ERR_FILE_NOT_OPEN.

Implemented in bymoc_system_t, dve_explicit_system_t, dve_prob_explicit_system_t, and dve_system_t.

virtual slong_int_t read ( std::istream &  ins = std::cin  )  [pure virtual]

Method for reading a model of a system from a stream.

Parameters:
ins = input stream containing a source of a model
Returns:
... 0 iff no error occurs, non-zero value in a case of error during a reading.

Implemented in bymoc_system_t, dve_prob_explicit_system_t, and dve_system_t.

virtual void remove_process ( const size_int_t  process_id  )  [pure virtual]

Method for removing of process from system.

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

Implemented in bymoc_system_t, and dve_system_t.

virtual void set_property_gid ( const size_int_t  gid  )  [pure virtual]

Sets, which process is a property process.

Parameters:
gid = GID of new property process
This method is implemented only if can_property_process() returns true.

Implemented in bymoc_system_t, and dve_system_t.

virtual std::string to_string (  )  [pure virtual]

Method for writing source of actually stored model of a system to the string

Implemented in bymoc_system_t, and dve_system_t.

virtual void write ( std::ostream &  outs = std::cout  )  [pure virtual]

Method for writing currently stored model of a system to a stream. (parameter `outs')

Implemented in bymoc_system_t, and dve_system_t.

virtual bool write ( const char *const   filename  )  [pure virtual]

Method for writing currently stored model of a system to a file.

Parameters:
filename = path to a file
Returns:
true iff successfuly opens the file

Implemented in bymoc_system_t, and dve_system_t.


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