dve_explicit_system_t Class Reference

Class in DVE system interpretation. More...

#include <dve_explicit_system.hh>

Inheritance diagram for dve_explicit_system_t:

explicit_system_t dve_system_t system_t system_t dve_prob_explicit_system_t

List of all members.

Public Member Functions

 dve_explicit_system_t (error_vector_t &evect=gerr)
 A constructor.
size_int_t get_channel_pos (const size_int_t gid) const
 Returns a position of channel in a state of the system with process GID `gid'.
size_int_t get_process_pos (const size_int_t gid) const
 Returns a position of process in a state of the system with process GID `gid'.
size_int_t get_process_size (const size_int_t gid) const
 Returns a size of process in a state of the system with process GID `gid'.
size_int_t get_var_pos (const size_int_t gid) const
 Returns a position of variable in a state of the system with process GID `gid'.
virtual ~dve_explicit_system_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 system_t.

void DBG_print_state (state_t state, std::ostream &outs=std::cerr, const ulong_int_t format=ES_FMT_PRINT_ALL_NAMES)
 Prints a state to output stream `outs' formated according to `format'.
void DBG_print_state_CR (state_t state, std::ostream &outs=std::cerr, const ulong_int_t format=ES_FMT_PRINT_ALL_NAMES)
all_values_t eval_expr (const dve_expression_t *const expr, const state_t state, bool &eval_err) const
 Evaluates the expression in the context of the state of explicit system.
dve_transition_tget_property_trans (const system_trans_t &sys_trans) const
 Returns a transition of property process contained in enabled transition.
dve_transition_tget_receiving_trans (const system_trans_t &sys_trans) const
 Returns a receiving transition contained in enabled transition.
dve_transition_tget_sending_or_normal_trans (const system_trans_t &sys_trans) const
 Returns a normal or a sending transition contained in enabled transition.
size_int_t get_space_sum () const
 Returns a number of bytes necessary to store a state of the system.
size_int_t get_state_of_process (const state_t state, size_int_t process_id) const
all_values_t get_var_value (const state_t state, size_int_t var_gid, const size_int_t index=0)
 Returns the value of the variable in a given state of the system.
bool is_accepting (state_t state, size_int_t process_id)
 Returns, whether process `process_id' is in a accepting process state.
virtual slong_int_t read (const char *const filename, bool do_comp)
 Read in a DVE source given by `filename` and avoids expression compaction if `do_comp` is false.
virtual slong_int_t read (const char *const filename)
 Reads in a DVE source given by `filename'.
bool set_var_value (state_t state, const size_int_t var_gid, const all_values_t v, const size_int_t index=0)
 Changes the value of the variable in a given state of the system.
Methods for expression evaluation
These methods are implemented and can_evaluate_expressions() returns true

virtual bool eval_expr (const expression_t *const expr, const state_t state, data_t &data) const
 Implements explicit_system_t::eval_expr() in DVE system.
Methods working with system transitions and enabled transitions
These methods are implemented and 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)
virtual int get_enabled_trans (const state_t state, enabled_trans_container_t &enb_trans)
 Implements explicit_system_t::get_enabled_trans() in DVE system.
virtual int get_enabled_trans_count (const state_t state, size_int_t &count)
 Implements explicit_system_t::get_enabled_trans_count() in DVE system.
virtual bool get_enabled_trans_succ (const state_t state, const enabled_trans_t &enabled, state_t &new_state)
 Implements explicit_system_t::get_enabled_trans_succ() in DVE system.
virtual bool get_enabled_trans_succs (const state_t state, succ_container_t &succs, const enabled_trans_container_t &enabled_trans)
 Implements explicit_system_t::get_enabled_trans_succs() in DVE system.
virtual int get_succs (state_t state, succ_container_t &succs, enabled_trans_container_t &etc)
virtual enabled_trans_tnew_enabled_trans () const
 Implements explicit_system_t::new_enabled_trans() in DVE system.
