Averest


MacroStep Module

This module implements functions that are required by a simulator based on multi-valued evaluation. For more information, see function SimulationStep that is the essential function of this module.

Functions and values

Function or value Description

ComputeTrace aifS drvS

Full Usage: ComputeTrace aifS drvS

Parameters:
Returns: (Environment * EnvUpdate * Environment * EnvUpdate) list

"ComputeTrace aifS drvS" executes "Simulate true aifS drvS" and returns the computed trace which is a list of tuples (drvEnv,drvNxtL,aifEnv,aifNxtL) as described in the comments on function Simulate.

aifS : AIFSystem
drvS : SystemPart
Returns: (Environment * EnvUpdate * Environment * EnvUpdate) list

DriverTrace aifS drvS

Full Usage: DriverTrace aifS drvS

Parameters:
Returns: Environment list

"DriverTrace aifS drvS" executes "Simulate true aifS drvS" and returns a the driver part of the computed trace which consists of (drvEnv,drvNxtL) as described in the comments on function Simulate.

aifS : AIFSystem
drvS : SystemPart
Returns: Environment list

PrintMicroStepFlag

Full Usage: PrintMicroStepFlag

Returns: bool ref

This global variable determines whether micro steps of the simulation are printed.

Returns: bool ref

Simulate collectEnv drvS aifS

Full Usage: Simulate collectEnv drvS aifS

Parameters:
Returns: (Environment * EnvUpdate * Environment * EnvUpdate) list

This function performs an entire simulation of AIF system aifS by driver drvS. The function simulates drvS until this module terminates and uses its outputs immediately as input stimuli for the aif system aifS. Thus, it first computes a fixpoint for drvS, and depending on this, another one for aifS. After this step, the environment must be complete, so that the assertions of the driver and the AIF system are checked and delayed assignments for the next macro step are determined and evaluated. Depending on the argument collectEnv, the following data is collected during the simulation:

  • collectEnv=true: computes a list of tuples (drvEnv,drvNxtL,aifEnv,aifNxtL) where drvEnv and aifEnv are the environments computed for the driver and the AIF system, respectively, and drvNxtL/aifNxtL are lists of delayed assignments of the driver and the aifsystem.
  • collectEnv=false: will not collect any data, the results of the simulation are just printed as specified by the variable Evaluation.Printer (which can also write to a file).

collectEnv : bool
drvS : SystemPart
aifS : AIFSystem
Returns: (Environment * EnvUpdate * Environment * EnvUpdate) list

SimulateODE step envInit envD asgL asmL

Full Usage: SimulateODE step envInit envD asgL asmL

Parameters:
Returns: Environment

step : double
envInit : Map<QName, Value>
envD : Environment
asgL : Action list
asmL : Action list
Returns: Environment

hasContinuousTransitions

Full Usage: hasContinuousTransitions

Returns: bool ref

This global variable determines whether continuous transitions do occur.

Returns: bool ref