This is to verify the conformation of the device (the current work file) to its environment (a user-selected work file).
substitutions
map (this is necessary for restoring the transition names when projecting the violation trace of the composition STG back on the original device STG)dev.g
fileenv.g
filedev.g
and env.g
and save the result into sys.g
: pcomp -o -fsys.g -ldetail.xml dev.g env.g
sys.g
filedetail.xml
file (this is necessary for identifying composition STG places that belong to the device STG component)sys-mod.g
filesys-mod.pnml
file: punf -r -m=sys-mod.pnml sys-mod.g
assertion.txt
fileassertion.txt
for sys-mod.pnml
unfolding prefix and save the verification results in solutions.xml
file: mpsat -Fs -d @assertion.txt -v0 -f sys-mod.pnml solutions.xml
sys.g
) together with MPSat verification result (this is necessary for subsequent interpretation of violation traces)
An example Reach expression for conformation check with shadow transitions x+/1
and x-/2
:
// Check whether several STGs conform to each other. // The enabled-via-dummies semantics is assumed for @. // Configurations with maximal dummies are assumed to be allowed. let // Set of phantom output transition names in the whole composed STG. SHADOW_OUTPUT_TRANSITIONS_NAMES = {"x+/1", "x-/2", ""} \ {""}, SHADOW_OUTPUT_TRANSITIONS = gather n in SHADOW_OUTPUT_TRANSITIONS_NAMES { T n } { // Optimisation: make sure phantom events are not in the configuration. forall e in ev SHADOW_OUTPUT_TRANSITIONS \ CUTOFFS { ~$e } & // Check if some output signal is enabled due to phantom transitions only; // this would mean that some component STG does not conform to the rest of the composition. exists o in OUTPUTS { let tran_o = tran o { exists t in tran_o * SHADOW_OUTPUT_TRANSITIONS { forall p in pre t { $p } } & forall tt in tran_o \ SHADOW_OUTPUT_TRANSITIONS { ~@tt } } } }
If there is no solution reported by MPSat, then 1-way conformation property holds.
If a solution (or a collection of solutions) is reported for the composition STG with shadow transitions, then the following processing of the violation traces needs to be performed:
details.xml
file to map trace transitions on device STG componentsubstitutions
map to restore the internal signals in the trace projectionsys.g
file and reach the problematic state by executing the composition violation trace