Deferred Sets: Difference between revisions - ProB Documentation

Deferred Sets: Difference between revisions

Created page with ' 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. <pre> MACHINE Test …'
 
Line 25: Line 25:
Example:  
Example:  
  probcli my.mch -card PID 5
  probcli my.mch -card PID 5
See [[Using_the_Command-Line_Version_of_ProB#-card_.3CGS.3E_.3CVAL.3E]].
See [[Using_the_Command-Line_Version_of_ProB#-card_.3CGS.3E_.3CVAL.3E|manual page for probcli]].

Revision as of 08:22, 31 August 2015

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 Test
SETS AA; BB={bb,cc,dd}
END

ProB 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.

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) = constant to 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/=bb 
     - aa:AA & bb:AA & aa/=bb
     - …
  • you can add a DEFINITION scope_AA == constant to instruct ProB to set the cardinality of AA to the constant.

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

See manual page for probcli.