Deferred Sets
A deferred set in B is declared in the SETS Section and is not explicitly enumerated. In the example below, AA is a deferred set and BB is an enumerated set.
MACHINE M0SETS AA; BB={bb,cc,dd}ENDProB in general requires all deferred sets to be given a finite cardinality before starting animation or model checking. If no cardinality is specified, a default size will be used (which is controlled by the DEFAULT_SETSIZE preference).
In general (for both probcli and ProB Tcl/Tk) you can set the cardinality of a set AA either by
- making it an enumerated set, i.e., adding
AA = {v1,v2,…}to the SETS clause - adding a predicate
card(AA) = constantto the PROPERTIES clause - Note: various other predicates in the PROPERTIES clause will also influence the size used for AA by ProB, for example:
- card(AA) > 1 - aa:AA & bb:AA & aa/=bb - AA = {aa,bb} & aa/=bb - …- you can add a DEFINITION
scope_AA == SIZEto instruct ProB to set the cardinality of AA to the constant SIZE. - you can also use a DEFINITION
scope_AA == Min..Maxto set the cardinality of AA to Max+1-Min. This definition also influences the way the deferred set elements are numbered.
Using Refinement for Animation Preferences
Section titled “Using Refinement for Animation Preferences”REFINEMENT M0_ProB REFINES M0CONSTANTS aa,bbPROPERTIESAA = {aa,bb} & aa/=bbENDSetting Deferred Set Cardinalities within probcli
Section titled “Setting Deferred Set Cardinalities within probcli”From the command-line, using probcli you can use the command-line switch:
-card <GS> <VAL>Example:
probcli my.mch -card PID 5