Using the Command-Line Version of ProB


The command-line version of ProB offers many of the feature of the standalone Tcl/Tk Version via the command-line. As such, you can run ProB from your shell scripts or in your Makefiles.

Conventions used

The following conventions are used in this guide:

<replaceme> All values that should be replaced with some value are shown withing < >
line breaks Command synopsis for command may be broken up on several lines. When typing commands enter all option on the same line.

Synopsis

probcli [--help]
<filename> [ <options> ]

Command-line Arguments for ProB Tcl/Tk

Note that the stand-alone Tcl/Tk version also supports a limited form of command-line preferences:

  • FILE (the name/path of the file to be loaded)
  • -prefs PREF_FILE (to use a specific preferences file, rather than the default ProB_Preferences.pl in your home folder)
  • -batch (to instruct ProB not to try to bring up windows, but to print information only to the terminal)
  • -selfcheck (to run the standard unit tests)
  • -t (to perform the Trace Check on the default trace file associated with the specification)
  • -tcl TCL_Command (to run a particular pre-defined Tcl command)
  • -mc (to perform model checking)
  • -c (to compute the coverage)
  • -ref (to perform the default trace refinment check)

However, the comand-line version of ProB, called probcli, provides more features. It also does not depend on Tcl/Tk and can therefore be run on systems without Tcl/Tk.

Options

-mc <nr>

Description

model check; checking at most <nr> states

Example

 probcli my.mch ...

-no<x>

Description

<x>=dead,inv,goal,ass (for model check)

Example

 probcli my.mch ...

-bf

Description

proceed breadth-first

Example

 probcli my.mch ...

-df

Description

proceed depth-first

Example

 probcli my.mch ...

--timeout <N>

Description

Timeout in ms for model checking and refinement checking

Example

probcli my.mch ...

-t

Description

trace check (associated .trace file must exist)

Example

probcli my.mch ...

-init

Description

initialise specification

Example

probcli my.mch -init

-cbc <OPNAME>

Description

constraint-based invariant checking for an operation (also use <OPNAME>=all)

Example

probcli my.mch ...

-cbc_deadlock

Description

constraint-based deadlock checking (also use -cbc_deadlock_pred PRED)

-cbc_deadlock_pred <<PRED>>

Description

Example

probcli my.mch ...

-strict

Description

raise error if mc finds counter example or trace checking fails

Example

probcli my.mch ...

-expcterr <ERR>

Description

expect error to occur (<ERR>=cbc,mc,ltl,...)

Example

probcli my.mch ...

-i

Description

interactive animation

Example

probcli my.mch ...

-eval

Description

start interactive read-eval-loop

Example

probcli my.mch ...

-c

Description

print coverage statistics

Example

probcli my.mch ...

-cc <Nr> <Nr>

Description

print and check coverage statistics

Example

probcli my.mch ...

-p <PREF> <VAL>

Description

set Preference to Value

Example

probcli my.mch ...

-card <GS> <VAL>

Description

set scope of B deferred set

Example

probcli my.mch ...

-goal <PRED>

Description

set GOAL predicate for model checker

Example

probcli my.mch ...

-s <PORT>

Description

start socket server on given port

Example

probcli my.mch ...

-ss

Description

start socket server on port 9000

Example

probcli my.mch ...

-sf

Description

start socket server on some free port

Example

probcli my.mch ...

-l <LogFile>

Description

log activities in <LogFile>

Example

probcli my.mch ...

-ll

Description

log activities in /tmp/prob_cli_debug.log

Example

probcli my.mch ...

-lg <LogFile>

Description

analyse <LogFile> using gnuplot

Example

probcli my.mch ...

-pp <FILE>

Description

pretty-print internal representation to <FILE>

Example

probcli my.mch ...

-ppf <FILE>

Description

pretty-print internal representation to <FILE>, force printing of all type infos

Example

probcli my.mch ...

-v

Description

verbose

Example

probcli my.mch ...

-version

Description

print version information

Example

probcli.exe -version
ProB Command Line Interface
 VERSION 1.3.3-final3 ($Rev: 7316 $)
 $LastChangedDate: 2011-03-09 17:14:00 +0100 (Mi, 09 Mrz 2011) $
 Prolog: SICStus 4.1.3 (x86-win32-nt-4): Wed Sep 22 21:41:09 WEDT 2010

-assertions

Description

check ASSERTIONS

Example

probcli my.mch ...

-properties

Description

check PROPERTIES

Example

probcli my.mch ...

-rc

Description

runtime checking of types/pre-/post-conditions

Example

probcli my.mch ...

-ltlfile <FILE>

Description

check LTL formulas in file <FILE>

Example

probcli my.mch ...

Some probcli examples

To load a file My.mch, setup the constants and initialize it do:

probcli -init My.mch

To load a file M.mch, setup the constants, initialize and then check all assertions with Atelier-B's default values for MININT and MAXINT and an increased timeout of 5 seconds do:

probcli -init -assertions -p MAXINT 2147483647 -p MININT -2147483647 -p TIME_OUT 5000 M.mch