Obligatory part of abstact interface
These methods have to implemented in each implementation of explicit_system_t

virtual state_t get_initial_state ()
 Implements explicit_system_t::get_initial_state() in DVE system.
virtual int get_ith_succ (state_t state, const int i, state_t &succ)
size_int_t get_preallocation_count () const
 Implements explicit_system_t::get_preallocation_count() in DVE system.
virtual int get_succs (state_t state, succ_container_t &succs)
virtual bool is_accepting (state_t state, size_int_t acc_group=0, size_int_t pair_member=1)
virtual bool is_erroneous (state_t state)
 Implements explicit_system_t::is_erroneous() in DVE system.
virtual void print_state (state_t state, std::ostream &outs=std::cout)
 Implements explicit_system_t::print_state() in DVE system.
virtual size_int_t violated_assertion_count (const state_t state) const
 Implements explicit_system_t::violated_assertion_count() in DVE system.
virtual std::string violated_assertion_string (const state_t state, const size_int_t index) const
 Implements explicit_system_t::violated_assertion_string() in DVE system.
virtual bool violates_assertion (const state_t state) const
 Implements explicit_system_t::violates_assertion() in DVE system.
Methods to check the SCCs of property process graph
process_decomposition_tget_property_decomposition ()
 Returns property decomposition.

Protected Member Functions

void append_new_enabled (dve_transition_t *const t_answ, dve_transition_t *const t_ask, const bool trans_err)
void append_new_enabled_prop_sync (dve_transition_t *const t_answ, dve_transition_t *const t_prop, const bool trans_err)
 Appends a new enabled transition given by sending and receiving property.
bool apply_effect (const state_t state, const dve_expression_t *const effect)
 Creates a successor of `state' by applying effect `effect'.
bool apply_transition_effects (const state_t state, const dve_transition_t *const trans)
 Creates a successor of `state' by applying effects of the transition `trans'.
size_int_t channel_content_count (const state_t &state, const size_int_t gid)
bool channel_is_empty (const state_t &state, const size_int_t gid)
 Returns true iff channel with GID `gid' is empty in state `state'.
bool channel_is_full (const state_t &state, const size_int_t gid)
 Returns true iff channel with GID `gid' is full in state `state'.
bool compute_enabled_of_property (const state_t state)
bool compute_enabled_stage1 (const size_int_t process_number, channels_t *channels, const state_t state, const bool only_commited)
bool compute_enabled_stage2 (const size_int_t process_number, channels_t *channels, const state_t state, const bool only_commited)
bool compute_successors_without_sync (const size_int_t process_number, succ_container_t &succs, const state_t state)
state_t create_error_state ()
 Creates "erroneous state".
int get_async_enabled_trans (const state_t state, enabled_trans_container_t &enb_trans)
 Implementation of get_enabled_trans() in asynchronous DVE systems.
bool get_async_enabled_trans_succ (const state_t state, const enabled_trans_t &enabled, state_t &new_state, const state_t property_state)
bool get_async_enabled_trans_succ (const state_t state, const enabled_trans_t &enabled, state_t &new_state)
 Implementation of get_enabled_trans_succ() in asynchronous DVE systems.
bool get_async_enabled_trans_succ_without_property (const state_t state, const enabled_trans_t &enabled, state_t &new_state)
bool get_async_enabled_trans_succs (const state_t state, succ_container_t &succs, const enabled_trans_container_t &enabled_trans)
 Implementation of get_enabled_trans_succs() in asynchronous DVE systems.
int get_async_succs (const state_t state, succ_container_t &succs, enabled_trans_container_t &enb_trans)
 Implementation of get_succs() in asynchronous DVE systems.
int get_async_succs (const state_t state, succ_container_t &succs)
 Implementation of get_succs() in asynchronous DVE systems.
