No edit summary |
|||
Line 41: | Line 41: | ||
== 2. SETUP_CONSTANTS == | == 2. SETUP_CONSTANTS == | ||
In this phase ProB will try and find values for the constants and parameters of your machine, so that the <tt>PROPERTIES</tt> and <tt>CONSTRAINTS</tt> are true. | |||
Note that ProB will '''not''' (yet) modify the settings from phase 1 for MAXINT, MININT and the size of the deferred sets. | |||
ProB will initiate this phase automatically, and as we can see above, ProB has found three distinct ways to setup the constant limit. By double clicking on "SETUP_CONSTANTS(2)" we proceed to the next phase: | |||
[[file:ProB_JukeboxAfterSETUPCONSTANTS.png|center||700px]] | [[file:ProB_JukeboxAfterSETUPCONSTANTS.png|center||700px]] | ||
== 3. INITIALISATION == | == 3. INITIALISATION == | ||
[[file:ProB_JukeboxAfterINITIALISATION.png|center||700px]] | [[file:ProB_JukeboxAfterINITIALISATION.png|center||700px]] |
We assume that you grasped the first steps of opening and animating a B machine as outlined in Tutorial First Steps.
In this lesson, we examine more closely the various steps that ProB undertakes before a machine can be animated.
First, open the machine "Jukebox.mch" which can be found in the SchneiderBook/Jukebox_Chapter13 subdirectory of the ProB Examples folder. The main ProB window should look more or less as follows:
In general, before the operations of a machine can be applied, ProB needs to traverse three phases:
This process is illustrated in the following picture:
We now examine these phases on the Jukebox machine in more detail
Here ProB parses and type checks the machine.
Then it will fix the values of MININT and MAXINT. There are two ways you can influence this:
Note that these preferences determine the elements of the sets INT (implementable integers), NAT (implementable natural numbers) and NAT1. In addition, they are used to control the enumeration of variables of type INTEGER</tt) (mathematical integers), in case a definite value cannot be inferred from the machine.
Afterwards, ProB will determine the cardinality of all deferred sets (such as TRACK in the Jukebox machine).There are several ways you can influence this:
As you can see above, ProB has chosen MAXINT=3, MININT=-1 and card(TRACK)=2.
In this phase ProB will try and find values for the constants and parameters of your machine, so that the PROPERTIES and CONSTRAINTS are true. Note that ProB will not (yet) modify the settings from phase 1 for MAXINT, MININT and the size of the deferred sets.
ProB will initiate this phase automatically, and as we can see above, ProB has found three distinct ways to setup the constant limit. By double clicking on "SETUP_CONSTANTS(2)" we proceed to the next phase: