void 
Simulate_ChooseOneStateInput(
  BddFsm_ptr  fsm, 
  bdd_ptr  from_state, 
  bdd_ptr  next_set, 
  Simulation_Mode  mode, 
  int  display_all, 
  bdd_ptr* input, 
  bdd_ptr* state 
)


bdd_ptr 
Simulate_ChooseOneState(
  BddFsm_ptr  fsm, 
  bdd_ptr  next_set, 
  Simulation_Mode  mode, 
  int  display_all 
)
Chooses a state among future states depending on the given simulation policy (random, deterministic or interactive). In case of interactive simulation, the system stops and allows the user to pick a state from a list of possible items. If the number of future states is too high, the system requires some further constraints to limit that number and will asks for them until the number of states is lower than an internal threshold. Entered expressions are accumulated in one big constraint used only in the actual step of the simulation. It will be discarded after a state will be chosen.

Side Effects A referenced state (BDD) is returned. NULL if failed.

See Also Simulate_MultipleStep

int 
Simulate_CmdPickOneState(
  BddFsm_ptr  fsm, 
  Simulation_Mode  mode, 
  int  display_all, 
  char * strConstr 
)
optional

Side Effects required

See Also optional

void 
Simulate_End(
    
)
Quits the simulate package


void 
Simulate_Init(
    
)
Initializes the simulate package.


node_ptr 
Simulate_MultipleSteps(
  BddFsm_ptr  fsm, 
  bdd_ptr  constraint, 
  boolean  time_shift, 
  Simulation_Mode  mode, 
  int  n, 
  int  display_all 
)
Multiple step simulation: loops n times over the choice of a state according to the picking policy given at command line. It returns a list of at least n+1 referenced states (the first one is always the "current state" from which any simulation must start). The obtained list can contain a minor number of states if there are no future states at some point.

See Also Simulate_ChooseOneState

bdd_ptr 
simulate_accumulate_constraints(
  BddEnc_ptr  enc, 
  bdd_ptr  bdd, 
  int  max_size 
)
There are 4 condition to be verified in order to accept new further constraints: 1) entered expression must be a non-zero set; 2) entered expression must be consistent with the accumulated constraints (i.e. the product (further / accumulated) must be non-zero; 3) if (further / accumulated) is non-zero, it also must be non-zero the product (further / accumulated) / next_set of states 4) cardinality of the set obtained from the last product must be <= shown_states

Side Effects required

See Also optional

void 
simulate_choose_next(
  BddFsm_ptr  fsm, 
  bdd_ptr  from_state, 
  bdd_ptr  next_state_set, 
  Simulation_Mode  mode, 
  int  display_all, 
  bdd_ptr* which_input, 
  bdd_ptr* which_state 
)
from_state can be NULL from the initial set of states. At the end which_input will contained the chosen input (if any, NULL otherwise) and which_state will contain the chosen state


bdd_ptr 
simulate_get_constraints_from_string(
  const char* constr_str, 
  BddEnc_ptr  enc, 
  boolean  allow_nexts, 
  boolean  allow_inputs 
)
Input variables are allowed to occur in the passed constraint iff allow_inputs is true. Next operators are allowed to occur in the passed constraint iff allow_nexts is true. If an error occurs, NULL is returned and a message is printed. This function does not raises any exception. Returned BDD must be freed by the caller. In error messages it is assumed that constr_str is read from the command line.


bdd_ptr 
simulate_request_constraints(
  BddEnc_ptr  enc 
)
optional

Side Effects required

See Also optional

void 
simulate_sigterm(
  int  sig 
)
SIGINT signal handler inside the simulator.


void 
simulate_store_and_print_trace(
  BddEnc_ptr  enc, 
  node_ptr  fragment, 
  boolean  printyesno, 
  boolean  only_changes, 
  NodeList_ptr  symbols 
)
Extends current simulation trace by creating a new trace for simulation fragment and concatenating it to existing one.

See Also Trace_concat

Last updated on 2010/05/19 22h:26