int get_async_succs_internal (const state_t state, succ_container_t &succs)
 Internal method for implementation of both variants of get_async_succs().
all_values_t get_state_creator_value_of_var_type (const state_t state, size_int_t var_gid, const dve_var_type_t var_type, const size_int_t index=0)
 Returns a value of a variable with GID `var_gid' in a state `state'.
int get_sync_enabled_trans (const state_t state, enabled_trans_container_t &enb_trans)
 !Implementation of get_enabled_trans() in synchronous DVE systems
bool get_sync_enabled_trans_succ (const state_t state, const enabled_trans_t &enabled, state_t &new_state)
 Implementation of get_enabled_trans_succ() in synchronous DVE systems.
bool get_sync_enabled_trans_succs (const state_t state, succ_container_t &succs, const enabled_trans_container_t &enabled_trans)
 Implementation of get_enabled_trans_succs() in synchronous DVE systems.
int get_sync_succs (state_t state, succ_container_t &succs, enabled_trans_container_t &etc)
 Implementation of get_succs() in synchronous DVE systems.
int get_sync_succs (state_t state, succ_container_t &succs)
 Implementation of get_succs() in synchronous DVE systems.
int get_sync_succs_internal (state_t state, succ_container_t &succs, enabled_trans_container_t *const etc)
 Internal method for implementation of both variants of get_sync_succs().
void go_to_error (state_t state)
bool is_commited (state_t state)
 Returns, whether at least one process is in a commited state.
bool not_in_glob_conflict (const dve_transition_t *const t1, const dve_transition_t *const t2)
bool passed_through (const state_t state, const dve_transition_t *const t, const dve_state_int_t state1, bool &eval_err)
void pop_front_channel (state_t &state, const size_int_t gid)
void prepare_channels_info ()
 Clears list of transitions created by compute_enabled_stage1().
void push_back_channel (state_t &state, const size_int_t gid)
all_values_t read_from_channel (const state_t &state, const size_int_t gid, const size_int_t item_index, const size_int_t elem_index=0)
all_values_t retype (dve_var_type_t type, all_values_t value)
bool set_state_creator_value (state_t state, const size_int_t var_gid, const all_values_t v, const size_int_t index=0)
void set_state_creator_value_extended (const state_t &state, const state_t &new_state, const dve_expression_t &to_assign, const all_values_t &val, bool &error)
 Sets a value `val' to the variable given by `to_assign'.
bool set_state_creator_value_of_var_type (state_t state, const size_int_t var_gid, const dve_var_type_t var_type, const all_values_t v, const size_int_t index)
 Sets a value of a variable with GID `var_gid' in a state `state'.
void write_to_channel (state_t &state, const size_int_t gid, const size_int_t item_index, const all_values_t value)

Protected Attributes

size_int_t * array_sizes
enabled_trans_container_taux_enabled_trans
enabled_trans_container_taux_enabled_trans2
succ_container_taux_succ_container
size_int_t * channel_buffer_size
size_int_t * channel_element_size
size_int_t ** channel_item_pos
dve_var_type_t ** channel_item_type
channels_t * channels
size_int_t first_in_succs
size_int_t glob_count
array_t< byte_t * > glob_filters
process_position_t global_position
size_int_t max_succ_count
enabled_trans_container_tp_enabled_trans
size_int_t process_count
process_position_t * process_positions
size_int_t prop_begin
size_int_t prop_size
size_int_t property_position
array_t< prop_trans_t > property_trans
size_int_t space_sum
std::vector< state_creator_tstate_creators
size_int_t state_creators_count
size_int_t * state_positions_channel
size_int_t * state_positions_proc
size_int_t * state_positions_state
size_int_t * state_positions_var
size_int_t * state_sizes_var
size_int_t trans_count

Classes

struct  state_creator_t


Detailed Description

Class in DVE system interpretation.

This class implements the abstract interface explicit_system_t.

