Controlling ProB Preferences: Difference between revisions

Line 10: Line 10:
=== Setting Preferences from the command-line ===
=== Setting Preferences from the command-line ===


  probcli -p P VAL
You can set a preference <tt>P</tt> to a value <tt>VAL</tt> for a particular run of probcli by adding the command-line switch <tt>-p P VAL</tt>, e.g.,
  probcli -p P VAL mymachine.mch -mc 9999


You can obtain a list of preferences by calling
You can obtain a list of preferences by calling
  probcli -help -v
  probcli -help -v
You can use a preference file generated by ProB Tcl/Tk:
    -prefs FILE  set Preferences from Prolog File
You can also set the scope for a particular deferred set:
    -card GS Val set scope of B deferred set


=== Setting Preferences from ProB Tcl/Tk ===
=== Setting Preferences from ProB Tcl/Tk ===

Revision as of 08:41, 31 August 2015

ProB provides a variety of preferences to control its behaviour.

Setting Preferences in a B machine

This only works for classical B models. For a preference P you can add the following definition to the DEFINITIONS section of the main machine:

SET_PREF_P == VAL

This will set the preference P to the value VAL for this model only.

Setting Preferences from the command-line

You can set a preference P to a value VAL for a particular run of probcli by adding the command-line switch -p P VAL, e.g.,

probcli -p P VAL mymachine.mch -mc 9999

You can obtain a list of preferences by calling

probcli -help -v

You can use a preference file generated by ProB Tcl/Tk:

    -prefs FILE  set Preferences from Prolog File

You can also set the scope for a particular deferred set:

    -card GS Val set scope of B deferred set

Setting Preferences from ProB Tcl/Tk

ProB Tcl/Tk stores your preferences settings in a file ProB_Preferences.pl.

The ProB preferences are grouped into various categories. In the "Preferences" Menu you can modify the preferences for each category:

GraphicalViewerPreferencesMenuEntry.png

For example, if you choose the graphical viewer preferences you will get this dialog:

GraphicalViewerPreferences.png