It is a child of dve_system_t - thus it also contains the representation of DVE system.

DVE system interpretation in this case comprises state generation, enabled transitions generation and expression evaluation.

This implementation of the abstract interface implements full set of its methods. Furthermore It takes over the system of expression evaluation from system_t. Only for evaluating varibles, fields and state identifiers there are defined special functions, which return their value accoring a state of system (given by a piece of a memory).

Furthermore it provides the set of methods, which are purely DVE system specific.


Constructor & Destructor Documentation

A constructor.

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

References system_t::get_abilities(), and system_abilities_t::system_can_decompose_property.


Member Function Documentation

void append_new_enabled ( dve_transition_t *const   t_answ,
dve_transition_t *const   t_ask,
const bool  trans_err 
) [protected]

Appends an new enabled transition given by sending and receiving transition and erroneousness.

It also combines sending and receiving transitions with property transitions stored in private variable property_trans, if there are any. Thus it stores 1 enabled transition for a system without property process and n enabled transition for a system with property process with n executable transitions stored in property_trans.

References array_of_abstract_t::back(), array_of_abstract_t::begin(), array_of_abstract_t::extend(), system_t::get_with_property(), system_trans_t::set_count(), enabled_trans_t::set_erroneous(), and array_of_abstract_t::size().

Referenced by compute_enabled_stage2().

void append_new_enabled_prop_sync ( dve_transition_t *const   t_answ,
dve_transition_t *const   t_prop,
const bool  trans_err 
) [protected]

Appends a new enabled transition given by sending and receiving property.

Parameters:
t_answ = sending transition
t_prop = receiving transition of the property process
trans_err = says, whether an evaluation of some of guards of transitions was erroneous

References array_of_abstract_t::extend(), system_trans_t::set_count(), and enabled_trans_t::set_erroneous().

Referenced by compute_enabled_stage2().

size_int_t channel_content_count ( const state_t state,
const size_int_t  gid 
) [protected]

Returns a count of elements stored in a channel with GID `gid' in state `state'

Referenced by channel_is_empty(), channel_is_full(), and DBG_print_state().

bool compute_enabled_of_property ( const state_t  state  )  [protected]

Computes trasitions of property process with satisfied guards and stores them to the list property_trans

References compute_successors_without_sync(), process_t::get_gid(), dve_process_t::get_trans_count(), dve_process_t::get_transition(), passed_through(), dve_system_t::pproperty, and SYNC_NO_SYNC.

Referenced by get_async_enabled_trans().

bool compute_enabled_stage1 ( const size_int_t  process_number,
channels_t *  channels,
const state_t  state,
const bool  only_commited 
) [protected]

Searching for receiving transitions with satisfied guards (stores them to `channels' - transition sorted by the used channel)

References dve_process_t::get_commited(), process_t::get_gid(), dve_process_t::get_trans_count(), dve_process_t::get_transition(), passed_through(), dve_system_t::processes, and SYNC_ASK.

Referenced by compute_successors_without_sync(), and get_async_enabled_trans().

bool compute_enabled_stage2 ( const size_int_t  process_number,
channels_t *  channels,
const state_t  state,
const bool  only_commited 
) [protected]

bool compute_successors_without_sync ( const size_int_t  process_number,
succ_container_t succs,
const state_t  state 
) [protected]

state_t create_error_state (  )  [protected]

Creates "erroneous state".

Creates "erroneous state", which is the unique in whole system. This state should not be interpreted (you would get unexpected values of varibles, which you want to see).

You can detect error states by function is_erroneous().

References get_space_sum(), and dve_system_t::processes.

void DBG_print_state ( state_t  state,
std::ostream &  outs = std::cerr,
const ulong_int_t  format = ES_FMT_PRINT_ALL_NAMES 
)

Prints a state to output stream `outs' formated according to `format'.

This is a function meant espesially for debugging purposes.

Parameters:
state = state of the system to print
outs = output stream where you want to print the state
format = format of output - you can set how the output should be structured and which names of identifiers should appear in the printout of the state (bitwise sum of the constants ES_FMT_PRINT_STATE_NAMES, ES_FMT_PRINT_VAR_NAMES, ES_FMT_PRINT_PROCESS_NAMES, ES_FMT_DIVIDE_PROCESSES_BY_CR).

References dve_explicit_system_t::state_creator_t::array_size, channel_content_count(), ES_FMT_DIVIDE_PROCESSES_BY_CR, ES_FMT_PRINT_PROCESS_NAMES, ES_FMT_PRINT_STATE_NAMES, ES_FMT_PRINT_VAR_NAMES, dve_symbol_table_t::get_channel(), dve_symbol_t::get_channel_type_list_size(), dve_symbol_t::get_name(), dve_symbol_table_t::get_process(), dve_symbol_table_t::get_state(), dve_symbol_table_t::get_variable(), dve_explicit_system_t::state_creator_t::gid, is_erroneous(), dve_system_t::processes, dve_system_t::psymbol_table, dve_explicit_system_t::state_creator_t::type, and dve_explicit_system_t::state_creator_t::var_type.

void DBG_print_state_CR ( state_t  state,
std::ostream &  outs = std::cerr,
const ulong_int_t  format = ES_FMT_PRINT_ALL_NAMES 
) [inline]

It is the same as DBG_print_state(), but finally calls `outs << std::endl' (thus prints `new-line' character and flushes the buffer).

Referenced by get_initial_state().

all_values_t eval_expr ( const dve_expression_t *const   expr,
const state_t  state,
bool &  eval_err 
) const [inline]

Evaluates the expression in the context of the state of explicit system.

Parameters:
expr = pointer to the expression represented by dve_expression_t
state = state of the system
eval_err = if there was an error during an evaluation of an expression, eval_err is set to true. Otherwise it is unchanged.
Returns:
The value of the expression expr in the context of state

References dve_system_t::eval_expr(), dve_system_t::fast_eval(), dve_expression_t::get_p_compact(), dve_expression_t::is_compacted(), and ES_parameters_t::state.

bool get_async_enabled_trans_succ ( const state_t  state,
const enabled_trans_t enabled,
state_t new_state,
const state_t  property_state 
) [protected]

Creates a successor of `state' using the enabled transition `enabled' and a successor `property_state' gained by the transition of property

This function optimizes a generation of successors of one state, because it does not compute transitions of property process any more. It uses precomputed state of property process.

References get_async_enabled_trans_succ_without_property(), get_property_trans(), and state_t::ptr.

bool get_async_enabled_trans_succ_without_property ( const state_t  state,
const enabled_trans_t enabled,
state_t new_state 
) [protected]

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

Implements explicit_system_t::get_enabled_ith_trans() in DVE system, but see also implementation specific notes below

Warning:
Computing of this method is the same as the running time of get_enabled_trans() (it is more efficient to use get_enabled_trans() and store generated enabled transitions, if it is possible).

Implements explicit_system_t.

References get_enabled_trans().

Referenced by get_ith_succ().

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

Implements explicit_system_t::get_enabled_trans_count() in DVE system.

The running time of this method is the same as the running time of get_enabled_trans().

Implements explicit_system_t.

References get_enabled_trans(), and array_of_abstract_t::size().

int get_ith_succ ( state_t  state,
const int  i,
state_t succ 
) [virtual]

Implements explicit_system_t::get_ith_succ() in DVE system, but see also implementation specific notes below

Warning:
The running time of this function is relatively high. The running time is the running time of get_succs(). It is usually more efficient to use get_succs() and to store all generated states, if it is possible.

Implements explicit_system_t.

References get_async_enabled_trans_succ(), get_enabled_ith_trans(), and SUCC_ERROR.

Referenced by por_t::ample_set_succs().

dve_transition_t * get_property_trans ( const system_trans_t sys_trans  )  const

Returns a transition of property process contained in enabled transition.

If the system contains a property process, this method returns the pointer to the property process's transition contained in an enabled transition.

Otherwise it returns 0.

Warning:
This method presumes, that sys_trans has been created by this class.

References system_trans_t::get_count(), and system_t::get_with_property().

Referenced by get_async_enabled_trans_succ(), and dve_prob_explicit_system_t::get_succs().

dve_transition_t * get_receiving_trans ( const system_trans_t sys_trans  )  const

Returns a receiving transition contained in enabled transition.

If get_sending_or_normal_trans(sys_trans) returns sending transition, this method returns its receiving counterpart.

Otherwise it returns 0.

Warning:
This method presumes, that sys_trans has been created by this class.

References system_trans_t::get_count(), and system_t::get_with_property().

Referenced by por_t::generate_ample_sets(), por_t::generate_composed_ample_sets(), and get_async_enabled_trans_succ_without_property().

dve_transition_t * get_sending_or_normal_trans ( const system_trans_t sys_trans  )  const

Returns a normal or a sending transition contained in enabled transition.

Transition of DVE system can consist of at most 3 transitions of processes. It always contains either non-synchronized transition or a sending transition (and its receiving counterpart)

This method guaranties to always return the transition, if sys_trans contains any (which should be truth, if enabled transition has been created by this class).

Warning:
This method presumes, that sys_trans has been created by this class.

Referenced by por_t::generate_ample_sets(), por_t::generate_composed_ample_sets(), get_async_enabled_trans_succ_without_property(), and dve_prob_explicit_system_t::get_succs().

all_values_t get_state_creator_value_of_var_type ( const state_t  state,
size_int_t  var_gid,
const dve_var_type_t  var_type,
const size_int_t  index = 0 
) [protected]

Returns a value of a variable with GID `var_gid' in a state `state'.

Parameters:
state = state of system
var_gid = GID of variable
var_type = type of variable
index = index for a case of vector of variables
Returns:
a value of variable with GID var_gid in a state state. It uses var_type to determine the type of conversion and index (voluntary) for determining an pointer to the variable in a vector

size_int_t get_state_of_process ( const state_t  state,
size_int_t  process_id 
) const

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

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

bool get_sync_enabled_trans_succ ( const state_t  state,
const enabled_trans_t enabled,
state_t new_state 
) [protected]

Implementation of get_enabled_trans_succ() in synchronous DVE systems.

!!!Transmitting of values through channels is ignored!!!!

References apply_transition_effects(), system_trans_t::get_count(), and enabled_trans_t::get_erroneous().

Referenced by get_sync_enabled_trans_succs().

void go_to_error ( state_t  state  )  [protected]

METHODS: Changes the state of process (repr. by `process') to `error'

References dve_system_t::processes.

Referenced by compute_successors_without_sync(), get_async_enabled_trans_succ_without_property(), and get_sync_succs_internal().

bool is_accepting ( state_t  state,
size_int_t  process_id 
) [inline]

Returns, whether process `process_id' is in a accepting process state.

Parameters:
state = state of the system
process_id = GID of process, which we are asking for an acceptance
Returns:
whether a process with GID process_ID is in an accepting state or not

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

Implements explicit_system_t::is_accepting() in DVE system. Returns true if the property automaton state belongs to the by-parameters-specified set of accepting condition. The set of accepting condition is specified using accepting group id and possibly pair member. Accepting !groups correspond to individual sets of states, or pairs of sets of states given by the accepting condition of the property automaton. Grups are identified by the numbers including zero (0,..,n-1) while pair members using numbers 1 and 2.

For example let Streett's accepting condition be (L1,U1), (L2,U2), (L3,U3). To check whether state q is present in U2, is_accepting(q,1,2) should be used.

Implements explicit_system_t.

bool not_in_glob_conflict ( const dve_transition_t *const   t1,
const dve_transition_t *const   t2 
) [inline, protected]

Returs true iff transitions `t1' and `t2' assign to the same global varibles.

References dve_transition_t::get_glob_mask().

bool passed_through ( const state_t  state,
const dve_transition_t *const   t,
const dve_state_int_t  state1,
bool &  eval_err 
) [inline, protected]

Returns true iff transition `t' is a transitiom from a process state `state1' with satisfied guard in a system state `state'

Returns also errors during an evaluation to the variable eval_err

References dve_transition_t::get_guard(), and dve_transition_t::get_state1_lid().

Referenced by compute_enabled_of_property(), compute_enabled_stage1(), compute_enabled_stage2(), and compute_successors_without_sync().

slong_int_t read ( const char *const   filename,
bool  do_comp 
) [virtual]

Read in a DVE source given by `filename` and avoids expression compaction if `do_comp` is false.

Is uses system_t::read(const char * const filename), therefore see that function for more information (about return value etc.) Furthermore it makes some analysis and extraction of information from the system and symbol table. Morover if `do_comp' is false avoids expression compaction

References dve_system_t::get_property_gid(), system_t::get_with_property(), process_decomposition_t::parse_process(), and dve_system_t::read().

virtual slong_int_t read ( const char *const   filename  )  [inline, virtual]

Reads in a DVE source given by `filename'.

Is uses system_t::read(const char * const filename), therefore see that function for more information (about return value etc.) Furthermore, it makes some analysis and extraction of information from the system and symbol table

Reimplemented from dve_system_t.

Reimplemented in dve_prob_explicit_system_t.

Referenced by dve_prob_explicit_system_t::read().

bool set_state_creator_value ( state_t  state,
const size_int_t  var_gid,
const all_values_t  v,
const size_int_t  index = 0 
) [inline, protected]

set_state_creator_value_of_var_type() with `var_type` set to `var_types[var_gid]`

Referenced by apply_effect(), and set_state_creator_value_extended().

void set_state_creator_value_extended ( const state_t state,
const state_t new_state,
const dve_expression_t to_assign,
const all_values_t &  val,
bool &  error 
) [protected]

Sets a value `val' to the variable given by `to_assign'.

Parameters:
state = original state
new_state = new state, where the value of variable should be assigned
to_assign = expression representing a variable of indexed element of array (index is evaluated in a constext of state)
val = value to assign
error = erroneousness of possible evaluation of index of array or potential breaking of bound of an array

References eval_expr(), dve_expression_t::get_ident_gid(), dve_expression_t::get_operator(), dve_expression_t::left(), and set_state_creator_value().

Referenced by get_async_enabled_trans_succ_without_property().

bool set_state_creator_value_of_var_type ( state_t  state,
const size_int_t  var_gid,
const dve_var_type_t  var_type,
const all_values_t  v,
const size_int_t  index 
) [protected]

Sets a value of a variable with GID `var_gid' in a state `state'.

Parameters:
state = state of system
var_gid = GID of variable
var_type = type of variable
index = index for a case of vector of variables
v = value to assign
Returns:
true iff no error occured during a call (i. e. value is in bounds of its type)

References dve_symbol_t::get_name(), dve_symbol_table_t::get_variable(), and dve_system_t::psymbol_table.

Referenced by get_initial_state().

bool set_var_value ( state_t  state,
const size_int_t  var_gid,
const all_values_t  v,
const size_int_t  index = 0 
) [inline]

Changes the value of the variable in a given state of the system.

Parameters:
state ... system state to which the variable value should be set
var_gid ... GID of variable to set
v ... value to set (be aware of bounds of byte and int types)
index ... optional parameter for the case of arrays - it is the index to an array
Returns:
true iff setting value was not successsful - i. e. value breaks the bounds of the type of variable, or variable is the constant


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