<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://prob.hhu.de/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Michael+Leuschel</id>
	<title>ProB Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://prob.hhu.de/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Michael+Leuschel"/>
	<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Special:Contributions/Michael_Leuschel"/>
	<updated>2026-05-27T06:04:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Links&amp;diff=6142</id>
		<title>Links</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Links&amp;diff=6142"/>
		<updated>2026-05-04T16:35:14Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Tools using ProB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Books and Resources on B ==&lt;br /&gt;
* [https://doi.org/10.1017/CBO9780511624162 The B-Book: Assigning programs to meanings, by Jean-Raymond Abrial]&lt;br /&gt;
* [https://www.amazon.de/-/en/Steve-Schneider/dp/033379284X/ The B-Method: An Introduction, by Steve Schneider] ((Cornerstones of Computing) )&lt;br /&gt;
* [http://www.event-b.org/abook.html Modeling in Event-B: System and Software Engineering, by Jean-Raymond Abrial] (the Bee book)&lt;br /&gt;
* [https://www3.hhu.de/stups/handbook/rodin/current/html/ Rodin Users&#039; Handbook]&lt;br /&gt;
* Atelier-B Reference Manual (available as part of the [[https://www.atelierb.eu/en/atelier-b-support-maintenance/download-atelier-b/ Atelier-B download])&lt;br /&gt;
* [https://mooc.imd.ufrn.br/course/the-b-method MOOC: The B-Method: from specification to code]&lt;br /&gt;
&lt;br /&gt;
== Papers ==&lt;br /&gt;
* [https://www.cs.hhu.de/lehrstuehle-und-arbeitsgruppen/softwaretechnik-und-programmiersprachen/publikationen ProB Publications] &lt;br /&gt;
* [http://en.wikipedia.org/wiki/B-Method B-Method in Wikipedia] &lt;br /&gt;
* [http://www.bmethod.com/ B-Method Site] from ClearSy&lt;br /&gt;
* [http://www.fm4industry.org/index.php/Can_FM_tools_manage_large_industrial_problems%3F Can FM tools manage large scale industrial problems ?]&lt;br /&gt;
* [http://www.data-validation.fr Data Validation]&lt;br /&gt;
&lt;br /&gt;
== ProB ==&lt;br /&gt;
* [[ProB for Railways]]&lt;br /&gt;
* [[ProB History]]&lt;br /&gt;
* [[ProB Examples|Examples for ProB]] (along with screenshots and explanations)&lt;br /&gt;
* [http://www.ecs.soton.ac.uk/~mal/systems/prob.html Old web page of ProB] (in Southampton; use for releases prior to 1.2)&lt;br /&gt;
* [http://www.fm4industry.org/index.php/Productivity_Improvement_of_Data_Consistency_in_Transportation_Models Link to Success Story (written by Cetic)]&lt;br /&gt;
* [https://groups.google.com/d/forum/prob-users prob-users group]&lt;br /&gt;
&lt;br /&gt;
== Tools using ProB ==&lt;br /&gt;
* [https://www.clearsy.com/en/our-tools/clearsy-data-solver/ ClearSy Data Solver]&lt;br /&gt;
* [http://www.data-validation.fr/data-validation-in-the-railways/ DTVT - Data Table Validation Tool] for Alstom by ClearSy&lt;br /&gt;
* OLAF data validation tool by ClearSy for Alstom and SNCF&lt;br /&gt;
* Dave data validation tool by ClearSy for General Electric Transportation&lt;br /&gt;
* [https://github.com/plues/plues PLUES] tool for university course validation&lt;br /&gt;
* [https://github.com/Joshua27/BSynthesis BSynthesis] tool for repair and generation  of formal models&lt;br /&gt;
* [https://safecap.co.uk SafeCap]&lt;br /&gt;
*  [https://pkoerner.github.io/lisb-doc/ LisB], a Clojure/DSL API built-on top of the ProB-JAVA API&lt;br /&gt;
* [http://wiki.event-b.org/index.php/IUML-B iUML Statemachines]&lt;br /&gt;
* [http://users.ecs.soton.ac.uk/vs2/ac.soton.multisim.updatesite/ MultiSimulation Plug-In for Rodin]&lt;br /&gt;
* [https://link.springer.com/chapter/10.1007/978-3-031-21595-7_9 Capella Validation Tool]&lt;br /&gt;
* [https://github.com/CLEARSY/B-Submission-Kit CLEARSY B-Submission-Kit]&lt;br /&gt;
* [http://www.beta-tool.info/user_guide.html Beta]&lt;br /&gt;
* [https://www.ros.hw.ac.uk/handle/10399/2685  HRemo (see chapter 4 of PhD thesis)]&lt;br /&gt;
* [http://dx.doi.org/10.14279/depositonce-2502 Message Choreography Model Animation and Test Case Generation (see PhD thesis; Chapters 5 and 6)] [http://link.springer.com/article/10.1007%2Fs10270-012-0272-x SSM article (2014)]&lt;br /&gt;
* [https://bcert-meeduse.github.io/ttc2026.html BCert]&lt;br /&gt;
* [http://b4msecure.forge.imag.fr B4MSecure]&lt;br /&gt;
* [http://genisis.forge.imag.fr GenISIS]&lt;br /&gt;
* [http://vasco.imag.fr/tools/meeduse/ MEEDUSE]&lt;br /&gt;
* [https://hal.archives-ouvertes.fr/hal-00981811 VTG] (Vulnerability Test Generator, see [http://blog.aymericksavary.fr/wp-content/uploads/2011/10/presentation.pdf  Rodin Workshop 2012 presentation] and [http://blog.aymericksavary.fr/wp-content/uploads/2014/06/Présentation.pdf 2014 presentation])&lt;br /&gt;
* CODA [https://arxiv.org/abs/1305.6112v1 arXiv article]&lt;br /&gt;
* There is also some intitial effort to [http://pure.au.dk/portal/en/publications/interpreting-implicit-vdm-specifications-using-prob(19de7f9f-1d9a-483c-b2e7-285c0d0edc63).html use ProB for implicit VDM specifications] presented at [http://wiki.overturetool.org/index.php/12th_Overture_Workshop the 12th Ouverture Workshop].&lt;br /&gt;
* [https://github.com/ValerioMedeiros/BEval BEval]&lt;br /&gt;
* [https://github.com/ValerioMedeiros/BTestBox BTestBox]&lt;br /&gt;
* [http://wiki.event-b.org/index.php/MBT_plugin MBT plugin] for model-based testing within Rodin&lt;br /&gt;
* [https://rajivmurali.github.io/UsecasePro/ UseCasePro], see article in the [http://eprints.ncl.ac.uk/file_store/production/229541/A4269E59-6B4A-485E-8E63-E164802DFADD.pdf proceedings of the 2016 Workshop on Formal and Model-Driven Techniques for Developing Trustworthy Systems]&lt;br /&gt;
* [http://bibbase.org/network/publication/lausdahl-ishikawa-larsen-interpretingimplicitvdmspecificationsusingprob-2015 Animating implicit VDM specifications inside Ouverture]&lt;br /&gt;
* [http://www.ovado.net Ovado] (as second tool chain)&lt;br /&gt;
* [https://github.com/tofische/cucumber-event-b Cucumber-Event-B] tool to run high-level tests&lt;br /&gt;
&lt;br /&gt;
== Related Tools ==&lt;br /&gt;
* [http://www.atelierb.eu/ Atelier B]&lt;br /&gt;
* [http://www.event-b.org/ Event-B and Rodin Wiki] ([http://wiki.event-b.org/index.php/Rodin_Platform_Releases Platform Releases], [http://wiki.event-b.org/index.php/Main_Page  Documentation]), [http://sourceforge.net/projects/rodin-b-sharp/ Rodin Sourceforge Site]&lt;br /&gt;
* [https://github.com/utwente-fmt/ltsmin/releases LTSmin releases (including versions for prob)]&lt;br /&gt;
* [http://www.b4free.com/ B4Free] tools for the development of B models&lt;br /&gt;
* [https://hal.archives-ouvertes.fr/inria-00099836 Click n Prove]&lt;br /&gt;
* [https://github.com/edwardcrichton/BToolkit B Toolkit]&lt;br /&gt;
* [http://www.ecs.soton.ac.uk/~cfs/umlb.html U2B] UML to B translation tool&lt;br /&gt;
* [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] ([http://research.microsoft.com/en-us/um/people/lamport/tla/tools.html tools for TLA+])&lt;br /&gt;
* [https://spivey.oriel.ox.ac.uk/corner/Fuzz_typechecker_for_Z The fuzz type-checker for Z]&lt;br /&gt;
* [https://www.cs.ox.ac.uk/projects/fdr/ The FDR CSP refinement checker]&lt;br /&gt;
* [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/List_of_model_checking_tools Model checking tools]&lt;br /&gt;
* [https://accelconf.web.cern.ch/icalepcs2021/doi/JACoW-ICALEPCS2021-WEPV042.html PLCverif] (CERN)&lt;br /&gt;
&lt;br /&gt;
== Testimonials ==&lt;br /&gt;
* [https://prologyear.logicprogramming.org/ColmerauerPrize.html Alain Colmerauer Prize, celebrating the 50th anniversary of Prolog]&amp;lt;i&amp;gt; &amp;quot;The winner of the first edition of the Prize was announced at the Prolog Day Symposium, on November 10, 2022: ProB: Harnessing the Power of Prolog to Bring Formal Models and Mathematics to Life. Michael Leuschel and STUPS Group.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://link.springer.com/chapter/10.1007/978-3-031-67114-2_13 Proving B with Atelier B]&amp;lt;i&amp;gt;&amp;quot; In the early 2000’s, formal data validation started to become more wide-spread in the railways [10]. In particular, the ProB model-checker was first demonstrated during the EU project DEPLOY [13]. After some optimisations, ProB was able to fully handle large size metro data and validation rules, resulting in the generation of one B machine per validation rule and instantiated with the data related to this rule. To date, the biggest B machine generated for data validation and analysed by ProB contains 10 Mloc. With Atelier B 4.3, ProB was added as an interactive command [12]. Its behaviour is similar to the predicate prover: it does not modify the goal, only trying to demonstrate it. It comes with a time limit (maximum duration) and the possibility to reduce the number of hypotheses by selecting those having one symbol in common with the goal. PRoB allows better handling of arithmetic goals and case-based proofs on reduced domains.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
*[https://link.springer.com/chapter/10.1007/978-3-031-05814-1_11 The 4SECURail Formal Methods Demonstrator, Franco Mazzanti and Dimitri Belli] &amp;lt;i&amp;gt;&amp;quot;&amp;quot;The second framework that has been chosen to support the formal analysis of the system is ProB [16]. Indeed, according to several surveys (see, e.g., [17,18,19]) B/EventB appears to be one of the most adopted formal methods in railways. Moreover, ProB has a very user-friendly interface requiring a small effort to be learnt and powerful verification methods. Last but not least, it is freely available as an open-source product.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
*[https://openportal.isti.cnr.it/doc?id=people______::8e1a740ac10b66042af4f30812531d2d The 4SECURail approach to formalizing standard interfaces between signalling systems components, Belli et al.] &amp;lt;i&amp;gt;&amp;quot;ProB has been selected as the second target of the formal encoding because of its recognized role (Ferrari et al. 2020) in the field of formal railway-related modelling. It provides user-friendly interfaces, and allows LTL/CTL model checking, state-space exploration, state-space projections, and trace descriptions in the form of sequence diagrams&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://www.deploy-project.eu/pdf/D41-Siemens-final-full.pdf Data validation at Siemens, Jérôme Falampin]: &amp;lt;i&amp;gt;&amp;quot;&amp;quot;The work done with ProB is a great success. Thanks to the automatization and ProB, the wayside data validation is quicker, easier and complete.&amp;quot;&amp;lt;/i&amp;gt; More details and academic papers can be found on our page [[Siemens Data Validation with ProB]].&lt;br /&gt;
* [http://dl.acm.org/citation.cfm?doid=2406336.2406351 Pacemaker model by Mery and Singh]: &amp;lt;i&amp;gt;&amp;quot;ProB was very useful in the development of the pacemaker specification, and was able to animate all of our models and able to prove the absence of error (no counterexample exist). The ProB model checker also discovered several invariant violations, e.g., related to incorrect responses or unordered pacing and sensing activities. It was also able to discover a deadlock in two of the models, which was due to the fact that “clock counter” were not properly recycled, meaning that after a while no pacing or sensing activities occur into the system. Such kind of errors would have been more difficult to uncover with the prover of RODIN tool.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://www.data-validation.fr/data-validation-reverse-engineering/ Reverse engineering using ProB at ClearSy]: &amp;lt;i&amp;gt;&amp;quot;Data validation principles have been applied recently to a railways reverse-engineering project with great success. B and ProB have demonstrated again how efficient they are when used in combination.&amp;quot;&amp;lt;/i&amp;gt;...&amp;lt;i&amp;gt;&amp;quot;This problem was solved elegantly by using data validation principles: a B model representing the two graphs and their properties were elaborated, and ProB used for finding a solution.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://www.ncl.ac.uk/computing/research/publication/197269 Safecap tool paper by Iliasov, Lopatkin and Romanovsky]: &amp;lt;i&amp;gt;&amp;quot;One of the larger examples we have tackled is the Carlisle Citadel station with the North, South, and Caldew junctions. The modelled fragment is 2.6km long and comprises 70 train detection circuits, 63 points, 79 routes and 161 valid paths. The translation from a scanned PDF drawing and printed control tables took 45 man-hours. The verification of the topology theory constraints using ProB took just over 6 minutes on a PC with i7 3730 CPU and utilized just under 2GB of RAM. The Why3 verification of the same theory takes approximately 70 minutes. The control table theory is verified under 20 seconds by ProB and not verified completely, with the current translation of conditions, using Why3.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://www.erts2014.org/Site/0R4UXE94/Fichier/erts2014_1B2.pdf Innovative Approach for Requirements Verification of Closed Systems by Reis, Bicknell, Butler, Colley]: &amp;lt;i&amp;gt;&amp;quot;The Event-B model can be animated within Rodin using the BMotion Studio tool, which is part of ProB. Using the tool, it is possible to generate an animated front-end to the simulation of the model in the form of a user-friendly graphical interface, which corresponds to the system’s GUI (see Figure 4). The user can interact directly with this animated front-end, while the tool continues to run the formal analysis in the background, reacting to user choices and checking the model and invariants at each step. This was utilised during the case study, to produce a representation of the GIU provided as part of the end-user system. As this graphical representation is tied to the underlying Event-B model, it can not only be used to run through the model and confirm that the model is the correct representation of the system, but can also be used to explore further scenarios. This graphical representation of the system can be used without necessarily requiring any experience with the Event-B language or the toolset.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://dl.acm.org/citation.cfm?id=2480314 ProZ for Modelling Safety Properties of Interactive Medical Systems by Bowen and Reeves]: &amp;lt;i&amp;gt;&amp;quot;In this paper we have shown how temporal logic and invariants describing safety properties of interactive medical devices can be investigated within the ProZ tool. We have given examples of checking for such properties against a model of the T34 syringe pump and discussed some of the results and challenges we have encountered using this approach. We believe that using techniques such as these, and other model-checking functionalities, contributes to supporting safer use of interactive medical devices. That is we can use such techniques not just to help develop better and safer systems (where such techniques are most typically used) but also, as we have shown here, to investigate existing devices to ensure they can be safely used within the clinical setting.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* ProB has been used “out-of-the-box” for Rodin theories by Thales for railway interlocking models, building ProB BMotionStudio visualizations on top. According to the [http://www.advance-ict.eu/sites/www.advance-ict.eu/files/Thales-Duesseldorf.pdf Thales slides of the Advance Industry Day 2014] ProB has a high technology readiness level (TRL).&lt;br /&gt;
* ProB [http://smtcomp.sourceforge.net/2016/results-NIA.shtml?v=1467112059 wins the NIA (non-linear integer arithmetic) division of the 2016 SMT competition] (this is ProB out-of-the-box, without tuning and where SMT formulas are translated to B)&lt;br /&gt;
* [https://tel.archives-ouvertes.fr/tel-03215450 Analysis and formal specification of relay-based railway interlocking systems]: &amp;lt;i&amp;gt;&amp;quot;In this work, the formal specification of the ITCS case study was verified with the use of ProB by model checking. Besides, we verified the same formal specification a second time with the Atelier B by theorem proving. Both tools were able to automatically prove the system without any human intervention. The result of this verification states that no error or inconsistencieshave been found. Thus, one may conclude that the system will not lead to a dangerous state.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://link.springer.com/chapter/10.1007/978-3-031-05814-1_10 Generating and Verifying Configuration Data with OVADO]: &amp;lt;i&amp;gt;&amp;quot;The second chain first produces a B abstract machine gathering data values and rules modeled as B properties and then calls the B model-checker ProB to evaluate the rules.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://ieeexplore.ieee.org/document/9755408 Applying B and ProB to a Real-world Data Validation Project]: &amp;lt;i&amp;gt;In this paper, we present our experiences on applying B language and ProB tool to validate the correctness of the part of the section topology of Tram Line 1 of Guangzhou Huangpu in China.&amp;lt;/i&amp;gt; ... &amp;lt;i&amp;gt;ProB is used to validate the correctness of the assertions, which is equivalent to checking that the data meet the rules. The validated topology improved the functional correctness of the tram control system.&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://link.springer.com/chapter/10.1007/978-3-031-16014-1_50 Xtend Transformation from PDDL to Event-B]: &amp;lt;i&amp;gt;Through the use of ProB animator, we can validate plan solutions. Unlike the VAL tool associated with PDDL, the animation with ProB allows locating errors of an incorrect plan solution.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/klar42/railground/ Railground Event-B Model]&lt;br /&gt;
* [https://www.irit.fr/EBRP/ EBRP Project]&lt;br /&gt;
&lt;br /&gt;
== Translating to Logic ==&lt;br /&gt;
&lt;br /&gt;
* [http://legacy.earlham.edu/~peters/courses/log/transtip.htm Translation Tips]&lt;br /&gt;
* [http://pages.cs.wisc.edu/~dyer/cs540/notes/fopc.html Lecture Notes on Translating to First-Order Logic]&lt;br /&gt;
* [http://cs.nyu.edu/faculty/davise/guide.html Guide to Axiomatizing in First-Order Logic]&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
* [[Privacy Policy|Privacy Policy (Datenschutz)]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Links&amp;diff=6141</id>
		<title>Links</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Links&amp;diff=6141"/>
		<updated>2026-05-04T16:34:07Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Tools using ProB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Books and Resources on B ==&lt;br /&gt;
* [https://doi.org/10.1017/CBO9780511624162 The B-Book: Assigning programs to meanings, by Jean-Raymond Abrial]&lt;br /&gt;
* [https://www.amazon.de/-/en/Steve-Schneider/dp/033379284X/ The B-Method: An Introduction, by Steve Schneider] ((Cornerstones of Computing) )&lt;br /&gt;
* [http://www.event-b.org/abook.html Modeling in Event-B: System and Software Engineering, by Jean-Raymond Abrial] (the Bee book)&lt;br /&gt;
* [https://www3.hhu.de/stups/handbook/rodin/current/html/ Rodin Users&#039; Handbook]&lt;br /&gt;
* Atelier-B Reference Manual (available as part of the [[https://www.atelierb.eu/en/atelier-b-support-maintenance/download-atelier-b/ Atelier-B download])&lt;br /&gt;
* [https://mooc.imd.ufrn.br/course/the-b-method MOOC: The B-Method: from specification to code]&lt;br /&gt;
&lt;br /&gt;
== Papers ==&lt;br /&gt;
* [https://www.cs.hhu.de/lehrstuehle-und-arbeitsgruppen/softwaretechnik-und-programmiersprachen/publikationen ProB Publications] &lt;br /&gt;
* [http://en.wikipedia.org/wiki/B-Method B-Method in Wikipedia] &lt;br /&gt;
* [http://www.bmethod.com/ B-Method Site] from ClearSy&lt;br /&gt;
* [http://www.fm4industry.org/index.php/Can_FM_tools_manage_large_industrial_problems%3F Can FM tools manage large scale industrial problems ?]&lt;br /&gt;
* [http://www.data-validation.fr Data Validation]&lt;br /&gt;
&lt;br /&gt;
== ProB ==&lt;br /&gt;
* [[ProB for Railways]]&lt;br /&gt;
* [[ProB History]]&lt;br /&gt;
* [[ProB Examples|Examples for ProB]] (along with screenshots and explanations)&lt;br /&gt;
* [http://www.ecs.soton.ac.uk/~mal/systems/prob.html Old web page of ProB] (in Southampton; use for releases prior to 1.2)&lt;br /&gt;
* [http://www.fm4industry.org/index.php/Productivity_Improvement_of_Data_Consistency_in_Transportation_Models Link to Success Story (written by Cetic)]&lt;br /&gt;
* [https://groups.google.com/d/forum/prob-users prob-users group]&lt;br /&gt;
&lt;br /&gt;
== Tools using ProB ==&lt;br /&gt;
* [https://www.clearsy.com/en/our-tools/clearsy-data-solver/ ClearSy Data Solver]&lt;br /&gt;
* [http://www.data-validation.fr/data-validation-in-the-railways/ DTVT - Data Table Validation Tool] for Alstom by ClearSy&lt;br /&gt;
* OLAF data validation tool by ClearSy for Alstom and SNCF&lt;br /&gt;
* Dave data validation tool by ClearSy for General Electric Transportation&lt;br /&gt;
* [https://github.com/plues/plues PLUES] tool for university course validation&lt;br /&gt;
* [https://github.com/Joshua27/BSynthesis BSynthesis] tool for repair and generation  of formal models&lt;br /&gt;
* [https://safecap.co.uk SafeCap]&lt;br /&gt;
*  [https://pkoerner.github.io/lisb-doc/ LisB], a Clojure/DSL API built-on top of the ProB-JAVA API&lt;br /&gt;
* [http://wiki.event-b.org/index.php/IUML-B iUML Statemachines]&lt;br /&gt;
* [http://users.ecs.soton.ac.uk/vs2/ac.soton.multisim.updatesite/ MultiSimulation Plug-In for Rodin]&lt;br /&gt;
* [https://link.springer.com/chapter/10.1007/978-3-031-21595-7_9 Capella Validation Tool]&lt;br /&gt;
* [http://www.beta-tool.info/user_guide.html Beta]&lt;br /&gt;
* [https://www.ros.hw.ac.uk/handle/10399/2685  HRemo (see chapter 4 of PhD thesis)]&lt;br /&gt;
* [http://dx.doi.org/10.14279/depositonce-2502 Message Choreography Model Animation and Test Case Generation (see PhD thesis; Chapters 5 and 6)] [http://link.springer.com/article/10.1007%2Fs10270-012-0272-x SSM article (2014)]&lt;br /&gt;
* [https://bcert-meeduse.github.io/ttc2026.html BCert]&lt;br /&gt;
* [http://b4msecure.forge.imag.fr B4MSecure]&lt;br /&gt;
* [http://genisis.forge.imag.fr GenISIS]&lt;br /&gt;
* [http://vasco.imag.fr/tools/meeduse/ MEEDUSE]&lt;br /&gt;
* [https://hal.archives-ouvertes.fr/hal-00981811 VTG] (Vulnerability Test Generator, see [http://blog.aymericksavary.fr/wp-content/uploads/2011/10/presentation.pdf  Rodin Workshop 2012 presentation] and [http://blog.aymericksavary.fr/wp-content/uploads/2014/06/Présentation.pdf 2014 presentation])&lt;br /&gt;
* CODA [https://arxiv.org/abs/1305.6112v1 arXiv article]&lt;br /&gt;
* There is also some intitial effort to [http://pure.au.dk/portal/en/publications/interpreting-implicit-vdm-specifications-using-prob(19de7f9f-1d9a-483c-b2e7-285c0d0edc63).html use ProB for implicit VDM specifications] presented at [http://wiki.overturetool.org/index.php/12th_Overture_Workshop the 12th Ouverture Workshop].&lt;br /&gt;
* [https://github.com/ValerioMedeiros/BEval BEval]&lt;br /&gt;
* [https://github.com/ValerioMedeiros/BTestBox BTestBox]&lt;br /&gt;
* [http://wiki.event-b.org/index.php/MBT_plugin MBT plugin] for model-based testing within Rodin&lt;br /&gt;
* [https://rajivmurali.github.io/UsecasePro/ UseCasePro], see article in the [http://eprints.ncl.ac.uk/file_store/production/229541/A4269E59-6B4A-485E-8E63-E164802DFADD.pdf proceedings of the 2016 Workshop on Formal and Model-Driven Techniques for Developing Trustworthy Systems]&lt;br /&gt;
* [http://bibbase.org/network/publication/lausdahl-ishikawa-larsen-interpretingimplicitvdmspecificationsusingprob-2015 Animating implicit VDM specifications inside Ouverture]&lt;br /&gt;
* [http://www.ovado.net Ovado] (as second tool chain)&lt;br /&gt;
* [https://github.com/tofische/cucumber-event-b Cucumber-Event-B] tool to run high-level tests&lt;br /&gt;
&lt;br /&gt;
== Related Tools ==&lt;br /&gt;
* [http://www.atelierb.eu/ Atelier B]&lt;br /&gt;
* [http://www.event-b.org/ Event-B and Rodin Wiki] ([http://wiki.event-b.org/index.php/Rodin_Platform_Releases Platform Releases], [http://wiki.event-b.org/index.php/Main_Page  Documentation]), [http://sourceforge.net/projects/rodin-b-sharp/ Rodin Sourceforge Site]&lt;br /&gt;
* [https://github.com/utwente-fmt/ltsmin/releases LTSmin releases (including versions for prob)]&lt;br /&gt;
* [http://www.b4free.com/ B4Free] tools for the development of B models&lt;br /&gt;
* [https://hal.archives-ouvertes.fr/inria-00099836 Click n Prove]&lt;br /&gt;
* [https://github.com/edwardcrichton/BToolkit B Toolkit]&lt;br /&gt;
* [http://www.ecs.soton.ac.uk/~cfs/umlb.html U2B] UML to B translation tool&lt;br /&gt;
* [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] ([http://research.microsoft.com/en-us/um/people/lamport/tla/tools.html tools for TLA+])&lt;br /&gt;
* [https://spivey.oriel.ox.ac.uk/corner/Fuzz_typechecker_for_Z The fuzz type-checker for Z]&lt;br /&gt;
* [https://www.cs.ox.ac.uk/projects/fdr/ The FDR CSP refinement checker]&lt;br /&gt;
* [https://github.com/leuschel/bbedit-prob BBedit Language modules for B, TLA+, CSP and Prolog]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/List_of_model_checking_tools Model checking tools]&lt;br /&gt;
* [https://accelconf.web.cern.ch/icalepcs2021/doi/JACoW-ICALEPCS2021-WEPV042.html PLCverif] (CERN)&lt;br /&gt;
&lt;br /&gt;
== Testimonials ==&lt;br /&gt;
* [https://prologyear.logicprogramming.org/ColmerauerPrize.html Alain Colmerauer Prize, celebrating the 50th anniversary of Prolog]&amp;lt;i&amp;gt; &amp;quot;The winner of the first edition of the Prize was announced at the Prolog Day Symposium, on November 10, 2022: ProB: Harnessing the Power of Prolog to Bring Formal Models and Mathematics to Life. Michael Leuschel and STUPS Group.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://link.springer.com/chapter/10.1007/978-3-031-67114-2_13 Proving B with Atelier B]&amp;lt;i&amp;gt;&amp;quot; In the early 2000’s, formal data validation started to become more wide-spread in the railways [10]. In particular, the ProB model-checker was first demonstrated during the EU project DEPLOY [13]. After some optimisations, ProB was able to fully handle large size metro data and validation rules, resulting in the generation of one B machine per validation rule and instantiated with the data related to this rule. To date, the biggest B machine generated for data validation and analysed by ProB contains 10 Mloc. With Atelier B 4.3, ProB was added as an interactive command [12]. Its behaviour is similar to the predicate prover: it does not modify the goal, only trying to demonstrate it. It comes with a time limit (maximum duration) and the possibility to reduce the number of hypotheses by selecting those having one symbol in common with the goal. PRoB allows better handling of arithmetic goals and case-based proofs on reduced domains.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
*[https://link.springer.com/chapter/10.1007/978-3-031-05814-1_11 The 4SECURail Formal Methods Demonstrator, Franco Mazzanti and Dimitri Belli] &amp;lt;i&amp;gt;&amp;quot;&amp;quot;The second framework that has been chosen to support the formal analysis of the system is ProB [16]. Indeed, according to several surveys (see, e.g., [17,18,19]) B/EventB appears to be one of the most adopted formal methods in railways. Moreover, ProB has a very user-friendly interface requiring a small effort to be learnt and powerful verification methods. Last but not least, it is freely available as an open-source product.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
*[https://openportal.isti.cnr.it/doc?id=people______::8e1a740ac10b66042af4f30812531d2d The 4SECURail approach to formalizing standard interfaces between signalling systems components, Belli et al.] &amp;lt;i&amp;gt;&amp;quot;ProB has been selected as the second target of the formal encoding because of its recognized role (Ferrari et al. 2020) in the field of formal railway-related modelling. It provides user-friendly interfaces, and allows LTL/CTL model checking, state-space exploration, state-space projections, and trace descriptions in the form of sequence diagrams&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://www.deploy-project.eu/pdf/D41-Siemens-final-full.pdf Data validation at Siemens, Jérôme Falampin]: &amp;lt;i&amp;gt;&amp;quot;&amp;quot;The work done with ProB is a great success. Thanks to the automatization and ProB, the wayside data validation is quicker, easier and complete.&amp;quot;&amp;lt;/i&amp;gt; More details and academic papers can be found on our page [[Siemens Data Validation with ProB]].&lt;br /&gt;
* [http://dl.acm.org/citation.cfm?doid=2406336.2406351 Pacemaker model by Mery and Singh]: &amp;lt;i&amp;gt;&amp;quot;ProB was very useful in the development of the pacemaker specification, and was able to animate all of our models and able to prove the absence of error (no counterexample exist). The ProB model checker also discovered several invariant violations, e.g., related to incorrect responses or unordered pacing and sensing activities. It was also able to discover a deadlock in two of the models, which was due to the fact that “clock counter” were not properly recycled, meaning that after a while no pacing or sensing activities occur into the system. Such kind of errors would have been more difficult to uncover with the prover of RODIN tool.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://www.data-validation.fr/data-validation-reverse-engineering/ Reverse engineering using ProB at ClearSy]: &amp;lt;i&amp;gt;&amp;quot;Data validation principles have been applied recently to a railways reverse-engineering project with great success. B and ProB have demonstrated again how efficient they are when used in combination.&amp;quot;&amp;lt;/i&amp;gt;...&amp;lt;i&amp;gt;&amp;quot;This problem was solved elegantly by using data validation principles: a B model representing the two graphs and their properties were elaborated, and ProB used for finding a solution.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://www.ncl.ac.uk/computing/research/publication/197269 Safecap tool paper by Iliasov, Lopatkin and Romanovsky]: &amp;lt;i&amp;gt;&amp;quot;One of the larger examples we have tackled is the Carlisle Citadel station with the North, South, and Caldew junctions. The modelled fragment is 2.6km long and comprises 70 train detection circuits, 63 points, 79 routes and 161 valid paths. The translation from a scanned PDF drawing and printed control tables took 45 man-hours. The verification of the topology theory constraints using ProB took just over 6 minutes on a PC with i7 3730 CPU and utilized just under 2GB of RAM. The Why3 verification of the same theory takes approximately 70 minutes. The control table theory is verified under 20 seconds by ProB and not verified completely, with the current translation of conditions, using Why3.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://www.erts2014.org/Site/0R4UXE94/Fichier/erts2014_1B2.pdf Innovative Approach for Requirements Verification of Closed Systems by Reis, Bicknell, Butler, Colley]: &amp;lt;i&amp;gt;&amp;quot;The Event-B model can be animated within Rodin using the BMotion Studio tool, which is part of ProB. Using the tool, it is possible to generate an animated front-end to the simulation of the model in the form of a user-friendly graphical interface, which corresponds to the system’s GUI (see Figure 4). The user can interact directly with this animated front-end, while the tool continues to run the formal analysis in the background, reacting to user choices and checking the model and invariants at each step. This was utilised during the case study, to produce a representation of the GIU provided as part of the end-user system. As this graphical representation is tied to the underlying Event-B model, it can not only be used to run through the model and confirm that the model is the correct representation of the system, but can also be used to explore further scenarios. This graphical representation of the system can be used without necessarily requiring any experience with the Event-B language or the toolset.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [http://dl.acm.org/citation.cfm?id=2480314 ProZ for Modelling Safety Properties of Interactive Medical Systems by Bowen and Reeves]: &amp;lt;i&amp;gt;&amp;quot;In this paper we have shown how temporal logic and invariants describing safety properties of interactive medical devices can be investigated within the ProZ tool. We have given examples of checking for such properties against a model of the T34 syringe pump and discussed some of the results and challenges we have encountered using this approach. We believe that using techniques such as these, and other model-checking functionalities, contributes to supporting safer use of interactive medical devices. That is we can use such techniques not just to help develop better and safer systems (where such techniques are most typically used) but also, as we have shown here, to investigate existing devices to ensure they can be safely used within the clinical setting.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* ProB has been used “out-of-the-box” for Rodin theories by Thales for railway interlocking models, building ProB BMotionStudio visualizations on top. According to the [http://www.advance-ict.eu/sites/www.advance-ict.eu/files/Thales-Duesseldorf.pdf Thales slides of the Advance Industry Day 2014] ProB has a high technology readiness level (TRL).&lt;br /&gt;
* ProB [http://smtcomp.sourceforge.net/2016/results-NIA.shtml?v=1467112059 wins the NIA (non-linear integer arithmetic) division of the 2016 SMT competition] (this is ProB out-of-the-box, without tuning and where SMT formulas are translated to B)&lt;br /&gt;
* [https://tel.archives-ouvertes.fr/tel-03215450 Analysis and formal specification of relay-based railway interlocking systems]: &amp;lt;i&amp;gt;&amp;quot;In this work, the formal specification of the ITCS case study was verified with the use of ProB by model checking. Besides, we verified the same formal specification a second time with the Atelier B by theorem proving. Both tools were able to automatically prove the system without any human intervention. The result of this verification states that no error or inconsistencieshave been found. Thus, one may conclude that the system will not lead to a dangerous state.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://link.springer.com/chapter/10.1007/978-3-031-05814-1_10 Generating and Verifying Configuration Data with OVADO]: &amp;lt;i&amp;gt;&amp;quot;The second chain first produces a B abstract machine gathering data values and rules modeled as B properties and then calls the B model-checker ProB to evaluate the rules.&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://ieeexplore.ieee.org/document/9755408 Applying B and ProB to a Real-world Data Validation Project]: &amp;lt;i&amp;gt;In this paper, we present our experiences on applying B language and ProB tool to validate the correctness of the part of the section topology of Tram Line 1 of Guangzhou Huangpu in China.&amp;lt;/i&amp;gt; ... &amp;lt;i&amp;gt;ProB is used to validate the correctness of the assertions, which is equivalent to checking that the data meet the rules. The validated topology improved the functional correctness of the tram control system.&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://link.springer.com/chapter/10.1007/978-3-031-16014-1_50 Xtend Transformation from PDDL to Event-B]: &amp;lt;i&amp;gt;Through the use of ProB animator, we can validate plan solutions. Unlike the VAL tool associated with PDDL, the animation with ProB allows locating errors of an incorrect plan solution.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/klar42/railground/ Railground Event-B Model]&lt;br /&gt;
* [https://www.irit.fr/EBRP/ EBRP Project]&lt;br /&gt;
&lt;br /&gt;
== Translating to Logic ==&lt;br /&gt;
&lt;br /&gt;
* [http://legacy.earlham.edu/~peters/courses/log/transtip.htm Translation Tips]&lt;br /&gt;
* [http://pages.cs.wisc.edu/~dyer/cs540/notes/fopc.html Lecture Notes on Translating to First-Order Logic]&lt;br /&gt;
* [http://cs.nyu.edu/faculty/davise/guide.html Guide to Axiomatizing in First-Order Logic]&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
* [[Privacy Policy|Privacy Policy (Datenschutz)]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Download&amp;diff=6140</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Download&amp;diff=6140"/>
		<updated>2026-05-04T15:52:44Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Sourcecode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Latest Release ==&lt;br /&gt;
&lt;br /&gt;
Below are links for downloading the latest stable release of probcli (the command line version of ProB) and ProB Tcl/Tk (ProB with a graphical user interface written in Tcl/Tk).&lt;br /&gt;
Note: please use the provided start scripts (StartProB.sh or StartProBWin.bat) to start ProB.&lt;br /&gt;
The list of changes can be found in the [[ProB_Release_History | ProB release history]].&lt;br /&gt;
&lt;br /&gt;
Details of the [[ProBLicence| ProB Licence can be found here]].&lt;br /&gt;
ProB is free to use and open source. For commercial support contact  [https://www.stups.uni-duesseldorf.de/~leuschel/ Michael Leuschel]. In particular, we can provide access to the validation report for using ProB as a tool of class T2 or T3 within the European norm [https://de.wikipedia.org/wiki/EN_50128 EN50128].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;table table-bordered wikitable&amp;quot; &amp;lt;!-- table and table-bordered for Bootstrap (ProB skin), wikitable for MediaWiki (Vector, MonoBook, etc. skins) --&amp;gt;&lt;br /&gt;
! Platform&lt;br /&gt;
! Release Date&lt;br /&gt;
! Download&lt;br /&gt;
! Dependencies&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;background-color:lightgrey;&amp;quot; | 1.15.1&lt;br /&gt;
|-&lt;br /&gt;
| Linux &lt;br /&gt;
| 21.12.2025 &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.linux64.tar.gz Tarball]&amp;lt;br/&amp;gt;&lt;br /&gt;
| glibc 2.17 or newer, Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Linux|see below]]), [https://www.graphviz.org/download/ GraphViz] ([[#Graphviz Requirements|see below]])&lt;br /&gt;
|-&lt;br /&gt;
| Windows&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64.zip Zipfile] (Tcl/Tk 8.6), &amp;lt;br/&amp;gt; [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64-tcltk-85.zip Zipfile] (Tcl/Tk 8.5)&lt;br /&gt;
| Windows 8 or newer, Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Windows|see below]]), [https://www.graphviz.org/download/ GraphViz] ([[#Graphviz Requirements|see below]])&lt;br /&gt;
|-&lt;br /&gt;
| macOS&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.macos.zip Zipfile] (Universal ARM/Intel)&amp;lt;br/&amp;gt;[https://github.com/hhu-stups/homebrew-prob Homebrew Tap]&lt;br /&gt;
| macOS 10.14 (Mojave) or newer, Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.6 ([[#Tcl/Tk on macOS|see below]]), [https://www.graphviz.org/download/ GraphViz] ([[#Graphviz Requirements|see below]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. More details [[#Java Requirements for B parser|are available below]].&lt;br /&gt;
&lt;br /&gt;
The Graphical User Interface of ProB Tcl/Tk requires Tcl/Tk 8.5 or 8.6. More details [[#Tcl/Tk Requirements for ProB Tcl/Tk|are available below]].&lt;br /&gt;
The default Tcl/Tk on macOS is broken and will result in &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt;, and you have to [[#Tcl/Tk Requirements for ProB Tcl/Tk|install another version of Tcl/Tk]]. (Note: Tcl/Tk 9 is not binary compatible and cannot yet be used.)&lt;br /&gt;
All releases include the command-line version &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt; which does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
macOS releases of ProB are universal binaries that support both &#039;&#039;&#039;aarch64&#039;&#039;&#039; (64-bit ARM/Apple Silicon) and &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel) architectures.&lt;br /&gt;
Windows and Linux releases are compiled only for &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel).&lt;br /&gt;
&lt;br /&gt;
The last version built for the x86 architecture (32-bit Intel) is ProB 1.8.0 (see [[DownloadPriorVersions|prior versions]]).&lt;br /&gt;
If you are using an unsupported architecture or system, you may still be able to [[Running ProB from source|run ProB from source]].&lt;br /&gt;
&lt;br /&gt;
Note that: on &amp;lt;b&amp;gt;macOS&amp;lt;/b&amp;gt; you  still have to right-click on the application and use &amp;quot;Open&amp;quot;, even though ProB Tcl/Tk (and probcli and all libraries) are signed and notarized. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Commented out while there is no current beta release: --&amp;gt;&lt;br /&gt;
=== Latest Beta Release ===&lt;br /&gt;
&lt;br /&gt;
The latest beta release is [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.16.0-beta1 1.16.0-beta1].&lt;br /&gt;
It may be older than the latest final release.&lt;br /&gt;
An official beta release always passes all of ProB&#039;s tests.&lt;br /&gt;
However, we do not follow the stringent checklist for final releases&lt;br /&gt;
(e.g., checking SICStus Prolog Spider warnings, checking coverage and additional manual&lt;br /&gt;
UI tests).&lt;br /&gt;
Also, we do not store coverage reports and other information necessary for T2 certification.&lt;br /&gt;
&lt;br /&gt;
=== Nightly Builds ===&lt;br /&gt;
&lt;br /&gt;
More current [https://stups.hhu-hosting.de/downloads/prob/tcltk/nightly/ nightly integration builds] are also available.&lt;br /&gt;
These releases are usually updated every night and old versions are not stored.&lt;br /&gt;
&lt;br /&gt;
Note for macOS users: Nightly builds of ProB are not signed or notarized, so macOS 10.15 and later (Catalina, Big Sur or Monterey, Ventura) will refuse to run them.&lt;br /&gt;
As a workaround, you will need to run &amp;lt;code&amp;gt;xattr -r -d com.apple.quarantine *&amp;lt;/code&amp;gt; inside the ProB directory before launching ProB.&lt;br /&gt;
The stable (and some beta releases) listed above are signed and notarized, so they will run without extra steps.&lt;br /&gt;
&lt;br /&gt;
Automatically generated test [https://stups.hhu-hosting.de/internal/coverage/html/ coverage reports are also available].&lt;br /&gt;
They are usually updated once per week.&lt;br /&gt;
&lt;br /&gt;
=== Sourcecode ===&lt;br /&gt;
&lt;br /&gt;
You can download the latest Prolog sourcecode snapshot from: https://stups.hhu-hosting.de/downloads/prob/source/&lt;br /&gt;
This site also contains an archive of the public examples used for testing ProB.&lt;br /&gt;
&lt;br /&gt;
The source code for the ProB parsers (B, LTL, ...) can be obtained from: https://github.com/hhu-stups/probparsers&lt;br /&gt;
&lt;br /&gt;
=== Prior Versions ===&lt;br /&gt;
&lt;br /&gt;
Prior Versions of ProB going back to 1.3.1 [[DownloadPriorVersions|are available for download here]]. &lt;br /&gt;
If you are interested in still earlier releases, please have a look at the [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/ Download directory].&lt;br /&gt;
&lt;br /&gt;
== Other ProB tools ==&lt;br /&gt;
&lt;br /&gt;
=== ProB Jupyter Kernel ===&lt;br /&gt;
&lt;br /&gt;
You can now create Jupyter Notebooks in B using the ProB Jupyter kernel.&lt;br /&gt;
Downloads, instructions, and source code can be found on [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel its own page].&lt;br /&gt;
&lt;br /&gt;
You can [https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.cs.uni-duesseldorf.de%2Fgeneral%2Fstups%2Fprob2-jupyter-kernel.git/master?filepath=notebooks try out the ProB Jupyter kernel in your browser] without installing it first.&lt;br /&gt;
Note that &#039;&#039;&#039;notebooks are not saved permanently in this online version!&#039;&#039;&#039;&lt;br /&gt;
To keep your notebooks, you &#039;&#039;must&#039;&#039; download them before closing the page.&lt;br /&gt;
&lt;br /&gt;
=== ProB for Rodin ===&lt;br /&gt;
To install ProB for Rodin, first download a current version of Rodin (e.g., [https://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/3.9/ Rodin 3.9]). Inside Rodin, choose Help -&amp;gt; Install New Software and choose the pre-configured ProB update site.&lt;br /&gt;
&lt;br /&gt;
More [[Tutorial Rodin First Step|detailed installation instructions and a brief tutorial]] are available.&lt;br /&gt;
&lt;br /&gt;
* Nightly builds of ProB for Rodin 3 can be obtained from within Rodin by using the update site https://stups.hhu-hosting.de/rodin/prob1/nightly.&lt;br /&gt;
&lt;br /&gt;
=== ProB2-UI ===&lt;br /&gt;
&lt;br /&gt;
The current release of the new JavaFX-based [[ProB2-UI]] is version 1.3.1. Installers are available for the following platforms:&lt;br /&gt;
&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-1.3.1.exe Windows (x86_64) installer] - requires Windows 10 or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1-notarized.zip macOS (Apple Silicon) application ZIP] (notarized) &amp;lt;!-- [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1.dmg macOS (Apple Silicon) application DMG] (not signed/notarized! [[#macOS issues|see below]])--&amp;gt; - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-x86_64-1.3.1.dmg macOS (Intel) application DMG] (not signed/notarized yet! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui_1.3.1_amd64.deb Linux (x86_64) .deb package] - requires glibc 2.17 or later (e. g. Debian 8 &amp;quot;jessie&amp;quot; or later, or Ubuntu 14.04 &amp;quot;trusty&amp;quot; or later)&lt;br /&gt;
&lt;br /&gt;
These installers include all necessary dependencies - you do not need to install a Java runtime manually.&lt;br /&gt;
&lt;br /&gt;
We also provide a [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui-1.3.1-multi.jar multi-platform jar] build, which requires an existing installation of Java 21 or later, but works without further installation on all supported platforms. &#039;&#039;&#039;The multi-platform jar is deprecated and will be removed in a future release.&#039;&#039;&#039; It only supports the x86_64 architecture, so it cannot run on macOS on Apple Silicon, unless you install an x86_64 JRE.&lt;br /&gt;
&lt;br /&gt;
Details about new features and improvements can be found in the [https://github.com/hhu-stups/prob2_ui/blob/develop/doc/prob2ui_release_history.md release history], along with download links for older versions.&lt;br /&gt;
&lt;br /&gt;
Snapshot builds of the current &#039;&#039;development&#039;&#039; version of ProB2-UI (1.4.0-SNAPSHOT) are also available:&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-1.4.0.exe Windows installer snapshot]&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-aarch64-1.4.0.dmg macOS (Apple Silicon) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-x86_64-1.4.0.dmg macOS (Intel) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/prob2-ui_1.4.0_amd64.deb Debian package snapshot]&lt;br /&gt;
&lt;br /&gt;
The source code for ProB2-UI is available at https://github.com/hhu-stups/prob2_ui and can be built by following [https://github.com/hhu-stups/prob2_ui#running-from-source these instructions].&lt;br /&gt;
&lt;br /&gt;
The underlying [[ProB Java API]] of ProB2-UI (aka the ProB 2 kernel) is available to Java developers via [https://central.sonatype.com/artifact/de.hhu.stups/de.prob2.kernel Maven Central].&lt;br /&gt;
Its source code can be obtained from: https://github.com/hhu-stups/prob2_kernel.&lt;br /&gt;
&lt;br /&gt;
==== macOS issues ====&lt;br /&gt;
&lt;br /&gt;
When you run the macOS app for the first time, you might have to open the app &#039;&#039;twice&#039;&#039; for ProB2-UI to start properly.&lt;br /&gt;
This should only happen once.&lt;br /&gt;
&lt;br /&gt;
Recent ProB2-UI macOS app releases are signed and notarized, so they should run without issues.&lt;br /&gt;
However, the multi-platform jar, all snapshot app builds, and older release app builds are &#039;&#039;not&#039;&#039; signed or notarized, so macOS will refuse to run them or say that the application is damaged.&lt;br /&gt;
As a workaround:&lt;br /&gt;
&lt;br /&gt;
* On macOS 15 (Sequoia) or later: Open the System Settings, go to &amp;quot;Privacy &amp;amp; Security&amp;quot;, and next to &amp;quot;ProB2-UI was blocked to protect your Mac&amp;quot;, and click on &amp;quot;Open Anyway&amp;quot;.&lt;br /&gt;
* On macOS 14 (Sonoma) or earlier: Right-click the app, select &amp;quot;Open&amp;quot;, and confirm the security dialog. If the dialog still doesn&#039;t give you an option to open the app, click &amp;quot;Cancel&amp;quot; and do the same thing again.&lt;br /&gt;
&lt;br /&gt;
For details, see [https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac &amp;quot;Open a Mac app from an unknown developer&amp;quot;] and [https://support.apple.com/en-us/102445#openanyway &amp;quot;Safely open apps on your Mac&amp;quot;] on Apple&#039;s support website.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
As a workaround, run this command in the folder where &#039;&#039;ProB2-UI.app&#039;&#039; is located:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xattr -r -d com.apple.quarantine &amp;quot;ProB2-UI.app&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multi-platform jar can also be started from the command line, which bypasses the signing/notarization check:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar prob2-ui-1.3.1-multi.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Editor Support ===&lt;br /&gt;
&lt;br /&gt;
==== VS Code ====&lt;br /&gt;
There is a [https://github.com/hhu-stups/b-language-extension B/ProB Language Support] extension for the Visual Studio Code (VS Code) editor. It integrates with the [[Using the Command-Line Version of ProB|command line tool probcli]] to obtain error markers for syntax and type errors. It can also be used for [[Well-Definedness Checking#VSCode|well-definedness checking]].&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/vscode_plugin Download for manual installation]&lt;br /&gt;
&lt;br /&gt;
==== Vim ====&lt;br /&gt;
A [https://github.com/bivab/prob.vim Vim plugin for ProB is available]. It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. Vim has built-in syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
==== BBEdit ====&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBEdit language modules for B, TLA+, CSP and Prolog] are available; these do not use the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]].&lt;br /&gt;
&lt;br /&gt;
== Java Requirements for B Parser ==&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. Java 11, 17, 21, 25, etc. are also fully supported.&lt;br /&gt;
&#039;&#039;&#039;A future ProB release will require Java 17 or newer.&#039;&#039;&#039;&lt;br /&gt;
ProB 1.9.3 is the last version to support Java 7. ProB 1.5.0 is the last version to support Java 6.&lt;br /&gt;
&lt;br /&gt;
You can install a Java Runtime Environment (JRE) from various sources, such as [https://adoptium.net/ Eclipse Adoptium], [https://www.azul.com/downloads/ Azul Zulu], or your system package manager.&lt;br /&gt;
&lt;br /&gt;
Note: on some systems (macOS) you may have to install the full Java Development Kit (JDK), and not just the JRE, so that Java becomes available to the command-line tools.&lt;br /&gt;
Type &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; to check which version is used by default for command-line tools; see also [http://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x this discussion on StackOverflow].&lt;br /&gt;
In case you have trouble starting the Java parser you can now set the &amp;lt;code&amp;gt;JAVA_PATH&amp;lt;/code&amp;gt; preference of ProB to point to the &amp;lt;code&amp;gt;java&amp;lt;/code&amp;gt; tool (or java.exe on Windows).&lt;br /&gt;
&lt;br /&gt;
To check whether ProB can correctly use its Java parser you can type the following (using probcli.exe on Windows):&lt;br /&gt;
 probcli -version -v&lt;br /&gt;
This will try and start the parser and obtain the parser version.&lt;br /&gt;
In case Java is not correctly installed you should get an error message.&lt;br /&gt;
If you see the error message&lt;br /&gt;
 &amp;lt;tt&amp;gt;Unsupported major.minor version 52.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
this means you do not have Java 8 or newer installed. You can try setting the path to the correct java version by setting the JAVA_PATH preference as follows:&lt;br /&gt;
 probcli -p JAVA_PATH path/to/java -version -v&lt;br /&gt;
&lt;br /&gt;
== Tcl/Tk Requirements for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk requires an installation of Tcl/Tk 8.5 or Tcl/Tk 8.6. The command-line tool probcli does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require this.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on macOS ===&lt;br /&gt;
Important note: macOS comes pre-installed with a version of Tcl/Tk which is broken.&lt;br /&gt;
This may result in the display of unreadable &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt; or crashes in the standard file dialogs.&lt;br /&gt;
There are various options to install Tcl/Tk:&lt;br /&gt;
* with Homebrew using the [https://formulae.brew.sh/formula/tcl-tk tcl-tk formula]&lt;br /&gt;
* with [https://ports.macports.org/port/tcl/ MacPorts]&lt;br /&gt;
* use the  [http://www.activestate.com/activetcl/downloads/ ActiveTcl version of Tcl/Tk]&lt;br /&gt;
You should probably start ProB using the &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script: it will auto-detect Tcl/Tk versions and set the SP_TCL_DSO environment variable.&lt;br /&gt;
Below are more details:&lt;br /&gt;
&lt;br /&gt;
==== Tcl/Tk from Homebrew or MacPorts ====&lt;br /&gt;
&lt;br /&gt;
You can install a newer Tcl/Tk (e.g., 8.6.17) using [https://brew.sh &amp;lt;b&amp;gt;Homebrew&amp;lt;/b&amp;gt;] or [https://www.macports.org &amp;lt;b&amp;gt;MacPorts&amp;lt;/b&amp;gt;].&lt;br /&gt;
Note: In the earlier release 8.6.11 [https://bugs.python.org/issue44828 file open and file save dialogs will not work].&lt;br /&gt;
For Homebrew the command to install the[https://formulae.brew.sh/formula/tcl-tk tcl-tk formula] is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The latest versions of Homebrew now install Tcl/Tk 9.0 which does not work yet with ProB.&lt;br /&gt;
In this case install&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk@8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, as the location of the libraries is not standard, you have to define the variable &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script should set SP_TCL_DSO automatically.&lt;br /&gt;
You can also define and export this variable yourself before starting ProB from the Terminal by typing this (you may have to adapt the link if you are using another version of Tcl/Tk):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SP_TCL_DSO=/opt/homebrew/Cellar/tcl-tk@8/8.6.17/lib/libtcl8.6.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have uses MacPorts the path is probably &amp;lt;tt&amp;gt;/opt/local/lib/libtcl.dylib&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set the variable by adding &amp;lt;tt&amp;gt;-DSP_TCL_DSO=/usr/local/Cellar/tcl-tk/8.6.12/lib/libtcl8.6.dylib&amp;lt;/tt&amp;gt; to the command starting ProB. You may also have to install &amp;lt;tt&amp;gt;tk-table&amp;lt;/tt&amp;gt; package yourself (it is bundled with Active Tcl).&lt;br /&gt;
&lt;br /&gt;
==== Active Tcl ====&lt;br /&gt;
&lt;br /&gt;
The [http://www.activestate.com/activetcl/downloads/ the ActiveTcl version of Tcl/Tk] is automatically recognised by ProB and you do not have to set &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, in Active Tcl/Tk 8.6 on macOS the double click in the &amp;quot;Operations View&amp;quot; or other views  is not working correctly.&lt;br /&gt;
You have to hit the RETURN key in the &amp;quot;Operations View&amp;quot; or right-click on an operation and select &amp;quot;Perform ...&amp;quot;  to execute an operation until this is fixed.&lt;br /&gt;
The older ersion [http://bugs.python.org/issue15853 8.5.12 has a bug related to copying text], see also [http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3555211&amp;amp;group_id=12997&amp;amp;atid=112997_type here]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Other Notes ====&lt;br /&gt;
Note: on macOS Catalina or later the Tcl/Tk menu bar is sometimes not working. Switching to another application and then back to ProB seems to solve the problem.&lt;br /&gt;
If you see the message &amp;quot;&amp;lt;tt&amp;gt;macOS 11 or later required !&amp;lt;/tt&amp;gt;&amp;quot;  in the terminal when launching &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; you should re-install Tcl/Tk as described above.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Windows ===&lt;br /&gt;
We currently provide two downloads of ProB, one for Tcl/Tk 8.6 (which we recommend)&lt;br /&gt;
and a version for Tcl/Tk 8.5.&lt;br /&gt;
You can use for example the  [https://www.activestate.com/products/tcl/ ActiveTcl releases].&lt;br /&gt;
Note: For the 64 bit version of ProB for Windows, you have to install the 64 bit Tcl/Tk 8.5 version!&lt;br /&gt;
ProB 1.12 (currently available as nightly build) works with both Tcl/Tk 8.5 and 8.6.&lt;br /&gt;
You may have to point the environment variable SP_TCL_DSO to the correct DLL before starting ProB. For Tcl/Tk 8.5 this is typically&lt;br /&gt;
base-tcl8.5-thread-win32-x86_64.dll.&lt;br /&gt;
You can either go to System -&amp;gt; Settings -&amp;gt; Advanced -&amp;gt; Environment Variables&lt;br /&gt;
or use the setx command for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setx SP_TCL_DSO C:\Tcl\bin\base-tcl8.5-thread-win32-x86_64.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Linux ===&lt;br /&gt;
On Linux you can typically install Tcl/Tk using &amp;lt;tt&amp;gt;sudo apt-get install tcl8.5 tk8.5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
On very recent Linux systems (such as Ubuntu 20.04) you may want to download (and compile) [https://www.tcl.tk/software/tcltk/downloadnow85.html Tcl/Tk 8.5] or use [https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/tcl8.5_8.5.19-4_amd64.deb.html packages from earlier releases].&lt;br /&gt;
&lt;br /&gt;
On Linux OpenSuse (12.3) you may have to perform the following for ProB to work:&lt;br /&gt;
 ln -s /usr/lib/libtk8.5.so /usr/lib/libtk8.5.so.0&lt;br /&gt;
 ln -s /usr/lib/libtcl8.5.so /usr/lib/libtcl8.5.so.0&lt;br /&gt;
&lt;br /&gt;
Also, some of the feature require the table extension, which can be installed like this:&lt;br /&gt;
 sudo apt install tk-table&lt;br /&gt;
Finally, support for .png ANIMATION_IMG declarations requires the Img package:&lt;br /&gt;
 sudo apt install libtk-img&lt;br /&gt;
&lt;br /&gt;
== Graphviz Requirements ==&lt;br /&gt;
&lt;br /&gt;
If you wish to view various visualizations generated by ProB Tcl/Tk or probcli you will need [http://www.graphviz.org/ GraphViz].&lt;br /&gt;
ProB generates various graphs (state space, custom graph, machine hierarchy,...) as .dot files and then  uses the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; to layout the graph and convert it to PDF.&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can also use dot-file viewer such as the &amp;lt;tt&amp;gt;dotty&amp;lt;/tt&amp;gt; program from GraphViz in Linux.&lt;br /&gt;
On macOS and Windows  it is more difficult to obtain a good viewer application for dot files. VS Code with the [https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview Graphviz Interactive Preview] extension is a candidate.&lt;br /&gt;
The commercial OmniGraffle macOS application can import .dot files.  A free alternative on macOS may be [https://ports.macports.org/port/graphviz-gui/ graphviz-gui] by [https://www.macports.org MacPorts]. To install the application do this&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz-gui&amp;lt;/tt&amp;gt;&lt;br /&gt;
The viewer can now be found in /Applications/MacPorts/Graphviz.app (you may have to set the ProB graphical viewer preference &amp;lt;tt&amp;gt;dot_viewer&amp;lt;/tt&amp;gt; to this path).&lt;br /&gt;
If you do not manage to install a viewer, you should select Preferences -&amp;gt; Graphical Viewer -&amp;gt; PDF within ProB Tcl/Tk.&lt;br /&gt;
Indeed, many ProB commands work directly with the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; which you can install on macOS with MacPorts like this:&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
On Mac you can now install the latest version of Graphviz using [https://brew.sh HomeBrew]:&lt;br /&gt;
&lt;br /&gt;
 1. &amp;lt;tt&amp;gt;brew uninstall graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
 2. &amp;lt;tt&amp;gt;brew install graphviz --with-gts&amp;lt;/tt&amp;gt;&lt;br /&gt;
 3. &amp;lt;tt&amp;gt;brew link --overwrite graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 1. is optional; you only need to use it if you have a prior version of Graphviz installed.&lt;br /&gt;
Step3 links the binaries to /usr/local/bin.&lt;br /&gt;
This is probably better than using the [http://www.pixelglow.com/graphviz/ older version from Pixelglow].&lt;br /&gt;
&lt;br /&gt;
You can also manually set the DOT (path_to_dot) preference if ProB cannot find the Graphviz dot binary you have installed.&lt;br /&gt;
&lt;br /&gt;
== Short Release History ==&lt;br /&gt;
&lt;br /&gt;
The full  [[ProB_Release_History | ProB release history can be found here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-12-21&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.1]] is available. Automatic use of operation reuse and compression for model checking. STORE_DETAILED_TRANSITION_INFOS preference and calls LTL property. Interactive proof via animator interface for Rodin PO files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-06-26&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.0]] is available. Interactive trace replay. Many [[VisB#VisB_DEFINITIONS |VisB]] improvements (use definition files for all models, grouping of VISB objects in a single definition, VISB_CLICK_META_INFOS, ...). Profiling can be turned on via PROFILING_INFO preference. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.13.0]] is available. Better Rodin theory support. Template strings. Unicode improvements. READ_JSON and other new external functions. VisB support for groups and &amp;quot;use&amp;quot; element. [[Monte_Carlo_Tree_Search_Game_Play|MCTS game play]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-03&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2-fix1]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-08-10&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2]] is available. [[VisB#VisB_DEFINITIONS_2 |VisB]] improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-04-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.0]] is available. Call stack infos, performance improvements in parser and solver,  new [[LTL_Model_Checking#Supported_Syntax |LTL]] operators, [[VisB#VisB_Additional_SVG_Objects|VisB]] improvements, reals/floats for [[Event-B_Theories|Rodin theories]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-12-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.1]] is available. Highlights: identifiers between backquotes, flexible JSON trace replay, DPLLT solving command, improvements to Z3 backend.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-10-06&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.0]] is available. Highlights: improved support for infinite sets, operation caching (OPERATION_REUSE), faster LTL checking for safety formulas, more compact .prob files, VisB HTML export, constructive Z3 translation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-12-15&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.10.0]] is available. Highlights: well-definedness prover, REAL datatype, -lint comand for VSCode and Atom, improved unsat core and error messages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.3]] is available. Highlights: performance improvements, new external functions, performance monitoring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.2]] is available. Minor bugfix release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.1]] is available. Maintenance release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-07-12&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.0]] is available. Highlights: improved error feedback, improved Unicode support, regular expression library, memoization.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-10-01&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.2]] is available. Highlights: improved error feedback, support [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel Jupyter kernel], first [[Alloy|support for Alloy models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-03-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.0]] is available. Highlights: terminal colour support, performance improvements for displaying very large values, improved symmetry breaking and constraint solving.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-10-05&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.1]] is available. Highlights: performance, non-deterministic assigned variables shown, Z improvements, export history to HTML.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-07-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.0]] is available. Highlights: improved [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], improved XML/CSV data import and export, RULE DSL language, many improvements in constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-10-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.1]] is available. Highlights: [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], LET and IF-THEN-ELSE for expressions and predicates, XML logging, XML data import, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-04-22&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.0]] is available. Highlights: [[Tutorial_Directed_Model_Checking|directed model checking]], [[Using_ProB_with_Z3|Z3 available as backend]], B line comments and unicode symbols, improved error messages, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2015-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.5.0]] is available. Highlights: improved random enumeration, MACE/SEM style static symmetry reduction for deferred set elements, [[State_Space_Coverage_Analyses|MC/DC coverage]] analysis for guards and invariants, [[TLC|improved TLC interface]], bug fixes and improvements including but not limited to the constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.1]], a small bugfix-only release is available. For a list of new features in 1.4.0 see below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-18&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.0]] is available. Highlights: CLP(FD)-based constraint solver enabled by default, kernel can handle more operations symbolically, [[TLC|integration of the TLC model checker]], bug fixes and performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2013-03-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.6]] is available. Highlights: improved constraint propagation for division, modulo, intervals, model checking progress bar, performance improvements, [[Using_ProB_with_KODKOD | improved Kodkod backend]] and use within REPL, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-10-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.5]] is available. Highlights: support for external and recursive functions, optional Kodkod backend, [[TLA|TLA+ support]], performance improvements, pragmas, units inference, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-03-30&#039;&#039;&#039;&lt;br /&gt;
A first prototype of an online [[ProB_Logic_Calculator|ProB Logic Calculator]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-11-21&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.4 is available. Highlights: Evaluation View and Eval window, CSP assertion checking, improved editor, 64-bit version for Mac and Linux, performance improvements, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-02-10&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.3 and ProB for Rodin 2.3 is available. Highlights: improved performance, constrained-based deadlock checking, record detection, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2010-07-30&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.2 is available. Highlights: improved performance, constraint solving over integers (enable in Advanced Preferences), much improved Z support, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-12-07&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.1 is available. Highlights: new data-structure for large sets and relations (see FM 2009), multi-level validation for Event-B, improved constraint propagation for boolean connectives, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-03-20&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.0 is available for download. Highlights: New parser and integrated typechecker, install as AtelierB plugin, improved kernel with support for large sets/relations, improved CSP support, faster LTL model checker, Undo/Redo in text editor, graphical formula viewer, user definable custom animations with gifs.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Caching_Constants_and_Operations&amp;diff=6139</id>
		<title>Caching Constants and Operations</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Caching_Constants_and_Operations&amp;diff=6139"/>
		<updated>2026-04-15T06:43:22Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Other Useful CLI commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ProB can store the values of constants and operations in a cache file.&lt;br /&gt;
Compared to [[Memoization_for_Functions|memoization for functions]] and&lt;br /&gt;
[[Tutorial_Tuning_Model_Checking#Operation_Caching_.28Reuse.29|operation reuse during model checking]], this caching is persistent across different runs of probcli or ProB Tcl/Tk and is applicable to the constant setup and operations, not at the level of computation of values using (constant) functions.&lt;br /&gt;
(It thus may make sense to activate both [[Memoization_for_Functions|memoization]] and caching.)&lt;br /&gt;
&lt;br /&gt;
=== Activating Caching ===&lt;br /&gt;
&lt;br /&gt;
In the  [[Using_the_Command-Line_Version_of_ProB|command-line version probcli]] the cache can be activated using the option&lt;br /&gt;
* -cache DIRECTORY&lt;br /&gt;
This means that cache results will be stored in that directory.&lt;br /&gt;
The directory may contain multiple files, namely one file per B machine.&lt;br /&gt;
The files contain a hash to detect whether they are still up-to-date.&lt;br /&gt;
&lt;br /&gt;
The same option has to be used to activate the caching for ProB Tcl/Tk, i.e., you need to launch ProB Tcl/Tk from the command-line with the -cache option:&lt;br /&gt;
* prob -cache DIRECTORY&lt;br /&gt;
&lt;br /&gt;
Caching is currently only available for classical B machines without refinement,&lt;br /&gt;
and when symmetry reduction is off (which it is by default).&lt;br /&gt;
(Note to developers: the conditions are checked in the Prolog predicate cache_is_applicable in the module value_persistance.pl).&lt;br /&gt;
The cache feature can, however, deal with composed machines (e.g., with INCLUDES, USES, SEES) and stores constant values for individual sub-machines.&lt;br /&gt;
Constants are cached when&lt;br /&gt;
* no time-out occurred during SET_UP_CONSTANTS&lt;br /&gt;
* all enabled solutions were computed (i.e., the MAX_INITIALISATIONS limit was not reached)&lt;br /&gt;
* the machine has no parameters&lt;br /&gt;
Operations are cached when&lt;br /&gt;
* no time-out occurred&lt;br /&gt;
* all enabled operations were computed (i.e., the MAX_OPERATIONS limit was not reached)&lt;br /&gt;
* the preference CACHE_OPERATIONS is true (which it is by default; it is only available as of version 1.11.0)&lt;br /&gt;
&lt;br /&gt;
The cache file will also contain the values of relevant preferences, which can influence the computation of constants or operation results (e.g., MAXINT, MININT, DEFAULT_SETSIZE,...)&lt;br /&gt;
If the cache cannot be re-used a message will be displayed:&lt;br /&gt;
 value caching: general computations parameters have changed, no re-use of stored operations&lt;br /&gt;
&lt;br /&gt;
=== Inspecting the Cache ===&lt;br /&gt;
&lt;br /&gt;
In the  [[Using_the_Command-Line_Version_of_ProB|command-line version probcli]] a summary of the cache can be displayed using this option (together with the -cache option mentioned above).&lt;br /&gt;
* -show_cache&lt;br /&gt;
In verbose mode (-v flag) more details are displayed, but the additional information is probably only useful for ProB developers. You can also use -show_cache_verbose to this effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli CrewAllocationConstants.mch -cache cache/ -show-cache&lt;br /&gt;
&lt;br /&gt;
Contents of cache file cache/CrewAllocationConstants.probcst of type constants for machine CrewAllocationConstants:&lt;br /&gt;
     ( male={(tom|-&amp;gt;TRUE),(david|-&amp;gt;TRUE),(jeremy|-&amp;gt;TRUE),(carol|-&amp;gt;FALSE),(janet|-&amp;gt;FALSE),(tracy|-&amp;gt;FALSE)} &amp;amp;&lt;br /&gt;
       speaks={(tom|-&amp;gt;german),(david|-&amp;gt;french),(jeremy|-&amp;gt;german),(carol|-&amp;gt;spanish),(janet|-&amp;gt;french),(tracy|-&amp;gt;spanish)} &amp;amp;&lt;br /&gt;
       assign={(1|-&amp;gt;tom),(1|-&amp;gt;david),(1|-&amp;gt;jeremy),(1|-&amp;gt;carol),(1|-&amp;gt;janet),(1|-&amp;gt;tracy),(2|-&amp;gt;tom),(2|-&amp;gt;david),(2|-&amp;gt;carol),(3|-&amp;gt;jeremy),(3|-&amp;gt;janet),(3|-&amp;gt;tracy)} )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Tcl/Tk this information can be obtained by choosing the command &amp;quot;Show ProB Cache Info&amp;quot; in the Debug menu.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Take the following B machine&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE PrimeNumbers&lt;br /&gt;
// A machine with a slow constant set up to check -cache option&lt;br /&gt;
DEFINITIONS SET_PREF_TIME_OUT == 10000&lt;br /&gt;
CONSTANTS n, primes, maxprime&lt;br /&gt;
PROPERTIES&lt;br /&gt;
 n:NATURAL1 &amp;amp;&lt;br /&gt;
 primes = {x|x:2..n &amp;amp; !y.(y&amp;gt;1 &amp;amp; y*y&amp;lt;=x =&amp;gt; x mod y /= 0)} &amp;amp;&lt;br /&gt;
 (n = 10000 or n=1000) &amp;amp;&lt;br /&gt;
 maxprime = max(primes)&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
 (n = 10000 =&amp;gt; card(primes) = 1229)&lt;br /&gt;
VARIABLES x&lt;br /&gt;
INVARIANT&lt;br /&gt;
 x:2..n &amp;amp; x:primes&lt;br /&gt;
INITIALISATION x:=2&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  NextPrime(nxt) = SELECT x&amp;lt;maxprime &amp;amp; &lt;br /&gt;
                         nxt:primes &amp;amp; nxt = min(primes /\ (x+1)..n) THEN&lt;br /&gt;
       x:=nxt&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without caching we have this behaviour:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 137 ms (walltime: 140 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 1176 ms (walltime: 1187 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
real	0m2.549s&lt;br /&gt;
user	0m2.341s&lt;br /&gt;
sys	0m0.125s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With cache, we obviously do not yet see a benefit the first time around:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init -cache ./cache/&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 134 ms (walltime: 136 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 1161 ms (walltime: 1169 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
real	0m2.536s&lt;br /&gt;
user	0m2.311s&lt;br /&gt;
sys	0m0.134s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second time around we get a much faster performance; the values of the constants are simply restored from disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init -cache ./cache/&lt;br /&gt;
&lt;br /&gt;
real	0m1.210s&lt;br /&gt;
user	0m1.010s&lt;br /&gt;
sys	0m0.117s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can inspect the cache contents either using probcli or inspecting the directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli PrimeNumbers.mch -init -cache ./cache/ -show_cache&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumbers.probcst of type constants for machine PrimeNumbers:&lt;br /&gt;
     ( n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&lt;br /&gt;
$ ls -l cache/&lt;br /&gt;
total 48&lt;br /&gt;
-rw-r--r--  1 leuschel  staff      0 15 May 16:25 PrimeNumbers.opdata&lt;br /&gt;
-rw-r--r--  1 leuschel  staff  14988 15 May 16:25 PrimeNumbers.probcst&lt;br /&gt;
-rw-r--r--  1 leuschel  staff   5831 15 May 16:26 PrimeNumbers.probops&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cache option is worthwhile for constants and operations which are computation intensive.&lt;br /&gt;
For example, it is not really worthwhile for the operation NextPrime.&lt;br /&gt;
As of version 1.11.0 you can turn off caching operations by setting the preference CACHE_OPERATIONS to FALSE.&lt;br /&gt;
&lt;br /&gt;
Note that the cache is also used for when other machines include a cached machine.&lt;br /&gt;
Take for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE PrimeNumberSum&lt;br /&gt;
INCLUDES PrimeNumbers&lt;br /&gt;
CONSTANTS&lt;br /&gt;
  mx&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  mx = n&lt;br /&gt;
VARIABLES&lt;br /&gt;
  sum&lt;br /&gt;
INVARIANT&lt;br /&gt;
  sum : 0..mx&lt;br /&gt;
INITIALISATION&lt;br /&gt;
  sum := 1&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  Next(nxtP) = PRE nxtP:0..mx THEN&lt;br /&gt;
     NextPrime(nxtP) || sum := sum + 1&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see that the cache of the included machine is re-used straight away:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli PrimeNumbersSum.mch -init -cache ./cache/ -show_cache&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 32 ms (walltime: 33 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumberSum.probcst of type constants for machine PrimeNumberSum:&lt;br /&gt;
     ( mx=1000 &amp;amp;&lt;br /&gt;
       n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( mx=10000 &amp;amp;&lt;br /&gt;
       n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumbers.probcst of type constants for machine PrimeNumbers:&lt;br /&gt;
     ( n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other Useful CLI commands ===&lt;br /&gt;
&lt;br /&gt;
The following commands can also be useful:&lt;br /&gt;
* -ccache DIR works like -cache DIR but creates the directory if it does not exist&lt;br /&gt;
* -cache_statistics to print statistics about cache re-use&lt;br /&gt;
* -clear_cache to clear the cache&lt;br /&gt;
* -clear_cache_for M to clear the cache for the machine M&lt;br /&gt;
* -ignore_cache_for P to ignore the cache for all machines whose name starts with P&lt;br /&gt;
* -show_inclusion_hierarchy to display the list of included subsidiary machines and a minimal cover&lt;br /&gt;
&lt;br /&gt;
The latter command produces a list of sufficient includes to cover all machines.&lt;br /&gt;
By performing&lt;br /&gt;
 probcli FILE.mch -init -cache DIR&lt;br /&gt;
for all machines in that list you can pre-populate the cache with all&lt;br /&gt;
the necessary constants.&lt;br /&gt;
&lt;br /&gt;
=== Useful Preferences ===&lt;br /&gt;
&lt;br /&gt;
* CACHE_CONSTANTS (default true): Cache constant values when -cache is activated&lt;br /&gt;
* CACHE_OPERATIONS (default true): Cache operations/events when -cache is activated&lt;br /&gt;
* CACHE_OPERATIONS_RUNTIME_LIMIT (default 0): Minimal runtime for operations to be stored in -cache&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Running_ProB_from_source&amp;diff=6138</id>
		<title>Running ProB from source</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Running_ProB_from_source&amp;diff=6138"/>
		<updated>2026-03-31T06:50:57Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Running the Prolog Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ProB Source Code ==&lt;br /&gt;
{{ProBSourceCode}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ProB from Prolog ==&lt;br /&gt;
&lt;br /&gt;
You first need to download and install [https://sicstus.sics.se/ SICStus Prolog]. Evaluation licenses (30-days) are available. We currently compile with SICStus 4.6.0 (as of January 2021), but the source code is compatible with older versions as well (SICStus 4.3.2 or later).&lt;br /&gt;
&lt;br /&gt;
You need the password to download SICStus then run &amp;lt;tt&amp;gt;sudo ./InstallSICStus&amp;lt;/tt&amp;gt; and provide the site name, license code and expiration date. Be sure to add the SICStus binaries to your PATH.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you need to clone or download the [http://www3.hhu.de/stups/downloads/prob/source/ ProB Prolog sources].&lt;br /&gt;
&lt;br /&gt;
=== Building ProB Extensions ===&lt;br /&gt;
Before using ProB for the first time from source you should build the extensions. The minimal extensions are counter, myheap and user_signal. You can build them using&lt;br /&gt;
 cd extensions/counter&lt;br /&gt;
 make&lt;br /&gt;
 cd ../user_signal&lt;br /&gt;
 make&lt;br /&gt;
 cd ../myheap&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Note, you can also pass the following additional flags to sicstus in the commands below, so that these extensions are not required (resulting in some performance loss):&lt;br /&gt;
  sicstus -Dprob_myheap=false -Dprob_c_counter=false -Dno_interrupts=true -Dprob_c_probhash=false ...&lt;br /&gt;
&lt;br /&gt;
You will also need the ProB parser, which can be downloaded or updated using the command&lt;br /&gt;
 ./gradlew updateParser&lt;br /&gt;
&lt;br /&gt;
You could also build all extensions at once by going to the top of the prob_prolog tree (i.e., the directory containing src and lib as sub-directories) and then type&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
An alternative is to download ProB from the [[Download|download page]], unzip the archive and copy all the files in the lib folder of the archive to the lib folder of your Prolog source code, containing files such as (the file extension of some of these files varies with the operating system: bundle for macOS, dll for Windows and so for Linux):&lt;br /&gt;
* probcliparser.jar&lt;br /&gt;
* counter.bundle&lt;br /&gt;
* user_signal.bundle&lt;br /&gt;
* myheap.bundle&lt;br /&gt;
* ltlc.bundle&lt;br /&gt;
&lt;br /&gt;
=== Starting ProB Tcl/Tk ===&lt;br /&gt;
&lt;br /&gt;
Probably you should first install a recent Active Tcl distribution, in particular on macOS. Check the [[Download|download page]] for which version is required or recommended. There is also a specific subsection about [[Download#Tcl/Tk_Requirements_for_ProB_Tcl/Tk|installing Tcl/Tk]] and setting the SP_TCL_DSO environment variable to help SICStus Prolog find the Tcl/Tk installation.&lt;br /&gt;
&lt;br /&gt;
You can then start ProB Tcl/Tk by changing into the prob_prolog directory of the Prolog sources and type:&lt;br /&gt;
 sicstus -Dprob_profile=true -l src/prob_tcltk.pl --goal &amp;quot;go.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
To simplify starting ProB, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (or similar configuration file; supposing you cloned the Git repository into ~/git_root):&lt;br /&gt;
 &lt;br /&gt;
 export PROBDIR=~/git_root/prob_prolog&lt;br /&gt;
 export PROB_SOURCE_DIR=$PROBDIR/src&lt;br /&gt;
 alias prob=&#039;cd sicstus -Dprob_profile=true -l $PROB_SOURCE_DIR/prob_tcltk.pl --goal &amp;quot;go.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Now, you can simply start ProB from the command-line and from source with the &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; alias command.&lt;br /&gt;
&lt;br /&gt;
=== Starting probcli command-line version ===&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB does not require a Tcl/Tk distribution.&lt;br /&gt;
&lt;br /&gt;
To start probcli from source define this alias, where &amp;lt;tt&amp;gt; PROB_SOURCE_DIR &amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SICSTUSDIR&amp;lt;/tt&amp;gt; must be defined:&lt;br /&gt;
 alias probsli=&#039;rlwrap $SICSTUSDIR/bin/sicstus -l $PROB_SOURCE_DIR/prob_cli.pl --goal &amp;quot;go_cli.&amp;quot; -a&#039;&lt;br /&gt;
&lt;br /&gt;
(It is recommended to install rlwrap so that you get a history of your commands. If you don&#039;t want to install rlwrap just remove it from the line above.)&lt;br /&gt;
&lt;br /&gt;
You can now use probsli just like probcli, e.g.,&lt;br /&gt;
 probsli M.mch --model-check&lt;br /&gt;
or &lt;br /&gt;
 probsli --repl&lt;br /&gt;
&lt;br /&gt;
=== Running the Prolog Tests ===&lt;br /&gt;
&lt;br /&gt;
All Prolog tests are stored as facts in the file &amp;lt;tt&amp;gt;test cases.pl&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Every test has&lt;br /&gt;
* an identifier (a number); the last test added has the highest number&lt;br /&gt;
* a non-empty list of categories (such as unit, tickets,...)&lt;br /&gt;
* the test itself: the parameters to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; needed to run the test&lt;br /&gt;
* a textual description of the test&lt;br /&gt;
&lt;br /&gt;
Many of the tests require B, CSP or other example files.&lt;br /&gt;
You can download them as a [https://stups.hhu-hosting.de/downloads/prob/source/ Zip archive next to the source code]. You need to put them next to the &amp;lt;tt&amp;gt;prob_prolog&amp;lt;/tt&amp;gt; directory with the Prolog source files.&lt;br /&gt;
&lt;br /&gt;
There is a specific &amp;lt;tt&amp;gt;test_runner.pl&amp;lt;/tt&amp;gt; file for running all Prolog unit and integration tests. The test_runner also provides a REPL (read-eval-print-loop) for running tests and collection of tests.&lt;br /&gt;
To start the Unit Test REPL, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (at least on Mac OS):&lt;br /&gt;
&lt;br /&gt;
 alias tests=&#039;cd $PROBDIR; rlwrap sicstus -Dprob_safe_mode=true -l $PROB_SOURCE_DIR/test_runner.pl --goal &amp;quot;test_repl.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
(It is recommended to install rlwrap so that you get a history of your commands. If you don&#039;t want to install rlwrap just remove it from the line above.)&lt;br /&gt;
&lt;br /&gt;
Now you can start the test runner like this:&lt;br /&gt;
 tests&lt;br /&gt;
or you can already specify tests to be run:&lt;br /&gt;
 tests last&lt;br /&gt;
You can also type the number of a unit test to run, or a test category such as &amp;lt;tt&amp;gt;tickets&amp;lt;/tt&amp;gt; to run all tests in that category.&lt;br /&gt;
&lt;br /&gt;
Here is a sample sesssion of running the test REPL:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tests&lt;br /&gt;
...&lt;br /&gt;
SICStus 4.2.3 (x86_64-darwin-11.4.2): Fri Oct  5 15:58:35 CEST 2012&lt;br /&gt;
Licensed to SP4phil-fak.uni-duesseldorf.de&lt;br /&gt;
TEST ==&amp;gt; last.&lt;br /&gt;
...&lt;br /&gt;
All tests successful.&lt;br /&gt;
Walltime: 100 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some useful commands in the REPL are:&lt;br /&gt;
* last to run the last test added to &amp;lt;tt&amp;gt;testcases.pl&amp;lt;/tt&amp;gt;&lt;br /&gt;
* all to run all tests&lt;br /&gt;
* cat to list all categories of tests (e.g., cbc, cbc_deadlock,...)&lt;br /&gt;
* cbc, cbc_deadlock, tickets, ... :  to run all tests in that category&lt;br /&gt;
* type in a number to run the specific test with that number (see &amp;lt;tt&amp;gt;testcases.pl&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* type in a range m-n to run all tests in that range&lt;br /&gt;
* v or vv to switch to verbose or very verbose mode&lt;br /&gt;
* q to quit the test runner (and stay in Prolog)&lt;br /&gt;
* x to quit the test runner and Prolog&lt;br /&gt;
* debug to switch on Prolog debug mode&lt;br /&gt;
* trace to force Prolog to start tracing as soon as an error occurs (if you have switched to debug above then you will be able to inspect the Prolog goal stack)&lt;br /&gt;
&lt;br /&gt;
== ProB Prolog compile time flags ==&lt;br /&gt;
By giving sicstus a command-line option &amp;lt;tt&amp;gt;-Dflag=true&amp;lt;/tt&amp;gt; you can set certain compile time flags, namely:&lt;br /&gt;
 prob_profile (enables B operation profiling to be displayed in ProB Tcl/Tk in Debug menu)&lt;br /&gt;
 prob_safe_mode (performs additional checking, in particular that ASTs are well-formed)&lt;br /&gt;
 prob_release (removes certain tests from the code)&lt;br /&gt;
 no_terminal_colors (disable terminal colors)&lt;br /&gt;
 prob_src_profile (perform profiling at B source level in source_profiler.pl)&lt;br /&gt;
 debug_kodkod (write dot files for kodkod interval analysis)&lt;br /&gt;
 prob_logging_mode (automatically log probcli (add -ll command-line switch))&lt;br /&gt;
 no_wd_checking (disable WD checking for function application)&lt;br /&gt;
 no_interrupts (do not treat CTRL-C user_interrupts)&lt;br /&gt;
 disable_chr (completely disable CHR)&lt;br /&gt;
 prob_data_validation_mode  (deprecated, replaced by DATA_VALIDATION preference)&lt;br /&gt;
 prob_core_only probcli now only contains core modules, many extensions are not included&lt;br /&gt;
 prob_myheap do not use C++ priority queue but Prolog version instead&lt;br /&gt;
 prob_c_counter_false do not use C++ counter extension but Prolog version instead&lt;br /&gt;
&lt;br /&gt;
The full list of flags is now documented in the Prolog file &amp;lt;tt&amp;gt;compile_time_flags.pl&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When you call probcli with the &amp;lt;tt&amp;gt;-version&amp;lt;/tt&amp;gt; command you will get information about the compile-time flags that have been used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -version&lt;br /&gt;
ProB Command Line Interface&lt;br /&gt;
  VERSION 1.10.1-nightly (88d012a1d06fdbfdaa5c550492197b0c622a1479)&lt;br /&gt;
  Sat Jan 9 09:41:02 2021 +0100&lt;br /&gt;
  Prolog: SICStus 4.6.0 (x86_64-darwin-17.7.0): Mon Apr  6 18:23:42 CEST 2020&lt;br /&gt;
  COMPILE TIME FLAGS: [prob_release,SP_TIMEOUT_IMPLEMENTATON=legacy]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running ProB with SWI-Prolog ==&lt;br /&gt;
&lt;br /&gt;
ProB can also run on recent versions of SWI-Prolog. We recommend using the latest development release of SWI-Prolog (currently 8.5.x). The stable release 8.4.2 also works relatively well. Downloads can be found on [https://www.swi-prolog.org/download/devel the SWI-Prolog website]. You can also compile [https://github.com/SWI-Prolog/swipl-devel the latest SWI-Prolog source code] manually.&lt;br /&gt;
&lt;br /&gt;
Please note that SWI-Prolog support in ProB is still in development and &#039;&#039;&#039;there are known bugs&#039;&#039;&#039;. In addition, many advanced ProB features are not yet available on SWI-Prolog and performance is sometimes much slower than on SICStus Prolog.&lt;br /&gt;
&lt;br /&gt;
All instructions below assume that you have installed SWI-Prolog and can run it on the command line as &amp;lt;code&amp;gt;swipl&amp;lt;/code&amp;gt;. If you have SWI-Prolog installed under a different name/location, you need to adjust the commands appropriately.&lt;br /&gt;
&lt;br /&gt;
=== Obtain Source Code and Parser JAR ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code for the development version of ProB: https://www3.hhu.de/stups/downloads/prob/source/ProB_src.tgz&lt;br /&gt;
* Ensure the Java parser is available, either by copying it from a pre-compiled release of ProB or by running &amp;lt;tt&amp;gt;./gradlew updateParser&amp;lt;/tt&amp;gt;. More details are available [[#Building ProB Extensions|above]]. Note you do not need the other extensions of ProB.&lt;br /&gt;
&lt;br /&gt;
=== Starting ProB with SWI-Prolog ===&lt;br /&gt;
&lt;br /&gt;
For convenience declare this alias, where $PROBDIR points to the top-level directory of the ProB source (see above):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias swiprob=&#039;PROLOG_SYSTEM=swi &amp;quot;$PROBDIR/probcli_src.sh&amp;quot;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now start a REPL for evaluating B expressions and predicates (without a machine context) as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ swiprob -repl&lt;br /&gt;
...&lt;br /&gt;
ProB Interactive Expression and Predicate Evaluator &lt;br /&gt;
Type &amp;quot;:help&amp;quot; for more information.&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that currently you may still see warnings and various messages appear on the console.&lt;br /&gt;
&lt;br /&gt;
You can now experiment and type in expressions and predicate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; 2+2&lt;br /&gt;
Expression Value = &lt;br /&gt;
4&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; {x,y|x:1..30000 &amp;amp; y:1..3000 &amp;amp; x&amp;lt;y &amp;amp; x * 220 &amp;lt;y}&lt;br /&gt;
Expression Value = &lt;br /&gt;
#18980:{(1|-&amp;gt;221),(1|-&amp;gt;222),...,(13|-&amp;gt;2999),(13|-&amp;gt;3000)}&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x*x=100&lt;br /&gt;
Existentially Quantified Predicate over x is TRUE&lt;br /&gt;
Solution:&lt;br /&gt;
       x = -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also provide all of the command-line arguments accepted by probcli, e.g., provide a machine that should be loaded&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
swiprob -repl -init ../prob_examples/public_examples/B/Demo/ACounter.mch &lt;br /&gt;
...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :state&lt;br /&gt;
Current state id 0 : &lt;br /&gt;
     ( ii=2 &amp;amp;&lt;br /&gt;
       jj=10 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Running ProB Tests with SWI-Prolog ===&lt;br /&gt;
&lt;br /&gt;
For convenience declare this alias, where $PROBDIR points to the top-level directory of the ProB source (see above):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias switests=&#039;PROLOG_SYSTEM=swi &amp;quot;$PROBDIR/prolog.sh&amp;quot; --file &amp;quot;$PROBDIR/src/test_runner.pl&amp;quot; --goal &amp;quot;test_repl.&amp;quot; -- &#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now start the testrunner REPL as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$switests&lt;br /&gt;
...&lt;br /&gt;
ProB 1.11.0-nightly&lt;br /&gt;
 Revision: no revision found&lt;br /&gt;
 Date: no lastchanged found&lt;br /&gt;
TEST ==&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now for example run individual tests:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TEST ==&amp;gt; 11.&lt;br /&gt;
Current directory: /Users/leuschel/git_root/prob_prolog/&lt;br /&gt;
Running test 11 &lt;br /&gt;
      &lt;br /&gt;
executing: probcli ../prob_examples/public_examples/B/Benchmarks/DSP0.mch -t -mc 100 -noinv -strict -nodead -expcterr model_check_incomplete -strict -p STRICT_RAISE_WARNINGS TRUE&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
All expected errors occurred.&lt;br /&gt;
Test 11 completed successfully (in 186 ms)&lt;br /&gt;
&lt;br /&gt;
Test successful.&lt;br /&gt;
Walltime: 188 ms&lt;br /&gt;
 0.000 MB ( 0.000 MB program) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The test runner will automatically skip tests that are known to be incompatible with SWI-Prolog, usually because a necessary component of ProB is currently disabled/unavailable on SWI-Prolog. To run a skipped test anyway, enter its number directly into the test REPL - this bypasses any skip declarations/conditions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Manual]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Debugging&amp;diff=6137</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Debugging&amp;diff=6137"/>
		<updated>2026-03-27T10:18:36Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Debugging individual operation executions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
[[Category: Advanced Feature]]&lt;br /&gt;
&lt;br /&gt;
There are various ways in which you can debug your model.&lt;br /&gt;
We focus here on debugging performance issues&lt;br /&gt;
&lt;br /&gt;
== Debugging with LibraryIO ==&lt;br /&gt;
&lt;br /&gt;
The [[External Functions|standard library]] &amp;quot;LibraryIO.def&amp;quot; contains various external functions and predicates with which you can instrument your formal model.&lt;br /&gt;
&lt;br /&gt;
To use the library in your model you need to include the following &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
 &amp;quot;LibraryIO.def&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the external predicate &amp;lt;tt&amp;gt;printf&amp;lt;/tt&amp;gt; you can view values of variables and identifiers. The printf predicate is always true and will print its arguments when all of them have been fully computed.&lt;br /&gt;
The printf predicate uses the format from SICStus Prolog for the format string.&lt;br /&gt;
The most important are &amp;lt;tt&amp;gt;~w&amp;lt;/tt&amp;gt; for printing an argument and &amp;lt;tt&amp;gt;~n&amp;lt;/tt&amp;gt;&lt;br /&gt;
for a newline. There must be exactly as many &amp;lt;tt&amp;gt;~w&amp;lt;/tt&amp;gt; in the format string as there&lt;br /&gt;
are aguments.&lt;br /&gt;
Below is a small example, to inspect in which order ProB enumerates values.&lt;br /&gt;
The example is typed in the REPL of  [[Using_the_Command-Line_Version_of_ProB|probcli]]&lt;br /&gt;
(started using the command &amp;lt;tt&amp;gt;probcli -repl File.mch&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;File.mch&amp;lt;/tt&amp;gt; includes the definitions section above):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; {x,y | x:1..5 &amp;amp; y:1..2 &amp;amp; x+y=6 &amp;amp; printf(&amp;quot;x=~w~n&amp;quot;,[x]) &amp;amp; printf(&amp;quot;y=~w~n&amp;quot;,[y])}&lt;br /&gt;
y=1&lt;br /&gt;
x=5&lt;br /&gt;
y=2&lt;br /&gt;
x=4&lt;br /&gt;
Expression Value = &lt;br /&gt;
{(4|-&amp;gt;2),(5|-&amp;gt;1)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, ProB has enumerated y before x, as its domain was smaller.&lt;br /&gt;
&lt;br /&gt;
You can use the external function &amp;lt;tt&amp;gt;observe&amp;lt;/tt&amp;gt; to inspect a list of&lt;br /&gt;
identifiers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; {x,y | x:1..5 &amp;amp; y:1..2 &amp;amp; x+y=6 &amp;amp; observe((x,y))}&lt;br /&gt;
 observing x&lt;br /&gt;
 observing y&lt;br /&gt;
 y = 1  (walltime: 562188 ms)&lt;br /&gt;
. x = 5  (walltime: 562188 ms)&lt;br /&gt;
..* Value complete: x |-&amp;gt; y = (5|-&amp;gt;1)  (walltime: 562188 ms)&lt;br /&gt;
------&lt;br /&gt;
 y = 2  (walltime: 562188 ms)&lt;br /&gt;
. x = 4  (walltime: 562188 ms)&lt;br /&gt;
..* Value complete: x |-&amp;gt; y = (4|-&amp;gt;2)  (walltime: 562188 ms)&lt;br /&gt;
------&lt;br /&gt;
Expression Value = &lt;br /&gt;
{(4|-&amp;gt;2),(5|-&amp;gt;1)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the external function &amp;lt;tt&amp;gt;TIME&amp;lt;/tt&amp;gt; you can get the current time in seconds:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; TIME(&amp;quot;sec&amp;quot;)&lt;br /&gt;
Expression Value = &lt;br /&gt;
11&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; TIME(&amp;quot;now&amp;quot;)&lt;br /&gt;
Expression Value = &lt;br /&gt;
1581432376&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; TIME(&amp;quot;now&amp;quot;)&lt;br /&gt;
Expression Value = &lt;br /&gt;
1581432377&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the external function &amp;lt;tt&amp;gt;DELTA_WALLTIME&amp;lt;/tt&amp;gt; you can get the  time in milliseconds since the last call to &amp;lt;tt&amp;gt;DELTA_WALLTIME&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Performance Messages ==&lt;br /&gt;
&lt;br /&gt;
By setting the preference &amp;lt;tt&amp;gt;PERFORMANCE_INFO&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; ProB will print various performance messages.&lt;br /&gt;
For example it may print messages when the evaluation of comprehension sets has exceeded a threshold. This threshold (in ms) can be influenced by setting the preference&lt;br /&gt;
&amp;lt;tt&amp;gt;PERFORMANCE_INFO_LIMIT&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Debugging Constants Setup ==&lt;br /&gt;
&lt;br /&gt;
=== TRACE_INFO preference ===&lt;br /&gt;
&lt;br /&gt;
By setting the preference &amp;lt;tt&amp;gt;TRACE_INFO&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; ProB will print additional messages when evaluating certain predicates, in particular the &amp;lt;tt&amp;gt;PROPERTIES&amp;lt;/tt&amp;gt; clause of a B machine.&lt;br /&gt;
With this feature you can observe how constants get bound to values and can sometimes spot expensive predicates and large values.&lt;br /&gt;
Some additional information about debugging the PROPERTIES can be found in the [[Tutorial Troubleshooting the Setup]].&lt;br /&gt;
The preference also helps debugging the &amp;lt;tt&amp;gt;INITIALISATION&amp;lt;/tt&amp;gt; clause of a B machine.&lt;br /&gt;
&lt;br /&gt;
Let us take the following machine&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE Debug&lt;br /&gt;
CONSTANTS a,b,c&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  a = card(b) &amp;amp;&lt;br /&gt;
  b = %x.(x:1..c|x*x) &amp;amp;&lt;br /&gt;
  c : 1000..1001 &amp;amp; c &amp;lt; 1001&lt;br /&gt;
VARIABLES x&lt;br /&gt;
INVARIANT x:NATURAL&lt;br /&gt;
INITIALISATION x:=2&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  Sqr = SELECT x:dom(b) THEN x := b(x) END;&lt;br /&gt;
  Finished = SELECT x /: dom(b) THEN skip END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is how we can debug the constants setup using the &amp;lt;TT&amp;gt;TRACE_INFO&amp;lt;/tt&amp;gt; preference:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli Debug.mch -p TRACE_INFO TRUE -init&lt;br /&gt;
% unused_constants(2,[a,c])&lt;br /&gt;
nr_of_components(1)&lt;br /&gt;
&lt;br /&gt;
 ====&amp;gt; (1) c &amp;lt; 1001&lt;br /&gt;
&lt;br /&gt;
 ====&amp;gt; (1) a = card(b)&lt;br /&gt;
&lt;br /&gt;
 ====&amp;gt; (1) b = %x.(x : 1 .. c|x * x)&lt;br /&gt;
&lt;br /&gt;
 ====&amp;gt; (1) c : 1000 .. 1001&lt;br /&gt;
finished_processing_component_predicates&lt;br /&gt;
grounding_wait_flags&lt;br /&gt;
 :?: a int(?:0..sup)&lt;br /&gt;
 :?: b VARIABLE: _31319 : GRVAL-CHECK&lt;br /&gt;
 :?: c int(?:inf..1000)&lt;br /&gt;
--1--&amp;gt;&amp;gt; a&lt;br /&gt;
     int(1000)&lt;br /&gt;
--1--&amp;gt;&amp;gt; b&lt;br /&gt;
     AVL.size=1000&lt;br /&gt;
--1--&amp;gt;&amp;gt; c&lt;br /&gt;
     int(1000)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 107 ms (walltime: 110 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
 =INIT=&amp;gt; x := 2&lt;br /&gt;
 [=OK= 0 ms]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Profiling Constants Computation Time ===&lt;br /&gt;
ProB now also supports profiling the computation of constants defined by equations in the PROPERTIES, when profiling is active (see section below).&lt;br /&gt;
The profiling can be achieved using the following table command &amp;lt;tt&amp;gt;-csv prob_constants_profile_info FILE&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probsli DebugSymbolicConstants.mch -csv prob_constants_profile_info user_output -init -p PROFILING_INFO TRUE -p PERFORMANCE_INFO TRUE&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 22 ms (walltime: 22 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
Calling table command prob_constants_profile_info&lt;br /&gt;
Constant Kind @desc Computation Runtime (ms) Computation Walltime (ms) Propagation Walltime (ms) # Calls Other Infos Valued Det.Value Instantiates&lt;br /&gt;
c1 concrete  20 20 0 1 [] yes AVL-Set:10000 []&lt;br /&gt;
c2 concrete  2 2 0 1 [] yes AVL-Set:100 []&lt;br /&gt;
c3 concrete  0 0 0 1 [] yes AVL-Set:100 []&lt;br /&gt;
a3 abstract  0 0 0 1 [] yes SYMBOLIC-Set []&lt;br /&gt;
a2 abstract  0 0 0 1 [] yes SYMBOLIC-Set []&lt;br /&gt;
a1 abstract  0 0 0 1 [] yes SYMBOLIC-Set []&lt;br /&gt;
Finished exporting prob_constants_profile_info to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In ProB Tcl/Tk this is available in the Debug -&amp;gt; Statistics menu, while in ProB2-UI it is available in the Graph and Table visualisation dialog. In probcli you can obtain a list of all available commands (callable via -csv CMD FILE) using &amp;lt;tt&amp;gt;probcli --help&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Debugging Constant Size ==&lt;br /&gt;
&lt;br /&gt;
Indeed, for performance it can be much more efficient to expand a value (such as a function or relation) once, rather than keeping it symbolic.&lt;br /&gt;
On the other, expanding a very large set can be costly in terms of memory.&lt;br /&gt;
A useful feature to analyse these issues is the &amp;lt;tt&amp;gt;constants_analysis&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
It generates a CSV table which can be inspected in an editor or a spreadsheet program.&lt;br /&gt;
The table provides an overview of the constants, in particular their size and whether they are kept symbolic or expanded.&lt;br /&gt;
&lt;br /&gt;
Note that B distinguishes between abstract and concrete constants.&lt;br /&gt;
By default, concrete constants will be evaluated (unless they are known to be infinite or larger or annotated as symbolic).&lt;br /&gt;
Abstract constants are more often kept symbolic.&lt;br /&gt;
You can influence ProB&#039;s treatmen of constants by&lt;br /&gt;
- choosing to put constants into the ABSTRACT_CONSTANTS or CONCRETE_CONSTANTS section&lt;br /&gt;
- annotating the values with the &amp;lt;tt&amp;gt;/*@ symbolic */&amp;lt;/tt&amp;gt; pragma&lt;br /&gt;
- annotating the constant with the &amp;lt;tt&amp;gt;/@ desc expand */&amp;lt;/tt&amp;gt; pragma to force expansion&lt;br /&gt;
- annotating the constant with the &amp;lt;tt&amp;gt;/@desc memo */&amp;lt;/tt&amp;gt; pragma to memoize its evaluation (i.e., cache evaluation results involving the constant)&lt;br /&gt;
&lt;br /&gt;
Let us examine this machine, where the constants a1,a2,a3 are identical to c1,c2,c3 but are located in the abstract rather than the concrete constants section:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE DebugSymbolicConstants&lt;br /&gt;
ABSTRACT_CONSTANTS&lt;br /&gt;
  a1, a2, a3&lt;br /&gt;
CONCRETE_CONSTANTS&lt;br /&gt;
  c1, c2, c3&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  a1 = %x.(x:1..10000|x+x) &amp;amp;&lt;br /&gt;
  a2 = {x | x:1..10000 &amp;amp; x mod 100 = 0} &amp;amp;&lt;br /&gt;
  a3 = %x.(x:1..100|x*x) &amp;amp;&lt;br /&gt;
  c1 = %x.(x:1..10000|x+x) &amp;amp;&lt;br /&gt;
  c2 = {x | x:1..10000 &amp;amp; x mod 100 = 0} &amp;amp;&lt;br /&gt;
  c3 = %x.(x:1..100|x*x)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command can now be run as follows.&lt;br /&gt;
Here the output is written to the console (by providing user_output as file name).&lt;br /&gt;
The list of constants is sorted according to size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 probcli DebugSymbolicConstants.mch -init -csv constants_analysis user_output&lt;br /&gt;
...&lt;br /&gt;
Calling table command constants_analysis&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Abstract constant is stored symbolically but can be expanded to a finite set of size 10000 (by moving to ABSTRACT_CONSTANTS or annotating with /*@desc expand */ pragma): a1&lt;br /&gt;
! Line: 3 Column: 2 until Line: 3 Column: 4 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants.mch&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Abstract constant is stored symbolically but can be expanded to a finite set of size 100 (by moving to ABSTRACT_CONSTANTS or annotating with /*@desc expand */ pragma): a2&lt;br /&gt;
! Line: 3 Column: 6 until Line: 3 Column: 8 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants.mch&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Abstract constant is stored symbolically but can be expanded to a finite set of size 100 (by moving to ABSTRACT_CONSTANTS or annotating with /*@desc expand */ pragma): a3&lt;br /&gt;
! Line: 3 Column: 10 until Line: 3 Column: 12 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants.mch&lt;br /&gt;
CONSTANT class kind termsize value&lt;br /&gt;
c1 CONCRETE AVL-Set:10000 90002 #10000:{(1|-&amp;gt;2),(2|-&amp;gt;4),...,(9999|-&amp;gt;19998),(10000|-&amp;gt;20000)}&lt;br /&gt;
c3 CONCRETE AVL-Set:100 902 {(1|-&amp;gt;1),(2|-&amp;gt;4),(3|-&amp;gt;9),(4|-&amp;gt;16),(5|-&amp;gt;25),(6|-&amp;gt;36),(7|-&amp;gt;49),(8|-&amp;gt;64),(9|-&amp;gt;81),(10|-&amp;gt;100),(11|-&amp;gt;121)...&lt;br /&gt;
a3 ABSTRACT FINITE-SYMBOLIC-Set:100 708 /*@symbolic*/ %x.(x : {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29...&lt;br /&gt;
c2 CONCRETE AVL-Set:100 602 {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,220...&lt;br /&gt;
a2 ABSTRACT FINITE-SYMBOLIC-Set:100 162 /*@symbolic*/ {x|x : (1 .. 10000) &amp;amp; x mod 100 = 0}&lt;br /&gt;
a1 ABSTRACT FINITE-SYMBOLIC-Set:10000 151 /*@symbolic*/ %x.(x : (1 .. 10000)|x + x)&lt;br /&gt;
Finished exporting constants_analysis to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now add pragmas to study their influence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE DebugSymbolicConstants_pragmas&lt;br /&gt;
ABSTRACT_CONSTANTS&lt;br /&gt;
  a1 /*@desc expand*/, a2 /*@desc expand*/, a3 /*@desc expand*/&lt;br /&gt;
CONCRETE_CONSTANTS&lt;br /&gt;
  c1 /*@desc memo */, c2, c3&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  a1 = %x.(x:1..10000|x+x) &amp;amp;&lt;br /&gt;
  a2 = {x | x:1..10000 &amp;amp; x mod 100 = 0} &amp;amp;&lt;br /&gt;
  a3 = %x.(x:1..100|x*x) &amp;amp;&lt;br /&gt;
  c1 = /*@symbolic */ %x.(x:1..10000|x+x) &amp;amp;&lt;br /&gt;
  c2 = /*@symbolic */ {x | x:1..10000 &amp;amp; x mod 100 = 0} &amp;amp;&lt;br /&gt;
  c3 = /*@symbolic */ %x.(x:1..100|x*x)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that a1,a2 and a3 are expanded, while c1, c2 and c3 kept symbolic.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 probcli DebugSymbolicConstants_pragmas.mch -init -csv constants_analysis user_output&lt;br /&gt;
...&lt;br /&gt;
Calling table command constants_analysis&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Concrete constant is stored symbolically but can be expanded to a finite set of size 10000 (by annotating with /*@desc expand */ pragma): c1&lt;br /&gt;
! Line: 5 Column: 2 until Line: 5 Column: 4 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants_pragmas.mch&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Concrete constant is stored symbolically but can be expanded to a finite set of size 100 (by annotating with /*@desc expand */ pragma): c2&lt;br /&gt;
! Line: 5 Column: 22 until Line: 5 Column: 24 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants_pragmas.mch&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Concrete constant is stored symbolically but can be expanded to a finite set of size 100 (by annotating with /*@desc expand */ pragma): c3&lt;br /&gt;
! Line: 5 Column: 26 until Line: 5 Column: 28 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants_pragmas.mch&lt;br /&gt;
CONSTANT class kind termsize value&lt;br /&gt;
a1 ABSTRACT AVL-Set:10000 90002 #10000:{(1|-&amp;gt;2),(2|-&amp;gt;4),...,(9999|-&amp;gt;19998),(10000|-&amp;gt;20000)}&lt;br /&gt;
a3 ABSTRACT AVL-Set:100 902 {(1|-&amp;gt;1),(2|-&amp;gt;4),(3|-&amp;gt;9),(4|-&amp;gt;16),(5|-&amp;gt;25),(6|-&amp;gt;36),(7|-&amp;gt;49),(8|-&amp;gt;64),(9|-&amp;gt;81),(10|-&amp;gt;100),(11|-&amp;gt;121)...&lt;br /&gt;
c3 CONCRETE FINITE-SYMBOLIC-Set:100 708 /*@symbolic*/ %x.(x : {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29...&lt;br /&gt;
a2 ABSTRACT AVL-Set:100 602 {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,220...&lt;br /&gt;
c2 CONCRETE FINITE-SYMBOLIC-Set:100 162 /*@symbolic*/ {x|x : (1 .. 10000) &amp;amp; x mod 100 = 0}&lt;br /&gt;
c1 MEMOIZED FINITE-SYMBOLIC-Set:10000 154 /*@symbolic*/ %x.(x : (1 .. 10000)|x + x)&lt;br /&gt;
Finished exporting constants_analysis to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For symbolic constants you can also inspect the value graphically.&lt;br /&gt;
Using probcli this can be done as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init DebugSymbolicConstants_pragmas.mch -dot_expr id_value_formula_tree c3 c3.pdf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command is also available by right-clicking on an identifier in the Evaluation View of ProB Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
== Finding Constant Expressions ==&lt;br /&gt;
&lt;br /&gt;
Using the command &amp;lt;pre&amp;gt;-csv constant_expr_analysis FILE&amp;lt;/pre&amp;gt; you can detect possibly expensive constant expressions used in operation bodies.&lt;br /&gt;
It could be interesting to extract these expressions out of operations (e.g., into a constant or variable computed after initialisation), to avoid repeated re-computation of the expression.&lt;br /&gt;
&lt;br /&gt;
Note, this command is also carried out as part of the &amp;lt;tt&amp;gt;-lint&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
You can also execute &amp;lt;tt&amp;gt;-lint_operations&amp;lt;/tt&amp;gt;, which will not generate a CSV table.&lt;br /&gt;
&lt;br /&gt;
== Debugging Animation or Execution ==&lt;br /&gt;
&lt;br /&gt;
By using the &amp;lt;tt&amp;gt;-animate_stats&amp;lt;/tt&amp;gt; flag, you can see execution times for operations that are executed either using the &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-animate&amp;lt;/tt&amp;gt; commands.&lt;br /&gt;
In verbose mode (&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt; flag) you also see the memory consumption.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli Debug.mch -execute_all -animate_stats&lt;br /&gt;
% unused_constants(2,[a,c])&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 79 ms (walltime: 80 ms)&lt;br /&gt;
1    : SETUP_CONSTANTS&lt;br /&gt;
       91 ms walltime (89 ms runtime), since start: 1107 ms&lt;br /&gt;
2    : INITIALISATION&lt;br /&gt;
       5 ms walltime (4 ms runtime), since start: 1112 ms&lt;br /&gt;
3    : Sqr&lt;br /&gt;
       10 ms walltime (10 ms runtime), since start: 1123 ms&lt;br /&gt;
4    : Sqr&lt;br /&gt;
       0 ms walltime (0 ms runtime), since start: 1123 ms&lt;br /&gt;
5    : Sqr&lt;br /&gt;
       1 ms walltime (0 ms runtime), since start: 1124 ms&lt;br /&gt;
6    : Sqr&lt;br /&gt;
       0 ms walltime (0 ms runtime), since start: 1124 ms&lt;br /&gt;
7    : Finished&lt;br /&gt;
       3 ms walltime (4 ms runtime), since start: 1127 ms&lt;br /&gt;
Infinite loop reached after 8 steps (looping on Finished).&lt;br /&gt;
% Runtime for -execute: 116 ms (with gc: 116 ms, walltime: 119 ms); time since start: 1132 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging Operation Executions ==&lt;br /&gt;
&lt;br /&gt;
After setting the preference &amp;lt;tt&amp;gt;STORE_DETAILED_TRANSITION_INFOS&amp;lt;/tt&amp;gt; to TRUE, ProB will store additional execution information about operations. You can see this info by right-clicking in the operations view of ProB Tcl/Tk or ProB2-UI.&lt;br /&gt;
When setting this preference, the same transition can be added multiple times to the state space, namely if the execution details differ.&lt;br /&gt;
This feature can be useful to debug unexpected non-determinism:&lt;br /&gt;
* you can inspect the transition infos of two executions and compare them (you can also put them into a file and use diff)&lt;br /&gt;
&lt;br /&gt;
== Profiling ==&lt;br /&gt;
&lt;br /&gt;
You can obtain some profiling information using the &amp;lt;tt&amp;gt;-prob_profile&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
This command unfortunately requires that ProB was compiled using special flags (&amp;lt;tt&amp;gt;-Dprob_profile=true&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-Dprob_src_profile=true&amp;lt;/tt&amp;gt;).&lt;br /&gt;
As of version 1.13.1-nightly September 2024, the profiling can be enabled by setting the preference &amp;lt;tt&amp;gt;PROFILING_INFO&amp;lt;/tt&amp;gt; to TRUE (simply add &amp;lt;tt&amp;gt;-p PROFILING_INFO TRUE&amp;lt;/tt&amp;gt; to the invocation below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli ../prob_examples/public_examples/B/Tutorial/Debug.mch -execute_all -prob_profile -p PROFILING_INFO TRUE&lt;br /&gt;
% unused_constants(2,[a,c])&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 2 ms (walltime: 2 ms)&lt;br /&gt;
Infinite loop reached after 8 steps (looping on Finished).&lt;br /&gt;
% Runtime for -execute: 3 ms (with gc: 3 ms, walltime: 3 ms); since start: 0 sec 426 ms&lt;br /&gt;
--------------------------&lt;br /&gt;
PROB PROFILING INFORMATION after 426 ms walltime (268 ms runtime)  168.843 MB&lt;br /&gt;
No source profiling information available&lt;br /&gt;
Set preference SOURCE_PROFILING_INFO to TRUE&lt;br /&gt;
---- ProB Runtime Profiler ----&lt;br /&gt;
---- Time spent in B operations and invariant evaluation&lt;br /&gt;
 Operation : Total Runtime ms (Total ms walltime &amp;amp; Minimum - Maximum ms walltime; #calls Number of Calls)&lt;br /&gt;
 $setup_constants : 2 ms (2 ms walltime &amp;amp; 2 - 2 ms walltime; #calls 1)&lt;br /&gt;
 INVARIANT : 1 ms (0 ms walltime &amp;amp; 0 - 0 ms walltime; #calls 7)&lt;br /&gt;
 Finished : 0 ms (1 ms walltime &amp;amp; 1 - 1 ms walltime; #calls 1)&lt;br /&gt;
 Sqr : 0 ms (0 ms walltime &amp;amp; 0 - 0 ms walltime; #calls 5)&lt;br /&gt;
 $initialise_machine : 0 ms (0 ms walltime &amp;amp; 0 - 0 ms walltime; #calls 1)&lt;br /&gt;
 Total Walltime: 3 ms for #calls 15&lt;br /&gt;
---- Time spent evaluating CONSTANTS (defined by equations)&lt;br /&gt;
 Operation : Total Runtime ms (Total ms walltime &amp;amp; Minimum - Maximum ms walltime; #calls Number of Calls)&lt;br /&gt;
 Total Walltime: 0 ms for #calls 0&lt;br /&gt;
Stored 0 AVL sets for state compression&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, if you memoize functions you can also inspect time spent in evaluating function calls. E.g., if you set the preference &amp;lt;tt&amp;gt; MEMOIZE_FUNCTIONS&amp;lt;/tt&amp;gt; to true then all abstract constants will be memoised and you can inspect number of calls and time.&lt;br /&gt;
See [[Memoization_for_Functions]].&lt;br /&gt;
&lt;br /&gt;
=== Exporting Profile to CSV===&lt;br /&gt;
You can also export the profile information into a CSV file (or on the console when providing &amp;quot;user_output&amp;quot; as special file name):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli ../prob_examples/public_examples/B/Tutorial/Debug.mch -execute_all -csv prob_profile_info user_output -p PROFILING_INFO TRUE&lt;br /&gt;
% unused_constants(2,[a,c])&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 3 ms (walltime: 2 ms)&lt;br /&gt;
Infinite loop reached after 8 steps (looping on Finished).&lt;br /&gt;
% Runtime for -execute: 3 ms (with gc: 3 ms, walltime: 3 ms); since start: 0 sec 430 ms&lt;br /&gt;
Calling table command prob_profile_info&lt;br /&gt;
Operation/Action Total Runtime (ms) Total Walltime (ms) # Calls Max. Walltime (ms) Max. Witness ID Min. Walltime (ms)&lt;br /&gt;
$setup_constants 3 2 1 2 unknown 2&lt;br /&gt;
Sqr 0 1 5 1 unknown 0&lt;br /&gt;
INVARIANT 0 0 7 0 unknown 0&lt;br /&gt;
Finished 0 0 1 0 unknown 0&lt;br /&gt;
$initialise_machine 0 0 1 0 unknown 0&lt;br /&gt;
Finished exporting prob_profile_info to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Profiling External Function Calls ===&lt;br /&gt;
&lt;br /&gt;
You can also generate a profile of the external functions called.&lt;br /&gt;
Take for example this machine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE TestLibraryHash&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
 &amp;quot;LibraryHash.def&amp;quot;&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
  HASH(2+2) = HASH(4);&lt;br /&gt;
  SHA_HASH(2**10) = SHA_HASH(1024);&lt;br /&gt;
  SHA_HASH(2**10) /= SHA_HASH({1024});&lt;br /&gt;
  SHA_HASH({2,3,1,4,5}) = SHA_HASH(1..5);&lt;br /&gt;
  SHA_HASH({2,3,1,4,5}*{TRUE}) = SHA_HASH({x,y|x:1..5 &amp;amp; (y=TRUE &amp;lt;=&amp;gt; x&amp;lt;6)});&lt;br /&gt;
  SHA_HASH({2,3,1,4,5}) /= SHA_HASH({2,3,1,4});&lt;br /&gt;
  SHA_HASH_HEX({2,3,1,4,5}) = SHA_HASH_HEX(1..5);&lt;br /&gt;
  SHA_HASH_HEX({2,3,1,4,5}) /= SHA_HASH_HEX({2,3,1,4})&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;-prob-profile&amp;lt;/tt&amp;gt; command above will also print out information about calls to external functions. This command generates a CSV table of the called external functions; instead of user_output you should provide the name of a file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli TestLibraryHash.mch -init -repl -csv prob_external_fun_profile_info user_output -assertions -p PROFILING_INFO TRUE&lt;br /&gt;
...&lt;br /&gt;
Calling table command prob_external_fun_profile_info&lt;br /&gt;
Operation/Action Total Runtime (ms) Total Walltime (ms) # Calls Max. Walltime (ms) Max. Witness ID Min. Walltime (ms)&lt;br /&gt;
SHA_HASH 0 1 16 1 unknown 0&lt;br /&gt;
SHA_HASH_HEX 0 0 8 0 unknown 0&lt;br /&gt;
Finished exporting prob_external_fun_profile_info to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Debugging&amp;diff=6136</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Debugging&amp;diff=6136"/>
		<updated>2026-03-27T10:18:14Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Debugging Animation or Execution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
[[Category: Advanced Feature]]&lt;br /&gt;
&lt;br /&gt;
There are various ways in which you can debug your model.&lt;br /&gt;
We focus here on debugging performance issues&lt;br /&gt;
&lt;br /&gt;
== Debugging with LibraryIO ==&lt;br /&gt;
&lt;br /&gt;
The [[External Functions|standard library]] &amp;quot;LibraryIO.def&amp;quot; contains various external functions and predicates with which you can instrument your formal model.&lt;br /&gt;
&lt;br /&gt;
To use the library in your model you need to include the following &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
 &amp;quot;LibraryIO.def&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the external predicate &amp;lt;tt&amp;gt;printf&amp;lt;/tt&amp;gt; you can view values of variables and identifiers. The printf predicate is always true and will print its arguments when all of them have been fully computed.&lt;br /&gt;
The printf predicate uses the format from SICStus Prolog for the format string.&lt;br /&gt;
The most important are &amp;lt;tt&amp;gt;~w&amp;lt;/tt&amp;gt; for printing an argument and &amp;lt;tt&amp;gt;~n&amp;lt;/tt&amp;gt;&lt;br /&gt;
for a newline. There must be exactly as many &amp;lt;tt&amp;gt;~w&amp;lt;/tt&amp;gt; in the format string as there&lt;br /&gt;
are aguments.&lt;br /&gt;
Below is a small example, to inspect in which order ProB enumerates values.&lt;br /&gt;
The example is typed in the REPL of  [[Using_the_Command-Line_Version_of_ProB|probcli]]&lt;br /&gt;
(started using the command &amp;lt;tt&amp;gt;probcli -repl File.mch&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;File.mch&amp;lt;/tt&amp;gt; includes the definitions section above):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; {x,y | x:1..5 &amp;amp; y:1..2 &amp;amp; x+y=6 &amp;amp; printf(&amp;quot;x=~w~n&amp;quot;,[x]) &amp;amp; printf(&amp;quot;y=~w~n&amp;quot;,[y])}&lt;br /&gt;
y=1&lt;br /&gt;
x=5&lt;br /&gt;
y=2&lt;br /&gt;
x=4&lt;br /&gt;
Expression Value = &lt;br /&gt;
{(4|-&amp;gt;2),(5|-&amp;gt;1)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, ProB has enumerated y before x, as its domain was smaller.&lt;br /&gt;
&lt;br /&gt;
You can use the external function &amp;lt;tt&amp;gt;observe&amp;lt;/tt&amp;gt; to inspect a list of&lt;br /&gt;
identifiers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; {x,y | x:1..5 &amp;amp; y:1..2 &amp;amp; x+y=6 &amp;amp; observe((x,y))}&lt;br /&gt;
 observing x&lt;br /&gt;
 observing y&lt;br /&gt;
 y = 1  (walltime: 562188 ms)&lt;br /&gt;
. x = 5  (walltime: 562188 ms)&lt;br /&gt;
..* Value complete: x |-&amp;gt; y = (5|-&amp;gt;1)  (walltime: 562188 ms)&lt;br /&gt;
------&lt;br /&gt;
 y = 2  (walltime: 562188 ms)&lt;br /&gt;
. x = 4  (walltime: 562188 ms)&lt;br /&gt;
..* Value complete: x |-&amp;gt; y = (4|-&amp;gt;2)  (walltime: 562188 ms)&lt;br /&gt;
------&lt;br /&gt;
Expression Value = &lt;br /&gt;
{(4|-&amp;gt;2),(5|-&amp;gt;1)}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the external function &amp;lt;tt&amp;gt;TIME&amp;lt;/tt&amp;gt; you can get the current time in seconds:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; TIME(&amp;quot;sec&amp;quot;)&lt;br /&gt;
Expression Value = &lt;br /&gt;
11&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; TIME(&amp;quot;now&amp;quot;)&lt;br /&gt;
Expression Value = &lt;br /&gt;
1581432376&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; TIME(&amp;quot;now&amp;quot;)&lt;br /&gt;
Expression Value = &lt;br /&gt;
1581432377&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the external function &amp;lt;tt&amp;gt;DELTA_WALLTIME&amp;lt;/tt&amp;gt; you can get the  time in milliseconds since the last call to &amp;lt;tt&amp;gt;DELTA_WALLTIME&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Performance Messages ==&lt;br /&gt;
&lt;br /&gt;
By setting the preference &amp;lt;tt&amp;gt;PERFORMANCE_INFO&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; ProB will print various performance messages.&lt;br /&gt;
For example it may print messages when the evaluation of comprehension sets has exceeded a threshold. This threshold (in ms) can be influenced by setting the preference&lt;br /&gt;
&amp;lt;tt&amp;gt;PERFORMANCE_INFO_LIMIT&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Debugging Constants Setup ==&lt;br /&gt;
&lt;br /&gt;
=== TRACE_INFO preference ===&lt;br /&gt;
&lt;br /&gt;
By setting the preference &amp;lt;tt&amp;gt;TRACE_INFO&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; ProB will print additional messages when evaluating certain predicates, in particular the &amp;lt;tt&amp;gt;PROPERTIES&amp;lt;/tt&amp;gt; clause of a B machine.&lt;br /&gt;
With this feature you can observe how constants get bound to values and can sometimes spot expensive predicates and large values.&lt;br /&gt;
Some additional information about debugging the PROPERTIES can be found in the [[Tutorial Troubleshooting the Setup]].&lt;br /&gt;
The preference also helps debugging the &amp;lt;tt&amp;gt;INITIALISATION&amp;lt;/tt&amp;gt; clause of a B machine.&lt;br /&gt;
&lt;br /&gt;
Let us take the following machine&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE Debug&lt;br /&gt;
CONSTANTS a,b,c&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  a = card(b) &amp;amp;&lt;br /&gt;
  b = %x.(x:1..c|x*x) &amp;amp;&lt;br /&gt;
  c : 1000..1001 &amp;amp; c &amp;lt; 1001&lt;br /&gt;
VARIABLES x&lt;br /&gt;
INVARIANT x:NATURAL&lt;br /&gt;
INITIALISATION x:=2&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  Sqr = SELECT x:dom(b) THEN x := b(x) END;&lt;br /&gt;
  Finished = SELECT x /: dom(b) THEN skip END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is how we can debug the constants setup using the &amp;lt;TT&amp;gt;TRACE_INFO&amp;lt;/tt&amp;gt; preference:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli Debug.mch -p TRACE_INFO TRUE -init&lt;br /&gt;
% unused_constants(2,[a,c])&lt;br /&gt;
nr_of_components(1)&lt;br /&gt;
&lt;br /&gt;
 ====&amp;gt; (1) c &amp;lt; 1001&lt;br /&gt;
&lt;br /&gt;
 ====&amp;gt; (1) a = card(b)&lt;br /&gt;
&lt;br /&gt;
 ====&amp;gt; (1) b = %x.(x : 1 .. c|x * x)&lt;br /&gt;
&lt;br /&gt;
 ====&amp;gt; (1) c : 1000 .. 1001&lt;br /&gt;
finished_processing_component_predicates&lt;br /&gt;
grounding_wait_flags&lt;br /&gt;
 :?: a int(?:0..sup)&lt;br /&gt;
 :?: b VARIABLE: _31319 : GRVAL-CHECK&lt;br /&gt;
 :?: c int(?:inf..1000)&lt;br /&gt;
--1--&amp;gt;&amp;gt; a&lt;br /&gt;
     int(1000)&lt;br /&gt;
--1--&amp;gt;&amp;gt; b&lt;br /&gt;
     AVL.size=1000&lt;br /&gt;
--1--&amp;gt;&amp;gt; c&lt;br /&gt;
     int(1000)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 107 ms (walltime: 110 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
 =INIT=&amp;gt; x := 2&lt;br /&gt;
 [=OK= 0 ms]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Profiling Constants Computation Time ===&lt;br /&gt;
ProB now also supports profiling the computation of constants defined by equations in the PROPERTIES, when profiling is active (see section below).&lt;br /&gt;
The profiling can be achieved using the following table command &amp;lt;tt&amp;gt;-csv prob_constants_profile_info FILE&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probsli DebugSymbolicConstants.mch -csv prob_constants_profile_info user_output -init -p PROFILING_INFO TRUE -p PERFORMANCE_INFO TRUE&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 22 ms (walltime: 22 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
Calling table command prob_constants_profile_info&lt;br /&gt;
Constant Kind @desc Computation Runtime (ms) Computation Walltime (ms) Propagation Walltime (ms) # Calls Other Infos Valued Det.Value Instantiates&lt;br /&gt;
c1 concrete  20 20 0 1 [] yes AVL-Set:10000 []&lt;br /&gt;
c2 concrete  2 2 0 1 [] yes AVL-Set:100 []&lt;br /&gt;
c3 concrete  0 0 0 1 [] yes AVL-Set:100 []&lt;br /&gt;
a3 abstract  0 0 0 1 [] yes SYMBOLIC-Set []&lt;br /&gt;
a2 abstract  0 0 0 1 [] yes SYMBOLIC-Set []&lt;br /&gt;
a1 abstract  0 0 0 1 [] yes SYMBOLIC-Set []&lt;br /&gt;
Finished exporting prob_constants_profile_info to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In ProB Tcl/Tk this is available in the Debug -&amp;gt; Statistics menu, while in ProB2-UI it is available in the Graph and Table visualisation dialog. In probcli you can obtain a list of all available commands (callable via -csv CMD FILE) using &amp;lt;tt&amp;gt;probcli --help&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Debugging Constant Size ==&lt;br /&gt;
&lt;br /&gt;
Indeed, for performance it can be much more efficient to expand a value (such as a function or relation) once, rather than keeping it symbolic.&lt;br /&gt;
On the other, expanding a very large set can be costly in terms of memory.&lt;br /&gt;
A useful feature to analyse these issues is the &amp;lt;tt&amp;gt;constants_analysis&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
It generates a CSV table which can be inspected in an editor or a spreadsheet program.&lt;br /&gt;
The table provides an overview of the constants, in particular their size and whether they are kept symbolic or expanded.&lt;br /&gt;
&lt;br /&gt;
Note that B distinguishes between abstract and concrete constants.&lt;br /&gt;
By default, concrete constants will be evaluated (unless they are known to be infinite or larger or annotated as symbolic).&lt;br /&gt;
Abstract constants are more often kept symbolic.&lt;br /&gt;
You can influence ProB&#039;s treatmen of constants by&lt;br /&gt;
- choosing to put constants into the ABSTRACT_CONSTANTS or CONCRETE_CONSTANTS section&lt;br /&gt;
- annotating the values with the &amp;lt;tt&amp;gt;/*@ symbolic */&amp;lt;/tt&amp;gt; pragma&lt;br /&gt;
- annotating the constant with the &amp;lt;tt&amp;gt;/@ desc expand */&amp;lt;/tt&amp;gt; pragma to force expansion&lt;br /&gt;
- annotating the constant with the &amp;lt;tt&amp;gt;/@desc memo */&amp;lt;/tt&amp;gt; pragma to memoize its evaluation (i.e., cache evaluation results involving the constant)&lt;br /&gt;
&lt;br /&gt;
Let us examine this machine, where the constants a1,a2,a3 are identical to c1,c2,c3 but are located in the abstract rather than the concrete constants section:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE DebugSymbolicConstants&lt;br /&gt;
ABSTRACT_CONSTANTS&lt;br /&gt;
  a1, a2, a3&lt;br /&gt;
CONCRETE_CONSTANTS&lt;br /&gt;
  c1, c2, c3&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  a1 = %x.(x:1..10000|x+x) &amp;amp;&lt;br /&gt;
  a2 = {x | x:1..10000 &amp;amp; x mod 100 = 0} &amp;amp;&lt;br /&gt;
  a3 = %x.(x:1..100|x*x) &amp;amp;&lt;br /&gt;
  c1 = %x.(x:1..10000|x+x) &amp;amp;&lt;br /&gt;
  c2 = {x | x:1..10000 &amp;amp; x mod 100 = 0} &amp;amp;&lt;br /&gt;
  c3 = %x.(x:1..100|x*x)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command can now be run as follows.&lt;br /&gt;
Here the output is written to the console (by providing user_output as file name).&lt;br /&gt;
The list of constants is sorted according to size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 probcli DebugSymbolicConstants.mch -init -csv constants_analysis user_output&lt;br /&gt;
...&lt;br /&gt;
Calling table command constants_analysis&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Abstract constant is stored symbolically but can be expanded to a finite set of size 10000 (by moving to ABSTRACT_CONSTANTS or annotating with /*@desc expand */ pragma): a1&lt;br /&gt;
! Line: 3 Column: 2 until Line: 3 Column: 4 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants.mch&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Abstract constant is stored symbolically but can be expanded to a finite set of size 100 (by moving to ABSTRACT_CONSTANTS or annotating with /*@desc expand */ pragma): a2&lt;br /&gt;
! Line: 3 Column: 6 until Line: 3 Column: 8 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants.mch&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Abstract constant is stored symbolically but can be expanded to a finite set of size 100 (by moving to ABSTRACT_CONSTANTS or annotating with /*@desc expand */ pragma): a3&lt;br /&gt;
! Line: 3 Column: 10 until Line: 3 Column: 12 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants.mch&lt;br /&gt;
CONSTANT class kind termsize value&lt;br /&gt;
c1 CONCRETE AVL-Set:10000 90002 #10000:{(1|-&amp;gt;2),(2|-&amp;gt;4),...,(9999|-&amp;gt;19998),(10000|-&amp;gt;20000)}&lt;br /&gt;
c3 CONCRETE AVL-Set:100 902 {(1|-&amp;gt;1),(2|-&amp;gt;4),(3|-&amp;gt;9),(4|-&amp;gt;16),(5|-&amp;gt;25),(6|-&amp;gt;36),(7|-&amp;gt;49),(8|-&amp;gt;64),(9|-&amp;gt;81),(10|-&amp;gt;100),(11|-&amp;gt;121)...&lt;br /&gt;
a3 ABSTRACT FINITE-SYMBOLIC-Set:100 708 /*@symbolic*/ %x.(x : {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29...&lt;br /&gt;
c2 CONCRETE AVL-Set:100 602 {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,220...&lt;br /&gt;
a2 ABSTRACT FINITE-SYMBOLIC-Set:100 162 /*@symbolic*/ {x|x : (1 .. 10000) &amp;amp; x mod 100 = 0}&lt;br /&gt;
a1 ABSTRACT FINITE-SYMBOLIC-Set:10000 151 /*@symbolic*/ %x.(x : (1 .. 10000)|x + x)&lt;br /&gt;
Finished exporting constants_analysis to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us now add pragmas to study their influence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE DebugSymbolicConstants_pragmas&lt;br /&gt;
ABSTRACT_CONSTANTS&lt;br /&gt;
  a1 /*@desc expand*/, a2 /*@desc expand*/, a3 /*@desc expand*/&lt;br /&gt;
CONCRETE_CONSTANTS&lt;br /&gt;
  c1 /*@desc memo */, c2, c3&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  a1 = %x.(x:1..10000|x+x) &amp;amp;&lt;br /&gt;
  a2 = {x | x:1..10000 &amp;amp; x mod 100 = 0} &amp;amp;&lt;br /&gt;
  a3 = %x.(x:1..100|x*x) &amp;amp;&lt;br /&gt;
  c1 = /*@symbolic */ %x.(x:1..10000|x+x) &amp;amp;&lt;br /&gt;
  c2 = /*@symbolic */ {x | x:1..10000 &amp;amp; x mod 100 = 0} &amp;amp;&lt;br /&gt;
  c3 = /*@symbolic */ %x.(x:1..100|x*x)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that a1,a2 and a3 are expanded, while c1, c2 and c3 kept symbolic.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 probcli DebugSymbolicConstants_pragmas.mch -init -csv constants_analysis user_output&lt;br /&gt;
...&lt;br /&gt;
Calling table command constants_analysis&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Concrete constant is stored symbolically but can be expanded to a finite set of size 10000 (by annotating with /*@desc expand */ pragma): c1&lt;br /&gt;
! Line: 5 Column: 2 until Line: 5 Column: 4 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants_pragmas.mch&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Concrete constant is stored symbolically but can be expanded to a finite set of size 100 (by annotating with /*@desc expand */ pragma): c2&lt;br /&gt;
! Line: 5 Column: 22 until Line: 5 Column: 24 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants_pragmas.mch&lt;br /&gt;
&lt;br /&gt;
! Message (source: constants_analysis):&lt;br /&gt;
! Concrete constant is stored symbolically but can be expanded to a finite set of size 100 (by annotating with /*@desc expand */ pragma): c3&lt;br /&gt;
! Line: 5 Column: 26 until Line: 5 Column: 28 in file: /Users/leuschel/git_root/prob_examples/public_examples/B/Tester/ConstantsDebug/DebugSymbolicConstants_pragmas.mch&lt;br /&gt;
CONSTANT class kind termsize value&lt;br /&gt;
a1 ABSTRACT AVL-Set:10000 90002 #10000:{(1|-&amp;gt;2),(2|-&amp;gt;4),...,(9999|-&amp;gt;19998),(10000|-&amp;gt;20000)}&lt;br /&gt;
a3 ABSTRACT AVL-Set:100 902 {(1|-&amp;gt;1),(2|-&amp;gt;4),(3|-&amp;gt;9),(4|-&amp;gt;16),(5|-&amp;gt;25),(6|-&amp;gt;36),(7|-&amp;gt;49),(8|-&amp;gt;64),(9|-&amp;gt;81),(10|-&amp;gt;100),(11|-&amp;gt;121)...&lt;br /&gt;
c3 CONCRETE FINITE-SYMBOLIC-Set:100 708 /*@symbolic*/ %x.(x : {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29...&lt;br /&gt;
a2 ABSTRACT AVL-Set:100 602 {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,220...&lt;br /&gt;
c2 CONCRETE FINITE-SYMBOLIC-Set:100 162 /*@symbolic*/ {x|x : (1 .. 10000) &amp;amp; x mod 100 = 0}&lt;br /&gt;
c1 MEMOIZED FINITE-SYMBOLIC-Set:10000 154 /*@symbolic*/ %x.(x : (1 .. 10000)|x + x)&lt;br /&gt;
Finished exporting constants_analysis to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For symbolic constants you can also inspect the value graphically.&lt;br /&gt;
Using probcli this can be done as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init DebugSymbolicConstants_pragmas.mch -dot_expr id_value_formula_tree c3 c3.pdf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The command is also available by right-clicking on an identifier in the Evaluation View of ProB Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
== Finding Constant Expressions ==&lt;br /&gt;
&lt;br /&gt;
Using the command &amp;lt;pre&amp;gt;-csv constant_expr_analysis FILE&amp;lt;/pre&amp;gt; you can detect possibly expensive constant expressions used in operation bodies.&lt;br /&gt;
It could be interesting to extract these expressions out of operations (e.g., into a constant or variable computed after initialisation), to avoid repeated re-computation of the expression.&lt;br /&gt;
&lt;br /&gt;
Note, this command is also carried out as part of the &amp;lt;tt&amp;gt;-lint&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
You can also execute &amp;lt;tt&amp;gt;-lint_operations&amp;lt;/tt&amp;gt;, which will not generate a CSV table.&lt;br /&gt;
&lt;br /&gt;
== Debugging Animation or Execution ==&lt;br /&gt;
&lt;br /&gt;
By using the &amp;lt;tt&amp;gt;-animate_stats&amp;lt;/tt&amp;gt; flag, you can see execution times for operations that are executed either using the &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-animate&amp;lt;/tt&amp;gt; commands.&lt;br /&gt;
In verbose mode (&amp;lt;tt&amp;gt;-v&amp;lt;/tt&amp;gt; flag) you also see the memory consumption.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli Debug.mch -execute_all -animate_stats&lt;br /&gt;
% unused_constants(2,[a,c])&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 79 ms (walltime: 80 ms)&lt;br /&gt;
1    : SETUP_CONSTANTS&lt;br /&gt;
       91 ms walltime (89 ms runtime), since start: 1107 ms&lt;br /&gt;
2    : INITIALISATION&lt;br /&gt;
       5 ms walltime (4 ms runtime), since start: 1112 ms&lt;br /&gt;
3    : Sqr&lt;br /&gt;
       10 ms walltime (10 ms runtime), since start: 1123 ms&lt;br /&gt;
4    : Sqr&lt;br /&gt;
       0 ms walltime (0 ms runtime), since start: 1123 ms&lt;br /&gt;
5    : Sqr&lt;br /&gt;
       1 ms walltime (0 ms runtime), since start: 1124 ms&lt;br /&gt;
6    : Sqr&lt;br /&gt;
       0 ms walltime (0 ms runtime), since start: 1124 ms&lt;br /&gt;
7    : Finished&lt;br /&gt;
       3 ms walltime (4 ms runtime), since start: 1127 ms&lt;br /&gt;
Infinite loop reached after 8 steps (looping on Finished).&lt;br /&gt;
% Runtime for -execute: 116 ms (with gc: 116 ms, walltime: 119 ms); time since start: 1132 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging individual operation executions ==&lt;br /&gt;
&lt;br /&gt;
After setting the preference &amp;lt;tt&amp;gt;STORE_DETAILED_TRANSITION_INFOS&amp;lt;/tt&amp;gt; to TRUE, ProB will store additional execution information about operations. You can see this info by right-clicking in the operations view of ProB Tcl/Tk or ProB2-UI.&lt;br /&gt;
When setting this preference, the same transition can be added multiple times to the state space, namely if the execution details differ.&lt;br /&gt;
This feature can be useful to debug unexpected non-determinism:&lt;br /&gt;
* you can inspect the transition infos of two executions and compare them (you can also put them into a file and use diff)&lt;br /&gt;
&lt;br /&gt;
== Profiling ==&lt;br /&gt;
&lt;br /&gt;
You can obtain some profiling information using the &amp;lt;tt&amp;gt;-prob_profile&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
This command unfortunately requires that ProB was compiled using special flags (&amp;lt;tt&amp;gt;-Dprob_profile=true&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-Dprob_src_profile=true&amp;lt;/tt&amp;gt;).&lt;br /&gt;
As of version 1.13.1-nightly September 2024, the profiling can be enabled by setting the preference &amp;lt;tt&amp;gt;PROFILING_INFO&amp;lt;/tt&amp;gt; to TRUE (simply add &amp;lt;tt&amp;gt;-p PROFILING_INFO TRUE&amp;lt;/tt&amp;gt; to the invocation below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli ../prob_examples/public_examples/B/Tutorial/Debug.mch -execute_all -prob_profile -p PROFILING_INFO TRUE&lt;br /&gt;
% unused_constants(2,[a,c])&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 2 ms (walltime: 2 ms)&lt;br /&gt;
Infinite loop reached after 8 steps (looping on Finished).&lt;br /&gt;
% Runtime for -execute: 3 ms (with gc: 3 ms, walltime: 3 ms); since start: 0 sec 426 ms&lt;br /&gt;
--------------------------&lt;br /&gt;
PROB PROFILING INFORMATION after 426 ms walltime (268 ms runtime)  168.843 MB&lt;br /&gt;
No source profiling information available&lt;br /&gt;
Set preference SOURCE_PROFILING_INFO to TRUE&lt;br /&gt;
---- ProB Runtime Profiler ----&lt;br /&gt;
---- Time spent in B operations and invariant evaluation&lt;br /&gt;
 Operation : Total Runtime ms (Total ms walltime &amp;amp; Minimum - Maximum ms walltime; #calls Number of Calls)&lt;br /&gt;
 $setup_constants : 2 ms (2 ms walltime &amp;amp; 2 - 2 ms walltime; #calls 1)&lt;br /&gt;
 INVARIANT : 1 ms (0 ms walltime &amp;amp; 0 - 0 ms walltime; #calls 7)&lt;br /&gt;
 Finished : 0 ms (1 ms walltime &amp;amp; 1 - 1 ms walltime; #calls 1)&lt;br /&gt;
 Sqr : 0 ms (0 ms walltime &amp;amp; 0 - 0 ms walltime; #calls 5)&lt;br /&gt;
 $initialise_machine : 0 ms (0 ms walltime &amp;amp; 0 - 0 ms walltime; #calls 1)&lt;br /&gt;
 Total Walltime: 3 ms for #calls 15&lt;br /&gt;
---- Time spent evaluating CONSTANTS (defined by equations)&lt;br /&gt;
 Operation : Total Runtime ms (Total ms walltime &amp;amp; Minimum - Maximum ms walltime; #calls Number of Calls)&lt;br /&gt;
 Total Walltime: 0 ms for #calls 0&lt;br /&gt;
Stored 0 AVL sets for state compression&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, if you memoize functions you can also inspect time spent in evaluating function calls. E.g., if you set the preference &amp;lt;tt&amp;gt; MEMOIZE_FUNCTIONS&amp;lt;/tt&amp;gt; to true then all abstract constants will be memoised and you can inspect number of calls and time.&lt;br /&gt;
See [[Memoization_for_Functions]].&lt;br /&gt;
&lt;br /&gt;
=== Exporting Profile to CSV===&lt;br /&gt;
You can also export the profile information into a CSV file (or on the console when providing &amp;quot;user_output&amp;quot; as special file name):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli ../prob_examples/public_examples/B/Tutorial/Debug.mch -execute_all -csv prob_profile_info user_output -p PROFILING_INFO TRUE&lt;br /&gt;
% unused_constants(2,[a,c])&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 3 ms (walltime: 2 ms)&lt;br /&gt;
Infinite loop reached after 8 steps (looping on Finished).&lt;br /&gt;
% Runtime for -execute: 3 ms (with gc: 3 ms, walltime: 3 ms); since start: 0 sec 430 ms&lt;br /&gt;
Calling table command prob_profile_info&lt;br /&gt;
Operation/Action Total Runtime (ms) Total Walltime (ms) # Calls Max. Walltime (ms) Max. Witness ID Min. Walltime (ms)&lt;br /&gt;
$setup_constants 3 2 1 2 unknown 2&lt;br /&gt;
Sqr 0 1 5 1 unknown 0&lt;br /&gt;
INVARIANT 0 0 7 0 unknown 0&lt;br /&gt;
Finished 0 0 1 0 unknown 0&lt;br /&gt;
$initialise_machine 0 0 1 0 unknown 0&lt;br /&gt;
Finished exporting prob_profile_info to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Profiling External Function Calls ===&lt;br /&gt;
&lt;br /&gt;
You can also generate a profile of the external functions called.&lt;br /&gt;
Take for example this machine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE TestLibraryHash&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
 &amp;quot;LibraryHash.def&amp;quot;&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
  HASH(2+2) = HASH(4);&lt;br /&gt;
  SHA_HASH(2**10) = SHA_HASH(1024);&lt;br /&gt;
  SHA_HASH(2**10) /= SHA_HASH({1024});&lt;br /&gt;
  SHA_HASH({2,3,1,4,5}) = SHA_HASH(1..5);&lt;br /&gt;
  SHA_HASH({2,3,1,4,5}*{TRUE}) = SHA_HASH({x,y|x:1..5 &amp;amp; (y=TRUE &amp;lt;=&amp;gt; x&amp;lt;6)});&lt;br /&gt;
  SHA_HASH({2,3,1,4,5}) /= SHA_HASH({2,3,1,4});&lt;br /&gt;
  SHA_HASH_HEX({2,3,1,4,5}) = SHA_HASH_HEX(1..5);&lt;br /&gt;
  SHA_HASH_HEX({2,3,1,4,5}) /= SHA_HASH_HEX({2,3,1,4})&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;-prob-profile&amp;lt;/tt&amp;gt; command above will also print out information about calls to external functions. This command generates a CSV table of the called external functions; instead of user_output you should provide the name of a file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli TestLibraryHash.mch -init -repl -csv prob_external_fun_profile_info user_output -assertions -p PROFILING_INFO TRUE&lt;br /&gt;
...&lt;br /&gt;
Calling table command prob_external_fun_profile_info&lt;br /&gt;
Operation/Action Total Runtime (ms) Total Walltime (ms) # Calls Max. Walltime (ms) Max. Witness ID Min. Walltime (ms)&lt;br /&gt;
SHA_HASH 0 1 16 1 unknown 0&lt;br /&gt;
SHA_HASH_HEX 0 0 8 0 unknown 0&lt;br /&gt;
Finished exporting prob_external_fun_profile_info to user_output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Running_ProB_from_source&amp;diff=6135</id>
		<title>Running ProB from source</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Running_ProB_from_source&amp;diff=6135"/>
		<updated>2026-03-26T11:34:43Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Building ProB Extensions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ProB Source Code ==&lt;br /&gt;
{{ProBSourceCode}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ProB from Prolog ==&lt;br /&gt;
&lt;br /&gt;
You first need to download and install [https://sicstus.sics.se/ SICStus Prolog]. Evaluation licenses (30-days) are available. We currently compile with SICStus 4.6.0 (as of January 2021), but the source code is compatible with older versions as well (SICStus 4.3.2 or later).&lt;br /&gt;
&lt;br /&gt;
You need the password to download SICStus then run &amp;lt;tt&amp;gt;sudo ./InstallSICStus&amp;lt;/tt&amp;gt; and provide the site name, license code and expiration date. Be sure to add the SICStus binaries to your PATH.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you need to clone or download the [http://www3.hhu.de/stups/downloads/prob/source/ ProB Prolog sources].&lt;br /&gt;
&lt;br /&gt;
=== Building ProB Extensions ===&lt;br /&gt;
Before using ProB for the first time from source you should build the extensions. The minimal extensions are counter, myheap and user_signal. You can build them using&lt;br /&gt;
 cd extensions/counter&lt;br /&gt;
 make&lt;br /&gt;
 cd ../user_signal&lt;br /&gt;
 make&lt;br /&gt;
 cd ../myheap&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Note, you can also pass the following additional flags to sicstus in the commands below, so that these extensions are not required (resulting in some performance loss):&lt;br /&gt;
  sicstus -Dprob_myheap=false -Dprob_c_counter=false -Dno_interrupts=true -Dprob_c_probhash=false ...&lt;br /&gt;
&lt;br /&gt;
You will also need the ProB parser, which can be downloaded or updated using the command&lt;br /&gt;
 ./gradlew updateParser&lt;br /&gt;
&lt;br /&gt;
You could also build all extensions at once by going to the top of the prob_prolog tree (i.e., the directory containing src and lib as sub-directories) and then type&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
An alternative is to download ProB from the [[Download|download page]], unzip the archive and copy all the files in the lib folder of the archive to the lib folder of your Prolog source code, containing files such as (the file extension of some of these files varies with the operating system: bundle for macOS, dll for Windows and so for Linux):&lt;br /&gt;
* probcliparser.jar&lt;br /&gt;
* counter.bundle&lt;br /&gt;
* user_signal.bundle&lt;br /&gt;
* myheap.bundle&lt;br /&gt;
* ltlc.bundle&lt;br /&gt;
&lt;br /&gt;
=== Starting ProB Tcl/Tk ===&lt;br /&gt;
&lt;br /&gt;
Probably you should first install a recent Active Tcl distribution, in particular on macOS. Check the [[Download|download page]] for which version is required or recommended. There is also a specific subsection about [[Download#Tcl/Tk_Requirements_for_ProB_Tcl/Tk|installing Tcl/Tk]] and setting the SP_TCL_DSO environment variable to help SICStus Prolog find the Tcl/Tk installation.&lt;br /&gt;
&lt;br /&gt;
You can then start ProB Tcl/Tk by changing into the prob_prolog directory of the Prolog sources and type:&lt;br /&gt;
 sicstus -Dprob_profile=true -l src/prob_tcltk.pl --goal &amp;quot;go.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
To simplify starting ProB, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (or similar configuration file; supposing you cloned the Git repository into ~/git_root):&lt;br /&gt;
 &lt;br /&gt;
 export PROBDIR=~/git_root/prob_prolog&lt;br /&gt;
 export PROB_SOURCE_DIR=$PROBDIR/src&lt;br /&gt;
 alias prob=&#039;cd sicstus -Dprob_profile=true -l $PROB_SOURCE_DIR/prob_tcltk.pl --goal &amp;quot;go.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Now, you can simply start ProB from the command-line and from source with the &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; alias command.&lt;br /&gt;
&lt;br /&gt;
=== Starting probcli command-line version ===&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB does not require a Tcl/Tk distribution.&lt;br /&gt;
&lt;br /&gt;
To start probcli from source define this alias, where &amp;lt;tt&amp;gt; PROB_SOURCE_DIR &amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SICSTUSDIR&amp;lt;/tt&amp;gt; must be defined:&lt;br /&gt;
 alias probsli=&#039;rlwrap $SICSTUSDIR/bin/sicstus -l $PROB_SOURCE_DIR/prob_cli.pl --goal &amp;quot;go_cli.&amp;quot; -a&#039;&lt;br /&gt;
&lt;br /&gt;
(It is recommended to install rlwrap so that you get a history of your commands. If you don&#039;t want to install rlwrap just remove it from the line above.)&lt;br /&gt;
&lt;br /&gt;
You can now use probsli just like probcli, e.g.,&lt;br /&gt;
 probsli M.mch --model-check&lt;br /&gt;
or &lt;br /&gt;
 probsli --repl&lt;br /&gt;
&lt;br /&gt;
=== Running the Prolog Tests ===&lt;br /&gt;
&lt;br /&gt;
All Prolog tests are stored as facts in the file &amp;lt;tt&amp;gt;test cases.pl&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Every test has&lt;br /&gt;
* an identifier (a number); the last test added has the highest number&lt;br /&gt;
* a non-empty list of categories (such as unit, tickets,...)&lt;br /&gt;
* the test itself: the parameters to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; needed to run the test&lt;br /&gt;
* a textual description of the test&lt;br /&gt;
&lt;br /&gt;
There is a specific &amp;lt;tt&amp;gt;test_runner.pl&amp;lt;/tt&amp;gt; file for running all Prolog unit and integration tests. The test_runner also provides a REPL (read-eval-print-loop) for running tests and collection of tests.&lt;br /&gt;
To start the Unit Test REPL, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (at least on Mac OS):&lt;br /&gt;
&lt;br /&gt;
 alias tests=&#039;cd $PROBDIR; rlwrap sicstus -Dprob_safe_mode=true -l $PROB_SOURCE_DIR/test_runner.pl --goal &amp;quot;test_repl.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
(It is recommended to install rlwrap so that you get a history of your commands. If you don&#039;t want to install rlwrap just remove it from the line above.)&lt;br /&gt;
&lt;br /&gt;
Now you can start the test runner like this:&lt;br /&gt;
 tests&lt;br /&gt;
or you can already specify tests to be run:&lt;br /&gt;
 tests last&lt;br /&gt;
You can also type the number of a unit test to run, or a test category such as &amp;lt;tt&amp;gt;tickets&amp;lt;/tt&amp;gt; to run all tests in that category.&lt;br /&gt;
&lt;br /&gt;
Here is a sample sesssion of running the test REPL:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tests&lt;br /&gt;
...&lt;br /&gt;
SICStus 4.2.3 (x86_64-darwin-11.4.2): Fri Oct  5 15:58:35 CEST 2012&lt;br /&gt;
Licensed to SP4phil-fak.uni-duesseldorf.de&lt;br /&gt;
TEST ==&amp;gt; last.&lt;br /&gt;
...&lt;br /&gt;
All tests successful.&lt;br /&gt;
Walltime: 100 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some useful commands in the REPL are:&lt;br /&gt;
* last to run the last test added to &amp;lt;tt&amp;gt;testcases.pl&amp;lt;/tt&amp;gt;&lt;br /&gt;
* all to run all tests&lt;br /&gt;
* cat to list all categories of tests (e.g., cbc, cbc_deadlock,...)&lt;br /&gt;
* cbc, cbc_deadlock, tickets, ... :  to run all tests in that category&lt;br /&gt;
* type in a number to run the specific test with that number (see &amp;lt;tt&amp;gt;testcases.pl&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* type in a range m-n to run all tests in that range&lt;br /&gt;
* v or vv to switch to verbose or very verbose mode&lt;br /&gt;
* q to quit the test runner (and stay in Prolog)&lt;br /&gt;
* x to quit the test runner and Prolog&lt;br /&gt;
* debug to switch on Prolog debug mode&lt;br /&gt;
* trace to force Prolog to start tracing as soon as an error occurs (if you have switched to debug above then you will be able to inspect the Prolog goal stack)&lt;br /&gt;
&lt;br /&gt;
== ProB Prolog compile time flags ==&lt;br /&gt;
By giving sicstus a command-line option &amp;lt;tt&amp;gt;-Dflag=true&amp;lt;/tt&amp;gt; you can set certain compile time flags, namely:&lt;br /&gt;
 prob_profile (enables B operation profiling to be displayed in ProB Tcl/Tk in Debug menu)&lt;br /&gt;
 prob_safe_mode (performs additional checking, in particular that ASTs are well-formed)&lt;br /&gt;
 prob_release (removes certain tests from the code)&lt;br /&gt;
 no_terminal_colors (disable terminal colors)&lt;br /&gt;
 prob_src_profile (perform profiling at B source level in source_profiler.pl)&lt;br /&gt;
 debug_kodkod (write dot files for kodkod interval analysis)&lt;br /&gt;
 prob_logging_mode (automatically log probcli (add -ll command-line switch))&lt;br /&gt;
 no_wd_checking (disable WD checking for function application)&lt;br /&gt;
 no_interrupts (do not treat CTRL-C user_interrupts)&lt;br /&gt;
 disable_chr (completely disable CHR)&lt;br /&gt;
 prob_data_validation_mode  (deprecated, replaced by DATA_VALIDATION preference)&lt;br /&gt;
 prob_core_only probcli now only contains core modules, many extensions are not included&lt;br /&gt;
 prob_myheap do not use C++ priority queue but Prolog version instead&lt;br /&gt;
 prob_c_counter_false do not use C++ counter extension but Prolog version instead&lt;br /&gt;
&lt;br /&gt;
The full list of flags is now documented in the Prolog file &amp;lt;tt&amp;gt;compile_time_flags.pl&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When you call probcli with the &amp;lt;tt&amp;gt;-version&amp;lt;/tt&amp;gt; command you will get information about the compile-time flags that have been used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -version&lt;br /&gt;
ProB Command Line Interface&lt;br /&gt;
  VERSION 1.10.1-nightly (88d012a1d06fdbfdaa5c550492197b0c622a1479)&lt;br /&gt;
  Sat Jan 9 09:41:02 2021 +0100&lt;br /&gt;
  Prolog: SICStus 4.6.0 (x86_64-darwin-17.7.0): Mon Apr  6 18:23:42 CEST 2020&lt;br /&gt;
  COMPILE TIME FLAGS: [prob_release,SP_TIMEOUT_IMPLEMENTATON=legacy]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running ProB with SWI-Prolog ==&lt;br /&gt;
&lt;br /&gt;
ProB can also run on recent versions of SWI-Prolog. We recommend using the latest development release of SWI-Prolog (currently 8.5.x). The stable release 8.4.2 also works relatively well. Downloads can be found on [https://www.swi-prolog.org/download/devel the SWI-Prolog website]. You can also compile [https://github.com/SWI-Prolog/swipl-devel the latest SWI-Prolog source code] manually.&lt;br /&gt;
&lt;br /&gt;
Please note that SWI-Prolog support in ProB is still in development and &#039;&#039;&#039;there are known bugs&#039;&#039;&#039;. In addition, many advanced ProB features are not yet available on SWI-Prolog and performance is sometimes much slower than on SICStus Prolog.&lt;br /&gt;
&lt;br /&gt;
All instructions below assume that you have installed SWI-Prolog and can run it on the command line as &amp;lt;code&amp;gt;swipl&amp;lt;/code&amp;gt;. If you have SWI-Prolog installed under a different name/location, you need to adjust the commands appropriately.&lt;br /&gt;
&lt;br /&gt;
=== Obtain Source Code and Parser JAR ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code for the development version of ProB: https://www3.hhu.de/stups/downloads/prob/source/ProB_src.tgz&lt;br /&gt;
* Ensure the Java parser is available, either by copying it from a pre-compiled release of ProB or by running &amp;lt;tt&amp;gt;./gradlew updateParser&amp;lt;/tt&amp;gt;. More details are available [[#Building ProB Extensions|above]]. Note you do not need the other extensions of ProB.&lt;br /&gt;
&lt;br /&gt;
=== Starting ProB with SWI-Prolog ===&lt;br /&gt;
&lt;br /&gt;
For convenience declare this alias, where $PROBDIR points to the top-level directory of the ProB source (see above):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias swiprob=&#039;PROLOG_SYSTEM=swi &amp;quot;$PROBDIR/probcli_src.sh&amp;quot;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now start a REPL for evaluating B expressions and predicates (without a machine context) as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ swiprob -repl&lt;br /&gt;
...&lt;br /&gt;
ProB Interactive Expression and Predicate Evaluator &lt;br /&gt;
Type &amp;quot;:help&amp;quot; for more information.&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that currently you may still see warnings and various messages appear on the console.&lt;br /&gt;
&lt;br /&gt;
You can now experiment and type in expressions and predicate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; 2+2&lt;br /&gt;
Expression Value = &lt;br /&gt;
4&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; {x,y|x:1..30000 &amp;amp; y:1..3000 &amp;amp; x&amp;lt;y &amp;amp; x * 220 &amp;lt;y}&lt;br /&gt;
Expression Value = &lt;br /&gt;
#18980:{(1|-&amp;gt;221),(1|-&amp;gt;222),...,(13|-&amp;gt;2999),(13|-&amp;gt;3000)}&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x*x=100&lt;br /&gt;
Existentially Quantified Predicate over x is TRUE&lt;br /&gt;
Solution:&lt;br /&gt;
       x = -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also provide all of the command-line arguments accepted by probcli, e.g., provide a machine that should be loaded&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
swiprob -repl -init ../prob_examples/public_examples/B/Demo/ACounter.mch &lt;br /&gt;
...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :state&lt;br /&gt;
Current state id 0 : &lt;br /&gt;
     ( ii=2 &amp;amp;&lt;br /&gt;
       jj=10 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Running ProB Tests with SWI-Prolog ===&lt;br /&gt;
&lt;br /&gt;
For convenience declare this alias, where $PROBDIR points to the top-level directory of the ProB source (see above):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias switests=&#039;PROLOG_SYSTEM=swi &amp;quot;$PROBDIR/prolog.sh&amp;quot; --file &amp;quot;$PROBDIR/src/test_runner.pl&amp;quot; --goal &amp;quot;test_repl.&amp;quot; -- &#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now start the testrunner REPL as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$switests&lt;br /&gt;
...&lt;br /&gt;
ProB 1.11.0-nightly&lt;br /&gt;
 Revision: no revision found&lt;br /&gt;
 Date: no lastchanged found&lt;br /&gt;
TEST ==&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now for example run individual tests:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TEST ==&amp;gt; 11.&lt;br /&gt;
Current directory: /Users/leuschel/git_root/prob_prolog/&lt;br /&gt;
Running test 11 &lt;br /&gt;
      &lt;br /&gt;
executing: probcli ../prob_examples/public_examples/B/Benchmarks/DSP0.mch -t -mc 100 -noinv -strict -nodead -expcterr model_check_incomplete -strict -p STRICT_RAISE_WARNINGS TRUE&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
All expected errors occurred.&lt;br /&gt;
Test 11 completed successfully (in 186 ms)&lt;br /&gt;
&lt;br /&gt;
Test successful.&lt;br /&gt;
Walltime: 188 ms&lt;br /&gt;
 0.000 MB ( 0.000 MB program) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The test runner will automatically skip tests that are known to be incompatible with SWI-Prolog, usually because a necessary component of ProB is currently disabled/unavailable on SWI-Prolog. To run a skipped test anyway, enter its number directly into the test REPL - this bypasses any skip declarations/conditions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Manual]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Running_ProB_from_source&amp;diff=6134</id>
		<title>Running ProB from source</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Running_ProB_from_source&amp;diff=6134"/>
		<updated>2026-03-26T08:37:35Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Building ProB Extensions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ProB Source Code ==&lt;br /&gt;
{{ProBSourceCode}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ProB from Prolog ==&lt;br /&gt;
&lt;br /&gt;
You first need to download and install [https://sicstus.sics.se/ SICStus Prolog]. Evaluation licenses (30-days) are available. We currently compile with SICStus 4.6.0 (as of January 2021), but the source code is compatible with older versions as well (SICStus 4.3.2 or later).&lt;br /&gt;
&lt;br /&gt;
You need the password to download SICStus then run &amp;lt;tt&amp;gt;sudo ./InstallSICStus&amp;lt;/tt&amp;gt; and provide the site name, license code and expiration date. Be sure to add the SICStus binaries to your PATH.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you need to clone or download the [http://www3.hhu.de/stups/downloads/prob/source/ ProB Prolog sources].&lt;br /&gt;
&lt;br /&gt;
=== Building ProB Extensions ===&lt;br /&gt;
Before using ProB for the first time from source you should build the extensions. The minimal extensions are counter, myheap and user_signal. You can build them using&lt;br /&gt;
 cd extensions/counter&lt;br /&gt;
 make&lt;br /&gt;
 cd ../user_signal&lt;br /&gt;
 make&lt;br /&gt;
 cd ../myheap&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Note, you can also pass the following additional flags to sicstus in the commands below, so that these extensions are not required (resulting in some performance loss):&lt;br /&gt;
  sicstus -Dprob_myheap=false -Dprob_c_counter=false -Dno_interrupts=true ...&lt;br /&gt;
&lt;br /&gt;
You will also need the ProB parser, which can be downloaded or updated using the command&lt;br /&gt;
 ./gradlew updateParser&lt;br /&gt;
&lt;br /&gt;
You could also build all extensions at once by going to the top of the prob_prolog tree (i.e., the directory containing src and lib as sub-directories) and then type&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
An alternative is to download ProB from the [[Download|download page]], unzip the archive and copy all the files in the lib folder of the archive to the lib folder of your Prolog source code, containing files such as (the file extension of some of these files varies with the operating system: bundle for macOS, dll for Windows and so for Linux):&lt;br /&gt;
* probcliparser.jar&lt;br /&gt;
* counter.bundle&lt;br /&gt;
* user_signal.bundle&lt;br /&gt;
* myheap.bundle&lt;br /&gt;
* ltlc.bundle&lt;br /&gt;
&lt;br /&gt;
=== Starting ProB Tcl/Tk ===&lt;br /&gt;
&lt;br /&gt;
Probably you should first install a recent Active Tcl distribution, in particular on macOS. Check the [[Download|download page]] for which version is required or recommended. There is also a specific subsection about [[Download#Tcl/Tk_Requirements_for_ProB_Tcl/Tk|installing Tcl/Tk]] and setting the SP_TCL_DSO environment variable to help SICStus Prolog find the Tcl/Tk installation.&lt;br /&gt;
&lt;br /&gt;
You can then start ProB Tcl/Tk by changing into the prob_prolog directory of the Prolog sources and type:&lt;br /&gt;
 sicstus -Dprob_profile=true -l src/prob_tcltk.pl --goal &amp;quot;go.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
To simplify starting ProB, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (or similar configuration file; supposing you cloned the Git repository into ~/git_root):&lt;br /&gt;
 &lt;br /&gt;
 export PROBDIR=~/git_root/prob_prolog&lt;br /&gt;
 export PROB_SOURCE_DIR=$PROBDIR/src&lt;br /&gt;
 alias prob=&#039;cd sicstus -Dprob_profile=true -l $PROB_SOURCE_DIR/prob_tcltk.pl --goal &amp;quot;go.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Now, you can simply start ProB from the command-line and from source with the &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; alias command.&lt;br /&gt;
&lt;br /&gt;
=== Starting probcli command-line version ===&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB does not require a Tcl/Tk distribution.&lt;br /&gt;
&lt;br /&gt;
To start probcli from source define this alias, where &amp;lt;tt&amp;gt; PROB_SOURCE_DIR &amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SICSTUSDIR&amp;lt;/tt&amp;gt; must be defined:&lt;br /&gt;
 alias probsli=&#039;rlwrap $SICSTUSDIR/bin/sicstus -l $PROB_SOURCE_DIR/prob_cli.pl --goal &amp;quot;go_cli.&amp;quot; -a&#039;&lt;br /&gt;
&lt;br /&gt;
(It is recommended to install rlwrap so that you get a history of your commands. If you don&#039;t want to install rlwrap just remove it from the line above.)&lt;br /&gt;
&lt;br /&gt;
You can now use probsli just like probcli, e.g.,&lt;br /&gt;
 probsli M.mch --model-check&lt;br /&gt;
or &lt;br /&gt;
 probsli --repl&lt;br /&gt;
&lt;br /&gt;
=== Running the Prolog Tests ===&lt;br /&gt;
&lt;br /&gt;
All Prolog tests are stored as facts in the file &amp;lt;tt&amp;gt;test cases.pl&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Every test has&lt;br /&gt;
* an identifier (a number); the last test added has the highest number&lt;br /&gt;
* a non-empty list of categories (such as unit, tickets,...)&lt;br /&gt;
* the test itself: the parameters to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; needed to run the test&lt;br /&gt;
* a textual description of the test&lt;br /&gt;
&lt;br /&gt;
There is a specific &amp;lt;tt&amp;gt;test_runner.pl&amp;lt;/tt&amp;gt; file for running all Prolog unit and integration tests. The test_runner also provides a REPL (read-eval-print-loop) for running tests and collection of tests.&lt;br /&gt;
To start the Unit Test REPL, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (at least on Mac OS):&lt;br /&gt;
&lt;br /&gt;
 alias tests=&#039;cd $PROBDIR; rlwrap sicstus -Dprob_safe_mode=true -l $PROB_SOURCE_DIR/test_runner.pl --goal &amp;quot;test_repl.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
(It is recommended to install rlwrap so that you get a history of your commands. If you don&#039;t want to install rlwrap just remove it from the line above.)&lt;br /&gt;
&lt;br /&gt;
Now you can start the test runner like this:&lt;br /&gt;
 tests&lt;br /&gt;
or you can already specify tests to be run:&lt;br /&gt;
 tests last&lt;br /&gt;
You can also type the number of a unit test to run, or a test category such as &amp;lt;tt&amp;gt;tickets&amp;lt;/tt&amp;gt; to run all tests in that category.&lt;br /&gt;
&lt;br /&gt;
Here is a sample sesssion of running the test REPL:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tests&lt;br /&gt;
...&lt;br /&gt;
SICStus 4.2.3 (x86_64-darwin-11.4.2): Fri Oct  5 15:58:35 CEST 2012&lt;br /&gt;
Licensed to SP4phil-fak.uni-duesseldorf.de&lt;br /&gt;
TEST ==&amp;gt; last.&lt;br /&gt;
...&lt;br /&gt;
All tests successful.&lt;br /&gt;
Walltime: 100 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some useful commands in the REPL are:&lt;br /&gt;
* last to run the last test added to &amp;lt;tt&amp;gt;testcases.pl&amp;lt;/tt&amp;gt;&lt;br /&gt;
* all to run all tests&lt;br /&gt;
* cat to list all categories of tests (e.g., cbc, cbc_deadlock,...)&lt;br /&gt;
* cbc, cbc_deadlock, tickets, ... :  to run all tests in that category&lt;br /&gt;
* type in a number to run the specific test with that number (see &amp;lt;tt&amp;gt;testcases.pl&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* type in a range m-n to run all tests in that range&lt;br /&gt;
* v or vv to switch to verbose or very verbose mode&lt;br /&gt;
* q to quit the test runner (and stay in Prolog)&lt;br /&gt;
* x to quit the test runner and Prolog&lt;br /&gt;
* debug to switch on Prolog debug mode&lt;br /&gt;
* trace to force Prolog to start tracing as soon as an error occurs (if you have switched to debug above then you will be able to inspect the Prolog goal stack)&lt;br /&gt;
&lt;br /&gt;
== ProB Prolog compile time flags ==&lt;br /&gt;
By giving sicstus a command-line option &amp;lt;tt&amp;gt;-Dflag=true&amp;lt;/tt&amp;gt; you can set certain compile time flags, namely:&lt;br /&gt;
 prob_profile (enables B operation profiling to be displayed in ProB Tcl/Tk in Debug menu)&lt;br /&gt;
 prob_safe_mode (performs additional checking, in particular that ASTs are well-formed)&lt;br /&gt;
 prob_release (removes certain tests from the code)&lt;br /&gt;
 no_terminal_colors (disable terminal colors)&lt;br /&gt;
 prob_src_profile (perform profiling at B source level in source_profiler.pl)&lt;br /&gt;
 debug_kodkod (write dot files for kodkod interval analysis)&lt;br /&gt;
 prob_logging_mode (automatically log probcli (add -ll command-line switch))&lt;br /&gt;
 no_wd_checking (disable WD checking for function application)&lt;br /&gt;
 no_interrupts (do not treat CTRL-C user_interrupts)&lt;br /&gt;
 disable_chr (completely disable CHR)&lt;br /&gt;
 prob_data_validation_mode  (deprecated, replaced by DATA_VALIDATION preference)&lt;br /&gt;
 prob_core_only probcli now only contains core modules, many extensions are not included&lt;br /&gt;
 prob_myheap do not use C++ priority queue but Prolog version instead&lt;br /&gt;
 prob_c_counter_false do not use C++ counter extension but Prolog version instead&lt;br /&gt;
&lt;br /&gt;
The full list of flags is now documented in the Prolog file &amp;lt;tt&amp;gt;compile_time_flags.pl&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When you call probcli with the &amp;lt;tt&amp;gt;-version&amp;lt;/tt&amp;gt; command you will get information about the compile-time flags that have been used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -version&lt;br /&gt;
ProB Command Line Interface&lt;br /&gt;
  VERSION 1.10.1-nightly (88d012a1d06fdbfdaa5c550492197b0c622a1479)&lt;br /&gt;
  Sat Jan 9 09:41:02 2021 +0100&lt;br /&gt;
  Prolog: SICStus 4.6.0 (x86_64-darwin-17.7.0): Mon Apr  6 18:23:42 CEST 2020&lt;br /&gt;
  COMPILE TIME FLAGS: [prob_release,SP_TIMEOUT_IMPLEMENTATON=legacy]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running ProB with SWI-Prolog ==&lt;br /&gt;
&lt;br /&gt;
ProB can also run on recent versions of SWI-Prolog. We recommend using the latest development release of SWI-Prolog (currently 8.5.x). The stable release 8.4.2 also works relatively well. Downloads can be found on [https://www.swi-prolog.org/download/devel the SWI-Prolog website]. You can also compile [https://github.com/SWI-Prolog/swipl-devel the latest SWI-Prolog source code] manually.&lt;br /&gt;
&lt;br /&gt;
Please note that SWI-Prolog support in ProB is still in development and &#039;&#039;&#039;there are known bugs&#039;&#039;&#039;. In addition, many advanced ProB features are not yet available on SWI-Prolog and performance is sometimes much slower than on SICStus Prolog.&lt;br /&gt;
&lt;br /&gt;
All instructions below assume that you have installed SWI-Prolog and can run it on the command line as &amp;lt;code&amp;gt;swipl&amp;lt;/code&amp;gt;. If you have SWI-Prolog installed under a different name/location, you need to adjust the commands appropriately.&lt;br /&gt;
&lt;br /&gt;
=== Obtain Source Code and Parser JAR ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code for the development version of ProB: https://www3.hhu.de/stups/downloads/prob/source/ProB_src.tgz&lt;br /&gt;
* Ensure the Java parser is available, either by copying it from a pre-compiled release of ProB or by running &amp;lt;tt&amp;gt;./gradlew updateParser&amp;lt;/tt&amp;gt;. More details are available [[#Building ProB Extensions|above]]. Note you do not need the other extensions of ProB.&lt;br /&gt;
&lt;br /&gt;
=== Starting ProB with SWI-Prolog ===&lt;br /&gt;
&lt;br /&gt;
For convenience declare this alias, where $PROBDIR points to the top-level directory of the ProB source (see above):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias swiprob=&#039;PROLOG_SYSTEM=swi &amp;quot;$PROBDIR/probcli_src.sh&amp;quot;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now start a REPL for evaluating B expressions and predicates (without a machine context) as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ swiprob -repl&lt;br /&gt;
...&lt;br /&gt;
ProB Interactive Expression and Predicate Evaluator &lt;br /&gt;
Type &amp;quot;:help&amp;quot; for more information.&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that currently you may still see warnings and various messages appear on the console.&lt;br /&gt;
&lt;br /&gt;
You can now experiment and type in expressions and predicate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; 2+2&lt;br /&gt;
Expression Value = &lt;br /&gt;
4&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; {x,y|x:1..30000 &amp;amp; y:1..3000 &amp;amp; x&amp;lt;y &amp;amp; x * 220 &amp;lt;y}&lt;br /&gt;
Expression Value = &lt;br /&gt;
#18980:{(1|-&amp;gt;221),(1|-&amp;gt;222),...,(13|-&amp;gt;2999),(13|-&amp;gt;3000)}&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x*x=100&lt;br /&gt;
Existentially Quantified Predicate over x is TRUE&lt;br /&gt;
Solution:&lt;br /&gt;
       x = -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also provide all of the command-line arguments accepted by probcli, e.g., provide a machine that should be loaded&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
swiprob -repl -init ../prob_examples/public_examples/B/Demo/ACounter.mch &lt;br /&gt;
...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :state&lt;br /&gt;
Current state id 0 : &lt;br /&gt;
     ( ii=2 &amp;amp;&lt;br /&gt;
       jj=10 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Running ProB Tests with SWI-Prolog ===&lt;br /&gt;
&lt;br /&gt;
For convenience declare this alias, where $PROBDIR points to the top-level directory of the ProB source (see above):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias switests=&#039;PROLOG_SYSTEM=swi &amp;quot;$PROBDIR/prolog.sh&amp;quot; --file &amp;quot;$PROBDIR/src/test_runner.pl&amp;quot; --goal &amp;quot;test_repl.&amp;quot; -- &#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now start the testrunner REPL as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$switests&lt;br /&gt;
...&lt;br /&gt;
ProB 1.11.0-nightly&lt;br /&gt;
 Revision: no revision found&lt;br /&gt;
 Date: no lastchanged found&lt;br /&gt;
TEST ==&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now for example run individual tests:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TEST ==&amp;gt; 11.&lt;br /&gt;
Current directory: /Users/leuschel/git_root/prob_prolog/&lt;br /&gt;
Running test 11 &lt;br /&gt;
      &lt;br /&gt;
executing: probcli ../prob_examples/public_examples/B/Benchmarks/DSP0.mch -t -mc 100 -noinv -strict -nodead -expcterr model_check_incomplete -strict -p STRICT_RAISE_WARNINGS TRUE&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
All expected errors occurred.&lt;br /&gt;
Test 11 completed successfully (in 186 ms)&lt;br /&gt;
&lt;br /&gt;
Test successful.&lt;br /&gt;
Walltime: 188 ms&lt;br /&gt;
 0.000 MB ( 0.000 MB program) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The test runner will automatically skip tests that are known to be incompatible with SWI-Prolog, usually because a necessary component of ProB is currently disabled/unavailable on SWI-Prolog. To run a skipped test anyway, enter its number directly into the test REPL - this bypasses any skip declarations/conditions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Manual]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Running_ProB_from_source&amp;diff=6133</id>
		<title>Running ProB from source</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Running_ProB_from_source&amp;diff=6133"/>
		<updated>2026-03-26T08:36:47Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Building ProB Extensions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ProB Source Code ==&lt;br /&gt;
{{ProBSourceCode}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ProB from Prolog ==&lt;br /&gt;
&lt;br /&gt;
You first need to download and install [https://sicstus.sics.se/ SICStus Prolog]. Evaluation licenses (30-days) are available. We currently compile with SICStus 4.6.0 (as of January 2021), but the source code is compatible with older versions as well (SICStus 4.3.2 or later).&lt;br /&gt;
&lt;br /&gt;
You need the password to download SICStus then run &amp;lt;tt&amp;gt;sudo ./InstallSICStus&amp;lt;/tt&amp;gt; and provide the site name, license code and expiration date. Be sure to add the SICStus binaries to your PATH.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, you need to clone or download the [http://www3.hhu.de/stups/downloads/prob/source/ ProB Prolog sources].&lt;br /&gt;
&lt;br /&gt;
=== Building ProB Extensions ===&lt;br /&gt;
Before using ProB for the first time from source you should build the extensions. The minimal extensions are counter, myheap and user_signal. You can build them using&lt;br /&gt;
 cd extensions/counter&lt;br /&gt;
 make&lt;br /&gt;
 cd ../user_signal&lt;br /&gt;
 make&lt;br /&gt;
 cd ../myheap&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Note, you can also pass the following flags to sicstus, so that these extensions are not required (resulting in some performance loss):&lt;br /&gt;
  -Dprob_myheap=false -Dprob_c_counter=false -Dno_interrupts=true&lt;br /&gt;
&lt;br /&gt;
You will also need the ProB parser, which can be downloaded or updated using the command&lt;br /&gt;
 ./gradlew updateParser&lt;br /&gt;
&lt;br /&gt;
You could also build all extensions at once by going to the top of the prob_prolog tree (i.e., the directory containing src and lib as sub-directories) and then type&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
An alternative is to download ProB from the [[Download|download page]], unzip the archive and copy all the files in the lib folder of the archive to the lib folder of your Prolog source code, containing files such as (the file extension of some of these files varies with the operating system: bundle for macOS, dll for Windows and so for Linux):&lt;br /&gt;
* probcliparser.jar&lt;br /&gt;
* counter.bundle&lt;br /&gt;
* user_signal.bundle&lt;br /&gt;
* myheap.bundle&lt;br /&gt;
* ltlc.bundle&lt;br /&gt;
&lt;br /&gt;
=== Starting ProB Tcl/Tk ===&lt;br /&gt;
&lt;br /&gt;
Probably you should first install a recent Active Tcl distribution, in particular on macOS. Check the [[Download|download page]] for which version is required or recommended. There is also a specific subsection about [[Download#Tcl/Tk_Requirements_for_ProB_Tcl/Tk|installing Tcl/Tk]] and setting the SP_TCL_DSO environment variable to help SICStus Prolog find the Tcl/Tk installation.&lt;br /&gt;
&lt;br /&gt;
You can then start ProB Tcl/Tk by changing into the prob_prolog directory of the Prolog sources and type:&lt;br /&gt;
 sicstus -Dprob_profile=true -l src/prob_tcltk.pl --goal &amp;quot;go.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
To simplify starting ProB, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (or similar configuration file; supposing you cloned the Git repository into ~/git_root):&lt;br /&gt;
 &lt;br /&gt;
 export PROBDIR=~/git_root/prob_prolog&lt;br /&gt;
 export PROB_SOURCE_DIR=$PROBDIR/src&lt;br /&gt;
 alias prob=&#039;cd sicstus -Dprob_profile=true -l $PROB_SOURCE_DIR/prob_tcltk.pl --goal &amp;quot;go.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Now, you can simply start ProB from the command-line and from source with the &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; alias command.&lt;br /&gt;
&lt;br /&gt;
=== Starting probcli command-line version ===&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB does not require a Tcl/Tk distribution.&lt;br /&gt;
&lt;br /&gt;
To start probcli from source define this alias, where &amp;lt;tt&amp;gt; PROB_SOURCE_DIR &amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;SICSTUSDIR&amp;lt;/tt&amp;gt; must be defined:&lt;br /&gt;
 alias probsli=&#039;rlwrap $SICSTUSDIR/bin/sicstus -l $PROB_SOURCE_DIR/prob_cli.pl --goal &amp;quot;go_cli.&amp;quot; -a&#039;&lt;br /&gt;
&lt;br /&gt;
(It is recommended to install rlwrap so that you get a history of your commands. If you don&#039;t want to install rlwrap just remove it from the line above.)&lt;br /&gt;
&lt;br /&gt;
You can now use probsli just like probcli, e.g.,&lt;br /&gt;
 probsli M.mch --model-check&lt;br /&gt;
or &lt;br /&gt;
 probsli --repl&lt;br /&gt;
&lt;br /&gt;
=== Running the Prolog Tests ===&lt;br /&gt;
&lt;br /&gt;
All Prolog tests are stored as facts in the file &amp;lt;tt&amp;gt;test cases.pl&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Every test has&lt;br /&gt;
* an identifier (a number); the last test added has the highest number&lt;br /&gt;
* a non-empty list of categories (such as unit, tickets,...)&lt;br /&gt;
* the test itself: the parameters to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; needed to run the test&lt;br /&gt;
* a textual description of the test&lt;br /&gt;
&lt;br /&gt;
There is a specific &amp;lt;tt&amp;gt;test_runner.pl&amp;lt;/tt&amp;gt; file for running all Prolog unit and integration tests. The test_runner also provides a REPL (read-eval-print-loop) for running tests and collection of tests.&lt;br /&gt;
To start the Unit Test REPL, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (at least on Mac OS):&lt;br /&gt;
&lt;br /&gt;
 alias tests=&#039;cd $PROBDIR; rlwrap sicstus -Dprob_safe_mode=true -l $PROB_SOURCE_DIR/test_runner.pl --goal &amp;quot;test_repl.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
(It is recommended to install rlwrap so that you get a history of your commands. If you don&#039;t want to install rlwrap just remove it from the line above.)&lt;br /&gt;
&lt;br /&gt;
Now you can start the test runner like this:&lt;br /&gt;
 tests&lt;br /&gt;
or you can already specify tests to be run:&lt;br /&gt;
 tests last&lt;br /&gt;
You can also type the number of a unit test to run, or a test category such as &amp;lt;tt&amp;gt;tickets&amp;lt;/tt&amp;gt; to run all tests in that category.&lt;br /&gt;
&lt;br /&gt;
Here is a sample sesssion of running the test REPL:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tests&lt;br /&gt;
...&lt;br /&gt;
SICStus 4.2.3 (x86_64-darwin-11.4.2): Fri Oct  5 15:58:35 CEST 2012&lt;br /&gt;
Licensed to SP4phil-fak.uni-duesseldorf.de&lt;br /&gt;
TEST ==&amp;gt; last.&lt;br /&gt;
...&lt;br /&gt;
All tests successful.&lt;br /&gt;
Walltime: 100 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some useful commands in the REPL are:&lt;br /&gt;
* last to run the last test added to &amp;lt;tt&amp;gt;testcases.pl&amp;lt;/tt&amp;gt;&lt;br /&gt;
* all to run all tests&lt;br /&gt;
* cat to list all categories of tests (e.g., cbc, cbc_deadlock,...)&lt;br /&gt;
* cbc, cbc_deadlock, tickets, ... :  to run all tests in that category&lt;br /&gt;
* type in a number to run the specific test with that number (see &amp;lt;tt&amp;gt;testcases.pl&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* type in a range m-n to run all tests in that range&lt;br /&gt;
* v or vv to switch to verbose or very verbose mode&lt;br /&gt;
* q to quit the test runner (and stay in Prolog)&lt;br /&gt;
* x to quit the test runner and Prolog&lt;br /&gt;
* debug to switch on Prolog debug mode&lt;br /&gt;
* trace to force Prolog to start tracing as soon as an error occurs (if you have switched to debug above then you will be able to inspect the Prolog goal stack)&lt;br /&gt;
&lt;br /&gt;
== ProB Prolog compile time flags ==&lt;br /&gt;
By giving sicstus a command-line option &amp;lt;tt&amp;gt;-Dflag=true&amp;lt;/tt&amp;gt; you can set certain compile time flags, namely:&lt;br /&gt;
 prob_profile (enables B operation profiling to be displayed in ProB Tcl/Tk in Debug menu)&lt;br /&gt;
 prob_safe_mode (performs additional checking, in particular that ASTs are well-formed)&lt;br /&gt;
 prob_release (removes certain tests from the code)&lt;br /&gt;
 no_terminal_colors (disable terminal colors)&lt;br /&gt;
 prob_src_profile (perform profiling at B source level in source_profiler.pl)&lt;br /&gt;
 debug_kodkod (write dot files for kodkod interval analysis)&lt;br /&gt;
 prob_logging_mode (automatically log probcli (add -ll command-line switch))&lt;br /&gt;
 no_wd_checking (disable WD checking for function application)&lt;br /&gt;
 no_interrupts (do not treat CTRL-C user_interrupts)&lt;br /&gt;
 disable_chr (completely disable CHR)&lt;br /&gt;
 prob_data_validation_mode  (deprecated, replaced by DATA_VALIDATION preference)&lt;br /&gt;
 prob_core_only probcli now only contains core modules, many extensions are not included&lt;br /&gt;
 prob_myheap do not use C++ priority queue but Prolog version instead&lt;br /&gt;
 prob_c_counter_false do not use C++ counter extension but Prolog version instead&lt;br /&gt;
&lt;br /&gt;
The full list of flags is now documented in the Prolog file &amp;lt;tt&amp;gt;compile_time_flags.pl&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When you call probcli with the &amp;lt;tt&amp;gt;-version&amp;lt;/tt&amp;gt; command you will get information about the compile-time flags that have been used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli -version&lt;br /&gt;
ProB Command Line Interface&lt;br /&gt;
  VERSION 1.10.1-nightly (88d012a1d06fdbfdaa5c550492197b0c622a1479)&lt;br /&gt;
  Sat Jan 9 09:41:02 2021 +0100&lt;br /&gt;
  Prolog: SICStus 4.6.0 (x86_64-darwin-17.7.0): Mon Apr  6 18:23:42 CEST 2020&lt;br /&gt;
  COMPILE TIME FLAGS: [prob_release,SP_TIMEOUT_IMPLEMENTATON=legacy]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running ProB with SWI-Prolog ==&lt;br /&gt;
&lt;br /&gt;
ProB can also run on recent versions of SWI-Prolog. We recommend using the latest development release of SWI-Prolog (currently 8.5.x). The stable release 8.4.2 also works relatively well. Downloads can be found on [https://www.swi-prolog.org/download/devel the SWI-Prolog website]. You can also compile [https://github.com/SWI-Prolog/swipl-devel the latest SWI-Prolog source code] manually.&lt;br /&gt;
&lt;br /&gt;
Please note that SWI-Prolog support in ProB is still in development and &#039;&#039;&#039;there are known bugs&#039;&#039;&#039;. In addition, many advanced ProB features are not yet available on SWI-Prolog and performance is sometimes much slower than on SICStus Prolog.&lt;br /&gt;
&lt;br /&gt;
All instructions below assume that you have installed SWI-Prolog and can run it on the command line as &amp;lt;code&amp;gt;swipl&amp;lt;/code&amp;gt;. If you have SWI-Prolog installed under a different name/location, you need to adjust the commands appropriately.&lt;br /&gt;
&lt;br /&gt;
=== Obtain Source Code and Parser JAR ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code for the development version of ProB: https://www3.hhu.de/stups/downloads/prob/source/ProB_src.tgz&lt;br /&gt;
* Ensure the Java parser is available, either by copying it from a pre-compiled release of ProB or by running &amp;lt;tt&amp;gt;./gradlew updateParser&amp;lt;/tt&amp;gt;. More details are available [[#Building ProB Extensions|above]]. Note you do not need the other extensions of ProB.&lt;br /&gt;
&lt;br /&gt;
=== Starting ProB with SWI-Prolog ===&lt;br /&gt;
&lt;br /&gt;
For convenience declare this alias, where $PROBDIR points to the top-level directory of the ProB source (see above):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias swiprob=&#039;PROLOG_SYSTEM=swi &amp;quot;$PROBDIR/probcli_src.sh&amp;quot;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now start a REPL for evaluating B expressions and predicates (without a machine context) as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ swiprob -repl&lt;br /&gt;
...&lt;br /&gt;
ProB Interactive Expression and Predicate Evaluator &lt;br /&gt;
Type &amp;quot;:help&amp;quot; for more information.&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that currently you may still see warnings and various messages appear on the console.&lt;br /&gt;
&lt;br /&gt;
You can now experiment and type in expressions and predicate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; 2+2&lt;br /&gt;
Expression Value = &lt;br /&gt;
4&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; {x,y|x:1..30000 &amp;amp; y:1..3000 &amp;amp; x&amp;lt;y &amp;amp; x * 220 &amp;lt;y}&lt;br /&gt;
Expression Value = &lt;br /&gt;
#18980:{(1|-&amp;gt;221),(1|-&amp;gt;222),...,(13|-&amp;gt;2999),(13|-&amp;gt;3000)}&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x*x=100&lt;br /&gt;
Existentially Quantified Predicate over x is TRUE&lt;br /&gt;
Solution:&lt;br /&gt;
       x = -10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also provide all of the command-line arguments accepted by probcli, e.g., provide a machine that should be loaded&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
swiprob -repl -init ../prob_examples/public_examples/B/Demo/ACounter.mch &lt;br /&gt;
...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :state&lt;br /&gt;
Current state id 0 : &lt;br /&gt;
     ( ii=2 &amp;amp;&lt;br /&gt;
       jj=10 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Running ProB Tests with SWI-Prolog ===&lt;br /&gt;
&lt;br /&gt;
For convenience declare this alias, where $PROBDIR points to the top-level directory of the ProB source (see above):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias switests=&#039;PROLOG_SYSTEM=swi &amp;quot;$PROBDIR/prolog.sh&amp;quot; --file &amp;quot;$PROBDIR/src/test_runner.pl&amp;quot; --goal &amp;quot;test_repl.&amp;quot; -- &#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now start the testrunner REPL as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$switests&lt;br /&gt;
...&lt;br /&gt;
ProB 1.11.0-nightly&lt;br /&gt;
 Revision: no revision found&lt;br /&gt;
 Date: no lastchanged found&lt;br /&gt;
TEST ==&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now for example run individual tests:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TEST ==&amp;gt; 11.&lt;br /&gt;
Current directory: /Users/leuschel/git_root/prob_prolog/&lt;br /&gt;
Running test 11 &lt;br /&gt;
      &lt;br /&gt;
executing: probcli ../prob_examples/public_examples/B/Benchmarks/DSP0.mch -t -mc 100 -noinv -strict -nodead -expcterr model_check_incomplete -strict -p STRICT_RAISE_WARNINGS TRUE&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
All expected errors occurred.&lt;br /&gt;
Test 11 completed successfully (in 186 ms)&lt;br /&gt;
&lt;br /&gt;
Test successful.&lt;br /&gt;
Walltime: 188 ms&lt;br /&gt;
 0.000 MB ( 0.000 MB program) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The test runner will automatically skip tests that are known to be incompatible with SWI-Prolog, usually because a necessary component of ProB is currently disabled/unavailable on SWI-Prolog. To run a skipped test anyway, enter its number directly into the test REPL - this bypasses any skip declarations/conditions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Manual]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6132</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6132"/>
		<updated>2026-03-20T12:52:22Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Direct Activation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|600px]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.16 of ProB you can also use SimB&lt;br /&gt;
* within [[Using_the_Command-Line_Version_of_ProB|probcli]] using the commands &lt;br /&gt;
** &amp;lt;tt&amp;gt;-simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for running the simulation a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-rt_simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for real-time simulation for a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-mc-simulate SIMBFILE.json Reps Steps&amp;lt;/tt&amp;gt; for Monte-Carlo simulation with Reps repetitions, each simulation the given number of steps&lt;br /&gt;
You can also open a SimB simulation dialog in the Animation menu of ProB Tcl/Tk.&lt;br /&gt;
Additional options are:&lt;br /&gt;
* &amp;lt;tt&amp;gt;-simb_profile&amp;lt;/tt&amp;gt; to print out profiling information at the end of the simulation&lt;br /&gt;
* &amp;lt;tt&amp;gt;-simulate_until_ltl_ap LTLSTOP&amp;lt;/tt&amp;gt; meaning that the simulation will stop when the LTL atomic property LTLSTOP is true.&lt;br /&gt;
* &amp;lt;tt&amp;gt;-simulate_until_time TIME&amp;lt;/tt&amp;gt; meaning that the simulation will stop when simulation time reaches or exceeds TIME&lt;br /&gt;
&lt;br /&gt;
A SimB file describes a list of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
A SimB activation controls the simulation: it can trigger an event in the formal model after a specified delay and it can also trigger other activations. Probabilistic annotations and B formulas can be used to influence the chosen event and the triggered activations.&lt;br /&gt;
The SimB listeners enable interactive simulation: they can respond to user interaction by triggering SimB activations.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name. It can also be a list of events, in which case on of the events will be executed (see transitionSelection below)&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single activation) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; stores a boolean flag which states whether activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are only triggered when event in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; is triggered (or always)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that multiple activations with the same id can be queued at the same time. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued at the same time. Priority is given to activations triggered first. &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the minimal deadline.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the maximal deadline.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; describes additional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; is a map, mapping identifiers to values. The identifiers should be parameters of the executed event, or variables which are assigned non-deterministically by the event.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;is a map of maps. A variable (parameter, or non-deterministic assigned variable) is mapped to another map defining the probabilistic choices for its value. The second Map contains Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling activations. Lower number means greater priority. Activations with same priorities and same scheduled time are processed in the order they are defined in the JSON file. Default value (if not defined) is 0.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; is true by default, meaning that other activations will only be triggered if the &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; was successful.&lt;br /&gt;
* &amp;lt;tt&amp;gt;errorWhenNotExecuted&amp;lt;/tt&amp;gt; is false by default. When set to true an error will be reported if &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; was not successful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activatingOnlyWhenExecuted&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an activation to be triggered.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map of Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are described by SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6131</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6131"/>
		<updated>2026-03-20T09:15:50Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Using SimB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|600px]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.16 of ProB you can also use SimB&lt;br /&gt;
* within [[Using_the_Command-Line_Version_of_ProB|probcli]] using the commands &lt;br /&gt;
** &amp;lt;tt&amp;gt;-simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for running the simulation a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-rt_simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for real-time simulation for a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-mc-simulate SIMBFILE.json Reps Steps&amp;lt;/tt&amp;gt; for Monte-Carlo simulation with Reps repetitions, each simulation the given number of steps&lt;br /&gt;
You can also open a SimB simulation dialog in the Animation menu of ProB Tcl/Tk.&lt;br /&gt;
Additional options are:&lt;br /&gt;
* &amp;lt;tt&amp;gt;-simb_profile&amp;lt;/tt&amp;gt; to print out profiling information at the end of the simulation&lt;br /&gt;
* &amp;lt;tt&amp;gt;-simulate_until_ltl_ap LTLSTOP&amp;lt;/tt&amp;gt; meaning that the simulation will stop when the LTL atomic property LTLSTOP is true.&lt;br /&gt;
* &amp;lt;tt&amp;gt;-simulate_until_time TIME&amp;lt;/tt&amp;gt; meaning that the simulation will stop when simulation time reaches or exceeds TIME&lt;br /&gt;
&lt;br /&gt;
A SimB file describes a list of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
A SimB activation controls the simulation: it can trigger an event in the formal model after a specified delay and it can also trigger other activations. Probabilistic annotations and B formulas can be used to influence the chosen event and the triggered activations.&lt;br /&gt;
The SimB listeners enable interactive simulation: they can respond to user interaction by triggering SimB activations.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single activation) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; stores a boolean flag which states whether activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are only triggered when event in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; is triggered (or always)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that multiple activations with the same id can be queued at the same time. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued at the same time. Priority is given to activations triggered first. &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the minimal deadline.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the maximal deadline.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; describes additional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; is a map, mapping identifiers to values. The identifiers should be parameters of the executed event, or variables which are assigned non-deterministically by the event.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;is a map of maps. A variable (parameter, or non-deterministic assigned variable) is mapped to another map defining the probabilistic choices for its value. The second Map contains Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling activations. Lower number means greater priority. Activations with same priorities and same scheduled time are processed in the order they are defined in the JSON file. Default value (if not defined) is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activatingOnlyWhenExecuted&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an activation to be triggered.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map of Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are described by SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6130</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6130"/>
		<updated>2026-03-20T09:15:11Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Using SimB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|800px]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.16 of ProB you can also use SimB&lt;br /&gt;
* within [[Using_the_Command-Line_Version_of_ProB|probcli]] using the commands &lt;br /&gt;
** &amp;lt;tt&amp;gt;-simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for running the simulation a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-rt_simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for real-time simulation for a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-mc-simulate SIMBFILE.json Reps Steps&amp;lt;/tt&amp;gt; for Monte-Carlo simulation with Reps repetitions, each simulation the given number of steps&lt;br /&gt;
You can also open a SimB simulation dialog in the Animation menu of ProB Tcl/Tk.&lt;br /&gt;
Additional options are:&lt;br /&gt;
* -simb_profile to print out profiling information at the end of the simulation&lt;br /&gt;
* -simulate_until_ltl_ap LTLSTOP meaning that the simulation will stop when the LTL atomic property LTLSTOP is true.&lt;br /&gt;
* -simulate_until_time TIME meaning that the simulation will stop when simulation time reaches or exceeds TIME&lt;br /&gt;
&lt;br /&gt;
A SimB file describes a list of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
A SimB activation controls the simulation: it can trigger an event in the formal model after a specified delay and it can also trigger other activations. Probabilistic annotations and B formulas can be used to influence the chosen event and the triggered activations.&lt;br /&gt;
The SimB listeners enable interactive simulation: they can respond to user interaction by triggering SimB activations.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single activation) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; stores a boolean flag which states whether activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are only triggered when event in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; is triggered (or always)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that multiple activations with the same id can be queued at the same time. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued at the same time. Priority is given to activations triggered first. &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the minimal deadline.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the maximal deadline.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; describes additional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; is a map, mapping identifiers to values. The identifiers should be parameters of the executed event, or variables which are assigned non-deterministically by the event.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;is a map of maps. A variable (parameter, or non-deterministic assigned variable) is mapped to another map defining the probabilistic choices for its value. The second Map contains Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling activations. Lower number means greater priority. Activations with same priorities and same scheduled time are processed in the order they are defined in the JSON file. Default value (if not defined) is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activatingOnlyWhenExecuted&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an activation to be triggered.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map of Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are described by SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6129</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6129"/>
		<updated>2026-03-20T09:12:22Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Interactive Elements in SimB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|800px]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.16 of ProB you can also use SimB&lt;br /&gt;
* within [[Using_the_Command-Line_Version_of_ProB|probcli]] using the commands &lt;br /&gt;
** &amp;lt;tt&amp;gt;-simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for running the simulation a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-rt_simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for real-time simulation for a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-mc-simulate SIMBFILE.json Reps Steps&amp;lt;/tt&amp;gt; for Monte-Carlo simulation with Reps repetitions, each simulation the given number of steps&lt;br /&gt;
You can also open a SimB simulation dialog in the Animation menu of ProB Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
A SimB file describes a list of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
A SimB activation controls the simulation: it can trigger an event in the formal model after a specified delay and it can also trigger other activations. Probabilistic annotations and B formulas can be used to influence the chosen event and the triggered activations.&lt;br /&gt;
The SimB listeners enable interactive simulation: they can respond to user interaction by triggering SimB activations.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single activation) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; stores a boolean flag which states whether activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are only triggered when event in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; is triggered (or always)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that multiple activations with the same id can be queued at the same time. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued at the same time. Priority is given to activations triggered first. &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the minimal deadline.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the maximal deadline.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; describes additional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; is a map, mapping identifiers to values. The identifiers should be parameters of the executed event, or variables which are assigned non-deterministically by the event.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;is a map of maps. A variable (parameter, or non-deterministic assigned variable) is mapped to another map defining the probabilistic choices for its value. The second Map contains Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling activations. Lower number means greater priority. Activations with same priorities and same scheduled time are processed in the order they are defined in the JSON file. Default value (if not defined) is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activatingOnlyWhenExecuted&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an activation to be triggered.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map of Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are described by SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6128</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6128"/>
		<updated>2026-03-20T09:09:24Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Direct Activation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|800px]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.16 of ProB you can also use SimB&lt;br /&gt;
* within [[Using_the_Command-Line_Version_of_ProB|probcli]] using the commands &lt;br /&gt;
** &amp;lt;tt&amp;gt;-simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for running the simulation a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-rt_simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for real-time simulation for a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-mc-simulate SIMBFILE.json Reps Steps&amp;lt;/tt&amp;gt; for Monte-Carlo simulation with Reps repetitions, each simulation the given number of steps&lt;br /&gt;
You can also open a SimB simulation dialog in the Animation menu of ProB Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
A SimB file describes a list of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
A SimB activation controls the simulation: it can trigger an event in the formal model after a specified delay and it can also trigger other activations. Probabilistic annotations and B formulas can be used to influence the chosen event and the triggered activations.&lt;br /&gt;
The SimB listeners enable interactive simulation: they can respond to user interaction by triggering SimB activations.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single activation) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; stores a boolean flag which states whether activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are only triggered when event in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; is triggered (or always)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that multiple activations with the same id can be queued at the same time. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued at the same time. Priority is given to activations triggered first. &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the minimal deadline.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that at most one activation with this id can be queued, retaining the activation with the maximal deadline.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; describes additional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; is a map, mapping identifiers to values. The identifiers should be parameters of the executed event, or variables which are assigned non-deterministically by the event.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;is a map of maps. A variable (parameter, or non-deterministic assigned variable) is mapped to another map defining the probabilistic choices for its value. The second Map contains Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling activations. Lower number means greater priority. Activations with same priorities and same scheduled time are processed in the order they are defined in the JSON file. Default value (if not defined) is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activatingOnlyWhenExecuted&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an activation to be triggered.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map of Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are so called SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6127</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6127"/>
		<updated>2026-03-20T09:02:48Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Probabilistic Choice */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|800px]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.16 of ProB you can also use SimB&lt;br /&gt;
* within [[Using_the_Command-Line_Version_of_ProB|probcli]] using the commands &lt;br /&gt;
** &amp;lt;tt&amp;gt;-simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for running the simulation a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-rt_simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for real-time simulation for a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-mc-simulate SIMBFILE.json Reps Steps&amp;lt;/tt&amp;gt; for Monte-Carlo simulation with Reps repetitions, each simulation the given number of steps&lt;br /&gt;
You can also open a SimB simulation dialog in the Animation menu of ProB Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
A SimB file describes a list of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
A SimB activation controls the simulation: it can trigger an event in the formal model after a specified delay and it can also trigger other activations. Probabilistic annotations and B formulas can be used to influence the chosen event and the triggered activations.&lt;br /&gt;
The SimB listeners enable interactive simulation: they can respond to user interaction by triggering SimB activations.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single activation) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; stores a boolean flag which states whether activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are only triggered when event in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; is triggered (or always)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that the activation will be queued. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that the activation will only be queued if there are no queued activations with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is greater. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is lower. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; stores optional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; stores a Map. Here, a variable (parameter, or non-deterministic assigned variable) is assigned to its value.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;stores a Map. Here a variable (parameter, or non-deterministic assigned variable) is assigned to another Map defining the probabilistic choice of its value. The second Map stores Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. Lower number means greater priority. Activations with same priorities and same scheduled time are processed in the order they are defined in the JSON file. Default value (if not defined) is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activatingOnlyWhenExecuted&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an activation to be triggered.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map of Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are so called SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6126</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6126"/>
		<updated>2026-03-20T09:00:53Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Using SimB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|800px]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.16 of ProB you can also use SimB&lt;br /&gt;
* within [[Using_the_Command-Line_Version_of_ProB|probcli]] using the commands &lt;br /&gt;
** &amp;lt;tt&amp;gt;-simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for running the simulation a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-rt_simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for real-time simulation for a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-mc-simulate SIMBFILE.json Reps Steps&amp;lt;/tt&amp;gt; for Monte-Carlo simulation with Reps repetitions, each simulation the given number of steps&lt;br /&gt;
You can also open a SimB simulation dialog in the Animation menu of ProB Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
A SimB file describes a list of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
A SimB activation controls the simulation: it can trigger an event in the formal model after a specified delay and it can also trigger other activations. Probabilistic annotations and B formulas can be used to influence the chosen event and the triggered activations.&lt;br /&gt;
The SimB listeners enable interactive simulation: they can respond to user interaction by triggering SimB activations.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single activation) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; stores a boolean flag which states whether activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are only triggered when event in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; is triggered (or always)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that the activation will be queued. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that the activation will only be queued if there are no queued activations with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is greater. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is lower. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; stores optional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; stores a Map. Here, a variable (parameter, or non-deterministic assigned variable) is assigned to its value.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;stores a Map. Here a variable (parameter, or non-deterministic assigned variable) is assigned to another Map defining the probabilistic choice of its value. The second Map stores Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. Lower number means greater priority. Activations with same priorities and same scheduled time are processed in the order they are defined in the JSON file. Default value (if not defined) is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activatingOnlyWhenExecuted&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an event to be executed in the future.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map storing Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.  It is possible to chain multiple probabilistic choices together, but eventually, a direct activation must be reached.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are so called SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6125</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6125"/>
		<updated>2026-03-20T09:00:27Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Using SimB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|800px]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.16 you can also use SimB&lt;br /&gt;
* within [[Using_the_Command-Line_Version_of_ProB|probcli]] using the commands &lt;br /&gt;
** &amp;lt;tt&amp;gt;-simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for running the simulation a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-rt_simulate SIMBFILE.json Steps&amp;lt;/tt&amp;gt; for real-time simulation for a certain number of steps&lt;br /&gt;
** &amp;lt;tt&amp;gt;-mc-simulate SIMBFILE.json Reps Steps&amp;lt;/tt&amp;gt; for Monte-Carlo simulation with Reps repetitions, each simulation the given number of steps&lt;br /&gt;
You can also open a SimB simulation dialog in the Animation menu of ProB Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
A SimB file describes a list of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
A SimB activation controls the simulation: it can trigger an event in the formal model after a specified delay and it can also trigger other activations. Probabilistic annotations and B formulas can be used to influence the chosen event and the triggered activations.&lt;br /&gt;
The SimB listeners enable interactive simulation: they can respond to user interaction by triggering SimB activations.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single activation) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activatingOnlyWhenExecuted&amp;lt;/tt&amp;gt; stores a boolean flag which states whether activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are only triggered when event in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; is triggered (or always)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that the activation will be queued. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that the activation will only be queued if there are no queued activations with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is greater. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is lower. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; stores optional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; stores a Map. Here, a variable (parameter, or non-deterministic assigned variable) is assigned to its value.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;stores a Map. Here a variable (parameter, or non-deterministic assigned variable) is assigned to another Map defining the probabilistic choice of its value. The second Map stores Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. Lower number means greater priority. Activations with same priorities and same scheduled time are processed in the order they are defined in the JSON file. Default value (if not defined) is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activatingOnlyWhenExecuted&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an event to be executed in the future.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map storing Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.  It is possible to chain multiple probabilistic choices together, but eventually, a direct activation must be reached.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are so called SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6124</id>
		<title>B2ASP</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6124"/>
		<updated>2026-03-19T13:43:13Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current versions of ProB can make use the clingo ASP solver as an alternate way of solving constraints.&lt;br /&gt;
This backend translates a subset of B formulas to SAT by encoding the formulas in ASP (Answer Set Programming) first and then using clingo to translate this to SAT and solve it.&lt;br /&gt;
&lt;br /&gt;
Limitations:&lt;br /&gt;
* it can only translate first-order values (no sets of sets, no higher-order relations or functions)&lt;br /&gt;
* it cannot yet deal with nested existential quantifiers inside universal quantifiers&lt;br /&gt;
&lt;br /&gt;
In contrast to the Kodkod backend, B2ASP can deal with arbitrary n-ary relations (and not just binary ones) and there are no issues with integer overflows.&lt;br /&gt;
&lt;br /&gt;
== Using B2ASP ==&lt;br /&gt;
&lt;br /&gt;
B2ASP solving consists of the following phases:&lt;br /&gt;
* a CLP(FD) based bounds analysis to infer finite bounds for all variables,&lt;br /&gt;
* a translation of set theory and B to ASP programs (aka Horn clauses),&lt;br /&gt;
* using clingo to translate and solve ASP programs via SAT solving,&lt;br /&gt;
* a Prolog back-translation of ASP models to B values.&lt;br /&gt;
&lt;br /&gt;
=== B2ASP (clingo) in the REPL ===&lt;br /&gt;
&lt;br /&gt;
The backend can be used in the REPL of [[Using_the_Command-Line_Version_of_ProB|probcli]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :clingo  pq = 1..2 /\ {2,4}&lt;br /&gt;
PREDICATE is TRUE&lt;br /&gt;
Solution: &lt;br /&gt;
       pq = {2}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;:clingo #file=FILE&amp;lt;/tt&amp;gt; to solve a predicate from a file.&lt;br /&gt;
The command &amp;lt;tt&amp;gt;:clingo-double-check&amp;lt;/tt&amp;gt; double checks the solution using ProB&#039;s default solver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== B2ASP (clingo) for PROPERTIES ===&lt;br /&gt;
&lt;br /&gt;
You can also use SOLVER_FOR_PROPERTIES preference to specify clingo as backend for solving PROPERTIES (aka axioms) of B models.&lt;br /&gt;
For example, you can put this into your DEFINITIONS section for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  SET_PREF_SOLVER_FOR_PROPERTIES == &amp;quot;clingo&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example using this preference to compute a dominating set of a graph:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE IceCream_Clingo&lt;br /&gt;
// Dominating set example:&lt;br /&gt;
// place ice cream vans so that every house (node) is at most one block away from a van&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  N == 24;&lt;br /&gt;
  CUSTOM_GRAPH == rec(layout:&amp;quot;dot&amp;quot;, rankdir:&amp;quot;TB&amp;quot;,&lt;br /&gt;
                     nodes: {j•j∈NODES |&lt;br /&gt;
                               rec(value:j, style:&amp;quot;filled&amp;quot;,&lt;br /&gt;
                                fillcolor:IF ice(j)=TRUE THEN &amp;quot;mistyrose&amp;quot; ELSE &amp;quot;white&amp;quot; END&lt;br /&gt;
                                  )},&lt;br /&gt;
                     edges: rec(color:&amp;quot;gray&amp;quot;, arrowhead:&amp;quot;odot&amp;quot;,&lt;br /&gt;
                              arrowtail:&amp;quot;odot&amp;quot;, dir:&amp;quot;both&amp;quot;,&lt;br /&gt;
                              label:&amp;quot;edge&amp;quot;,&lt;br /&gt;
                              edges: edge)&lt;br /&gt;
                    );&lt;br /&gt;
  bi_edge == (edge ∪ edge⁻¹);&lt;br /&gt;
&lt;br /&gt;
  SET_PREF_SOLVER_FOR_PROPERTIES == &amp;quot;clingo&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  VISB_SVG_FILE == &amp;quot;IceCream.svg&amp;quot;;&lt;br /&gt;
  VISB_SVG_UPDATES == {n • n∈NODES |&lt;br /&gt;
                        rec(`id`:n, fill: IF ice(n)=TRUE THEN &amp;quot;red&amp;quot; ELSE &amp;quot;LightBlue&amp;quot; END)}&lt;br /&gt;
SETS&lt;br /&gt;
  NODES = {n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,&lt;br /&gt;
           n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24}&lt;br /&gt;
CONSTANTS edge, ice&lt;br /&gt;
PROPERTIES&lt;br /&gt;
 edge∈ NODES ↔ NODES ∧&lt;br /&gt;
 edge = { n1↦n2, n1↦n4,&lt;br /&gt;
          n2↦n3,&lt;br /&gt;
          n3↦n4, n3↦n5, n3↦n7,&lt;br /&gt;
          n4↦n7,&lt;br /&gt;
          n5↦n6, n5↦n9,&lt;br /&gt;
          n6↦n7, n6↦n8,&lt;br /&gt;
          n7↦n8,&lt;br /&gt;
          n8↦n10, n8↦n13,&lt;br /&gt;
          n9↦n10, n9↦n11, n9↦n12,&lt;br /&gt;
          n11↦n12, n11↦n14,&lt;br /&gt;
          n12↦n13,&lt;br /&gt;
          n13↦n16,&lt;br /&gt;
          n14↦n15, n14↦n17,&lt;br /&gt;
          n15↦n16, n15↦n17, n15↦n18, n15↦n21,&lt;br /&gt;
          n16↦n18, n16↦n19,&lt;br /&gt;
          n17↦n19,&lt;br /&gt;
          n18↦n19, n18↦n20, n18↦n21,&lt;br /&gt;
          n19↦n20, n19↦n21,&lt;br /&gt;
          n20↦n21, n20↦n22,&lt;br /&gt;
          n21↦n22, n21↦n23, n21↦n24,&lt;br /&gt;
          n22↦n23, n21↦n24,&lt;br /&gt;
          n23↦n24&lt;br /&gt;
          } ∧&lt;br /&gt;
 ice ∈ NODES→ BOOL ∧&lt;br /&gt;
 ∀x.(x∈NODES ⇒&lt;br /&gt;
      (ice(x)=TRUE or&lt;br /&gt;
        TRUE ∈ ice[edge[{x}] ∪ edge⁻¹[{x}]]&lt;br /&gt;
       )&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
 ∧ card({x|x∈NODES ∧ ice(x)=TRUE})≤6&lt;br /&gt;
 /* minimal solution requires 6 vans */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  v &amp;lt;-- NrVans = BEGIN v := card(ice⁻¹[{TRUE}]) END;&lt;br /&gt;
  xx &amp;lt;-- Get(yy) = PRE yy∈NODES ∧ {CUSTOM_GRAPH} = ∅ THEN xx:= ice(yy) END;&lt;br /&gt;
  v &amp;lt;-- Vans = BEGIN v:= ice⁻¹[{TRUE}] END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the graphical rendering of a solution using the custom graph definition above:&lt;br /&gt;
&lt;br /&gt;
[[File:IceCream_Generic.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
== Article ==&lt;br /&gt;
&lt;br /&gt;
The following [https://link.springer.com/chapter/10.1007/978-3-032-15981-6_9 article] describes this backend in more detail:&lt;br /&gt;
* Michael Leuschel: Using Prolog to Translate Set Theory and B to SAT. PADL 2025: 143-160.&lt;br /&gt;
The article also has an accompanying [https://zenodo.org/records/17660151 Zenodo archive of benchmarks].&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6123</id>
		<title>B2ASP</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6123"/>
		<updated>2026-03-19T13:39:20Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current versions of ProB can make use the clingo ASP solver as an alternate way of solving constraints.&lt;br /&gt;
This backend translates a subset of B formulas to SAT by encoding the formulas in ASP (Answer Set Programming) first and then using clingo to translate this to SAT and solve it.&lt;br /&gt;
&lt;br /&gt;
== Using B2ASP ==&lt;br /&gt;
&lt;br /&gt;
B2ASP solving consists of the following phases:&lt;br /&gt;
* a CLP(FD) based bounds analysis to infer finite bounds for all variables,&lt;br /&gt;
* a translation of set theory and B to ASP programs (aka Horn clauses),&lt;br /&gt;
* using clingo to translate and solve ASP programs via SAT solving,&lt;br /&gt;
* a Prolog back-translation of ASP models to B values.&lt;br /&gt;
&lt;br /&gt;
=== B2ASP (clingo) in the REPL ===&lt;br /&gt;
&lt;br /&gt;
The backend can be used in the REPL of [[Using_the_Command-Line_Version_of_ProB|probcli]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :clingo  pq = 1..2 /\ {2,4}&lt;br /&gt;
PREDICATE is TRUE&lt;br /&gt;
Solution: &lt;br /&gt;
       pq = {2}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;:clingo #file=FILE&amp;lt;/tt&amp;gt; to solve a predicate from a file.&lt;br /&gt;
The command &amp;lt;tt&amp;gt;:clingo-double-check&amp;lt;/tt&amp;gt; double checks the solution using ProB&#039;s default solver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== B2ASP (clingo) for PROPERTIES ===&lt;br /&gt;
&lt;br /&gt;
You can also use SOLVER_FOR_PROPERTIES preference to specify clingo as backend for solving PROPERTIES (aka axioms) of B models.&lt;br /&gt;
For example, you can put this into your DEFINITIONS section for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  SET_PREF_SOLVER_FOR_PROPERTIES == &amp;quot;clingo&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example using this preference to compute a dominating set of a graph:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE IceCream_Clingo&lt;br /&gt;
// Dominating set example:&lt;br /&gt;
// place ice cream vans so that every house (node) is at most one block away from a van&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  N == 24;&lt;br /&gt;
  CUSTOM_GRAPH == rec(layout:&amp;quot;dot&amp;quot;, rankdir:&amp;quot;TB&amp;quot;,&lt;br /&gt;
                     nodes: {j•j∈NODES |&lt;br /&gt;
                               rec(value:j, style:&amp;quot;filled&amp;quot;,&lt;br /&gt;
                                fillcolor:IF ice(j)=TRUE THEN &amp;quot;mistyrose&amp;quot; ELSE &amp;quot;white&amp;quot; END&lt;br /&gt;
                                  )},&lt;br /&gt;
                     edges: rec(color:&amp;quot;gray&amp;quot;, arrowhead:&amp;quot;odot&amp;quot;,&lt;br /&gt;
                              arrowtail:&amp;quot;odot&amp;quot;, dir:&amp;quot;both&amp;quot;,&lt;br /&gt;
                              label:&amp;quot;edge&amp;quot;,&lt;br /&gt;
                              edges: edge)&lt;br /&gt;
                    );&lt;br /&gt;
  bi_edge == (edge ∪ edge⁻¹);&lt;br /&gt;
&lt;br /&gt;
  SET_PREF_SOLVER_FOR_PROPERTIES == &amp;quot;clingo&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  VISB_SVG_FILE == &amp;quot;IceCream.svg&amp;quot;;&lt;br /&gt;
  VISB_SVG_UPDATES == {n • n∈NODES |&lt;br /&gt;
                        rec(`id`:n, fill: IF ice(n)=TRUE THEN &amp;quot;red&amp;quot; ELSE &amp;quot;LightBlue&amp;quot; END)}&lt;br /&gt;
SETS&lt;br /&gt;
  NODES = {n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,&lt;br /&gt;
           n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24}&lt;br /&gt;
CONSTANTS edge, ice&lt;br /&gt;
PROPERTIES&lt;br /&gt;
 edge∈ NODES ↔ NODES ∧&lt;br /&gt;
 edge = { n1↦n2, n1↦n4,&lt;br /&gt;
          n2↦n3,&lt;br /&gt;
          n3↦n4, n3↦n5, n3↦n7,&lt;br /&gt;
          n4↦n7,&lt;br /&gt;
          n5↦n6, n5↦n9,&lt;br /&gt;
          n6↦n7, n6↦n8,&lt;br /&gt;
          n7↦n8,&lt;br /&gt;
          n8↦n10, n8↦n13,&lt;br /&gt;
          n9↦n10, n9↦n11, n9↦n12,&lt;br /&gt;
          n11↦n12, n11↦n14,&lt;br /&gt;
          n12↦n13,&lt;br /&gt;
          n13↦n16,&lt;br /&gt;
          n14↦n15, n14↦n17,&lt;br /&gt;
          n15↦n16, n15↦n17, n15↦n18, n15↦n21,&lt;br /&gt;
          n16↦n18, n16↦n19,&lt;br /&gt;
          n17↦n19,&lt;br /&gt;
          n18↦n19, n18↦n20, n18↦n21,&lt;br /&gt;
          n19↦n20, n19↦n21,&lt;br /&gt;
          n20↦n21, n20↦n22,&lt;br /&gt;
          n21↦n22, n21↦n23, n21↦n24,&lt;br /&gt;
          n22↦n23, n21↦n24,&lt;br /&gt;
          n23↦n24&lt;br /&gt;
          } ∧&lt;br /&gt;
 ice ∈ NODES→ BOOL ∧&lt;br /&gt;
 ∀x.(x∈NODES ⇒&lt;br /&gt;
      (ice(x)=TRUE or&lt;br /&gt;
        TRUE ∈ ice[edge[{x}] ∪ edge⁻¹[{x}]]&lt;br /&gt;
       )&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
 ∧ card({x|x∈NODES ∧ ice(x)=TRUE})≤6&lt;br /&gt;
 /* minimal solution requires 6 vans */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  v &amp;lt;-- NrVans = BEGIN v := card(ice⁻¹[{TRUE}]) END;&lt;br /&gt;
  xx &amp;lt;-- Get(yy) = PRE yy∈NODES ∧ {CUSTOM_GRAPH} = ∅ THEN xx:= ice(yy) END;&lt;br /&gt;
  v &amp;lt;-- Vans = BEGIN v:= ice⁻¹[{TRUE}] END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the graphical rendering of a solution using the custom graph definition above:&lt;br /&gt;
&lt;br /&gt;
[[File:IceCream_Generic.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
== Article ==&lt;br /&gt;
&lt;br /&gt;
The following [https://link.springer.com/chapter/10.1007/978-3-032-15981-6_9 article] describes this backend in more detail:&lt;br /&gt;
* Michael Leuschel: Using Prolog to Translate Set Theory and B to SAT. PADL 2025: 143-160.&lt;br /&gt;
The article also has an accompanying [https://zenodo.org/records/17660151 Zenodo archive of benchmarks].&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6122</id>
		<title>B2ASP</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6122"/>
		<updated>2026-03-19T13:38:25Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* B2ASP (clingo) for PROPERTIES */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current versions of ProB can make use the clingo ASP solver as an alternate way of solving constraints.&lt;br /&gt;
This backend translates a subset of B formulas to SAT by encoding the formulas in ASP (Answer Set Programming) first and then using clingo to translate this to SAT and solve it.&lt;br /&gt;
&lt;br /&gt;
== Using B2ASP ==&lt;br /&gt;
&lt;br /&gt;
B2ASP solving consists of the following phases:&lt;br /&gt;
* a CLP(FD) based bounds analysis to infer finite bounds for all variables,&lt;br /&gt;
* a translation of set theory and B to ASP programs (aka Horn clauses),&lt;br /&gt;
* using clingo to translate and solve ASP programs via SAT solving,&lt;br /&gt;
* a Prolog back-translation of ASP models to B values.&lt;br /&gt;
&lt;br /&gt;
=== B2ASP (clingo) in the REPL ===&lt;br /&gt;
&lt;br /&gt;
The backend can be used in the REPL of [[Using_the_Command-Line_Version_of_ProB|probcli]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :clingo  pq = 1..2 /\ {2,4}&lt;br /&gt;
PREDICATE is TRUE&lt;br /&gt;
Solution: &lt;br /&gt;
       pq = {2}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;:clingo #file=FILE&amp;lt;/tt&amp;gt; to solve a predicate from a file.&lt;br /&gt;
The command &amp;lt;tt&amp;gt;:clingo-double-check&amp;lt;/tt&amp;gt; double checks the solution using ProB&#039;s default solver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== B2ASP (clingo) for PROPERTIES ===&lt;br /&gt;
&lt;br /&gt;
You can also use SOLVER_FOR_PROPERTIES preference to specify clingo as backend for solving PROPERTIES (aka axioms) of B models.&lt;br /&gt;
For example, you can put this into your DEFINITIONS section for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  SET_PREF_SOLVER_FOR_PROPERTIES == &amp;quot;clingo&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example using this preference to compute a dominating set of a graph:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE IceCream_Clingo&lt;br /&gt;
// Dominating set example:&lt;br /&gt;
// place ice cream vans so that every house (node) is at most one block away from a van&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
  N == 24;&lt;br /&gt;
  CUSTOM_GRAPH == rec(layout:&amp;quot;dot&amp;quot;, rankdir:&amp;quot;TB&amp;quot;,&lt;br /&gt;
                     nodes: {j•j∈NODES |&lt;br /&gt;
                               rec(value:j, style:&amp;quot;filled&amp;quot;,&lt;br /&gt;
                                fillcolor:IF ice(j)=TRUE THEN &amp;quot;mistyrose&amp;quot; ELSE &amp;quot;white&amp;quot; END&lt;br /&gt;
                                  )},&lt;br /&gt;
                     edges: rec(color:&amp;quot;gray&amp;quot;, arrowhead:&amp;quot;odot&amp;quot;,&lt;br /&gt;
                              arrowtail:&amp;quot;odot&amp;quot;, dir:&amp;quot;both&amp;quot;,&lt;br /&gt;
                              label:&amp;quot;edge&amp;quot;,&lt;br /&gt;
                              edges: edge)&lt;br /&gt;
                    );&lt;br /&gt;
  bi_edge == (edge ∪ edge⁻¹);&lt;br /&gt;
&lt;br /&gt;
  SET_PREF_SOLVER_FOR_PROPERTIES == &amp;quot;clingo&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  VISB_SVG_FILE == &amp;quot;IceCream.svg&amp;quot;;&lt;br /&gt;
  VISB_SVG_UPDATES == {n • n∈NODES |&lt;br /&gt;
                        rec(`id`:n, fill: IF ice(n)=TRUE THEN &amp;quot;red&amp;quot; ELSE &amp;quot;LightBlue&amp;quot; END)}&lt;br /&gt;
SETS&lt;br /&gt;
  NODES = {n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,&lt;br /&gt;
           n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24}&lt;br /&gt;
CONSTANTS edge, ice&lt;br /&gt;
PROPERTIES&lt;br /&gt;
 edge∈ NODES ↔ NODES ∧&lt;br /&gt;
 edge = { n1↦n2, n1↦n4,&lt;br /&gt;
          n2↦n3,&lt;br /&gt;
          n3↦n4, n3↦n5, n3↦n7,&lt;br /&gt;
          n4↦n7,&lt;br /&gt;
          n5↦n6, n5↦n9,&lt;br /&gt;
          n6↦n7, n6↦n8,&lt;br /&gt;
          n7↦n8,&lt;br /&gt;
          n8↦n10, n8↦n13,&lt;br /&gt;
          n9↦n10, n9↦n11, n9↦n12,&lt;br /&gt;
          n11↦n12, n11↦n14,&lt;br /&gt;
          n12↦n13,&lt;br /&gt;
          n13↦n16,&lt;br /&gt;
          n14↦n15, n14↦n17,&lt;br /&gt;
          n15↦n16, n15↦n17, n15↦n18, n15↦n21,&lt;br /&gt;
          n16↦n18, n16↦n19,&lt;br /&gt;
          n17↦n19,&lt;br /&gt;
          n18↦n19, n18↦n20, n18↦n21,&lt;br /&gt;
          n19↦n20, n19↦n21,&lt;br /&gt;
          n20↦n21, n20↦n22,&lt;br /&gt;
          n21↦n22, n21↦n23, n21↦n24,&lt;br /&gt;
          n22↦n23, n21↦n24,&lt;br /&gt;
          n23↦n24&lt;br /&gt;
          } ∧&lt;br /&gt;
 ice ∈ NODES→ BOOL ∧&lt;br /&gt;
 ∀x.(x∈NODES ⇒&lt;br /&gt;
      (ice(x)=TRUE or&lt;br /&gt;
        TRUE ∈ ice[edge[{x}] ∪ edge⁻¹[{x}]]&lt;br /&gt;
       )&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
 ∧ card({x|x∈NODES ∧ ice(x)=TRUE})≤6&lt;br /&gt;
 /* minimal solution requires 6 vans */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  v &amp;lt;-- NrVans = BEGIN v := card(ice⁻¹[{TRUE}]) END;&lt;br /&gt;
  xx &amp;lt;-- Get(yy) = PRE yy∈NODES ∧ {CUSTOM_GRAPH} = ∅ THEN xx:= ice(yy) END;&lt;br /&gt;
  v &amp;lt;-- Vans = BEGIN v:= ice⁻¹[{TRUE}] END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the graphical rendering of a solution using the custom graph definition above:&lt;br /&gt;
&lt;br /&gt;
[[File:IceCream_Generic.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
== Article ==&lt;br /&gt;
&lt;br /&gt;
[https://link.springer.com/chapter/10.1007/978-3-032-15981-6_9 Michael Leuschel:&lt;br /&gt;
Using Prolog to Translate Set Theory and B to SAT. PADL 2025: 143-160.]&lt;br /&gt;
&lt;br /&gt;
[https://zenodo.org/records/17660151 Zenodo archive of benchmarks].&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6121</id>
		<title>B2ASP</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6121"/>
		<updated>2026-03-19T13:35:40Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current versions of ProB can make use the clingo ASP solver as an alternate way of solving constraints.&lt;br /&gt;
This backend translates a subset of B formulas to SAT by encoding the formulas in ASP (Answer Set Programming) first and then using clingo to translate this to SAT and solve it.&lt;br /&gt;
&lt;br /&gt;
== Using B2ASP ==&lt;br /&gt;
&lt;br /&gt;
B2ASP solving consists of the following phases:&lt;br /&gt;
* a CLP(FD) based bounds analysis to infer finite bounds for all variables,&lt;br /&gt;
* a translation of set theory and B to ASP programs (aka Horn clauses),&lt;br /&gt;
* using clingo to translate and solve ASP programs via SAT solving,&lt;br /&gt;
* a Prolog back-translation of ASP models to B values.&lt;br /&gt;
&lt;br /&gt;
=== B2ASP (clingo) in the REPL ===&lt;br /&gt;
&lt;br /&gt;
The backend can be used in the REPL of [[Using_the_Command-Line_Version_of_ProB|probcli]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :clingo  pq = 1..2 /\ {2,4}&lt;br /&gt;
PREDICATE is TRUE&lt;br /&gt;
Solution: &lt;br /&gt;
       pq = {2}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;:clingo #file=FILE&amp;lt;/tt&amp;gt; to solve a predicate from a file.&lt;br /&gt;
The command &amp;lt;tt&amp;gt;:clingo-double-check&amp;lt;/tt&amp;gt; double checks the solution using ProB&#039;s default solver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== B2ASP (clingo) for PROPERTIES ===&lt;br /&gt;
&lt;br /&gt;
You can also use SOLVER_FOR_PROPERTIES preference to specify clingo as backend for solving PROPERTIES (aka axioms) of B models.&lt;br /&gt;
For example, you can put this into your DEFINITIONS section for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  SET_PREF_SOLVER_FOR_PROPERTIES == &amp;quot;clingo&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Article ==&lt;br /&gt;
&lt;br /&gt;
[https://link.springer.com/chapter/10.1007/978-3-032-15981-6_9 Michael Leuschel:&lt;br /&gt;
Using Prolog to Translate Set Theory and B to SAT. PADL 2025: 143-160.]&lt;br /&gt;
&lt;br /&gt;
[https://zenodo.org/records/17660151 Zenodo archive of benchmarks].&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6120</id>
		<title>B2ASP</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6120"/>
		<updated>2026-03-19T13:34:03Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current versions of ProB can make use the clingo ASP solver as an alternate way of solving constraints.&lt;br /&gt;
This backend translates a subset of B formulas to SAT by encoding the formulas in ASP (Answer Set Programming) first and then using clingo to translate this to SAT and solve it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
B2ASP solving consists of the following phases:&lt;br /&gt;
* a CLP(FD) based bounds analysis to infer finite bounds for all variables,&lt;br /&gt;
* a translation of set theory and B to ASP programs (aka Horn clauses),&lt;br /&gt;
* using clingo to translate and solve ASP programs via SAT solving,&lt;br /&gt;
* a Prolog back-translation of ASP models to B values.&lt;br /&gt;
&lt;br /&gt;
The backend can be used in the REPL of probcli:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :clingo  pq = 1..2 /\ {2,4}&lt;br /&gt;
PREDICATE is TRUE&lt;br /&gt;
Solution: &lt;br /&gt;
       pq = {2}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;:clingo #file=FILE&amp;lt;/tt&amp;gt; to solve a predicate from a file.&lt;br /&gt;
The command &amp;lt;tt&amp;gt;:clingo-double-check&amp;lt;/tt&amp;gt; double checks the solution using ProB&#039;s default solver.&lt;br /&gt;
&lt;br /&gt;
== &lt;br /&gt;
&lt;br /&gt;
You can also use SOLVER_FOR_PROPERTIES preference to specify clingo as backend for solving PROPERTIES (aka axioms) of B models.&lt;br /&gt;
For example, you can put this into your DEFINITIONS section for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  SET_PREF_SOLVER_FOR_PROPERTIES == &amp;quot;clingo&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Article ==&lt;br /&gt;
&lt;br /&gt;
[https://link.springer.com/chapter/10.1007/978-3-032-15981-6_9 Michael Leuschel:&lt;br /&gt;
Using Prolog to Translate Set Theory and B to SAT. PADL 2025: 143-160.]&lt;br /&gt;
&lt;br /&gt;
[https://zenodo.org/records/17660151 Zenodo archive of benchmarks].&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6119</id>
		<title>B2ASP</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=B2ASP&amp;diff=6119"/>
		<updated>2026-03-19T13:31:37Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: Created page with &amp;quot;The current versions of ProB can make use the clingo ASP solver as an alternate way of solving constraints. This backend translates a subset of B formulas to SAT by encoding the formulas in ASP (Answer Set Programming) first and then using clingo to translate this to SAT and solve it.   B2ASP solving consists of the following phases: * a CLP(FD) based bounds analysis to infer finite bounds for all variables, * a translation of set theory and B to ASP programs (aka Horn c...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current versions of ProB can make use the clingo ASP solver as an alternate way of solving constraints.&lt;br /&gt;
This backend translates a subset of B formulas to SAT by encoding the formulas in ASP (Answer Set Programming) first and then using clingo to translate this to SAT and solve it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
B2ASP solving consists of the following phases:&lt;br /&gt;
* a CLP(FD) based bounds analysis to infer finite bounds for all variables,&lt;br /&gt;
* a translation of set theory and B to ASP programs (aka Horn clauses),&lt;br /&gt;
* using clingo to translate and solve ASP programs via SAT solving,&lt;br /&gt;
* a Prolog back-translation of ASP models to B values.&lt;br /&gt;
&lt;br /&gt;
The backend can be used in the REPL of probcli:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; :clingo  pq = 1..2 /\ {2,4}&lt;br /&gt;
PREDICATE is TRUE&lt;br /&gt;
Solution: &lt;br /&gt;
       pq = {2}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;:clingo #file=FILE&amp;lt;/tt&amp;gt; to solve a predicate from a file.&lt;br /&gt;
The command &amp;lt;tt&amp;gt;:clingo-double-check&amp;lt;/tt&amp;gt; double checks the solution using ProB&#039;s default solver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use SOLVER_FOR_PROPERTIES preference to specify clingo as backend for solving PROPERTIES (aka axioms) of B models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## Article ##&lt;br /&gt;
&lt;br /&gt;
[https://link.springer.com/chapter/10.1007/978-3-032-15981-6_9 Michael Leuschel:&lt;br /&gt;
Using Prolog to Translate Set Theory and B to SAT. PADL 2025: 143-160.]&lt;br /&gt;
&lt;br /&gt;
[https://zenodo.org/records/17660151 Zenodo archive of benchmarks].&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Template:User_Manual_Index&amp;diff=6118</id>
		<title>Template:User Manual Index</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Template:User_Manual_Index&amp;diff=6118"/>
		<updated>2026-03-19T13:19:36Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Animation and Visualisation with ProB:&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
* [[Current Limitations]]&lt;br /&gt;
* [[General Presentation (tcl/tk)]]&lt;br /&gt;
* [[Graphical Viewer]]&lt;br /&gt;
* [[Graphical Visualization]]&lt;br /&gt;
* [[State Space Visualization]]&lt;br /&gt;
&lt;br /&gt;
Validation with ProB:&lt;br /&gt;
* [[Consistency Checking|Consistency Checking (Finding Invariant Violations using the Model Checker)]]&lt;br /&gt;
* [[Constraint Based Checking]]&lt;br /&gt;
* [[Refinement Checking]]&lt;br /&gt;
* [[LTL Model Checking]]&lt;br /&gt;
* [[Bounded Model Checking|Bounded Model Checking (BMC*)]]&lt;br /&gt;
* [[Symbolic Model Checking|Symbolic Model Checking]]&lt;br /&gt;
* [[ProB Validation Methods|Comparing the various ProB Validation Methods]]&lt;br /&gt;
* [[Well-Definedness Checking]]&lt;br /&gt;
&lt;br /&gt;
Other Interfaces to ProB:&lt;br /&gt;
* [[Using the Command-Line Version of ProB]]&lt;br /&gt;
* [[ProB REPL]]&lt;br /&gt;
* [[ProB2-UI]]&lt;br /&gt;
&lt;br /&gt;
ProB and Other Tools:&lt;br /&gt;
* [[Using ProB with Atelier B]]&lt;br /&gt;
* [[TLC|Using TLC for B Specifications]]&lt;br /&gt;
* [[LTSMin|Using ProB with LTSMin as Model Checking Backend]]&lt;br /&gt;
* [[Using ProB with KODKOD]]&lt;br /&gt;
* [[Using ProB with Z3]]&lt;br /&gt;
* [[B2SAT|Using ProB with B2SAT]]&lt;br /&gt;
* [[B2ASP|Using ProB with Clingo]]&lt;br /&gt;
* [[Editors for ProB]]&lt;br /&gt;
&lt;br /&gt;
ProB for Other Languages:&lt;br /&gt;
&lt;br /&gt;
* [[CSP-M|Using CSP-M in ProB]]&lt;br /&gt;
* [[Checking CSP Assertions]]&lt;br /&gt;
* [[ProB for Event-B|Using ProB for Event-B and Rodin]]&lt;br /&gt;
* [[Event-B Theories|Using ProB for Event-B with the theory plug-in]]&lt;br /&gt;
* [[ProZ|Using ProZ for Animation and Model Checking of Z Specifications]]&lt;br /&gt;
* [[TLA|Using ProB for TLA Specifications]]&lt;br /&gt;
* [[Alloy|Using ProB for Alloy Specifications]]&lt;br /&gt;
* [[Other languages|Using ProB with Promela and other languages]]&lt;br /&gt;
* [[Rules-DSL|Using the B Rules DSL Language]]&lt;br /&gt;
&lt;br /&gt;
Advanced Features of ProB:&lt;br /&gt;
* [[Symmetry Reduction]]&lt;br /&gt;
* [[ParB|Parallel Execution of ProB]]&lt;br /&gt;
* [[Recursively Defined Functions]]&lt;br /&gt;
* [[Memoization for Functions]]&lt;br /&gt;
* [[Operation Calls in Expressions]]&lt;br /&gt;
* [[External Functions]]&lt;br /&gt;
* [[Reals and Floats]]&lt;br /&gt;
* [[Debugging]]&lt;br /&gt;
* [[Common Subexpression Elimination]]&lt;br /&gt;
* [[Test Case Generation]]&lt;br /&gt;
* [[State Space Coverage Analyses]]&lt;br /&gt;
* [[Generating Documents with ProB and Latex]]&lt;br /&gt;
* [[Caching Constants and Operations]]&lt;br /&gt;
* [[Monte Carlo Tree Search Game Play]]&lt;br /&gt;
&lt;br /&gt;
Advanced Visualization Features of ProB:&lt;br /&gt;
* [[Generating UML Sequence Charts]]&lt;br /&gt;
* [[Custom_Graph|Custom Graph Visualization]]&lt;br /&gt;
* [[VisB|VisB SVG-based Visualization]]&lt;br /&gt;
&lt;br /&gt;
FAQ, Tips and Troubleshootings:&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Controlling_ProB_Preferences|Setting ProB Preferences]]&lt;br /&gt;
* [[Troubleshooting]]&lt;br /&gt;
* [[Tips: Writing Models for ProB]]&lt;br /&gt;
* [[Tips: B Idioms|Tips: Common B Idioms (let, if-then-else,...)]]&lt;br /&gt;
* [[Summary of B Syntax]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6111</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6111"/>
		<updated>2026-03-11T07:05:32Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Direct Activation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|800px]]&lt;br /&gt;
&lt;br /&gt;
A SimB file consists of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
SimB activations encode an activation diagram with probabilistic and timing elements for automatic simulation.&lt;br /&gt;
To enable interactive simulation, it is also necessary to encode interactive elements aka. SimB listeners which trigger other SimB activations.&lt;br /&gt;
Within these elements, the modeler can user B expressions which are evaluated on the current state.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores activations that will be scheduled when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other activations are scheduled. The modeler can either write a String (to activate a single event) or a list of Strings (to schedule multiple activations)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of the activation. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that the activation will be queued for execution. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that the activation will only be queued if there are no queued activations with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is greater. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is lower. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; stores optional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; stores a Map. Here, a variable (parameter, or non-deterministic assigned variable) is assigned to its value.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;stores a Map. Here a variable (parameter, or non-deterministic assigned variable) is assigned to another Map defining the probabilistic choice of its value. The second Map stores Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. Lower number means greater priority.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an event to be executed in the future.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map storing Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.  It is possible to chain multiple probabilistic choices together, but eventually, a direct activation must be reached.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are so called SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6110</id>
		<title>SimB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=SimB&amp;diff=6110"/>
		<updated>2026-03-10T14:09:17Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Direct Activation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SimB ==&lt;br /&gt;
&lt;br /&gt;
Additional documentation is available here: [https://github.com/hhu-stups/prob2_ui/blob/develop/src/main/helpsources/help_en/Main%20Menu/Advanced/SimB.md SimB Documentation]&lt;br /&gt;
&lt;br /&gt;
SimB is a simulator built on top of ProB.  It is available in the latest SNAPSHOT version in the new JavaFX based user interface [[ProB2-UI]] (https://github.com/hhu-stups/prob2_ui), The modeler can write SimB annotations for a formal model to simulate it. Examples are available at https://github.com/favu100/SimB-examples.&lt;br /&gt;
Furthermore, it is then possible to validate probabilistic and timing properties with statistical validation techniques such as hypothesis testing and estimation.&lt;br /&gt;
&lt;br /&gt;
SimB also contains a feature called interactive simulation.&lt;br /&gt;
This feature allows user interaction to trigger a simulation.&lt;br /&gt;
For interactive simulation, a modeler has to encode SimB listeners on events, triggering a SimB simulation.&lt;br /&gt;
Interactive Simulation examples are available at https://github.com/favu100/SimB-examples/tree/main/Interactive_Examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More recently, SimB is extended by a new feature which makes it possible to load an Reinforcement learning Agent.&lt;br /&gt;
Technically, each step of the RL agent is converted into a SimB activation.&lt;br /&gt;
In order to simulate a RL agent in SimB, one must (1) create a formal B model for the RL agent, and (2) create a mapping between the state in the RL agent and the formal model, and (3) provide information to the formal B model again.&lt;br /&gt;
Reinforcement Learning examples are available at: https://github.com/hhu-stups/reinforcement-learning-b-models&lt;br /&gt;
&lt;br /&gt;
== Citing SimB ==&lt;br /&gt;
To cite SimB as a tool, its timing or probabilistic simulation features, or SimBs statistical validation techniques, please use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael and Mashkoor, Atif},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Timed Probabilistic Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2021,&lt;br /&gt;
  Series    = {LNCS},&lt;br /&gt;
  Volume     = {12709},&lt;br /&gt;
  Pages = {81--96}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To cite SimBs interactive simulation, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@InProceedings{simb,&lt;br /&gt;
  Author    = {Vu, Fabian and Leuschel, Michael},&lt;br /&gt;
  Title        = {{Validation of Formal Models by Interactive Simulation}},&lt;br /&gt;
  Booktitle    = {Proceedings ABZ},&lt;br /&gt;
  Year        = 2023&lt;br /&gt;
  Series = {LNCS},&lt;br /&gt;
  Volume = {14010},&lt;br /&gt;
  Pages = {59--69}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using SimB ==&lt;br /&gt;
&lt;br /&gt;
Start SimB via &amp;quot;SimB&amp;quot; in the &amp;quot;Advanced&amp;quot; Menu after opening a machine. &lt;br /&gt;
&lt;br /&gt;
[[File:Open_SimB.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Now, you can open a SimB file (JSON format)  controlling the underlying formal model.&lt;br /&gt;
&lt;br /&gt;
[[File:SimB_Window.png|800px]]&lt;br /&gt;
&lt;br /&gt;
A SimB file consists of SimB activations and SimB listeners to simulate the model.&lt;br /&gt;
SimB activations encode an activation diagram with probabilistic and timing elements for automatic simulation.&lt;br /&gt;
To enable interactive simulation, it is also necessary to encode interactive elements aka. SimB listeners which trigger other SimB activations.&lt;br /&gt;
Within these elements, the modeler can user B expressions which are evaluated on the current state.&lt;br /&gt;
&lt;br /&gt;
The general structure of a SimB simulation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [...]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; stores SimB activations, while &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; stores SimB listeners.&lt;br /&gt;
&amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; must be encoded,  &amp;lt;tt&amp;gt;listeners&amp;lt;/tt&amp;gt; is optional and defaults to the empty list.&lt;br /&gt;
&lt;br /&gt;
== Probabilistic and Timing Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
The SimB file always contains an &amp;lt;tt&amp;gt;activations&amp;lt;/tt&amp;gt; field storing a list of probabilistic and timing elements to control the simulation. Probabilistic values are always interpreted as weights and thus may sum to any number greater than zero.&lt;br /&gt;
There are two types of activations: direct activation and probabilistic choice.&lt;br /&gt;
All activations are identified by their  &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
===Direct Activation ===&lt;br /&gt;
&lt;br /&gt;
A direct activation activates an event to be executed in the future.&lt;br /&gt;
It requires the fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; to be defined.&lt;br /&gt;
All other fields can be defined optionally.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt; identifies the activated event by its name.&lt;br /&gt;
* &amp;lt;tt&amp;gt;after&amp;lt;/tt&amp;gt; defines the scheduled time (in ms) when activating an event. By default, it is set to 0 ms, e.g., when this field is not defined explicitly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; stores events that will be activated when executing the event defined by &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. When the attribute is absent then no other events are activated. The modeler can either write a String (to activate a single event) or a list of Strings (to activate multiple events)&lt;br /&gt;
* &amp;lt;tt&amp;gt;activationKind&amp;lt;/tt&amp;gt; stores the kind of activation for &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. Possible options are &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt;. The default value is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; means that the activation will be queued for execution. &lt;br /&gt;
** &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; means that the activation will only be queued if there are no queued activations with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:min&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is greater. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
** &amp;lt;tt&amp;gt;single:max&amp;lt;/tt&amp;gt; means that the activation will only be queued if (1) there are no queued activations for the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; or (2) there is a queued activation with the same &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; whose value for the scheduled time is lower. In the case of (2), the already queued activation will be discarded.&lt;br /&gt;
* &amp;lt;tt&amp;gt;additionalGuards&amp;lt;/tt&amp;gt; stores optional guards when executing the event stored in &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;fixedVariables&amp;lt;/tt&amp;gt; stores a Map. Here, a variable (parameter, or non-deterministic assigned variable) is assigned to its value.&lt;br /&gt;
* &amp;lt;tt&amp;gt;probabilisticVariables&amp;lt;/tt&amp;gt;stores a Map. Here a variable (parameter, or non-deterministic assigned variable) is assigned to another Map defining the probabilistic choice of its value. The second Map stores Key-Value pairs where values are mapped to the probability/weight. &lt;br /&gt;
* &amp;lt;tt&amp;gt;transitionSelection&amp;lt;/tt&amp;gt; determines how SimB choses from multiple possible transitions (due to not specified variables):&lt;br /&gt;
** &amp;lt;tt&amp;gt;first&amp;lt;/tt&amp;gt; (the default) means that the first transition is chosen for execution.&lt;br /&gt;
** &amp;lt;tt&amp;gt;uniform&amp;lt;/tt&amp;gt; means that a transition is selected from all alternatives uniformly.&lt;br /&gt;
* &amp;lt;tt&amp;gt;priority&amp;lt;/tt&amp;gt; stores the priority for scheduling &amp;lt;tt&amp;gt;execute&amp;lt;/tt&amp;gt;. Lower number means greater priority.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;execute&amp;quot;: ...&lt;br /&gt;
   &amp;quot;after&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activationKind&amp;quot;: ...&lt;br /&gt;
   &amp;quot;additionalGuards&amp;quot;: ...&lt;br /&gt;
   &amp;quot;fixedVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;probabilisticVariables&amp;quot;: ....&lt;br /&gt;
   &amp;quot;transitionSelection&amp;quot;: ...,&lt;br /&gt;
   &amp;quot;priority&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Probabilistic Choice ===&lt;br /&gt;
&lt;br /&gt;
A probabilistic choice selects an event to be executed in the future.&lt;br /&gt;
It requires the two fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;chooseActivation&amp;lt;/tt&amp;gt; is a Map storing Key-Value pairs where activations (identified by their &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;) are mapped to a probability/weight.  It is possible to chain multiple probabilistic choices together, but eventually, a direct activation must be reached.&lt;br /&gt;
The probabilities are always interpreted as weights and may sum to any number greater than zero.&lt;br /&gt;
Thus, a &amp;lt;tt&amp;gt;probabilistic choice&amp;lt;/tt&amp;gt; is of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;chooseActivation&amp;quot;: ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following, an example for a SimB file controlling a Traffic Lights for cars and pedestrians (with timing and probabilistic behavior) is shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;activations&amp;quot;: [&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;$initialise_machine&amp;quot;, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;choose&amp;quot;, &amp;quot;chooseActivation&amp;quot;:{&amp;quot;cars_ry&amp;quot;: &amp;quot;0.8&amp;quot;, &amp;quot;peds_g&amp;quot;: &amp;quot;0.2&amp;quot;}},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_ry&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_g&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_g&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;cars_y&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_y&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;cars_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;cars_r&amp;quot;, &amp;quot;after&amp;quot;:500, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_g&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;peds_r&amp;quot;},&lt;br /&gt;
  {&amp;quot;id&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;execute&amp;quot;:&amp;quot;peds_r&amp;quot;, &amp;quot;after&amp;quot;:5000, &amp;quot;activating&amp;quot;:&amp;quot;choose&amp;quot;}&lt;br /&gt;
 ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Elements in SimB ==&lt;br /&gt;
&lt;br /&gt;
Interactive elements in SimB are so called SimB listeners.&lt;br /&gt;
A SimB listener consists of four fields &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This means that the SimB listener associated with &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; listens on a manual/user interaction on &amp;lt;tt&amp;gt;event&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; after which activations in &amp;lt;tt&amp;gt;activating&amp;lt;/tt&amp;gt; are triggered.&lt;br /&gt;
&amp;lt;tt&amp;gt;predicate&amp;lt;/tt&amp;gt; is optional and defaults to &amp;lt;tt&amp;gt;1=1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Manual/User interaction is recognized via VisB and ProB&#039;s Operations View.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;id&amp;quot;:  ...&lt;br /&gt;
   &amp;quot;event&amp;quot;: ...&lt;br /&gt;
   &amp;quot;predicate&amp;quot;: ...&lt;br /&gt;
   &amp;quot;activating&amp;quot;: [...]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following, we parts of a SimB simulation from an automotive case study.&lt;br /&gt;
The SimB simulation contains a SimB listener which is linked to two activations.&lt;br /&gt;
The case study models the car&#039;s lighting system controlled by pitman controller, the key ignition, and the warning lights button.&lt;br /&gt;
&lt;br /&gt;
The SimB listeners states that SimB listens on user interaction on the event &amp;lt;tt&amp;gt;ENV_Pitman_DirectionBlinking&amp;lt;/tt&amp;gt;, to trigger two SimB activations &amp;lt;tt&amp;gt;blinking_on&amp;lt;/tt&amp;gt; and blinking_off afterward.&lt;br /&gt;
Practically, this means that a driver&#039;s input on the pitman for direction blinking activates the blinking cycle for the corresponding direction indicators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOn&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;blinking_off&amp;quot;, &lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;RTIME_BlinkerOff&amp;quot;, &lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;curDeadlines(blink_deadline)&amp;quot;,&lt;br /&gt;
       &amp;quot;activating&amp;quot; : &amp;quot;blinking_on&amp;quot;, &lt;br /&gt;
       ...&lt;br /&gt;
    },&lt;br /&gt;
    ...&lt;br /&gt;
  ]&lt;br /&gt;
  &amp;quot;listeners&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;start_blinking&amp;quot;,&lt;br /&gt;
      &amp;quot;event&amp;quot;: &amp;quot;ENV_Pitman_DirectionBlinking&amp;quot;, &lt;br /&gt;
      &amp;quot;activating&amp;quot; : [&amp;quot;blinking_on&amp;quot;, &amp;quot;blinking_off&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reinforcement Learning Agent in SimB ==&lt;br /&gt;
&lt;br /&gt;
Instead of loading a SimB simulation as a JSON file, one can also load a Reinforcement Learning &lt;br /&gt;
agent implemented in Python (.py).&lt;br /&gt;
For the simulation to work, one has to apply the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Train a model of a Reinforcement Learning agent.&lt;br /&gt;
&lt;br /&gt;
2. Create a formal B model (including safety shield) for the RL agent. &lt;br /&gt;
&lt;br /&gt;
The operations represent the actions the RL agent can choose from. The formal model&#039;s state mainly represents the state of the environment.&lt;br /&gt;
Safety shields are encoded by the operations&#039; guards which are provided to the RL agent. Enabled operations are considered to be safe. Thus, the RL agent chooses the enabled operation/action with the highest predicted reward.&lt;br /&gt;
The operations&#039; substitutions model the desired behavior of the respective actions.&lt;br /&gt;
&lt;br /&gt;
An example for the FASTER of a HighwayEnvironment is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FASTER = &lt;br /&gt;
PRE&lt;br /&gt;
  ¬(∃v. (v ∈ PresentVehicles \ {EgoVehicle} ∧ VehiclesX(v) &amp;gt; 0.0 ∧ VehiclesX(v) &amp;lt; 45.0 ∧ &lt;br /&gt;
  VehiclesY(v) &amp;lt; 3.5 ∧ VehiclesY(v) &amp;gt; -3.5))&lt;br /&gt;
THEN&lt;br /&gt;
  Crash :∈ BOOL ||&lt;br /&gt;
  PresentVehicles :∈ P(Vehicles) ;&lt;br /&gt;
  VehiclesX :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesY :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesVx :| (VehiclesVx ∈ PresentVehicles → R ∧ &lt;br /&gt;
             VehiclesVx(EgoVehicle) ≥ VehiclesVx’(EgoVehicle) - 0.05) ||&lt;br /&gt;
  VehiclesVy :∈ Vehicles → R ||&lt;br /&gt;
  VehiclesAx :| (VehiclesAx ∈ PresentVehicles → R ∧ VehiclesAx(EgoVehicle) ≥ -0.05) || &lt;br /&gt;
  VehiclesAy :∈ Vehicles → R ||&lt;br /&gt;
  Reward :∈ R&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 2-4 shows the operation&#039;s guard which is used as safety shield. &lt;br /&gt;
&lt;br /&gt;
Lines 6-15 shows the operation&#039;s substitution describing the desired behavior after executing FASTER.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Implement the mapping between the RL agent in Python and the formal B model.&lt;br /&gt;
This includes the mapping of actions to operations, and the mapping of information from the RL agent, particularly the environment and observation, to the variables.&lt;br /&gt;
&lt;br /&gt;
An example for the mapping of actions to operations is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
action_names = {&lt;br /&gt;
    0: &amp;quot;LANE_LEFT&amp;quot;,&lt;br /&gt;
    1: &amp;quot;IDLE&amp;quot;,&lt;br /&gt;
    2: &amp;quot;LANE_RIGHT&amp;quot;,&lt;br /&gt;
    3: &amp;quot;FASTER&amp;quot;,&lt;br /&gt;
    4: &amp;quot;SLOWER&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, one can see that the numbers representing the actions in the RL agents are mapped to the corresponding operation names in the formal B model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An example for a mapping to a variable in the formal B model is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def get_VehiclesX(obs):&lt;br /&gt;
    return &amp;quot;{{EgoVehicle |-&amp;gt; {0}, Vehicles2 |-&amp;gt; {1}, Vehicles3 |-&amp;gt; {2}, &lt;br /&gt;
             Vehicles4 |-&amp;gt; {3},  Vehicles5 |-&amp;gt; {4}}}&amp;quot;&lt;br /&gt;
         .format(obs[0][1]*200, obs[1][1]*200, obs[2][1]*200, &lt;br /&gt;
                  obs[3][1]*200, obs[4][1]*200) # Implemented manually&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remark: While the getter for the variable is generated by B2Program, the function for the mapping is implemented manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Implement necessary messages sent between the ProB animator and the RL agent.&lt;br /&gt;
Simulation should be a while-loop which runs while the simulation has not finished. &lt;br /&gt;
&lt;br /&gt;
* 1st message: Sent from ProB Animator: List of enabled operations&lt;br /&gt;
** Meanwhile RL agent predicts enabled operation with highest reward&lt;br /&gt;
* 2nd message: Sent from RL agent: Name of chosen action/operation&lt;br /&gt;
* 3rd message: Sent from RL agent: Time until executing chosen action/operation&lt;br /&gt;
* 4th message: Sent from RL agent: Succeeding B state as a predicate&lt;br /&gt;
* 5th message: Sent from RL agent: Boolean flag describing whether simulation is finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example code (line 70 - 113; particularly 86 - 113): https://github.com/hhu-stups/reinforcement-learning-b-models/blob/main/HighwayEnvironment/HighwayEnvironment.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To generate a RL agent for SimB, one can use the high-level code generator B2Program: https://github.com/favu100/b2program&lt;br /&gt;
&lt;br /&gt;
Given a formal B model, B2Program generates an RL agent which loads a given trained model and execute the necessary steps. This includes the fourth step described before.&lt;br /&gt;
The third step still has to be implemented; in this step, B2Program only generates the templates for the mappings which are then completed manually.&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Simulation ===&lt;br /&gt;
&lt;br /&gt;
Using a SimB file, the modeler can play a single simulation on the underlying model in real-time. &lt;br /&gt;
The modeler can then manually check whether the model behaves as desired. Combining [[VisB]] and SimB, a simulation can be seen as an animated picture similar to a GIF picture.  &lt;br /&gt;
This gives the domain expert even a better understanding of the model.&lt;br /&gt;
With SimB listeners, it is also possible to encode simulations that are triggered by manual/user actions.&lt;br /&gt;
&lt;br /&gt;
A Traffic Light example (based on the SimB file shown in [[SimB|Using_SimB]] ) simulating the first 21 seconds is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:TrafficLight_Simulation.gif|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Timed Trace Replay ===&lt;br /&gt;
&lt;br /&gt;
Based on a single simulation, the modeler can generate a timed trace which is also stored in the SimB format. Afterwards, it can be used to replay a scenario. similar to real-time simulation. &lt;br /&gt;
&lt;br /&gt;
Below, the resulting timed trace for the scenario in [[SimB|Real-Time Simulation]] is shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activations&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;$initialise_machine&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;0&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: {&lt;br /&gt;
        &amp;quot;tl_cars&amp;quot;: &amp;quot;red&amp;quot;,&lt;br /&gt;
        &amp;quot;tl_peds&amp;quot;: &amp;quot;red&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;$initialise_machine&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_ry&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_ry_1&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_g_2&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_y&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_y_3&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;cars_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;500&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;cars_r_4&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_g&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: [&lt;br /&gt;
        &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_g_5&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;execute&amp;quot;: &amp;quot;peds_r&amp;quot;,&lt;br /&gt;
      &amp;quot;after&amp;quot;: &amp;quot;5000&amp;quot;,&lt;br /&gt;
      &amp;quot;priority&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;additionalGuards&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activationKind&amp;quot;: null,&lt;br /&gt;
      &amp;quot;fixedVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;probabilisticVariables&amp;quot;: null,&lt;br /&gt;
      &amp;quot;activating&amp;quot;: null,&lt;br /&gt;
      &amp;quot;id&amp;quot;: &amp;quot;peds_r_6&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;fileType&amp;quot;: &amp;quot;Timed_Trace&amp;quot;,&lt;br /&gt;
    &amp;quot;formatVersion&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;savedAt&amp;quot;: &amp;quot;2021-03-03T11:04:08.460477Z&amp;quot;,&lt;br /&gt;
    &amp;quot;creator&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;proB2KernelVersion&amp;quot;: &amp;quot;4.0.0-SNAPSHOT&amp;quot;,&lt;br /&gt;
    &amp;quot;proBCliVersion&amp;quot;: null,&lt;br /&gt;
    &amp;quot;modelName&amp;quot;: null&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo Simulation ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to apply Monte Carlo simulation to generate a certain number of simulations.&lt;br /&gt;
Here, all simulations are played without real time. However, it is possible for the user, to replay the generated scenarios with real-time afterwards. &lt;br /&gt;
&lt;br /&gt;
The input parameters are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt; defines the number of simulations to be generated.&lt;br /&gt;
* &amp;lt;em&amp;gt; Max Steps Before Start&amp;lt;/em&amp;gt; defines the number of steps before taking into account the starting and ending conditions.&lt;br /&gt;
* &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; defines condition to simulate until before taking &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; into account. It is either defined by a &amp;lt;em&amp;gt;No Condition&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Starting Predicate&amp;lt;/em&amp;gt;.&lt;br /&gt;
* &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; defines condition to simulate until after taking  &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; into account (defines the last transition of the simulation). It is either defined by a &amp;lt;em&amp;gt;Number of Steps&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Ending Time&amp;lt;/em&amp;gt; or &amp;lt;em&amp;gt;Ending Predicate&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Check&amp;lt;/em&amp;gt; defines the check to apply for the simulation. &amp;lt;em&amp;gt;Monte Carlo Simulation&amp;lt;/em&amp;gt; means that there are no checks to be applied, while the other options are &amp;lt;em&amp;gt;Hypothesis Testing&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Estimation&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MonteCarloSimulation.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are two statistical validation techniques that can be applied based on Monte Carlo simulations: Hypothesis Testing and Estimation.&lt;br /&gt;
&lt;br /&gt;
=== Hypothesis Testing ===&lt;br /&gt;
&lt;br /&gt;
Hypothesis Testing expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Max Steps before Simulation&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Hypothesis Testing are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Hypothesis Check&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Left-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Right-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Two-tailed hypothesis test&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Probability&amp;lt;/em&amp;gt; (in the hypothesis)&lt;br /&gt;
* &amp;lt;em&amp;gt;Significance Level&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:HypothesisTesting.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Estimation ===&lt;br /&gt;
&lt;br /&gt;
Estimation expects the same parameters as Monte Carlo Simulation: &amp;lt;em&amp;gt;Number of Simulations&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The additional input parameters for Estimation are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;em&amp;gt;Property&amp;lt;/em&amp;gt; defines the property to be checked between &amp;lt;em&amp;gt;Starting Condition&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;Ending Condition&amp;lt;/em&amp;gt; for each simulation. Possible configurations are:&lt;br /&gt;
** &amp;lt;em&amp;gt;All Invariants&amp;lt;/em&amp;gt; can be used to check all invariants.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate as Invariant&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is always true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Final Predicate&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked in the final state of a simulation.&lt;br /&gt;
** &amp;lt;em&amp;gt;Predicate Eventually&amp;lt;/em&amp;gt; can be used to provide a predicate to be checked whether it is eventually true.&lt;br /&gt;
** &amp;lt;em&amp;gt;Timing&amp;lt;/em&amp;gt; can be used to check the time.&lt;br /&gt;
** &amp;lt;em&amp;gt;Average&amp;lt;/em&amp;gt; can be used to check the average value of an expression.&lt;br /&gt;
** &amp;lt;em&amp;gt;Sum&amp;lt;/em&amp;gt; can be used to check the sum of an expression.&lt;br /&gt;
* &amp;lt;em&amp;gt;Estimator&amp;lt;/em&amp;gt;&lt;br /&gt;
** &amp;lt;em&amp;gt;Minimum Estimator&amp;lt;/em&amp;gt; returns the minimum estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Mean Estimator&amp;lt;/em&amp;gt; returns the mean estimated value from all simulated runs.&lt;br /&gt;
** &amp;lt;em&amp;gt;Maximum Estimator&amp;lt;/em&amp;gt; returns the maximum estimated value from all simulated runs.&lt;br /&gt;
* &amp;lt;em&amp;gt;Desired Value&amp;lt;/em&amp;gt;&lt;br /&gt;
* &amp;lt;em&amp;gt;Epsilon&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an estimated value e, a desired value d, and an epsilon eps, it checks for each simulation whether e is within [d - eps, d + eps]&lt;br /&gt;
&lt;br /&gt;
[[File:Estimation.png|400px]]&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Download&amp;diff=6097</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Download&amp;diff=6097"/>
		<updated>2026-02-12T11:46:15Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Latest Beta Release */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Latest Release ==&lt;br /&gt;
&lt;br /&gt;
Below are links for downloading the latest stable release of probcli (the command line version of ProB) and ProB Tcl/Tk (ProB with a graphical user interface written in Tcl/Tk).&lt;br /&gt;
Note: please use the provided start scripts (StartProB.sh or StartProBWin.bat) to start ProB.&lt;br /&gt;
The list of changes can be found in the [[ProB_Release_History | ProB release history]].&lt;br /&gt;
&lt;br /&gt;
Details of the [[ProBLicence| ProB Licence can be found here]].&lt;br /&gt;
ProB is free to use and open source. For commercial support contact  [https://www.stups.uni-duesseldorf.de/~leuschel/ Michael Leuschel]. In particular, we can provide access to the validation report for using ProB as a tool of class T2 or T3 within the European norm [https://de.wikipedia.org/wiki/EN_50128 EN50128].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;table table-bordered wikitable&amp;quot; &amp;lt;!-- table and table-bordered for Bootstrap (ProB skin), wikitable for MediaWiki (Vector, MonoBook, etc. skins) --&amp;gt;&lt;br /&gt;
! Platform&lt;br /&gt;
! Release Date&lt;br /&gt;
! Download&lt;br /&gt;
! Dependencies&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;background-color:lightgrey;&amp;quot; | 1.15.1&lt;br /&gt;
|-&lt;br /&gt;
| Linux &lt;br /&gt;
| 21.12.2025 &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.linux64.tar.gz Tarball]&amp;lt;br/&amp;gt;&lt;br /&gt;
| Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Linux|see below]]), [https://www.graphviz.org/download/ GraphViz]&lt;br /&gt;
|-&lt;br /&gt;
| Windows&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64.zip Zipfile] (Tcl/Tk 8.6), &amp;lt;br/&amp;gt; [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64-tcltk-85.zip Zipfile] (Tcl/Tk 8.5)&lt;br /&gt;
| Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Windows|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ GraphViz], [[Windows Installation Instructions]]&lt;br /&gt;
|-&lt;br /&gt;
| macOS&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.macos.zip Zipfile] (Universal ARM/Intel notarized)&amp;lt;br/&amp;gt; &lt;br /&gt;
[https://github.com/hhu-stups/homebrew-prob Homebrew Tap]&lt;br /&gt;
| macOS 10.14 (Mojave) or newer, Tcl/Tk 8.6 ([[#Tcl/Tk on macOS|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ Graphviz] ([[#Graphviz_Requirements|see below]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. More details [[#Java Requirements for B parser|are available below]].&lt;br /&gt;
&lt;br /&gt;
The Graphical User Interface of ProB Tcl/Tk requires Tcl/Tk 8.5 or 8.6. More details [[#Tcl/Tk Requirements for ProB Tcl/Tk|are available below]].&lt;br /&gt;
The default Tcl/Tk on macOS is broken and will result in &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt;, and you have to [[#Tcl/Tk Requirements for ProB Tcl/Tk|install another version of Tcl/Tk]]. (Note: Tcl/Tk 9 is not binary compatible and cannot yet be used.)&lt;br /&gt;
All releases include the command-line version &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt; which does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
macOS releases of ProB are universal binaries that support both &#039;&#039;&#039;aarch64&#039;&#039;&#039; (64-bit ARM/Apple Silicon) and &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel) architectures.&lt;br /&gt;
Windows and Linux releases are compiled only for &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel).&lt;br /&gt;
&lt;br /&gt;
The last version built for the x86 architecture (32-bit Intel) is ProB 1.8.0 (see [[DownloadPriorVersions|prior versions]]).&lt;br /&gt;
If you are using an unsupported architecture or system, you may still be able to [[Running ProB from source|run ProB from source]].&lt;br /&gt;
&lt;br /&gt;
Note that: on &amp;lt;b&amp;gt;macOS&amp;lt;/b&amp;gt; you  still have to right-click on the application and use &amp;quot;Open&amp;quot;, even though ProB Tcl/Tk (and probcli and all libraries) are signed and notarized. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Commented out while there is no current beta release: --&amp;gt;&lt;br /&gt;
=== Latest Beta Release ===&lt;br /&gt;
&lt;br /&gt;
The latest beta release is [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.16.0-beta1 1.16.0-beta1].&lt;br /&gt;
It may be older than the latest final release.&lt;br /&gt;
An official beta release always passes all of ProB&#039;s tests.&lt;br /&gt;
However, we do not follow the stringent checklist for final releases&lt;br /&gt;
(e.g., checking SICStus Prolog Spider warnings, checking coverage and additional manual&lt;br /&gt;
UI tests).&lt;br /&gt;
Also, we do not store coverage reports and other information necessary for T2 certification.&lt;br /&gt;
&lt;br /&gt;
=== Nightly Builds ===&lt;br /&gt;
&lt;br /&gt;
More current [https://stups.hhu-hosting.de/downloads/prob/tcltk/nightly/ nightly integration builds] are also available.&lt;br /&gt;
These releases are usually updated every night and old versions are not stored.&lt;br /&gt;
&lt;br /&gt;
Note for macOS users: Nightly builds of ProB are not signed or notarized, so macOS 10.15 and later (Catalina, Big Sur or Monterey, Ventura) will refuse to run them.&lt;br /&gt;
As a workaround, you will need to run &amp;lt;code&amp;gt;xattr -r -d com.apple.quarantine *&amp;lt;/code&amp;gt; inside the ProB directory before launching ProB.&lt;br /&gt;
The stable (and some beta releases) listed above are signed and notarized, so they will run without extra steps.&lt;br /&gt;
&lt;br /&gt;
Automatically generated test [https://stups.hhu-hosting.de/internal/coverage/html/ coverage reports are also available].&lt;br /&gt;
They are usually updated once per week.&lt;br /&gt;
&lt;br /&gt;
=== Sourcecode ===&lt;br /&gt;
&lt;br /&gt;
You can download the latest Prolog sourcecode snapshot from: https://stups.hhu-hosting.de/downloads/prob/source/&lt;br /&gt;
&lt;br /&gt;
The source code for the ProB parsers (B, LTL, ...) can be obtained from: https://github.com/hhu-stups/probparsers&lt;br /&gt;
&lt;br /&gt;
=== Prior Versions ===&lt;br /&gt;
&lt;br /&gt;
Prior Versions of ProB going back to 1.3.1 [[DownloadPriorVersions|are available for download here]]. &lt;br /&gt;
If you are interested in still earlier releases, please have a look at the [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/ Download directory].&lt;br /&gt;
&lt;br /&gt;
== Other ProB tools ==&lt;br /&gt;
&lt;br /&gt;
=== ProB Jupyter Kernel ===&lt;br /&gt;
&lt;br /&gt;
You can now create Jupyter Notebooks in B using the ProB Jupyter kernel.&lt;br /&gt;
Downloads, instructions, and source code can be found on [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel its own page].&lt;br /&gt;
&lt;br /&gt;
You can [https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.cs.uni-duesseldorf.de%2Fgeneral%2Fstups%2Fprob2-jupyter-kernel.git/master?filepath=notebooks try out the ProB Jupyter kernel in your browser] without installing it first.&lt;br /&gt;
Note that &#039;&#039;&#039;notebooks are not saved permanently in this online version!&#039;&#039;&#039;&lt;br /&gt;
To keep your notebooks, you &#039;&#039;must&#039;&#039; download them before closing the page.&lt;br /&gt;
&lt;br /&gt;
=== ProB for Rodin ===&lt;br /&gt;
To install ProB for Rodin, first download a current version of Rodin (e.g., [https://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/3.9/ Rodin 3.9]). Inside Rodin, choose Help -&amp;gt; Install New Software and choose the pre-configured ProB update site.&lt;br /&gt;
&lt;br /&gt;
More [[Tutorial Rodin First Step|detailed installation instructions and a brief tutorial]] are available.&lt;br /&gt;
&lt;br /&gt;
* Nightly builds of ProB for Rodin 3 can be obtained from within Rodin by using the update site https://stups.hhu-hosting.de/rodin/prob1/nightly.&lt;br /&gt;
&lt;br /&gt;
=== ProB2-UI (based on JavaFX) ===&lt;br /&gt;
&lt;br /&gt;
The current release of the new JavaFX-based [[ProB2-UI]] is version 1.3.1. Installers are available for the following platforms:&lt;br /&gt;
&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-1.3.1.exe Windows (x86_64) installer] - requires Windows 10 or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1-notarized.zip macOS (Apple Silicon) application ZIP] (notarized) &amp;lt;!-- [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1.dmg macOS (Apple Silicon) application DMG] (not signed/notarized! [[#macOS issues|see below]])--&amp;gt; - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-x86_64-1.3.1.dmg macOS (Intel) application DMG] (not signed/notarized yet! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui_1.3.1_amd64.deb Linux (x86_64) .deb package] - requires glibc 2.17 or later (e. g. Debian 8 &amp;quot;jessie&amp;quot; or later, or Ubuntu 14.04 &amp;quot;trusty&amp;quot; or later)&lt;br /&gt;
&lt;br /&gt;
These installers include all necessary dependencies - you do not need to install a Java runtime manually.&lt;br /&gt;
&lt;br /&gt;
We also provide a [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui-1.3.1-multi.jar multi-platform jar] build, which requires an existing installation of Java 21 or later, but works without further installation on all supported platforms. &#039;&#039;&#039;The multi-platform jar is deprecated and will be removed in a future release.&#039;&#039;&#039; It only supports the x86_64 architecture, so it cannot run on macOS on Apple Silicon, unless you install an x86_64 JRE.&lt;br /&gt;
&lt;br /&gt;
Details about new features and improvements can be found in the [https://github.com/hhu-stups/prob2_ui/blob/develop/doc/prob2ui_release_history.md release history], along with download links for older versions.&lt;br /&gt;
&lt;br /&gt;
Snapshot builds of the current &#039;&#039;development&#039;&#039; version of ProB2-UI (1.4.0-SNAPSHOT) are also available:&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-1.4.0.exe Windows installer snapshot]&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-aarch64-1.4.0.dmg macOS (Apple Silicon) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-x86_64-1.4.0.dmg macOS (Intel) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/prob2-ui_1.4.0_amd64.deb Debian package snapshot]&lt;br /&gt;
&lt;br /&gt;
The source code for ProB2-UI is available at https://github.com/hhu-stups/prob2_ui and can be built by following [https://github.com/hhu-stups/prob2_ui#running-from-source these instructions].&lt;br /&gt;
&lt;br /&gt;
The underlying [[ProB Java API]] of ProB2-UI (aka the ProB 2 kernel) is available to Java developers via [https://central.sonatype.com/artifact/de.hhu.stups/de.prob2.kernel Maven Central].&lt;br /&gt;
Its source code can be obtained from: https://github.com/hhu-stups/prob2_kernel.&lt;br /&gt;
&lt;br /&gt;
==== macOS issues ====&lt;br /&gt;
&lt;br /&gt;
When you run the macOS app for the first time, you might have to open the app &#039;&#039;twice&#039;&#039; for ProB2-UI to start properly.&lt;br /&gt;
This should only happen once.&lt;br /&gt;
&lt;br /&gt;
Recent ProB2-UI macOS app releases are signed and notarized, so they should run without issues.&lt;br /&gt;
However, the multi-platform jar, all snapshot app builds, and older release app builds are &#039;&#039;not&#039;&#039; signed or notarized, so macOS will refuse to run them or say that the application is damaged.&lt;br /&gt;
As a workaround:&lt;br /&gt;
&lt;br /&gt;
* On macOS 15 (Sequoia) or later: Open the System Settings, go to &amp;quot;Privacy &amp;amp; Security&amp;quot;, and next to &amp;quot;ProB2-UI was blocked to protect your Mac&amp;quot;, and click on &amp;quot;Open Anyway&amp;quot;.&lt;br /&gt;
* On macOS 14 (Sonoma) or earlier: Right-click the app, select &amp;quot;Open&amp;quot;, and confirm the security dialog. If the dialog still doesn&#039;t give you an option to open the app, click &amp;quot;Cancel&amp;quot; and do the same thing again.&lt;br /&gt;
&lt;br /&gt;
For details, see [https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac &amp;quot;Open a Mac app from an unknown developer&amp;quot;] and [https://support.apple.com/en-us/102445#openanyway &amp;quot;Safely open apps on your Mac&amp;quot;] on Apple&#039;s support website.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
As a workaround, run this command in the folder where &#039;&#039;ProB2-UI.app&#039;&#039; is located:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xattr -r -d com.apple.quarantine &amp;quot;ProB2-UI.app&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multi-platform jar can also be started from the command line, which bypasses the signing/notarization check:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar prob2-ui-1.3.1-multi.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Editor Support ===&lt;br /&gt;
&lt;br /&gt;
==== VS Code ====&lt;br /&gt;
There is a [https://github.com/hhu-stups/b-language-extension B/ProB Language Support] extension for the Visual Studio Code (VS Code) editor. It integrates with the [[Using the Command-Line Version of ProB|command line tool probcli]] to obtain error markers for syntax and type errors. It can also be used for [[Well-Definedness Checking#VSCode|well-definedness checking]].&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/vscode_plugin Download for manual installation]&lt;br /&gt;
&lt;br /&gt;
==== Vim ====&lt;br /&gt;
A [https://github.com/bivab/prob.vim Vim plugin for ProB is available]. It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. Vim has built-in syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
==== BBEdit ====&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBEdit language modules for B, TLA+, CSP and Prolog] are available; these do not use the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]].&lt;br /&gt;
&lt;br /&gt;
== Java Requirements for B Parser ==&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. Java 11, 17, 21, 25, etc. are also fully supported.&lt;br /&gt;
&#039;&#039;&#039;A future ProB release will require Java 17 or newer.&#039;&#039;&#039;&lt;br /&gt;
ProB 1.9.3 is the last version to support Java 7. ProB 1.5.0 is the last version to support Java 6.&lt;br /&gt;
&lt;br /&gt;
You can install a Java Runtime Environment (JRE) from various sources, such as [https://adoptium.net/ Eclipse Adoptium], [https://www.azul.com/downloads/ Azul Zulu], or your system package manager.&lt;br /&gt;
&lt;br /&gt;
Note: on some systems (macOS) you may have to install the full Java Development Kit (JDK), and not just the JRE, so that Java becomes available to the command-line tools.&lt;br /&gt;
Type &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; to check which version is used by default for command-line tools; see also [http://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x this discussion on StackOverflow].&lt;br /&gt;
In case you have trouble starting the Java parser you can now set the &amp;lt;code&amp;gt;JAVA_PATH&amp;lt;/code&amp;gt; preference of ProB to point to the &amp;lt;code&amp;gt;java&amp;lt;/code&amp;gt; tool (or java.exe on Windows).&lt;br /&gt;
&lt;br /&gt;
To check whether ProB can correctly use its Java parser you can type the following (using probcli.exe on Windows):&lt;br /&gt;
 probcli -version -v&lt;br /&gt;
This will try and start the parser and obtain the parser version.&lt;br /&gt;
In case Java is not correctly installed you should get an error message.&lt;br /&gt;
If you see the error message&lt;br /&gt;
 &amp;lt;tt&amp;gt;Unsupported major.minor version 52.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
this means you do not have Java 8 or newer installed. You can try setting the path to the correct java version by setting the JAVA_PATH preference as follows:&lt;br /&gt;
 probcli -p JAVA_PATH path/to/java -version -v&lt;br /&gt;
&lt;br /&gt;
== Tcl/Tk Requirements for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk requires an installation of Tcl/Tk 8.5 or Tcl/Tk 8.6. The command-line tool probcli does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require this.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on macOS ===&lt;br /&gt;
Important note: macOS comes pre-installed with a version of Tcl/Tk which is broken.&lt;br /&gt;
This may result in the display of unreadable &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt; or crashes in the standard file dialogs.&lt;br /&gt;
There are various options to install Tcl/Tk:&lt;br /&gt;
* with Homebrew using the [https://formulae.brew.sh/formula/tcl-tk tcl-tk formula]&lt;br /&gt;
* with [https://ports.macports.org/port/tcl/ MacPorts]&lt;br /&gt;
* use the  [http://www.activestate.com/activetcl/downloads/ ActiveTcl version of Tcl/Tk]&lt;br /&gt;
You should probably start ProB using the &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script: it will auto-detect Tcl/Tk versions and set the SP_TCL_DSO environment variable.&lt;br /&gt;
Below are more details:&lt;br /&gt;
&lt;br /&gt;
==== Tcl/Tk from Homebrew or MacPorts ====&lt;br /&gt;
&lt;br /&gt;
You can install a newer Tcl/Tk (e.g., 8.6.17) using [https://brew.sh &amp;lt;b&amp;gt;Homebrew&amp;lt;/b&amp;gt;] or [https://www.macports.org &amp;lt;b&amp;gt;MacPorts&amp;lt;/b&amp;gt;].&lt;br /&gt;
Note: In the earlier release 8.6.11 [https://bugs.python.org/issue44828 file open and file save dialogs will not work].&lt;br /&gt;
For Homebrew the command to install the[https://formulae.brew.sh/formula/tcl-tk tcl-tk formula] is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The latest versions of Homebrew now install Tcl/Tk 9.0 which does not work yet with ProB.&lt;br /&gt;
In this case install&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk@8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, as the location of the libraries is not standard, you have to define the variable &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script should set SP_TCL_DSO automatically.&lt;br /&gt;
You can also define and export this variable yourself before starting ProB from the Terminal by typing this (you may have to adapt the link if you are using another version of Tcl/Tk):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SP_TCL_DSO=/opt/homebrew/Cellar/tcl-tk@8/8.6.17/lib/libtcl8.6.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have uses MacPorts the path is probably &amp;lt;tt&amp;gt;/opt/local/lib/libtcl.dylib&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set the variable by adding &amp;lt;tt&amp;gt;-DSP_TCL_DSO=/usr/local/Cellar/tcl-tk/8.6.12/lib/libtcl8.6.dylib&amp;lt;/tt&amp;gt; to the command starting ProB. You may also have to install &amp;lt;tt&amp;gt;tk-table&amp;lt;/tt&amp;gt; package yourself (it is bundled with Active Tcl).&lt;br /&gt;
&lt;br /&gt;
==== Active Tcl ====&lt;br /&gt;
&lt;br /&gt;
The [http://www.activestate.com/activetcl/downloads/ the ActiveTcl version of Tcl/Tk] is automatically recognised by ProB and you do not have to set &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, in Active Tcl/Tk 8.6 on macOS the double click in the &amp;quot;Operations View&amp;quot; or other views  is not working correctly.&lt;br /&gt;
You have to hit the RETURN key in the &amp;quot;Operations View&amp;quot; or right-click on an operation and select &amp;quot;Perform ...&amp;quot;  to execute an operation until this is fixed.&lt;br /&gt;
The older ersion [http://bugs.python.org/issue15853 8.5.12 has a bug related to copying text], see also [http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3555211&amp;amp;group_id=12997&amp;amp;atid=112997_type here]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Other Notes ====&lt;br /&gt;
Note: on macOS Catalina or later the Tcl/Tk menu bar is sometimes not working. Switching to another application and then back to ProB seems to solve the problem.&lt;br /&gt;
If you see the message &amp;quot;&amp;lt;tt&amp;gt;macOS 11 or later required !&amp;lt;/tt&amp;gt;&amp;quot;  in the terminal when launching &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; you should re-install Tcl/Tk as described above.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Windows ===&lt;br /&gt;
We currently provide two downloads of ProB, one for Tcl/Tk 8.6 (which we recommend)&lt;br /&gt;
and a version for Tcl/Tk 8.5.&lt;br /&gt;
You can use for example the  [https://www.activestate.com/products/tcl/ ActiveTcl releases].&lt;br /&gt;
Note: For the 64 bit version of ProB for Windows, you have to install the 64 bit Tcl/Tk 8.5 version!&lt;br /&gt;
ProB 1.12 (currently available as nightly build) works with both Tcl/Tk 8.5 and 8.6.&lt;br /&gt;
You may have to point the environment variable SP_TCL_DSO to the correct DLL before starting ProB. For Tcl/Tk 8.5 this is typically&lt;br /&gt;
base-tcl8.5-thread-win32-x86_64.dll.&lt;br /&gt;
You can either go to System -&amp;gt; Settings -&amp;gt; Advanced -&amp;gt; Environment Variables&lt;br /&gt;
or use the setx command for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setx SP_TCL_DSO C:\Tcl\bin\base-tcl8.5-thread-win32-x86_64.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Linux ===&lt;br /&gt;
On Linux you can typically install Tcl/Tk using &amp;lt;tt&amp;gt;sudo apt-get install tcl8.5 tk8.5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
On very recent Linux systems (such as Ubuntu 20.04) you may want to download (and compile) [https://www.tcl.tk/software/tcltk/downloadnow85.html Tcl/Tk 8.5] or use [https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/tcl8.5_8.5.19-4_amd64.deb.html packages from earlier releases].&lt;br /&gt;
&lt;br /&gt;
On Linux OpenSuse (12.3) you may have to perform the following for ProB to work:&lt;br /&gt;
 ln -s /usr/lib/libtk8.5.so /usr/lib/libtk8.5.so.0&lt;br /&gt;
 ln -s /usr/lib/libtcl8.5.so /usr/lib/libtcl8.5.so.0&lt;br /&gt;
&lt;br /&gt;
Also, some of the feature require the table extension, which can be installed like this:&lt;br /&gt;
 sudo apt install tk-table&lt;br /&gt;
Finally, support for .png ANIMATION_IMG declarations requires the Img package:&lt;br /&gt;
 sudo apt install libtk-img&lt;br /&gt;
&lt;br /&gt;
== Graphviz Requirements ==&lt;br /&gt;
&lt;br /&gt;
If you wish to view various visualizations generated by ProB Tcl/Tk or probcli you will need [http://www.graphviz.org/ GraphViz].&lt;br /&gt;
ProB generates various graphs (state space, custom graph, machine hierarchy,...) as .dot files and then  uses the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; to layout the graph and convert it to PDF.&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can also use dot-file viewer such as the &amp;lt;tt&amp;gt;dotty&amp;lt;/tt&amp;gt; program from GraphViz in Linux.&lt;br /&gt;
On macOS and Windows  it is more difficult to obtain a good viewer application for dot files. VS Code with the [https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview Graphviz Interactive Preview] extension is a candidate.&lt;br /&gt;
The commercial OmniGraffle macOS application can import .dot files.  A free alternative on macOS may be [https://ports.macports.org/port/graphviz-gui/ graphviz-gui] by [https://www.macports.org MacPorts]. To install the application do this&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz-gui&amp;lt;/tt&amp;gt;&lt;br /&gt;
The viewer can now be found in /Applications/MacPorts/Graphviz.app (you may have to set the ProB graphical viewer preference &amp;lt;tt&amp;gt;dot_viewer&amp;lt;/tt&amp;gt; to this path).&lt;br /&gt;
If you do not manage to install a viewer, you should select Preferences -&amp;gt; Graphical Viewer -&amp;gt; PDF within ProB Tcl/Tk.&lt;br /&gt;
Indeed, many ProB commands work directly with the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; which you can install on macOS with MacPorts like this:&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
On Mac you can now install the latest version of Graphviz using [https://brew.sh HomeBrew]:&lt;br /&gt;
&lt;br /&gt;
 1. &amp;lt;tt&amp;gt;brew uninstall graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
 2. &amp;lt;tt&amp;gt;brew install graphviz --with-gts&amp;lt;/tt&amp;gt;&lt;br /&gt;
 3. &amp;lt;tt&amp;gt;brew link --overwrite graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 1. is optional; you only need to use it if you have a prior version of Graphviz installed.&lt;br /&gt;
Step3 links the binaries to /usr/local/bin.&lt;br /&gt;
This is probably better than using the [http://www.pixelglow.com/graphviz/ older version from Pixelglow].&lt;br /&gt;
&lt;br /&gt;
You can also manually set the DOT (path_to_dot) preference if ProB cannot find the Graphviz dot binary you have installed.&lt;br /&gt;
&lt;br /&gt;
== Short Release History ==&lt;br /&gt;
&lt;br /&gt;
The full  [[ProB_Release_History | ProB release history can be found here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-12-21&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.1]] is available. Automatic use of operation reuse and compression for model checking. STORE_DETAILED_TRANSITION_INFOS preference and calls LTL property. Interactive proof via animator interface for Rodin PO files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-06-26&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.0]] is available. Interactive trace replay. Many [[VisB#VisB_DEFINITIONS |VisB]] improvements (use definition files for all models, grouping of VISB objects in a single definition, VISB_CLICK_META_INFOS, ...). Profiling can be turned on via PROFILING_INFO preference. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.13.0]] is available. Better Rodin theory support. Template strings. Unicode improvements. READ_JSON and other new external functions. VisB support for groups and &amp;quot;use&amp;quot; element. [[Monte_Carlo_Tree_Search_Game_Play|MCTS game play]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-03&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2-fix1]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-08-10&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2]] is available. [[VisB#VisB_DEFINITIONS_2 |VisB]] improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-04-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.0]] is available. Call stack infos, performance improvements in parser and solver,  new [[LTL_Model_Checking#Supported_Syntax |LTL]] operators, [[VisB#VisB_Additional_SVG_Objects|VisB]] improvements, reals/floats for [[Event-B_Theories|Rodin theories]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-12-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.1]] is available. Highlights: identifiers between backquotes, flexible JSON trace replay, DPLLT solving command, improvements to Z3 backend.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-10-06&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.0]] is available. Highlights: improved support for infinite sets, operation caching (OPERATION_REUSE), faster LTL checking for safety formulas, more compact .prob files, VisB HTML export, constructive Z3 translation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-12-15&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.10.0]] is available. Highlights: well-definedness prover, REAL datatype, -lint comand for VSCode and Atom, improved unsat core and error messages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.3]] is available. Highlights: performance improvements, new external functions, performance monitoring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.2]] is available. Minor bugfix release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.1]] is available. Maintenance release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-07-12&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.0]] is available. Highlights: improved error feedback, improved Unicode support, regular expression library, memoization.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-10-01&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.2]] is available. Highlights: improved error feedback, support [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel Jupyter kernel], first [[Alloy|support for Alloy models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-03-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.0]] is available. Highlights: terminal colour support, performance improvements for displaying very large values, improved symmetry breaking and constraint solving.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-10-05&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.1]] is available. Highlights: performance, non-deterministic assigned variables shown, Z improvements, export history to HTML.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-07-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.0]] is available. Highlights: improved [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], improved XML/CSV data import and export, RULE DSL language, many improvements in constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-10-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.1]] is available. Highlights: [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], LET and IF-THEN-ELSE for expressions and predicates, XML logging, XML data import, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-04-22&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.0]] is available. Highlights: [[Tutorial_Directed_Model_Checking|directed model checking]], [[Using_ProB_with_Z3|Z3 available as backend]], B line comments and unicode symbols, improved error messages, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2015-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.5.0]] is available. Highlights: improved random enumeration, MACE/SEM style static symmetry reduction for deferred set elements, [[State_Space_Coverage_Analyses|MC/DC coverage]] analysis for guards and invariants, [[TLC|improved TLC interface]], bug fixes and improvements including but not limited to the constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.1]], a small bugfix-only release is available. For a list of new features in 1.4.0 see below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-18&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.0]] is available. Highlights: CLP(FD)-based constraint solver enabled by default, kernel can handle more operations symbolically, [[TLC|integration of the TLC model checker]], bug fixes and performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2013-03-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.6]] is available. Highlights: improved constraint propagation for division, modulo, intervals, model checking progress bar, performance improvements, [[Using_ProB_with_KODKOD | improved Kodkod backend]] and use within REPL, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-10-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.5]] is available. Highlights: support for external and recursive functions, optional Kodkod backend, [[TLA|TLA+ support]], performance improvements, pragmas, units inference, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-03-30&#039;&#039;&#039;&lt;br /&gt;
A first prototype of an online [[ProB_Logic_Calculator|ProB Logic Calculator]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-11-21&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.4 is available. Highlights: Evaluation View and Eval window, CSP assertion checking, improved editor, 64-bit version for Mac and Linux, performance improvements, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-02-10&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.3 and ProB for Rodin 2.3 is available. Highlights: improved performance, constrained-based deadlock checking, record detection, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2010-07-30&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.2 is available. Highlights: improved performance, constraint solving over integers (enable in Advanced Preferences), much improved Z support, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-12-07&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.1 is available. Highlights: new data-structure for large sets and relations (see FM 2009), multi-level validation for Event-B, improved constraint propagation for boolean connectives, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-03-20&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.0 is available for download. Highlights: New parser and integrated typechecker, install as AtelierB plugin, improved kernel with support for large sets/relations, improved CSP support, faster LTL model checker, Undo/Redo in text editor, graphical formula viewer, user definable custom animations with gifs.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Download&amp;diff=6096</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Download&amp;diff=6096"/>
		<updated>2026-02-12T11:45:22Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Latest Release ==&lt;br /&gt;
&lt;br /&gt;
Below are links for downloading the latest stable release of probcli (the command line version of ProB) and ProB Tcl/Tk (ProB with a graphical user interface written in Tcl/Tk).&lt;br /&gt;
Note: please use the provided start scripts (StartProB.sh or StartProBWin.bat) to start ProB.&lt;br /&gt;
The list of changes can be found in the [[ProB_Release_History | ProB release history]].&lt;br /&gt;
&lt;br /&gt;
Details of the [[ProBLicence| ProB Licence can be found here]].&lt;br /&gt;
ProB is free to use and open source. For commercial support contact  [https://www.stups.uni-duesseldorf.de/~leuschel/ Michael Leuschel]. In particular, we can provide access to the validation report for using ProB as a tool of class T2 or T3 within the European norm [https://de.wikipedia.org/wiki/EN_50128 EN50128].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;table table-bordered wikitable&amp;quot; &amp;lt;!-- table and table-bordered for Bootstrap (ProB skin), wikitable for MediaWiki (Vector, MonoBook, etc. skins) --&amp;gt;&lt;br /&gt;
! Platform&lt;br /&gt;
! Release Date&lt;br /&gt;
! Download&lt;br /&gt;
! Dependencies&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;background-color:lightgrey;&amp;quot; | 1.15.1&lt;br /&gt;
|-&lt;br /&gt;
| Linux &lt;br /&gt;
| 21.12.2025 &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.linux64.tar.gz Tarball]&amp;lt;br/&amp;gt;&lt;br /&gt;
| Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Linux|see below]]), [https://www.graphviz.org/download/ GraphViz]&lt;br /&gt;
|-&lt;br /&gt;
| Windows&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64.zip Zipfile] (Tcl/Tk 8.6), &amp;lt;br/&amp;gt; [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64-tcltk-85.zip Zipfile] (Tcl/Tk 8.5)&lt;br /&gt;
| Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Windows|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ GraphViz], [[Windows Installation Instructions]]&lt;br /&gt;
|-&lt;br /&gt;
| macOS&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.macos.zip Zipfile] (Universal ARM/Intel notarized)&amp;lt;br/&amp;gt; &lt;br /&gt;
[https://github.com/hhu-stups/homebrew-prob Homebrew Tap]&lt;br /&gt;
| macOS 10.14 (Mojave) or newer, Tcl/Tk 8.6 ([[#Tcl/Tk on macOS|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ Graphviz] ([[#Graphviz_Requirements|see below]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. More details [[#Java Requirements for B parser|are available below]].&lt;br /&gt;
&lt;br /&gt;
The Graphical User Interface of ProB Tcl/Tk requires Tcl/Tk 8.5 or 8.6. More details [[#Tcl/Tk Requirements for ProB Tcl/Tk|are available below]].&lt;br /&gt;
The default Tcl/Tk on macOS is broken and will result in &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt;, and you have to [[#Tcl/Tk Requirements for ProB Tcl/Tk|install another version of Tcl/Tk]]. (Note: Tcl/Tk 9 is not binary compatible and cannot yet be used.)&lt;br /&gt;
All releases include the command-line version &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt; which does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
macOS releases of ProB are universal binaries that support both &#039;&#039;&#039;aarch64&#039;&#039;&#039; (64-bit ARM/Apple Silicon) and &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel) architectures.&lt;br /&gt;
Windows and Linux releases are compiled only for &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel).&lt;br /&gt;
&lt;br /&gt;
The last version built for the x86 architecture (32-bit Intel) is ProB 1.8.0 (see [[DownloadPriorVersions|prior versions]]).&lt;br /&gt;
If you are using an unsupported architecture or system, you may still be able to [[Running ProB from source|run ProB from source]].&lt;br /&gt;
&lt;br /&gt;
Note that: on &amp;lt;b&amp;gt;macOS&amp;lt;/b&amp;gt; you  still have to right-click on the application and use &amp;quot;Open&amp;quot;, even though ProB Tcl/Tk (and probcli and all libraries) are signed and notarized. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Commented out while there is no current beta release: --&amp;gt;&lt;br /&gt;
=== Latest Beta Release ===&lt;br /&gt;
&lt;br /&gt;
The latest beta release is [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.16.1-beta1 1.16.1-beta1].&lt;br /&gt;
It may be older than the latest final release.&lt;br /&gt;
An official beta release always passes all of ProB&#039;s tests.&lt;br /&gt;
However, we do not follow the stringent checklist for final releases&lt;br /&gt;
(e.g., checking SICStus Prolog Spider warnings, checking coverage and additional manual&lt;br /&gt;
UI tests).&lt;br /&gt;
Also, we do not store coverage reports and other information necessary for T2 certification.&lt;br /&gt;
&lt;br /&gt;
=== Nightly Builds ===&lt;br /&gt;
&lt;br /&gt;
More current [https://stups.hhu-hosting.de/downloads/prob/tcltk/nightly/ nightly integration builds] are also available.&lt;br /&gt;
These releases are usually updated every night and old versions are not stored.&lt;br /&gt;
&lt;br /&gt;
Note for macOS users: Nightly builds of ProB are not signed or notarized, so macOS 10.15 and later (Catalina, Big Sur or Monterey, Ventura) will refuse to run them.&lt;br /&gt;
As a workaround, you will need to run &amp;lt;code&amp;gt;xattr -r -d com.apple.quarantine *&amp;lt;/code&amp;gt; inside the ProB directory before launching ProB.&lt;br /&gt;
The stable (and some beta releases) listed above are signed and notarized, so they will run without extra steps.&lt;br /&gt;
&lt;br /&gt;
Automatically generated test [https://stups.hhu-hosting.de/internal/coverage/html/ coverage reports are also available].&lt;br /&gt;
They are usually updated once per week.&lt;br /&gt;
&lt;br /&gt;
=== Sourcecode ===&lt;br /&gt;
&lt;br /&gt;
You can download the latest Prolog sourcecode snapshot from: https://stups.hhu-hosting.de/downloads/prob/source/&lt;br /&gt;
&lt;br /&gt;
The source code for the ProB parsers (B, LTL, ...) can be obtained from: https://github.com/hhu-stups/probparsers&lt;br /&gt;
&lt;br /&gt;
=== Prior Versions ===&lt;br /&gt;
&lt;br /&gt;
Prior Versions of ProB going back to 1.3.1 [[DownloadPriorVersions|are available for download here]]. &lt;br /&gt;
If you are interested in still earlier releases, please have a look at the [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/ Download directory].&lt;br /&gt;
&lt;br /&gt;
== Other ProB tools ==&lt;br /&gt;
&lt;br /&gt;
=== ProB Jupyter Kernel ===&lt;br /&gt;
&lt;br /&gt;
You can now create Jupyter Notebooks in B using the ProB Jupyter kernel.&lt;br /&gt;
Downloads, instructions, and source code can be found on [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel its own page].&lt;br /&gt;
&lt;br /&gt;
You can [https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.cs.uni-duesseldorf.de%2Fgeneral%2Fstups%2Fprob2-jupyter-kernel.git/master?filepath=notebooks try out the ProB Jupyter kernel in your browser] without installing it first.&lt;br /&gt;
Note that &#039;&#039;&#039;notebooks are not saved permanently in this online version!&#039;&#039;&#039;&lt;br /&gt;
To keep your notebooks, you &#039;&#039;must&#039;&#039; download them before closing the page.&lt;br /&gt;
&lt;br /&gt;
=== ProB for Rodin ===&lt;br /&gt;
To install ProB for Rodin, first download a current version of Rodin (e.g., [https://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/3.9/ Rodin 3.9]). Inside Rodin, choose Help -&amp;gt; Install New Software and choose the pre-configured ProB update site.&lt;br /&gt;
&lt;br /&gt;
More [[Tutorial Rodin First Step|detailed installation instructions and a brief tutorial]] are available.&lt;br /&gt;
&lt;br /&gt;
* Nightly builds of ProB for Rodin 3 can be obtained from within Rodin by using the update site https://stups.hhu-hosting.de/rodin/prob1/nightly.&lt;br /&gt;
&lt;br /&gt;
=== ProB2-UI (based on JavaFX) ===&lt;br /&gt;
&lt;br /&gt;
The current release of the new JavaFX-based [[ProB2-UI]] is version 1.3.1. Installers are available for the following platforms:&lt;br /&gt;
&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-1.3.1.exe Windows (x86_64) installer] - requires Windows 10 or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1-notarized.zip macOS (Apple Silicon) application ZIP] (notarized) &amp;lt;!-- [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1.dmg macOS (Apple Silicon) application DMG] (not signed/notarized! [[#macOS issues|see below]])--&amp;gt; - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-x86_64-1.3.1.dmg macOS (Intel) application DMG] (not signed/notarized yet! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui_1.3.1_amd64.deb Linux (x86_64) .deb package] - requires glibc 2.17 or later (e. g. Debian 8 &amp;quot;jessie&amp;quot; or later, or Ubuntu 14.04 &amp;quot;trusty&amp;quot; or later)&lt;br /&gt;
&lt;br /&gt;
These installers include all necessary dependencies - you do not need to install a Java runtime manually.&lt;br /&gt;
&lt;br /&gt;
We also provide a [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui-1.3.1-multi.jar multi-platform jar] build, which requires an existing installation of Java 21 or later, but works without further installation on all supported platforms. &#039;&#039;&#039;The multi-platform jar is deprecated and will be removed in a future release.&#039;&#039;&#039; It only supports the x86_64 architecture, so it cannot run on macOS on Apple Silicon, unless you install an x86_64 JRE.&lt;br /&gt;
&lt;br /&gt;
Details about new features and improvements can be found in the [https://github.com/hhu-stups/prob2_ui/blob/develop/doc/prob2ui_release_history.md release history], along with download links for older versions.&lt;br /&gt;
&lt;br /&gt;
Snapshot builds of the current &#039;&#039;development&#039;&#039; version of ProB2-UI (1.4.0-SNAPSHOT) are also available:&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-1.4.0.exe Windows installer snapshot]&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-aarch64-1.4.0.dmg macOS (Apple Silicon) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-x86_64-1.4.0.dmg macOS (Intel) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/prob2-ui_1.4.0_amd64.deb Debian package snapshot]&lt;br /&gt;
&lt;br /&gt;
The source code for ProB2-UI is available at https://github.com/hhu-stups/prob2_ui and can be built by following [https://github.com/hhu-stups/prob2_ui#running-from-source these instructions].&lt;br /&gt;
&lt;br /&gt;
The underlying [[ProB Java API]] of ProB2-UI (aka the ProB 2 kernel) is available to Java developers via [https://central.sonatype.com/artifact/de.hhu.stups/de.prob2.kernel Maven Central].&lt;br /&gt;
Its source code can be obtained from: https://github.com/hhu-stups/prob2_kernel.&lt;br /&gt;
&lt;br /&gt;
==== macOS issues ====&lt;br /&gt;
&lt;br /&gt;
When you run the macOS app for the first time, you might have to open the app &#039;&#039;twice&#039;&#039; for ProB2-UI to start properly.&lt;br /&gt;
This should only happen once.&lt;br /&gt;
&lt;br /&gt;
Recent ProB2-UI macOS app releases are signed and notarized, so they should run without issues.&lt;br /&gt;
However, the multi-platform jar, all snapshot app builds, and older release app builds are &#039;&#039;not&#039;&#039; signed or notarized, so macOS will refuse to run them or say that the application is damaged.&lt;br /&gt;
As a workaround:&lt;br /&gt;
&lt;br /&gt;
* On macOS 15 (Sequoia) or later: Open the System Settings, go to &amp;quot;Privacy &amp;amp; Security&amp;quot;, and next to &amp;quot;ProB2-UI was blocked to protect your Mac&amp;quot;, and click on &amp;quot;Open Anyway&amp;quot;.&lt;br /&gt;
* On macOS 14 (Sonoma) or earlier: Right-click the app, select &amp;quot;Open&amp;quot;, and confirm the security dialog. If the dialog still doesn&#039;t give you an option to open the app, click &amp;quot;Cancel&amp;quot; and do the same thing again.&lt;br /&gt;
&lt;br /&gt;
For details, see [https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac &amp;quot;Open a Mac app from an unknown developer&amp;quot;] and [https://support.apple.com/en-us/102445#openanyway &amp;quot;Safely open apps on your Mac&amp;quot;] on Apple&#039;s support website.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
As a workaround, run this command in the folder where &#039;&#039;ProB2-UI.app&#039;&#039; is located:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xattr -r -d com.apple.quarantine &amp;quot;ProB2-UI.app&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multi-platform jar can also be started from the command line, which bypasses the signing/notarization check:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar prob2-ui-1.3.1-multi.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Editor Support ===&lt;br /&gt;
&lt;br /&gt;
==== VS Code ====&lt;br /&gt;
There is a [https://github.com/hhu-stups/b-language-extension B/ProB Language Support] extension for the Visual Studio Code (VS Code) editor. It integrates with the [[Using the Command-Line Version of ProB|command line tool probcli]] to obtain error markers for syntax and type errors. It can also be used for [[Well-Definedness Checking#VSCode|well-definedness checking]].&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/vscode_plugin Download for manual installation]&lt;br /&gt;
&lt;br /&gt;
==== Vim ====&lt;br /&gt;
A [https://github.com/bivab/prob.vim Vim plugin for ProB is available]. It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. Vim has built-in syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
==== BBEdit ====&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBEdit language modules for B, TLA+, CSP and Prolog] are available; these do not use the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]].&lt;br /&gt;
&lt;br /&gt;
== Java Requirements for B Parser ==&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. Java 11, 17, 21, 25, etc. are also fully supported.&lt;br /&gt;
&#039;&#039;&#039;A future ProB release will require Java 17 or newer.&#039;&#039;&#039;&lt;br /&gt;
ProB 1.9.3 is the last version to support Java 7. ProB 1.5.0 is the last version to support Java 6.&lt;br /&gt;
&lt;br /&gt;
You can install a Java Runtime Environment (JRE) from various sources, such as [https://adoptium.net/ Eclipse Adoptium], [https://www.azul.com/downloads/ Azul Zulu], or your system package manager.&lt;br /&gt;
&lt;br /&gt;
Note: on some systems (macOS) you may have to install the full Java Development Kit (JDK), and not just the JRE, so that Java becomes available to the command-line tools.&lt;br /&gt;
Type &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; to check which version is used by default for command-line tools; see also [http://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x this discussion on StackOverflow].&lt;br /&gt;
In case you have trouble starting the Java parser you can now set the &amp;lt;code&amp;gt;JAVA_PATH&amp;lt;/code&amp;gt; preference of ProB to point to the &amp;lt;code&amp;gt;java&amp;lt;/code&amp;gt; tool (or java.exe on Windows).&lt;br /&gt;
&lt;br /&gt;
To check whether ProB can correctly use its Java parser you can type the following (using probcli.exe on Windows):&lt;br /&gt;
 probcli -version -v&lt;br /&gt;
This will try and start the parser and obtain the parser version.&lt;br /&gt;
In case Java is not correctly installed you should get an error message.&lt;br /&gt;
If you see the error message&lt;br /&gt;
 &amp;lt;tt&amp;gt;Unsupported major.minor version 52.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
this means you do not have Java 8 or newer installed. You can try setting the path to the correct java version by setting the JAVA_PATH preference as follows:&lt;br /&gt;
 probcli -p JAVA_PATH path/to/java -version -v&lt;br /&gt;
&lt;br /&gt;
== Tcl/Tk Requirements for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk requires an installation of Tcl/Tk 8.5 or Tcl/Tk 8.6. The command-line tool probcli does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require this.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on macOS ===&lt;br /&gt;
Important note: macOS comes pre-installed with a version of Tcl/Tk which is broken.&lt;br /&gt;
This may result in the display of unreadable &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt; or crashes in the standard file dialogs.&lt;br /&gt;
There are various options to install Tcl/Tk:&lt;br /&gt;
* with Homebrew using the [https://formulae.brew.sh/formula/tcl-tk tcl-tk formula]&lt;br /&gt;
* with [https://ports.macports.org/port/tcl/ MacPorts]&lt;br /&gt;
* use the  [http://www.activestate.com/activetcl/downloads/ ActiveTcl version of Tcl/Tk]&lt;br /&gt;
You should probably start ProB using the &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script: it will auto-detect Tcl/Tk versions and set the SP_TCL_DSO environment variable.&lt;br /&gt;
Below are more details:&lt;br /&gt;
&lt;br /&gt;
==== Tcl/Tk from Homebrew or MacPorts ====&lt;br /&gt;
&lt;br /&gt;
You can install a newer Tcl/Tk (e.g., 8.6.17) using [https://brew.sh &amp;lt;b&amp;gt;Homebrew&amp;lt;/b&amp;gt;] or [https://www.macports.org &amp;lt;b&amp;gt;MacPorts&amp;lt;/b&amp;gt;].&lt;br /&gt;
Note: In the earlier release 8.6.11 [https://bugs.python.org/issue44828 file open and file save dialogs will not work].&lt;br /&gt;
For Homebrew the command to install the[https://formulae.brew.sh/formula/tcl-tk tcl-tk formula] is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The latest versions of Homebrew now install Tcl/Tk 9.0 which does not work yet with ProB.&lt;br /&gt;
In this case install&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk@8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, as the location of the libraries is not standard, you have to define the variable &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script should set SP_TCL_DSO automatically.&lt;br /&gt;
You can also define and export this variable yourself before starting ProB from the Terminal by typing this (you may have to adapt the link if you are using another version of Tcl/Tk):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SP_TCL_DSO=/opt/homebrew/Cellar/tcl-tk@8/8.6.17/lib/libtcl8.6.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have uses MacPorts the path is probably &amp;lt;tt&amp;gt;/opt/local/lib/libtcl.dylib&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set the variable by adding &amp;lt;tt&amp;gt;-DSP_TCL_DSO=/usr/local/Cellar/tcl-tk/8.6.12/lib/libtcl8.6.dylib&amp;lt;/tt&amp;gt; to the command starting ProB. You may also have to install &amp;lt;tt&amp;gt;tk-table&amp;lt;/tt&amp;gt; package yourself (it is bundled with Active Tcl).&lt;br /&gt;
&lt;br /&gt;
==== Active Tcl ====&lt;br /&gt;
&lt;br /&gt;
The [http://www.activestate.com/activetcl/downloads/ the ActiveTcl version of Tcl/Tk] is automatically recognised by ProB and you do not have to set &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, in Active Tcl/Tk 8.6 on macOS the double click in the &amp;quot;Operations View&amp;quot; or other views  is not working correctly.&lt;br /&gt;
You have to hit the RETURN key in the &amp;quot;Operations View&amp;quot; or right-click on an operation and select &amp;quot;Perform ...&amp;quot;  to execute an operation until this is fixed.&lt;br /&gt;
The older ersion [http://bugs.python.org/issue15853 8.5.12 has a bug related to copying text], see also [http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3555211&amp;amp;group_id=12997&amp;amp;atid=112997_type here]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Other Notes ====&lt;br /&gt;
Note: on macOS Catalina or later the Tcl/Tk menu bar is sometimes not working. Switching to another application and then back to ProB seems to solve the problem.&lt;br /&gt;
If you see the message &amp;quot;&amp;lt;tt&amp;gt;macOS 11 or later required !&amp;lt;/tt&amp;gt;&amp;quot;  in the terminal when launching &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; you should re-install Tcl/Tk as described above.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Windows ===&lt;br /&gt;
We currently provide two downloads of ProB, one for Tcl/Tk 8.6 (which we recommend)&lt;br /&gt;
and a version for Tcl/Tk 8.5.&lt;br /&gt;
You can use for example the  [https://www.activestate.com/products/tcl/ ActiveTcl releases].&lt;br /&gt;
Note: For the 64 bit version of ProB for Windows, you have to install the 64 bit Tcl/Tk 8.5 version!&lt;br /&gt;
ProB 1.12 (currently available as nightly build) works with both Tcl/Tk 8.5 and 8.6.&lt;br /&gt;
You may have to point the environment variable SP_TCL_DSO to the correct DLL before starting ProB. For Tcl/Tk 8.5 this is typically&lt;br /&gt;
base-tcl8.5-thread-win32-x86_64.dll.&lt;br /&gt;
You can either go to System -&amp;gt; Settings -&amp;gt; Advanced -&amp;gt; Environment Variables&lt;br /&gt;
or use the setx command for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setx SP_TCL_DSO C:\Tcl\bin\base-tcl8.5-thread-win32-x86_64.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Linux ===&lt;br /&gt;
On Linux you can typically install Tcl/Tk using &amp;lt;tt&amp;gt;sudo apt-get install tcl8.5 tk8.5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
On very recent Linux systems (such as Ubuntu 20.04) you may want to download (and compile) [https://www.tcl.tk/software/tcltk/downloadnow85.html Tcl/Tk 8.5] or use [https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/tcl8.5_8.5.19-4_amd64.deb.html packages from earlier releases].&lt;br /&gt;
&lt;br /&gt;
On Linux OpenSuse (12.3) you may have to perform the following for ProB to work:&lt;br /&gt;
 ln -s /usr/lib/libtk8.5.so /usr/lib/libtk8.5.so.0&lt;br /&gt;
 ln -s /usr/lib/libtcl8.5.so /usr/lib/libtcl8.5.so.0&lt;br /&gt;
&lt;br /&gt;
Also, some of the feature require the table extension, which can be installed like this:&lt;br /&gt;
 sudo apt install tk-table&lt;br /&gt;
Finally, support for .png ANIMATION_IMG declarations requires the Img package:&lt;br /&gt;
 sudo apt install libtk-img&lt;br /&gt;
&lt;br /&gt;
== Graphviz Requirements ==&lt;br /&gt;
&lt;br /&gt;
If you wish to view various visualizations generated by ProB Tcl/Tk or probcli you will need [http://www.graphviz.org/ GraphViz].&lt;br /&gt;
ProB generates various graphs (state space, custom graph, machine hierarchy,...) as .dot files and then  uses the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; to layout the graph and convert it to PDF.&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can also use dot-file viewer such as the &amp;lt;tt&amp;gt;dotty&amp;lt;/tt&amp;gt; program from GraphViz in Linux.&lt;br /&gt;
On macOS and Windows  it is more difficult to obtain a good viewer application for dot files. VS Code with the [https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview Graphviz Interactive Preview] extension is a candidate.&lt;br /&gt;
The commercial OmniGraffle macOS application can import .dot files.  A free alternative on macOS may be [https://ports.macports.org/port/graphviz-gui/ graphviz-gui] by [https://www.macports.org MacPorts]. To install the application do this&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz-gui&amp;lt;/tt&amp;gt;&lt;br /&gt;
The viewer can now be found in /Applications/MacPorts/Graphviz.app (you may have to set the ProB graphical viewer preference &amp;lt;tt&amp;gt;dot_viewer&amp;lt;/tt&amp;gt; to this path).&lt;br /&gt;
If you do not manage to install a viewer, you should select Preferences -&amp;gt; Graphical Viewer -&amp;gt; PDF within ProB Tcl/Tk.&lt;br /&gt;
Indeed, many ProB commands work directly with the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; which you can install on macOS with MacPorts like this:&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
On Mac you can now install the latest version of Graphviz using [https://brew.sh HomeBrew]:&lt;br /&gt;
&lt;br /&gt;
 1. &amp;lt;tt&amp;gt;brew uninstall graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
 2. &amp;lt;tt&amp;gt;brew install graphviz --with-gts&amp;lt;/tt&amp;gt;&lt;br /&gt;
 3. &amp;lt;tt&amp;gt;brew link --overwrite graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 1. is optional; you only need to use it if you have a prior version of Graphviz installed.&lt;br /&gt;
Step3 links the binaries to /usr/local/bin.&lt;br /&gt;
This is probably better than using the [http://www.pixelglow.com/graphviz/ older version from Pixelglow].&lt;br /&gt;
&lt;br /&gt;
You can also manually set the DOT (path_to_dot) preference if ProB cannot find the Graphviz dot binary you have installed.&lt;br /&gt;
&lt;br /&gt;
== Short Release History ==&lt;br /&gt;
&lt;br /&gt;
The full  [[ProB_Release_History | ProB release history can be found here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-12-21&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.1]] is available. Automatic use of operation reuse and compression for model checking. STORE_DETAILED_TRANSITION_INFOS preference and calls LTL property. Interactive proof via animator interface for Rodin PO files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-06-26&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.0]] is available. Interactive trace replay. Many [[VisB#VisB_DEFINITIONS |VisB]] improvements (use definition files for all models, grouping of VISB objects in a single definition, VISB_CLICK_META_INFOS, ...). Profiling can be turned on via PROFILING_INFO preference. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.13.0]] is available. Better Rodin theory support. Template strings. Unicode improvements. READ_JSON and other new external functions. VisB support for groups and &amp;quot;use&amp;quot; element. [[Monte_Carlo_Tree_Search_Game_Play|MCTS game play]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-03&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2-fix1]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-08-10&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2]] is available. [[VisB#VisB_DEFINITIONS_2 |VisB]] improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-04-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.0]] is available. Call stack infos, performance improvements in parser and solver,  new [[LTL_Model_Checking#Supported_Syntax |LTL]] operators, [[VisB#VisB_Additional_SVG_Objects|VisB]] improvements, reals/floats for [[Event-B_Theories|Rodin theories]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-12-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.1]] is available. Highlights: identifiers between backquotes, flexible JSON trace replay, DPLLT solving command, improvements to Z3 backend.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-10-06&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.0]] is available. Highlights: improved support for infinite sets, operation caching (OPERATION_REUSE), faster LTL checking for safety formulas, more compact .prob files, VisB HTML export, constructive Z3 translation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-12-15&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.10.0]] is available. Highlights: well-definedness prover, REAL datatype, -lint comand for VSCode and Atom, improved unsat core and error messages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.3]] is available. Highlights: performance improvements, new external functions, performance monitoring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.2]] is available. Minor bugfix release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.1]] is available. Maintenance release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-07-12&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.0]] is available. Highlights: improved error feedback, improved Unicode support, regular expression library, memoization.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-10-01&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.2]] is available. Highlights: improved error feedback, support [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel Jupyter kernel], first [[Alloy|support for Alloy models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-03-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.0]] is available. Highlights: terminal colour support, performance improvements for displaying very large values, improved symmetry breaking and constraint solving.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-10-05&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.1]] is available. Highlights: performance, non-deterministic assigned variables shown, Z improvements, export history to HTML.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-07-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.0]] is available. Highlights: improved [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], improved XML/CSV data import and export, RULE DSL language, many improvements in constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-10-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.1]] is available. Highlights: [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], LET and IF-THEN-ELSE for expressions and predicates, XML logging, XML data import, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-04-22&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.0]] is available. Highlights: [[Tutorial_Directed_Model_Checking|directed model checking]], [[Using_ProB_with_Z3|Z3 available as backend]], B line comments and unicode symbols, improved error messages, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2015-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.5.0]] is available. Highlights: improved random enumeration, MACE/SEM style static symmetry reduction for deferred set elements, [[State_Space_Coverage_Analyses|MC/DC coverage]] analysis for guards and invariants, [[TLC|improved TLC interface]], bug fixes and improvements including but not limited to the constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.1]], a small bugfix-only release is available. For a list of new features in 1.4.0 see below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-18&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.0]] is available. Highlights: CLP(FD)-based constraint solver enabled by default, kernel can handle more operations symbolically, [[TLC|integration of the TLC model checker]], bug fixes and performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2013-03-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.6]] is available. Highlights: improved constraint propagation for division, modulo, intervals, model checking progress bar, performance improvements, [[Using_ProB_with_KODKOD | improved Kodkod backend]] and use within REPL, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-10-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.5]] is available. Highlights: support for external and recursive functions, optional Kodkod backend, [[TLA|TLA+ support]], performance improvements, pragmas, units inference, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-03-30&#039;&#039;&#039;&lt;br /&gt;
A first prototype of an online [[ProB_Logic_Calculator|ProB Logic Calculator]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-11-21&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.4 is available. Highlights: Evaluation View and Eval window, CSP assertion checking, improved editor, 64-bit version for Mac and Linux, performance improvements, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-02-10&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.3 and ProB for Rodin 2.3 is available. Highlights: improved performance, constrained-based deadlock checking, record detection, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2010-07-30&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.2 is available. Highlights: improved performance, constraint solving over integers (enable in Advanced Preferences), much improved Z support, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-12-07&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.1 is available. Highlights: new data-structure for large sets and relations (see FM 2009), multi-level validation for Event-B, improved constraint propagation for boolean connectives, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-03-20&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.0 is available for download. Highlights: New parser and integrated typechecker, install as AtelierB plugin, improved kernel with support for large sets/relations, improved CSP support, faster LTL model checker, Undo/Redo in text editor, graphical formula viewer, user definable custom animations with gifs.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Download&amp;diff=6095</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Download&amp;diff=6095"/>
		<updated>2026-02-09T16:13:08Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Tcl/Tk from Homebrew or MacPorts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Latest Release ==&lt;br /&gt;
&lt;br /&gt;
Below are links for downloading the latest stable release of probcli (the command line version of ProB) and ProB Tcl/Tk (ProB with a graphical user interface written in Tcl/Tk).&lt;br /&gt;
Note: please use the provided start scripts (StartProB.sh or StartProBWin.bat) to start ProB.&lt;br /&gt;
The list of changes can be found in the [[ProB_Release_History | ProB release history]].&lt;br /&gt;
&lt;br /&gt;
Details of the [[ProBLicence| ProB Licence can be found here]].&lt;br /&gt;
ProB is free to use and open source. For commercial support contact  [https://www.stups.uni-duesseldorf.de/~leuschel/ Michael Leuschel]. In particular, we can provide access to the validation report for using ProB as a tool of class T2 or T3 within the European norm [https://de.wikipedia.org/wiki/EN_50128 EN50128].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;table table-bordered wikitable&amp;quot; &amp;lt;!-- table and table-bordered for Bootstrap (ProB skin), wikitable for MediaWiki (Vector, MonoBook, etc. skins) --&amp;gt;&lt;br /&gt;
! Platform&lt;br /&gt;
! Release Date&lt;br /&gt;
! Download&lt;br /&gt;
! Dependencies&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;background-color:lightgrey;&amp;quot; | 1.15.1&lt;br /&gt;
|-&lt;br /&gt;
| Linux &lt;br /&gt;
| 21.12.2025 &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.linux64.tar.gz Tarball]&amp;lt;br/&amp;gt;&lt;br /&gt;
| Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Linux|see below]]), [https://www.graphviz.org/download/ GraphViz]&lt;br /&gt;
|-&lt;br /&gt;
| Windows&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64.zip Zipfile] (Tcl/Tk 8.6), &amp;lt;br/&amp;gt; [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64-tcltk-85.zip Zipfile] (Tcl/Tk 8.5)&lt;br /&gt;
| Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Windows|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ GraphViz], [[Windows Installation Instructions]]&lt;br /&gt;
|-&lt;br /&gt;
| macOS&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.macos.zip Zipfile] (Universal ARM/Intel notarized)&amp;lt;br/&amp;gt; &lt;br /&gt;
[https://github.com/hhu-stups/homebrew-prob Homebrew Tap]&lt;br /&gt;
| macOS 10.14 (Mojave) or newer, Tcl/Tk 8.6 ([[#Tcl/Tk on macOS|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ Graphviz] ([[#Graphviz_Requirements|see below]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. More details [[#Java Requirements for B parser|are available below]].&lt;br /&gt;
&lt;br /&gt;
The Graphical User Interface of ProB Tcl/Tk requires Tcl/Tk 8.5 or 8.6. More details [[#Tcl/Tk Requirements for ProB Tcl/Tk|are available below]].&lt;br /&gt;
The default Tcl/Tk on macOS is broken and will result in &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt;, and you have to [[#Tcl/Tk Requirements for ProB Tcl/Tk|install another version of Tcl/Tk]]. (Note: Tcl/Tk 9 is not binary compatible and cannot yet be used.)&lt;br /&gt;
All releases include the command-line version &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt; which does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
macOS releases of ProB are universal binaries that support both &#039;&#039;&#039;aarch64&#039;&#039;&#039; (64-bit ARM/Apple Silicon) and &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel) architectures.&lt;br /&gt;
Windows and Linux releases are compiled only for &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel).&lt;br /&gt;
&lt;br /&gt;
The last version built for the x86 architecture (32-bit Intel) is ProB 1.8.0 (see [[DownloadPriorVersions|prior versions]]).&lt;br /&gt;
If you are using an unsupported architecture or system, you may still be able to [[Running ProB from source|run ProB from source]].&lt;br /&gt;
&lt;br /&gt;
Note that: on &amp;lt;b&amp;gt;macOS&amp;lt;/b&amp;gt; you  still have to right-click on the application and use &amp;quot;Open&amp;quot;, even though ProB Tcl/Tk (and probcli and all libraries) are signed and notarized. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Commented out while there is no current beta release:&lt;br /&gt;
=== Latest Beta Release ===&lt;br /&gt;
&lt;br /&gt;
The latest beta release is [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.13.1-beta1 1.13.1-beta1].&lt;br /&gt;
It may be older than the latest final release.&lt;br /&gt;
An official beta release always passes all of ProB&#039;s tests.&lt;br /&gt;
However, we do not follow the stringent checklist for final releases&lt;br /&gt;
(e.g., checking SICStus Prolog Spider warnings, checking coverage and additional manual&lt;br /&gt;
UI tests).&lt;br /&gt;
Also, we do not store coverage reports and other information necessary for T2 certification.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
=== Nightly Builds ===&lt;br /&gt;
&lt;br /&gt;
More current [https://stups.hhu-hosting.de/downloads/prob/tcltk/nightly/ nightly integration builds] are also available.&lt;br /&gt;
These releases are usually updated every night and old versions are not stored.&lt;br /&gt;
&lt;br /&gt;
Note for macOS users: Nightly builds of ProB are not signed or notarized, so macOS 10.15 and later (Catalina, Big Sur or Monterey, Ventura) will refuse to run them.&lt;br /&gt;
As a workaround, you will need to run &amp;lt;code&amp;gt;xattr -r -d com.apple.quarantine *&amp;lt;/code&amp;gt; inside the ProB directory before launching ProB.&lt;br /&gt;
The stable and beta releases listed above are signed and notarized, so they will run without extra steps.&lt;br /&gt;
&lt;br /&gt;
Automatically generated test [https://stups.hhu-hosting.de/internal/coverage/html/ coverage reports are also available].&lt;br /&gt;
They are usually updated once per week.&lt;br /&gt;
&lt;br /&gt;
=== Sourcecode ===&lt;br /&gt;
&lt;br /&gt;
You can download the latest Prolog sourcecode snapshot from: https://stups.hhu-hosting.de/downloads/prob/source/&lt;br /&gt;
&lt;br /&gt;
The source code for the ProB parsers (B, LTL, ...) can be obtained from: https://github.com/hhu-stups/probparsers&lt;br /&gt;
&lt;br /&gt;
=== Prior Versions ===&lt;br /&gt;
&lt;br /&gt;
Prior Versions of ProB going back to 1.3.1 [[DownloadPriorVersions|are available for download here]]. &lt;br /&gt;
If you are interested in still earlier releases, please have a look at the [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/ Download directory].&lt;br /&gt;
&lt;br /&gt;
== Other ProB tools ==&lt;br /&gt;
&lt;br /&gt;
=== ProB Jupyter Kernel ===&lt;br /&gt;
&lt;br /&gt;
You can now create Jupyter Notebooks in B using the ProB Jupyter kernel.&lt;br /&gt;
Downloads, instructions, and source code can be found on [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel its own page].&lt;br /&gt;
&lt;br /&gt;
You can [https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.cs.uni-duesseldorf.de%2Fgeneral%2Fstups%2Fprob2-jupyter-kernel.git/master?filepath=notebooks try out the ProB Jupyter kernel in your browser] without installing it first.&lt;br /&gt;
Note that &#039;&#039;&#039;notebooks are not saved permanently in this online version!&#039;&#039;&#039;&lt;br /&gt;
To keep your notebooks, you &#039;&#039;must&#039;&#039; download them before closing the page.&lt;br /&gt;
&lt;br /&gt;
=== ProB for Rodin ===&lt;br /&gt;
To install ProB for Rodin, first download a current version of Rodin (e.g., [https://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/3.9/ Rodin 3.9]). Inside Rodin, choose Help -&amp;gt; Install New Software and choose the pre-configured ProB update site.&lt;br /&gt;
&lt;br /&gt;
More [[Tutorial Rodin First Step|detailed installation instructions and a brief tutorial]] are available.&lt;br /&gt;
&lt;br /&gt;
* Nightly builds of ProB for Rodin 3 can be obtained from within Rodin by using the update site https://stups.hhu-hosting.de/rodin/prob1/nightly.&lt;br /&gt;
&lt;br /&gt;
=== ProB2-UI (based on JavaFX) ===&lt;br /&gt;
&lt;br /&gt;
The current release of the new JavaFX-based [[ProB2-UI]] is version 1.3.1. Installers are available for the following platforms:&lt;br /&gt;
&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-1.3.1.exe Windows (x86_64) installer] - requires Windows 10 or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1-notarized.zip macOS (Apple Silicon) application ZIP] (notarized) &amp;lt;!-- [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1.dmg macOS (Apple Silicon) application DMG] (not signed/notarized! [[#macOS issues|see below]])--&amp;gt; - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-x86_64-1.3.1.dmg macOS (Intel) application DMG] (not signed/notarized yet! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui_1.3.1_amd64.deb Linux (x86_64) .deb package] - requires glibc 2.17 or later (e. g. Debian 8 &amp;quot;jessie&amp;quot; or later, or Ubuntu 14.04 &amp;quot;trusty&amp;quot; or later)&lt;br /&gt;
&lt;br /&gt;
These installers include all necessary dependencies - you do not need to install a Java runtime manually.&lt;br /&gt;
&lt;br /&gt;
We also provide a [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui-1.3.1-multi.jar multi-platform jar] build, which requires an existing installation of Java 21 or later, but works without further installation on all supported platforms. &#039;&#039;&#039;The multi-platform jar is deprecated and will be removed in a future release.&#039;&#039;&#039; It only supports the x86_64 architecture, so it cannot run on macOS on Apple Silicon, unless you install an x86_64 JRE.&lt;br /&gt;
&lt;br /&gt;
Details about new features and improvements can be found in the [https://github.com/hhu-stups/prob2_ui/blob/develop/doc/prob2ui_release_history.md release history], along with download links for older versions.&lt;br /&gt;
&lt;br /&gt;
Snapshot builds of the current &#039;&#039;development&#039;&#039; version of ProB2-UI (1.4.0-SNAPSHOT) are also available:&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-1.4.0.exe Windows installer snapshot]&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-aarch64-1.4.0.dmg macOS (Apple Silicon) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-x86_64-1.4.0.dmg macOS (Intel) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/prob2-ui_1.4.0_amd64.deb Debian package snapshot]&lt;br /&gt;
&lt;br /&gt;
The source code for ProB2-UI is available at https://github.com/hhu-stups/prob2_ui and can be built by following [https://github.com/hhu-stups/prob2_ui#running-from-source these instructions].&lt;br /&gt;
&lt;br /&gt;
The underlying [[ProB Java API]] of ProB2-UI (aka the ProB 2 kernel) is available to Java developers via [https://central.sonatype.com/artifact/de.hhu.stups/de.prob2.kernel Maven Central].&lt;br /&gt;
Its source code can be obtained from: https://github.com/hhu-stups/prob2_kernel.&lt;br /&gt;
&lt;br /&gt;
==== macOS issues ====&lt;br /&gt;
&lt;br /&gt;
When you run the macOS app for the first time, you might have to open the app &#039;&#039;twice&#039;&#039; for ProB2-UI to start properly.&lt;br /&gt;
This should only happen once.&lt;br /&gt;
&lt;br /&gt;
Recent ProB2-UI macOS app releases are signed and notarized, so they should run without issues.&lt;br /&gt;
However, the multi-platform jar, all snapshot app builds, and older release app builds are &#039;&#039;not&#039;&#039; signed or notarized, so macOS will refuse to run them or say that the application is damaged.&lt;br /&gt;
As a workaround:&lt;br /&gt;
&lt;br /&gt;
* On macOS 15 (Sequoia) or later: Open the System Settings, go to &amp;quot;Privacy &amp;amp; Security&amp;quot;, and next to &amp;quot;ProB2-UI was blocked to protect your Mac&amp;quot;, and click on &amp;quot;Open Anyway&amp;quot;.&lt;br /&gt;
* On macOS 14 (Sonoma) or earlier: Right-click the app, select &amp;quot;Open&amp;quot;, and confirm the security dialog. If the dialog still doesn&#039;t give you an option to open the app, click &amp;quot;Cancel&amp;quot; and do the same thing again.&lt;br /&gt;
&lt;br /&gt;
For details, see [https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac &amp;quot;Open a Mac app from an unknown developer&amp;quot;] and [https://support.apple.com/en-us/102445#openanyway &amp;quot;Safely open apps on your Mac&amp;quot;] on Apple&#039;s support website.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
As a workaround, run this command in the folder where &#039;&#039;ProB2-UI.app&#039;&#039; is located:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xattr -r -d com.apple.quarantine &amp;quot;ProB2-UI.app&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multi-platform jar can also be started from the command line, which bypasses the signing/notarization check:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar prob2-ui-1.3.1-multi.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Editor Support ===&lt;br /&gt;
&lt;br /&gt;
==== VS Code ====&lt;br /&gt;
There is a [https://github.com/hhu-stups/b-language-extension B/ProB Language Support] extension for the Visual Studio Code (VS Code) editor. It integrates with the [[Using the Command-Line Version of ProB|command line tool probcli]] to obtain error markers for syntax and type errors. It can also be used for [[Well-Definedness Checking#VSCode|well-definedness checking]].&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/vscode_plugin Download for manual installation]&lt;br /&gt;
&lt;br /&gt;
==== Vim ====&lt;br /&gt;
A [https://github.com/bivab/prob.vim Vim plugin for ProB is available]. It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. Vim has built-in syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
==== BBEdit ====&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBEdit language modules for B, TLA+, CSP and Prolog] are available; these do not use the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]].&lt;br /&gt;
&lt;br /&gt;
== Java Requirements for B Parser ==&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. Java 11, 17, 21, 25, etc. are also fully supported.&lt;br /&gt;
&#039;&#039;&#039;A future ProB release will require Java 17 or newer.&#039;&#039;&#039;&lt;br /&gt;
ProB 1.9.3 is the last version to support Java 7. ProB 1.5.0 is the last version to support Java 6.&lt;br /&gt;
&lt;br /&gt;
You can install a Java Runtime Environment (JRE) from various sources, such as [https://adoptium.net/ Eclipse Adoptium], [https://www.azul.com/downloads/ Azul Zulu], or your system package manager.&lt;br /&gt;
&lt;br /&gt;
Note: on some systems (macOS) you may have to install the full Java Development Kit (JDK), and not just the JRE, so that Java becomes available to the command-line tools.&lt;br /&gt;
Type &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; to check which version is used by default for command-line tools; see also [http://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x this discussion on StackOverflow].&lt;br /&gt;
In case you have trouble starting the Java parser you can now set the &amp;lt;code&amp;gt;JAVA_PATH&amp;lt;/code&amp;gt; preference of ProB to point to the &amp;lt;code&amp;gt;java&amp;lt;/code&amp;gt; tool (or java.exe on Windows).&lt;br /&gt;
&lt;br /&gt;
To check whether ProB can correctly use its Java parser you can type the following (using probcli.exe on Windows):&lt;br /&gt;
 probcli -version -v&lt;br /&gt;
This will try and start the parser and obtain the parser version.&lt;br /&gt;
In case Java is not correctly installed you should get an error message.&lt;br /&gt;
If you see the error message&lt;br /&gt;
 &amp;lt;tt&amp;gt;Unsupported major.minor version 52.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
this means you do not have Java 8 or newer installed. You can try setting the path to the correct java version by setting the JAVA_PATH preference as follows:&lt;br /&gt;
 probcli -p JAVA_PATH path/to/java -version -v&lt;br /&gt;
&lt;br /&gt;
== Tcl/Tk Requirements for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk requires an installation of Tcl/Tk 8.5 or Tcl/Tk 8.6. The command-line tool probcli does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require this.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on macOS ===&lt;br /&gt;
Important note: macOS comes pre-installed with a version of Tcl/Tk which is broken.&lt;br /&gt;
This may result in the display of unreadable &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt; or crashes in the standard file dialogs.&lt;br /&gt;
There are various options to install Tcl/Tk:&lt;br /&gt;
* with Homebrew using the [https://formulae.brew.sh/formula/tcl-tk tcl-tk formula]&lt;br /&gt;
* with [https://ports.macports.org/port/tcl/ MacPorts]&lt;br /&gt;
* use the  [http://www.activestate.com/activetcl/downloads/ ActiveTcl version of Tcl/Tk]&lt;br /&gt;
You should probably start ProB using the &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script: it will auto-detect Tcl/Tk versions and set the SP_TCL_DSO environment variable.&lt;br /&gt;
Below are more details:&lt;br /&gt;
&lt;br /&gt;
==== Tcl/Tk from Homebrew or MacPorts ====&lt;br /&gt;
&lt;br /&gt;
You can install a newer Tcl/Tk (e.g., 8.6.17) using [https://brew.sh &amp;lt;b&amp;gt;Homebrew&amp;lt;/b&amp;gt;] or [https://www.macports.org &amp;lt;b&amp;gt;MacPorts&amp;lt;/b&amp;gt;].&lt;br /&gt;
Note: In the earlier release 8.6.11 [https://bugs.python.org/issue44828 file open and file save dialogs will not work].&lt;br /&gt;
For Homebrew the command to install the[https://formulae.brew.sh/formula/tcl-tk tcl-tk formula] is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The latest versions of Homebrew now install Tcl/Tk 9.0 which does not work yet with ProB.&lt;br /&gt;
In this case install&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk@8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, as the location of the libraries is not standard, you have to define the variable &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script should set SP_TCL_DSO automatically.&lt;br /&gt;
You can also define and export this variable yourself before starting ProB from the Terminal by typing this (you may have to adapt the link if you are using another version of Tcl/Tk):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SP_TCL_DSO=/opt/homebrew/Cellar/tcl-tk@8/8.6.17/lib/libtcl8.6.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have uses MacPorts the path is probably &amp;lt;tt&amp;gt;/opt/local/lib/libtcl.dylib&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set the variable by adding &amp;lt;tt&amp;gt;-DSP_TCL_DSO=/usr/local/Cellar/tcl-tk/8.6.12/lib/libtcl8.6.dylib&amp;lt;/tt&amp;gt; to the command starting ProB. You may also have to install &amp;lt;tt&amp;gt;tk-table&amp;lt;/tt&amp;gt; package yourself (it is bundled with Active Tcl).&lt;br /&gt;
&lt;br /&gt;
==== Active Tcl ====&lt;br /&gt;
&lt;br /&gt;
The [http://www.activestate.com/activetcl/downloads/ the ActiveTcl version of Tcl/Tk] is automatically recognised by ProB and you do not have to set &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, in Active Tcl/Tk 8.6 on macOS the double click in the &amp;quot;Operations View&amp;quot; or other views  is not working correctly.&lt;br /&gt;
You have to hit the RETURN key in the &amp;quot;Operations View&amp;quot; or right-click on an operation and select &amp;quot;Perform ...&amp;quot;  to execute an operation until this is fixed.&lt;br /&gt;
The older ersion [http://bugs.python.org/issue15853 8.5.12 has a bug related to copying text], see also [http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3555211&amp;amp;group_id=12997&amp;amp;atid=112997_type here]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Other Notes ====&lt;br /&gt;
Note: on macOS Catalina or later the Tcl/Tk menu bar is sometimes not working. Switching to another application and then back to ProB seems to solve the problem.&lt;br /&gt;
If you see the message &amp;quot;&amp;lt;tt&amp;gt;macOS 11 or later required !&amp;lt;/tt&amp;gt;&amp;quot;  in the terminal when launching &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; you should re-install Tcl/Tk as described above.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Windows ===&lt;br /&gt;
We currently provide two downloads of ProB, one for Tcl/Tk 8.6 (which we recommend)&lt;br /&gt;
and a version for Tcl/Tk 8.5.&lt;br /&gt;
You can use for example the  [https://www.activestate.com/products/tcl/ ActiveTcl releases].&lt;br /&gt;
Note: For the 64 bit version of ProB for Windows, you have to install the 64 bit Tcl/Tk 8.5 version!&lt;br /&gt;
ProB 1.12 (currently available as nightly build) works with both Tcl/Tk 8.5 and 8.6.&lt;br /&gt;
You may have to point the environment variable SP_TCL_DSO to the correct DLL before starting ProB. For Tcl/Tk 8.5 this is typically&lt;br /&gt;
base-tcl8.5-thread-win32-x86_64.dll.&lt;br /&gt;
You can either go to System -&amp;gt; Settings -&amp;gt; Advanced -&amp;gt; Environment Variables&lt;br /&gt;
or use the setx command for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setx SP_TCL_DSO C:\Tcl\bin\base-tcl8.5-thread-win32-x86_64.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Linux ===&lt;br /&gt;
On Linux you can typically install Tcl/Tk using &amp;lt;tt&amp;gt;sudo apt-get install tcl8.5 tk8.5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
On very recent Linux systems (such as Ubuntu 20.04) you may want to download (and compile) [https://www.tcl.tk/software/tcltk/downloadnow85.html Tcl/Tk 8.5] or use [https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/tcl8.5_8.5.19-4_amd64.deb.html packages from earlier releases].&lt;br /&gt;
&lt;br /&gt;
On Linux OpenSuse (12.3) you may have to perform the following for ProB to work:&lt;br /&gt;
 ln -s /usr/lib/libtk8.5.so /usr/lib/libtk8.5.so.0&lt;br /&gt;
 ln -s /usr/lib/libtcl8.5.so /usr/lib/libtcl8.5.so.0&lt;br /&gt;
&lt;br /&gt;
Also, some of the feature require the table extension, which can be installed like this:&lt;br /&gt;
 sudo apt install tk-table&lt;br /&gt;
Finally, support for .png ANIMATION_IMG declarations requires the Img package:&lt;br /&gt;
 sudo apt install libtk-img&lt;br /&gt;
&lt;br /&gt;
== Graphviz Requirements ==&lt;br /&gt;
&lt;br /&gt;
If you wish to view various visualizations generated by ProB Tcl/Tk or probcli you will need [http://www.graphviz.org/ GraphViz].&lt;br /&gt;
ProB generates various graphs (state space, custom graph, machine hierarchy,...) as .dot files and then  uses the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; to layout the graph and convert it to PDF.&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can also use dot-file viewer such as the &amp;lt;tt&amp;gt;dotty&amp;lt;/tt&amp;gt; program from GraphViz in Linux.&lt;br /&gt;
On macOS and Windows  it is more difficult to obtain a good viewer application for dot files. VS Code with the [https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview Graphviz Interactive Preview] extension is a candidate.&lt;br /&gt;
The commercial OmniGraffle macOS application can import .dot files.  A free alternative on macOS may be [https://ports.macports.org/port/graphviz-gui/ graphviz-gui] by [https://www.macports.org MacPorts]. To install the application do this&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz-gui&amp;lt;/tt&amp;gt;&lt;br /&gt;
The viewer can now be found in /Applications/MacPorts/Graphviz.app (you may have to set the ProB graphical viewer preference &amp;lt;tt&amp;gt;dot_viewer&amp;lt;/tt&amp;gt; to this path).&lt;br /&gt;
If you do not manage to install a viewer, you should select Preferences -&amp;gt; Graphical Viewer -&amp;gt; PDF within ProB Tcl/Tk.&lt;br /&gt;
Indeed, many ProB commands work directly with the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; which you can install on macOS with MacPorts like this:&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
On Mac you can now install the latest version of Graphviz using [https://brew.sh HomeBrew]:&lt;br /&gt;
&lt;br /&gt;
 1. &amp;lt;tt&amp;gt;brew uninstall graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
 2. &amp;lt;tt&amp;gt;brew install graphviz --with-gts&amp;lt;/tt&amp;gt;&lt;br /&gt;
 3. &amp;lt;tt&amp;gt;brew link --overwrite graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 1. is optional; you only need to use it if you have a prior version of Graphviz installed.&lt;br /&gt;
Step3 links the binaries to /usr/local/bin.&lt;br /&gt;
This is probably better than using the [http://www.pixelglow.com/graphviz/ older version from Pixelglow].&lt;br /&gt;
&lt;br /&gt;
You can also manually set the DOT (path_to_dot) preference if ProB cannot find the Graphviz dot binary you have installed.&lt;br /&gt;
&lt;br /&gt;
== Short Release History ==&lt;br /&gt;
&lt;br /&gt;
The full  [[ProB_Release_History | ProB release history can be found here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-12-21&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.1]] is available. Automatic use of operation reuse and compression for model checking. STORE_DETAILED_TRANSITION_INFOS preference and calls LTL property. Interactive proof via animator interface for Rodin PO files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-06-26&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.0]] is available. Interactive trace replay. Many [[VisB#VisB_DEFINITIONS |VisB]] improvements (use definition files for all models, grouping of VISB objects in a single definition, VISB_CLICK_META_INFOS, ...). Profiling can be turned on via PROFILING_INFO preference. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.13.0]] is available. Better Rodin theory support. Template strings. Unicode improvements. READ_JSON and other new external functions. VisB support for groups and &amp;quot;use&amp;quot; element. [[Monte_Carlo_Tree_Search_Game_Play|MCTS game play]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-03&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2-fix1]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-08-10&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2]] is available. [[VisB#VisB_DEFINITIONS_2 |VisB]] improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-04-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.0]] is available. Call stack infos, performance improvements in parser and solver,  new [[LTL_Model_Checking#Supported_Syntax |LTL]] operators, [[VisB#VisB_Additional_SVG_Objects|VisB]] improvements, reals/floats for [[Event-B_Theories|Rodin theories]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-12-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.1]] is available. Highlights: identifiers between backquotes, flexible JSON trace replay, DPLLT solving command, improvements to Z3 backend.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-10-06&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.0]] is available. Highlights: improved support for infinite sets, operation caching (OPERATION_REUSE), faster LTL checking for safety formulas, more compact .prob files, VisB HTML export, constructive Z3 translation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-12-15&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.10.0]] is available. Highlights: well-definedness prover, REAL datatype, -lint comand for VSCode and Atom, improved unsat core and error messages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.3]] is available. Highlights: performance improvements, new external functions, performance monitoring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.2]] is available. Minor bugfix release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.1]] is available. Maintenance release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-07-12&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.0]] is available. Highlights: improved error feedback, improved Unicode support, regular expression library, memoization.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-10-01&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.2]] is available. Highlights: improved error feedback, support [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel Jupyter kernel], first [[Alloy|support for Alloy models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-03-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.0]] is available. Highlights: terminal colour support, performance improvements for displaying very large values, improved symmetry breaking and constraint solving.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-10-05&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.1]] is available. Highlights: performance, non-deterministic assigned variables shown, Z improvements, export history to HTML.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-07-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.0]] is available. Highlights: improved [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], improved XML/CSV data import and export, RULE DSL language, many improvements in constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-10-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.1]] is available. Highlights: [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], LET and IF-THEN-ELSE for expressions and predicates, XML logging, XML data import, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-04-22&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.0]] is available. Highlights: [[Tutorial_Directed_Model_Checking|directed model checking]], [[Using_ProB_with_Z3|Z3 available as backend]], B line comments and unicode symbols, improved error messages, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2015-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.5.0]] is available. Highlights: improved random enumeration, MACE/SEM style static symmetry reduction for deferred set elements, [[State_Space_Coverage_Analyses|MC/DC coverage]] analysis for guards and invariants, [[TLC|improved TLC interface]], bug fixes and improvements including but not limited to the constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.1]], a small bugfix-only release is available. For a list of new features in 1.4.0 see below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-18&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.0]] is available. Highlights: CLP(FD)-based constraint solver enabled by default, kernel can handle more operations symbolically, [[TLC|integration of the TLC model checker]], bug fixes and performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2013-03-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.6]] is available. Highlights: improved constraint propagation for division, modulo, intervals, model checking progress bar, performance improvements, [[Using_ProB_with_KODKOD | improved Kodkod backend]] and use within REPL, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-10-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.5]] is available. Highlights: support for external and recursive functions, optional Kodkod backend, [[TLA|TLA+ support]], performance improvements, pragmas, units inference, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-03-30&#039;&#039;&#039;&lt;br /&gt;
A first prototype of an online [[ProB_Logic_Calculator|ProB Logic Calculator]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-11-21&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.4 is available. Highlights: Evaluation View and Eval window, CSP assertion checking, improved editor, 64-bit version for Mac and Linux, performance improvements, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-02-10&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.3 and ProB for Rodin 2.3 is available. Highlights: improved performance, constrained-based deadlock checking, record detection, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2010-07-30&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.2 is available. Highlights: improved performance, constraint solving over integers (enable in Advanced Preferences), much improved Z support, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-12-07&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.1 is available. Highlights: new data-structure for large sets and relations (see FM 2009), multi-level validation for Event-B, improved constraint propagation for boolean connectives, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-03-20&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.0 is available for download. Highlights: New parser and integrated typechecker, install as AtelierB plugin, improved kernel with support for large sets/relations, improved CSP support, faster LTL model checker, Undo/Redo in text editor, graphical formula viewer, user definable custom animations with gifs.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Download&amp;diff=6094</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Download&amp;diff=6094"/>
		<updated>2026-02-09T12:55:52Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* ProB2-UI (based on JavaFX) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Latest Release ==&lt;br /&gt;
&lt;br /&gt;
Below are links for downloading the latest stable release of probcli (the command line version of ProB) and ProB Tcl/Tk (ProB with a graphical user interface written in Tcl/Tk).&lt;br /&gt;
Note: please use the provided start scripts (StartProB.sh or StartProBWin.bat) to start ProB.&lt;br /&gt;
The list of changes can be found in the [[ProB_Release_History | ProB release history]].&lt;br /&gt;
&lt;br /&gt;
Details of the [[ProBLicence| ProB Licence can be found here]].&lt;br /&gt;
ProB is free to use and open source. For commercial support contact  [https://www.stups.uni-duesseldorf.de/~leuschel/ Michael Leuschel]. In particular, we can provide access to the validation report for using ProB as a tool of class T2 or T3 within the European norm [https://de.wikipedia.org/wiki/EN_50128 EN50128].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;table table-bordered wikitable&amp;quot; &amp;lt;!-- table and table-bordered for Bootstrap (ProB skin), wikitable for MediaWiki (Vector, MonoBook, etc. skins) --&amp;gt;&lt;br /&gt;
! Platform&lt;br /&gt;
! Release Date&lt;br /&gt;
! Download&lt;br /&gt;
! Dependencies&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;background-color:lightgrey;&amp;quot; | 1.15.1&lt;br /&gt;
|-&lt;br /&gt;
| Linux &lt;br /&gt;
| 21.12.2025 &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.linux64.tar.gz Tarball]&amp;lt;br/&amp;gt;&lt;br /&gt;
| Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Linux|see below]]), [https://www.graphviz.org/download/ GraphViz]&lt;br /&gt;
|-&lt;br /&gt;
| Windows&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64.zip Zipfile] (Tcl/Tk 8.6), &amp;lt;br/&amp;gt; [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64-tcltk-85.zip Zipfile] (Tcl/Tk 8.5)&lt;br /&gt;
| Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Windows|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ GraphViz], [[Windows Installation Instructions]]&lt;br /&gt;
|-&lt;br /&gt;
| macOS&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.macos.zip Zipfile] (Universal ARM/Intel notarized)&amp;lt;br/&amp;gt; &lt;br /&gt;
[https://github.com/hhu-stups/homebrew-prob Homebrew Tap]&lt;br /&gt;
| macOS 10.14 (Mojave) or newer, Tcl/Tk 8.6 ([[#Tcl/Tk on macOS|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ Graphviz] ([[#Graphviz_Requirements|see below]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. More details [[#Java Requirements for B parser|are available below]].&lt;br /&gt;
&lt;br /&gt;
The Graphical User Interface of ProB Tcl/Tk requires Tcl/Tk 8.5 or 8.6. More details [[#Tcl/Tk Requirements for ProB Tcl/Tk|are available below]].&lt;br /&gt;
The default Tcl/Tk on macOS is broken and will result in &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt;, and you have to [[#Tcl/Tk Requirements for ProB Tcl/Tk|install another version of Tcl/Tk]]. (Note: Tcl/Tk 9 is not binary compatible and cannot yet be used.)&lt;br /&gt;
All releases include the command-line version &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt; which does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
macOS releases of ProB are universal binaries that support both &#039;&#039;&#039;aarch64&#039;&#039;&#039; (64-bit ARM/Apple Silicon) and &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel) architectures.&lt;br /&gt;
Windows and Linux releases are compiled only for &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel).&lt;br /&gt;
&lt;br /&gt;
The last version built for the x86 architecture (32-bit Intel) is ProB 1.8.0 (see [[DownloadPriorVersions|prior versions]]).&lt;br /&gt;
If you are using an unsupported architecture or system, you may still be able to [[Running ProB from source|run ProB from source]].&lt;br /&gt;
&lt;br /&gt;
Note that: on &amp;lt;b&amp;gt;macOS&amp;lt;/b&amp;gt; you  still have to right-click on the application and use &amp;quot;Open&amp;quot;, even though ProB Tcl/Tk (and probcli and all libraries) are signed and notarized. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Commented out while there is no current beta release:&lt;br /&gt;
=== Latest Beta Release ===&lt;br /&gt;
&lt;br /&gt;
The latest beta release is [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.13.1-beta1 1.13.1-beta1].&lt;br /&gt;
It may be older than the latest final release.&lt;br /&gt;
An official beta release always passes all of ProB&#039;s tests.&lt;br /&gt;
However, we do not follow the stringent checklist for final releases&lt;br /&gt;
(e.g., checking SICStus Prolog Spider warnings, checking coverage and additional manual&lt;br /&gt;
UI tests).&lt;br /&gt;
Also, we do not store coverage reports and other information necessary for T2 certification.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
=== Nightly Builds ===&lt;br /&gt;
&lt;br /&gt;
More current [https://stups.hhu-hosting.de/downloads/prob/tcltk/nightly/ nightly integration builds] are also available.&lt;br /&gt;
These releases are usually updated every night and old versions are not stored.&lt;br /&gt;
&lt;br /&gt;
Note for macOS users: Nightly builds of ProB are not signed or notarized, so macOS 10.15 and later (Catalina, Big Sur or Monterey, Ventura) will refuse to run them.&lt;br /&gt;
As a workaround, you will need to run &amp;lt;code&amp;gt;xattr -r -d com.apple.quarantine *&amp;lt;/code&amp;gt; inside the ProB directory before launching ProB.&lt;br /&gt;
The stable and beta releases listed above are signed and notarized, so they will run without extra steps.&lt;br /&gt;
&lt;br /&gt;
Automatically generated test [https://stups.hhu-hosting.de/internal/coverage/html/ coverage reports are also available].&lt;br /&gt;
They are usually updated once per week.&lt;br /&gt;
&lt;br /&gt;
=== Sourcecode ===&lt;br /&gt;
&lt;br /&gt;
You can download the latest Prolog sourcecode snapshot from: https://stups.hhu-hosting.de/downloads/prob/source/&lt;br /&gt;
&lt;br /&gt;
The source code for the ProB parsers (B, LTL, ...) can be obtained from: https://github.com/hhu-stups/probparsers&lt;br /&gt;
&lt;br /&gt;
=== Prior Versions ===&lt;br /&gt;
&lt;br /&gt;
Prior Versions of ProB going back to 1.3.1 [[DownloadPriorVersions|are available for download here]]. &lt;br /&gt;
If you are interested in still earlier releases, please have a look at the [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/ Download directory].&lt;br /&gt;
&lt;br /&gt;
== Other ProB tools ==&lt;br /&gt;
&lt;br /&gt;
=== ProB Jupyter Kernel ===&lt;br /&gt;
&lt;br /&gt;
You can now create Jupyter Notebooks in B using the ProB Jupyter kernel.&lt;br /&gt;
Downloads, instructions, and source code can be found on [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel its own page].&lt;br /&gt;
&lt;br /&gt;
You can [https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.cs.uni-duesseldorf.de%2Fgeneral%2Fstups%2Fprob2-jupyter-kernel.git/master?filepath=notebooks try out the ProB Jupyter kernel in your browser] without installing it first.&lt;br /&gt;
Note that &#039;&#039;&#039;notebooks are not saved permanently in this online version!&#039;&#039;&#039;&lt;br /&gt;
To keep your notebooks, you &#039;&#039;must&#039;&#039; download them before closing the page.&lt;br /&gt;
&lt;br /&gt;
=== ProB for Rodin ===&lt;br /&gt;
To install ProB for Rodin, first download a current version of Rodin (e.g., [https://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/3.9/ Rodin 3.9]). Inside Rodin, choose Help -&amp;gt; Install New Software and choose the pre-configured ProB update site.&lt;br /&gt;
&lt;br /&gt;
More [[Tutorial Rodin First Step|detailed installation instructions and a brief tutorial]] are available.&lt;br /&gt;
&lt;br /&gt;
* Nightly builds of ProB for Rodin 3 can be obtained from within Rodin by using the update site https://stups.hhu-hosting.de/rodin/prob1/nightly.&lt;br /&gt;
&lt;br /&gt;
=== ProB2-UI (based on JavaFX) ===&lt;br /&gt;
&lt;br /&gt;
The current release of the new JavaFX-based [[ProB2-UI]] is version 1.3.1. Installers are available for the following platforms:&lt;br /&gt;
&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-1.3.1.exe Windows (x86_64) installer] - requires Windows 10 or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1-notarized.zip macOS (Apple Silicon) application ZIP] (notarized) &amp;lt;!-- [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1.dmg macOS (Apple Silicon) application DMG] (not signed/notarized! [[#macOS issues|see below]])--&amp;gt; - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-x86_64-1.3.1.dmg macOS (Intel) application DMG] (not signed/notarized yet! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui_1.3.1_amd64.deb Linux (x86_64) .deb package] - requires glibc 2.17 or later (e. g. Debian 8 &amp;quot;jessie&amp;quot; or later, or Ubuntu 14.04 &amp;quot;trusty&amp;quot; or later)&lt;br /&gt;
&lt;br /&gt;
These installers include all necessary dependencies - you do not need to install a Java runtime manually.&lt;br /&gt;
&lt;br /&gt;
We also provide a [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui-1.3.1-multi.jar multi-platform jar] build, which requires an existing installation of Java 21 or later, but works without further installation on all supported platforms. &#039;&#039;&#039;The multi-platform jar is deprecated and will be removed in a future release.&#039;&#039;&#039; It only supports the x86_64 architecture, so it cannot run on macOS on Apple Silicon, unless you install an x86_64 JRE.&lt;br /&gt;
&lt;br /&gt;
Details about new features and improvements can be found in the [https://github.com/hhu-stups/prob2_ui/blob/develop/doc/prob2ui_release_history.md release history], along with download links for older versions.&lt;br /&gt;
&lt;br /&gt;
Snapshot builds of the current &#039;&#039;development&#039;&#039; version of ProB2-UI (1.4.0-SNAPSHOT) are also available:&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-1.4.0.exe Windows installer snapshot]&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-aarch64-1.4.0.dmg macOS (Apple Silicon) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-x86_64-1.4.0.dmg macOS (Intel) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/prob2-ui_1.4.0_amd64.deb Debian package snapshot]&lt;br /&gt;
&lt;br /&gt;
The source code for ProB2-UI is available at https://github.com/hhu-stups/prob2_ui and can be built by following [https://github.com/hhu-stups/prob2_ui#running-from-source these instructions].&lt;br /&gt;
&lt;br /&gt;
The underlying [[ProB Java API]] of ProB2-UI (aka the ProB 2 kernel) is available to Java developers via [https://central.sonatype.com/artifact/de.hhu.stups/de.prob2.kernel Maven Central].&lt;br /&gt;
Its source code can be obtained from: https://github.com/hhu-stups/prob2_kernel.&lt;br /&gt;
&lt;br /&gt;
==== macOS issues ====&lt;br /&gt;
&lt;br /&gt;
When you run the macOS app for the first time, you might have to open the app &#039;&#039;twice&#039;&#039; for ProB2-UI to start properly.&lt;br /&gt;
This should only happen once.&lt;br /&gt;
&lt;br /&gt;
Recent ProB2-UI macOS app releases are signed and notarized, so they should run without issues.&lt;br /&gt;
However, the multi-platform jar, all snapshot app builds, and older release app builds are &#039;&#039;not&#039;&#039; signed or notarized, so macOS will refuse to run them or say that the application is damaged.&lt;br /&gt;
As a workaround:&lt;br /&gt;
&lt;br /&gt;
* On macOS 15 (Sequoia) or later: Open the System Settings, go to &amp;quot;Privacy &amp;amp; Security&amp;quot;, and next to &amp;quot;ProB2-UI was blocked to protect your Mac&amp;quot;, and click on &amp;quot;Open Anyway&amp;quot;.&lt;br /&gt;
* On macOS 14 (Sonoma) or earlier: Right-click the app, select &amp;quot;Open&amp;quot;, and confirm the security dialog. If the dialog still doesn&#039;t give you an option to open the app, click &amp;quot;Cancel&amp;quot; and do the same thing again.&lt;br /&gt;
&lt;br /&gt;
For details, see [https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac &amp;quot;Open a Mac app from an unknown developer&amp;quot;] and [https://support.apple.com/en-us/102445#openanyway &amp;quot;Safely open apps on your Mac&amp;quot;] on Apple&#039;s support website.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
As a workaround, run this command in the folder where &#039;&#039;ProB2-UI.app&#039;&#039; is located:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xattr -r -d com.apple.quarantine &amp;quot;ProB2-UI.app&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multi-platform jar can also be started from the command line, which bypasses the signing/notarization check:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar prob2-ui-1.3.1-multi.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Editor Support ===&lt;br /&gt;
&lt;br /&gt;
==== VS Code ====&lt;br /&gt;
There is a [https://github.com/hhu-stups/b-language-extension B/ProB Language Support] extension for the Visual Studio Code (VS Code) editor. It integrates with the [[Using the Command-Line Version of ProB|command line tool probcli]] to obtain error markers for syntax and type errors. It can also be used for [[Well-Definedness Checking#VSCode|well-definedness checking]].&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/vscode_plugin Download for manual installation]&lt;br /&gt;
&lt;br /&gt;
==== Vim ====&lt;br /&gt;
A [https://github.com/bivab/prob.vim Vim plugin for ProB is available]. It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. Vim has built-in syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
==== BBEdit ====&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBEdit language modules for B, TLA+, CSP and Prolog] are available; these do not use the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]].&lt;br /&gt;
&lt;br /&gt;
== Java Requirements for B Parser ==&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. Java 11, 17, 21, 25, etc. are also fully supported.&lt;br /&gt;
&#039;&#039;&#039;A future ProB release will require Java 17 or newer.&#039;&#039;&#039;&lt;br /&gt;
ProB 1.9.3 is the last version to support Java 7. ProB 1.5.0 is the last version to support Java 6.&lt;br /&gt;
&lt;br /&gt;
You can install a Java Runtime Environment (JRE) from various sources, such as [https://adoptium.net/ Eclipse Adoptium], [https://www.azul.com/downloads/ Azul Zulu], or your system package manager.&lt;br /&gt;
&lt;br /&gt;
Note: on some systems (macOS) you may have to install the full Java Development Kit (JDK), and not just the JRE, so that Java becomes available to the command-line tools.&lt;br /&gt;
Type &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; to check which version is used by default for command-line tools; see also [http://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x this discussion on StackOverflow].&lt;br /&gt;
In case you have trouble starting the Java parser you can now set the &amp;lt;code&amp;gt;JAVA_PATH&amp;lt;/code&amp;gt; preference of ProB to point to the &amp;lt;code&amp;gt;java&amp;lt;/code&amp;gt; tool (or java.exe on Windows).&lt;br /&gt;
&lt;br /&gt;
To check whether ProB can correctly use its Java parser you can type the following (using probcli.exe on Windows):&lt;br /&gt;
 probcli -version -v&lt;br /&gt;
This will try and start the parser and obtain the parser version.&lt;br /&gt;
In case Java is not correctly installed you should get an error message.&lt;br /&gt;
If you see the error message&lt;br /&gt;
 &amp;lt;tt&amp;gt;Unsupported major.minor version 52.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
this means you do not have Java 8 or newer installed. You can try setting the path to the correct java version by setting the JAVA_PATH preference as follows:&lt;br /&gt;
 probcli -p JAVA_PATH path/to/java -version -v&lt;br /&gt;
&lt;br /&gt;
== Tcl/Tk Requirements for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk requires an installation of Tcl/Tk 8.5 or Tcl/Tk 8.6. The command-line tool probcli does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require this.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on macOS ===&lt;br /&gt;
Important note: macOS comes pre-installed with a version of Tcl/Tk which is broken.&lt;br /&gt;
This may result in the display of unreadable &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt; or crashes in the standard file dialogs.&lt;br /&gt;
There are various options to install Tcl/Tk:&lt;br /&gt;
* with Homebrew using the [https://formulae.brew.sh/formula/tcl-tk tcl-tk formula]&lt;br /&gt;
* with [https://ports.macports.org/port/tcl/ MacPorts]&lt;br /&gt;
* use the  [http://www.activestate.com/activetcl/downloads/ ActiveTcl version of Tcl/Tk]&lt;br /&gt;
You should probably start ProB using the &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script: it will auto-detect Tcl/Tk versions and set the SP_TCL_DSO environment variable.&lt;br /&gt;
Below are more details:&lt;br /&gt;
&lt;br /&gt;
==== Tcl/Tk from Homebrew or MacPorts ====&lt;br /&gt;
&lt;br /&gt;
You can install a newer Tcl/Tk (e.g., 8.6.13) using [https://brew.sh &amp;lt;b&amp;gt;Homebrew&amp;lt;/b&amp;gt;] or [https://www.macports.org &amp;lt;b&amp;gt;MacPorts&amp;lt;/b&amp;gt;].&lt;br /&gt;
Note: In the earlier release 8.6.11 [https://bugs.python.org/issue44828 file open and file save dialogs will not work].&lt;br /&gt;
For Homebrew the command to install the[https://formulae.brew.sh/formula/tcl-tk tcl-tk formula] is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The latest versions of Homebrew now install Tcl/Tk 9.0 which does not work yet with ProB.&lt;br /&gt;
In this case install&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk@8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, as the location of the libraries is not standard, you have to define the variable &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script should set SP_TCL_DSO automatically.&lt;br /&gt;
You can also define and export this variable yourself before starting ProB from the Terminal by typing this (you may have to adapt the link if you are using another version of Tcl/Tk):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SP_TCL_DSO=/opt/homebrew/Cellar/tcl-tk@8/8.6.16/lib/libtcl8.6.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have uses MacPorts the path is probably &amp;lt;tt&amp;gt;/opt/local/lib/libtcl.dylib&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set the variable by adding &amp;lt;tt&amp;gt;-DSP_TCL_DSO=/usr/local/Cellar/tcl-tk/8.6.12/lib/libtcl8.6.dylib&amp;lt;/tt&amp;gt; to the command starting ProB. You may also have to install &amp;lt;tt&amp;gt;tk-table&amp;lt;/tt&amp;gt; package yourself (it is bundled with Active Tcl).&lt;br /&gt;
&lt;br /&gt;
==== Active Tcl ====&lt;br /&gt;
&lt;br /&gt;
The [http://www.activestate.com/activetcl/downloads/ the ActiveTcl version of Tcl/Tk] is automatically recognised by ProB and you do not have to set &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, in Active Tcl/Tk 8.6 on macOS the double click in the &amp;quot;Operations View&amp;quot; or other views  is not working correctly.&lt;br /&gt;
You have to hit the RETURN key in the &amp;quot;Operations View&amp;quot; or right-click on an operation and select &amp;quot;Perform ...&amp;quot;  to execute an operation until this is fixed.&lt;br /&gt;
The older ersion [http://bugs.python.org/issue15853 8.5.12 has a bug related to copying text], see also [http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3555211&amp;amp;group_id=12997&amp;amp;atid=112997_type here]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Other Notes ====&lt;br /&gt;
Note: on macOS Catalina or later the Tcl/Tk menu bar is sometimes not working. Switching to another application and then back to ProB seems to solve the problem.&lt;br /&gt;
If you see the message &amp;quot;&amp;lt;tt&amp;gt;macOS 11 or later required !&amp;lt;/tt&amp;gt;&amp;quot;  in the terminal when launching &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; you should re-install Tcl/Tk as described above.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Windows ===&lt;br /&gt;
We currently provide two downloads of ProB, one for Tcl/Tk 8.6 (which we recommend)&lt;br /&gt;
and a version for Tcl/Tk 8.5.&lt;br /&gt;
You can use for example the  [https://www.activestate.com/products/tcl/ ActiveTcl releases].&lt;br /&gt;
Note: For the 64 bit version of ProB for Windows, you have to install the 64 bit Tcl/Tk 8.5 version!&lt;br /&gt;
ProB 1.12 (currently available as nightly build) works with both Tcl/Tk 8.5 and 8.6.&lt;br /&gt;
You may have to point the environment variable SP_TCL_DSO to the correct DLL before starting ProB. For Tcl/Tk 8.5 this is typically&lt;br /&gt;
base-tcl8.5-thread-win32-x86_64.dll.&lt;br /&gt;
You can either go to System -&amp;gt; Settings -&amp;gt; Advanced -&amp;gt; Environment Variables&lt;br /&gt;
or use the setx command for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setx SP_TCL_DSO C:\Tcl\bin\base-tcl8.5-thread-win32-x86_64.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Linux ===&lt;br /&gt;
On Linux you can typically install Tcl/Tk using &amp;lt;tt&amp;gt;sudo apt-get install tcl8.5 tk8.5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
On very recent Linux systems (such as Ubuntu 20.04) you may want to download (and compile) [https://www.tcl.tk/software/tcltk/downloadnow85.html Tcl/Tk 8.5] or use [https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/tcl8.5_8.5.19-4_amd64.deb.html packages from earlier releases].&lt;br /&gt;
&lt;br /&gt;
On Linux OpenSuse (12.3) you may have to perform the following for ProB to work:&lt;br /&gt;
 ln -s /usr/lib/libtk8.5.so /usr/lib/libtk8.5.so.0&lt;br /&gt;
 ln -s /usr/lib/libtcl8.5.so /usr/lib/libtcl8.5.so.0&lt;br /&gt;
&lt;br /&gt;
Also, some of the feature require the table extension, which can be installed like this:&lt;br /&gt;
 sudo apt install tk-table&lt;br /&gt;
Finally, support for .png ANIMATION_IMG declarations requires the Img package:&lt;br /&gt;
 sudo apt install libtk-img&lt;br /&gt;
&lt;br /&gt;
== Graphviz Requirements ==&lt;br /&gt;
&lt;br /&gt;
If you wish to view various visualizations generated by ProB Tcl/Tk or probcli you will need [http://www.graphviz.org/ GraphViz].&lt;br /&gt;
ProB generates various graphs (state space, custom graph, machine hierarchy,...) as .dot files and then  uses the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; to layout the graph and convert it to PDF.&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can also use dot-file viewer such as the &amp;lt;tt&amp;gt;dotty&amp;lt;/tt&amp;gt; program from GraphViz in Linux.&lt;br /&gt;
On macOS and Windows  it is more difficult to obtain a good viewer application for dot files. VS Code with the [https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview Graphviz Interactive Preview] extension is a candidate.&lt;br /&gt;
The commercial OmniGraffle macOS application can import .dot files.  A free alternative on macOS may be [https://ports.macports.org/port/graphviz-gui/ graphviz-gui] by [https://www.macports.org MacPorts]. To install the application do this&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz-gui&amp;lt;/tt&amp;gt;&lt;br /&gt;
The viewer can now be found in /Applications/MacPorts/Graphviz.app (you may have to set the ProB graphical viewer preference &amp;lt;tt&amp;gt;dot_viewer&amp;lt;/tt&amp;gt; to this path).&lt;br /&gt;
If you do not manage to install a viewer, you should select Preferences -&amp;gt; Graphical Viewer -&amp;gt; PDF within ProB Tcl/Tk.&lt;br /&gt;
Indeed, many ProB commands work directly with the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; which you can install on macOS with MacPorts like this:&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
On Mac you can now install the latest version of Graphviz using [https://brew.sh HomeBrew]:&lt;br /&gt;
&lt;br /&gt;
 1. &amp;lt;tt&amp;gt;brew uninstall graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
 2. &amp;lt;tt&amp;gt;brew install graphviz --with-gts&amp;lt;/tt&amp;gt;&lt;br /&gt;
 3. &amp;lt;tt&amp;gt;brew link --overwrite graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 1. is optional; you only need to use it if you have a prior version of Graphviz installed.&lt;br /&gt;
Step3 links the binaries to /usr/local/bin.&lt;br /&gt;
This is probably better than using the [http://www.pixelglow.com/graphviz/ older version from Pixelglow].&lt;br /&gt;
&lt;br /&gt;
You can also manually set the DOT (path_to_dot) preference if ProB cannot find the Graphviz dot binary you have installed.&lt;br /&gt;
&lt;br /&gt;
== Short Release History ==&lt;br /&gt;
&lt;br /&gt;
The full  [[ProB_Release_History | ProB release history can be found here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-12-21&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.1]] is available. Automatic use of operation reuse and compression for model checking. STORE_DETAILED_TRANSITION_INFOS preference and calls LTL property. Interactive proof via animator interface for Rodin PO files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-06-26&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.0]] is available. Interactive trace replay. Many [[VisB#VisB_DEFINITIONS |VisB]] improvements (use definition files for all models, grouping of VISB objects in a single definition, VISB_CLICK_META_INFOS, ...). Profiling can be turned on via PROFILING_INFO preference. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.13.0]] is available. Better Rodin theory support. Template strings. Unicode improvements. READ_JSON and other new external functions. VisB support for groups and &amp;quot;use&amp;quot; element. [[Monte_Carlo_Tree_Search_Game_Play|MCTS game play]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-03&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2-fix1]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-08-10&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2]] is available. [[VisB#VisB_DEFINITIONS_2 |VisB]] improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-04-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.0]] is available. Call stack infos, performance improvements in parser and solver,  new [[LTL_Model_Checking#Supported_Syntax |LTL]] operators, [[VisB#VisB_Additional_SVG_Objects|VisB]] improvements, reals/floats for [[Event-B_Theories|Rodin theories]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-12-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.1]] is available. Highlights: identifiers between backquotes, flexible JSON trace replay, DPLLT solving command, improvements to Z3 backend.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-10-06&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.0]] is available. Highlights: improved support for infinite sets, operation caching (OPERATION_REUSE), faster LTL checking for safety formulas, more compact .prob files, VisB HTML export, constructive Z3 translation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-12-15&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.10.0]] is available. Highlights: well-definedness prover, REAL datatype, -lint comand for VSCode and Atom, improved unsat core and error messages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.3]] is available. Highlights: performance improvements, new external functions, performance monitoring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.2]] is available. Minor bugfix release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.1]] is available. Maintenance release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-07-12&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.0]] is available. Highlights: improved error feedback, improved Unicode support, regular expression library, memoization.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-10-01&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.2]] is available. Highlights: improved error feedback, support [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel Jupyter kernel], first [[Alloy|support for Alloy models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-03-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.0]] is available. Highlights: terminal colour support, performance improvements for displaying very large values, improved symmetry breaking and constraint solving.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-10-05&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.1]] is available. Highlights: performance, non-deterministic assigned variables shown, Z improvements, export history to HTML.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-07-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.0]] is available. Highlights: improved [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], improved XML/CSV data import and export, RULE DSL language, many improvements in constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-10-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.1]] is available. Highlights: [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], LET and IF-THEN-ELSE for expressions and predicates, XML logging, XML data import, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-04-22&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.0]] is available. Highlights: [[Tutorial_Directed_Model_Checking|directed model checking]], [[Using_ProB_with_Z3|Z3 available as backend]], B line comments and unicode symbols, improved error messages, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2015-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.5.0]] is available. Highlights: improved random enumeration, MACE/SEM style static symmetry reduction for deferred set elements, [[State_Space_Coverage_Analyses|MC/DC coverage]] analysis for guards and invariants, [[TLC|improved TLC interface]], bug fixes and improvements including but not limited to the constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.1]], a small bugfix-only release is available. For a list of new features in 1.4.0 see below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-18&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.0]] is available. Highlights: CLP(FD)-based constraint solver enabled by default, kernel can handle more operations symbolically, [[TLC|integration of the TLC model checker]], bug fixes and performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2013-03-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.6]] is available. Highlights: improved constraint propagation for division, modulo, intervals, model checking progress bar, performance improvements, [[Using_ProB_with_KODKOD | improved Kodkod backend]] and use within REPL, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-10-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.5]] is available. Highlights: support for external and recursive functions, optional Kodkod backend, [[TLA|TLA+ support]], performance improvements, pragmas, units inference, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-03-30&#039;&#039;&#039;&lt;br /&gt;
A first prototype of an online [[ProB_Logic_Calculator|ProB Logic Calculator]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-11-21&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.4 is available. Highlights: Evaluation View and Eval window, CSP assertion checking, improved editor, 64-bit version for Mac and Linux, performance improvements, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-02-10&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.3 and ProB for Rodin 2.3 is available. Highlights: improved performance, constrained-based deadlock checking, record detection, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2010-07-30&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.2 is available. Highlights: improved performance, constraint solving over integers (enable in Advanced Preferences), much improved Z support, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-12-07&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.1 is available. Highlights: new data-structure for large sets and relations (see FM 2009), multi-level validation for Event-B, improved constraint propagation for boolean connectives, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-03-20&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.0 is available for download. Highlights: New parser and integrated typechecker, install as AtelierB plugin, improved kernel with support for large sets/relations, improved CSP support, faster LTL model checker, Undo/Redo in text editor, graphical formula viewer, user definable custom animations with gifs.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Download&amp;diff=6093</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Download&amp;diff=6093"/>
		<updated>2026-02-09T12:36:53Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* ProB2-UI (based on JavaFX) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Latest Release ==&lt;br /&gt;
&lt;br /&gt;
Below are links for downloading the latest stable release of probcli (the command line version of ProB) and ProB Tcl/Tk (ProB with a graphical user interface written in Tcl/Tk).&lt;br /&gt;
Note: please use the provided start scripts (StartProB.sh or StartProBWin.bat) to start ProB.&lt;br /&gt;
The list of changes can be found in the [[ProB_Release_History | ProB release history]].&lt;br /&gt;
&lt;br /&gt;
Details of the [[ProBLicence| ProB Licence can be found here]].&lt;br /&gt;
ProB is free to use and open source. For commercial support contact  [https://www.stups.uni-duesseldorf.de/~leuschel/ Michael Leuschel]. In particular, we can provide access to the validation report for using ProB as a tool of class T2 or T3 within the European norm [https://de.wikipedia.org/wiki/EN_50128 EN50128].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;table table-bordered wikitable&amp;quot; &amp;lt;!-- table and table-bordered for Bootstrap (ProB skin), wikitable for MediaWiki (Vector, MonoBook, etc. skins) --&amp;gt;&lt;br /&gt;
! Platform&lt;br /&gt;
! Release Date&lt;br /&gt;
! Download&lt;br /&gt;
! Dependencies&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;background-color:lightgrey;&amp;quot; | 1.15.1&lt;br /&gt;
|-&lt;br /&gt;
| Linux &lt;br /&gt;
| 21.12.2025 &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.linux64.tar.gz Tarball]&amp;lt;br/&amp;gt;&lt;br /&gt;
| Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Linux|see below]]), [https://www.graphviz.org/download/ GraphViz]&lt;br /&gt;
|-&lt;br /&gt;
| Windows&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64.zip Zipfile] (Tcl/Tk 8.6), &amp;lt;br/&amp;gt; [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64-tcltk-85.zip Zipfile] (Tcl/Tk 8.5)&lt;br /&gt;
| Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Windows|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ GraphViz], [[Windows Installation Instructions]]&lt;br /&gt;
|-&lt;br /&gt;
| macOS&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.macos.zip Zipfile] (Universal ARM/Intel notarized)&amp;lt;br/&amp;gt; &lt;br /&gt;
[https://github.com/hhu-stups/homebrew-prob Homebrew Tap]&lt;br /&gt;
| macOS 10.14 (Mojave) or newer, Tcl/Tk 8.6 ([[#Tcl/Tk on macOS|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ Graphviz] ([[#Graphviz_Requirements|see below]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. More details [[#Java Requirements for B parser|are available below]].&lt;br /&gt;
&lt;br /&gt;
The Graphical User Interface of ProB Tcl/Tk requires Tcl/Tk 8.5 or 8.6. More details [[#Tcl/Tk Requirements for ProB Tcl/Tk|are available below]].&lt;br /&gt;
The default Tcl/Tk on macOS is broken and will result in &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt;, and you have to [[#Tcl/Tk Requirements for ProB Tcl/Tk|install another version of Tcl/Tk]]. (Note: Tcl/Tk 9 is not binary compatible and cannot yet be used.)&lt;br /&gt;
All releases include the command-line version &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt; which does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
macOS releases of ProB are universal binaries that support both &#039;&#039;&#039;aarch64&#039;&#039;&#039; (64-bit ARM/Apple Silicon) and &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel) architectures.&lt;br /&gt;
Windows and Linux releases are compiled only for &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel).&lt;br /&gt;
&lt;br /&gt;
The last version built for the x86 architecture (32-bit Intel) is ProB 1.8.0 (see [[DownloadPriorVersions|prior versions]]).&lt;br /&gt;
If you are using an unsupported architecture or system, you may still be able to [[Running ProB from source|run ProB from source]].&lt;br /&gt;
&lt;br /&gt;
Note that: on &amp;lt;b&amp;gt;macOS&amp;lt;/b&amp;gt; you  still have to right-click on the application and use &amp;quot;Open&amp;quot;, even though ProB Tcl/Tk (and probcli and all libraries) are signed and notarized. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Commented out while there is no current beta release:&lt;br /&gt;
=== Latest Beta Release ===&lt;br /&gt;
&lt;br /&gt;
The latest beta release is [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.13.1-beta1 1.13.1-beta1].&lt;br /&gt;
It may be older than the latest final release.&lt;br /&gt;
An official beta release always passes all of ProB&#039;s tests.&lt;br /&gt;
However, we do not follow the stringent checklist for final releases&lt;br /&gt;
(e.g., checking SICStus Prolog Spider warnings, checking coverage and additional manual&lt;br /&gt;
UI tests).&lt;br /&gt;
Also, we do not store coverage reports and other information necessary for T2 certification.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
=== Nightly Builds ===&lt;br /&gt;
&lt;br /&gt;
More current [https://stups.hhu-hosting.de/downloads/prob/tcltk/nightly/ nightly integration builds] are also available.&lt;br /&gt;
These releases are usually updated every night and old versions are not stored.&lt;br /&gt;
&lt;br /&gt;
Note for macOS users: Nightly builds of ProB are not signed or notarized, so macOS 10.15 and later (Catalina, Big Sur or Monterey, Ventura) will refuse to run them.&lt;br /&gt;
As a workaround, you will need to run &amp;lt;code&amp;gt;xattr -r -d com.apple.quarantine *&amp;lt;/code&amp;gt; inside the ProB directory before launching ProB.&lt;br /&gt;
The stable and beta releases listed above are signed and notarized, so they will run without extra steps.&lt;br /&gt;
&lt;br /&gt;
Automatically generated test [https://stups.hhu-hosting.de/internal/coverage/html/ coverage reports are also available].&lt;br /&gt;
They are usually updated once per week.&lt;br /&gt;
&lt;br /&gt;
=== Sourcecode ===&lt;br /&gt;
&lt;br /&gt;
You can download the latest Prolog sourcecode snapshot from: https://stups.hhu-hosting.de/downloads/prob/source/&lt;br /&gt;
&lt;br /&gt;
The source code for the ProB parsers (B, LTL, ...) can be obtained from: https://github.com/hhu-stups/probparsers&lt;br /&gt;
&lt;br /&gt;
=== Prior Versions ===&lt;br /&gt;
&lt;br /&gt;
Prior Versions of ProB going back to 1.3.1 [[DownloadPriorVersions|are available for download here]]. &lt;br /&gt;
If you are interested in still earlier releases, please have a look at the [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/ Download directory].&lt;br /&gt;
&lt;br /&gt;
== Other ProB tools ==&lt;br /&gt;
&lt;br /&gt;
=== ProB Jupyter Kernel ===&lt;br /&gt;
&lt;br /&gt;
You can now create Jupyter Notebooks in B using the ProB Jupyter kernel.&lt;br /&gt;
Downloads, instructions, and source code can be found on [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel its own page].&lt;br /&gt;
&lt;br /&gt;
You can [https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.cs.uni-duesseldorf.de%2Fgeneral%2Fstups%2Fprob2-jupyter-kernel.git/master?filepath=notebooks try out the ProB Jupyter kernel in your browser] without installing it first.&lt;br /&gt;
Note that &#039;&#039;&#039;notebooks are not saved permanently in this online version!&#039;&#039;&#039;&lt;br /&gt;
To keep your notebooks, you &#039;&#039;must&#039;&#039; download them before closing the page.&lt;br /&gt;
&lt;br /&gt;
=== ProB for Rodin ===&lt;br /&gt;
To install ProB for Rodin, first download a current version of Rodin (e.g., [https://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/3.9/ Rodin 3.9]). Inside Rodin, choose Help -&amp;gt; Install New Software and choose the pre-configured ProB update site.&lt;br /&gt;
&lt;br /&gt;
More [[Tutorial Rodin First Step|detailed installation instructions and a brief tutorial]] are available.&lt;br /&gt;
&lt;br /&gt;
* Nightly builds of ProB for Rodin 3 can be obtained from within Rodin by using the update site https://stups.hhu-hosting.de/rodin/prob1/nightly.&lt;br /&gt;
&lt;br /&gt;
=== ProB2-UI (based on JavaFX) ===&lt;br /&gt;
&lt;br /&gt;
The current release of the new JavaFX-based [[ProB2-UI]] is version 1.3.1. Installers are available for the following platforms:&lt;br /&gt;
&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-1.3.1.exe Windows (x86_64) installer] - requires Windows 10 or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1-notarized.zip macOS (Apple Silicon) application ZIP] (notarized) [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1.dmg macOS (Apple Silicon) application DMG] (not signed/notarized! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-x86_64-1.3.1.dmg macOS (Intel) application DMG] (not signed/notarized yet! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui_1.3.1_amd64.deb Linux (x86_64) .deb package] - requires glibc 2.17 or later (e. g. Debian 8 &amp;quot;jessie&amp;quot; or later, or Ubuntu 14.04 &amp;quot;trusty&amp;quot; or later)&lt;br /&gt;
&lt;br /&gt;
These installers include all necessary dependencies - you do not need to install a Java runtime manually.&lt;br /&gt;
&lt;br /&gt;
We also provide a [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui-1.3.1-multi.jar multi-platform jar] build, which requires an existing installation of Java 21 or later, but works without further installation on all supported platforms. &#039;&#039;&#039;The multi-platform jar is deprecated and will be removed in a future release.&#039;&#039;&#039; It only supports the x86_64 architecture, so it cannot run on macOS on Apple Silicon, unless you install an x86_64 JRE.&lt;br /&gt;
&lt;br /&gt;
Details about new features and improvements can be found in the [https://github.com/hhu-stups/prob2_ui/blob/develop/doc/prob2ui_release_history.md release history], along with download links for older versions.&lt;br /&gt;
&lt;br /&gt;
Snapshot builds of the current &#039;&#039;development&#039;&#039; version of ProB2-UI (1.4.0-SNAPSHOT) are also available:&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-1.4.0.exe Windows installer snapshot]&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-aarch64-1.4.0.dmg macOS (Apple Silicon) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-x86_64-1.4.0.dmg macOS (Intel) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/prob2-ui_1.4.0_amd64.deb Debian package snapshot]&lt;br /&gt;
&lt;br /&gt;
The source code for ProB2-UI is available at https://github.com/hhu-stups/prob2_ui and can be built by following [https://github.com/hhu-stups/prob2_ui#running-from-source these instructions].&lt;br /&gt;
&lt;br /&gt;
The underlying [[ProB Java API]] of ProB2-UI (aka the ProB 2 kernel) is available to Java developers via [https://central.sonatype.com/artifact/de.hhu.stups/de.prob2.kernel Maven Central].&lt;br /&gt;
Its source code can be obtained from: https://github.com/hhu-stups/prob2_kernel.&lt;br /&gt;
&lt;br /&gt;
==== macOS issues ====&lt;br /&gt;
&lt;br /&gt;
When you run the macOS app for the first time, you might have to open the app &#039;&#039;twice&#039;&#039; for ProB2-UI to start properly.&lt;br /&gt;
This should only happen once.&lt;br /&gt;
&lt;br /&gt;
Recent ProB2-UI macOS app releases are signed and notarized, so they should run without issues.&lt;br /&gt;
However, the multi-platform jar, all snapshot app builds, and older release app builds are &#039;&#039;not&#039;&#039; signed or notarized, so macOS will refuse to run them or say that the application is damaged.&lt;br /&gt;
As a workaround:&lt;br /&gt;
&lt;br /&gt;
* On macOS 15 (Sequoia) or later: Open the System Settings, go to &amp;quot;Privacy &amp;amp; Security&amp;quot;, and next to &amp;quot;ProB2-UI was blocked to protect your Mac&amp;quot;, and click on &amp;quot;Open Anyway&amp;quot;.&lt;br /&gt;
* On macOS 14 (Sonoma) or earlier: Right-click the app, select &amp;quot;Open&amp;quot;, and confirm the security dialog. If the dialog still doesn&#039;t give you an option to open the app, click &amp;quot;Cancel&amp;quot; and do the same thing again.&lt;br /&gt;
&lt;br /&gt;
For details, see [https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac &amp;quot;Open a Mac app from an unknown developer&amp;quot;] and [https://support.apple.com/en-us/102445#openanyway &amp;quot;Safely open apps on your Mac&amp;quot;] on Apple&#039;s support website.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
As a workaround, run this command in the folder where &#039;&#039;ProB2-UI.app&#039;&#039; is located:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xattr -r -d com.apple.quarantine &amp;quot;ProB2-UI.app&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multi-platform jar can also be started from the command line, which bypasses the signing/notarization check:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar prob2-ui-1.3.1-multi.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Editor Support ===&lt;br /&gt;
&lt;br /&gt;
==== VS Code ====&lt;br /&gt;
There is a [https://github.com/hhu-stups/b-language-extension B/ProB Language Support] extension for the Visual Studio Code (VS Code) editor. It integrates with the [[Using the Command-Line Version of ProB|command line tool probcli]] to obtain error markers for syntax and type errors. It can also be used for [[Well-Definedness Checking#VSCode|well-definedness checking]].&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/vscode_plugin Download for manual installation]&lt;br /&gt;
&lt;br /&gt;
==== Vim ====&lt;br /&gt;
A [https://github.com/bivab/prob.vim Vim plugin for ProB is available]. It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. Vim has built-in syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
==== BBEdit ====&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBEdit language modules for B, TLA+, CSP and Prolog] are available; these do not use the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]].&lt;br /&gt;
&lt;br /&gt;
== Java Requirements for B Parser ==&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. Java 11, 17, 21, 25, etc. are also fully supported.&lt;br /&gt;
&#039;&#039;&#039;A future ProB release will require Java 17 or newer.&#039;&#039;&#039;&lt;br /&gt;
ProB 1.9.3 is the last version to support Java 7. ProB 1.5.0 is the last version to support Java 6.&lt;br /&gt;
&lt;br /&gt;
You can install a Java Runtime Environment (JRE) from various sources, such as [https://adoptium.net/ Eclipse Adoptium], [https://www.azul.com/downloads/ Azul Zulu], or your system package manager.&lt;br /&gt;
&lt;br /&gt;
Note: on some systems (macOS) you may have to install the full Java Development Kit (JDK), and not just the JRE, so that Java becomes available to the command-line tools.&lt;br /&gt;
Type &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; to check which version is used by default for command-line tools; see also [http://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x this discussion on StackOverflow].&lt;br /&gt;
In case you have trouble starting the Java parser you can now set the &amp;lt;code&amp;gt;JAVA_PATH&amp;lt;/code&amp;gt; preference of ProB to point to the &amp;lt;code&amp;gt;java&amp;lt;/code&amp;gt; tool (or java.exe on Windows).&lt;br /&gt;
&lt;br /&gt;
To check whether ProB can correctly use its Java parser you can type the following (using probcli.exe on Windows):&lt;br /&gt;
 probcli -version -v&lt;br /&gt;
This will try and start the parser and obtain the parser version.&lt;br /&gt;
In case Java is not correctly installed you should get an error message.&lt;br /&gt;
If you see the error message&lt;br /&gt;
 &amp;lt;tt&amp;gt;Unsupported major.minor version 52.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
this means you do not have Java 8 or newer installed. You can try setting the path to the correct java version by setting the JAVA_PATH preference as follows:&lt;br /&gt;
 probcli -p JAVA_PATH path/to/java -version -v&lt;br /&gt;
&lt;br /&gt;
== Tcl/Tk Requirements for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk requires an installation of Tcl/Tk 8.5 or Tcl/Tk 8.6. The command-line tool probcli does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require this.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on macOS ===&lt;br /&gt;
Important note: macOS comes pre-installed with a version of Tcl/Tk which is broken.&lt;br /&gt;
This may result in the display of unreadable &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt; or crashes in the standard file dialogs.&lt;br /&gt;
There are various options to install Tcl/Tk:&lt;br /&gt;
* with Homebrew using the [https://formulae.brew.sh/formula/tcl-tk tcl-tk formula]&lt;br /&gt;
* with [https://ports.macports.org/port/tcl/ MacPorts]&lt;br /&gt;
* use the  [http://www.activestate.com/activetcl/downloads/ ActiveTcl version of Tcl/Tk]&lt;br /&gt;
You should probably start ProB using the &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script: it will auto-detect Tcl/Tk versions and set the SP_TCL_DSO environment variable.&lt;br /&gt;
Below are more details:&lt;br /&gt;
&lt;br /&gt;
==== Tcl/Tk from Homebrew or MacPorts ====&lt;br /&gt;
&lt;br /&gt;
You can install a newer Tcl/Tk (e.g., 8.6.13) using [https://brew.sh &amp;lt;b&amp;gt;Homebrew&amp;lt;/b&amp;gt;] or [https://www.macports.org &amp;lt;b&amp;gt;MacPorts&amp;lt;/b&amp;gt;].&lt;br /&gt;
Note: In the earlier release 8.6.11 [https://bugs.python.org/issue44828 file open and file save dialogs will not work].&lt;br /&gt;
For Homebrew the command to install the[https://formulae.brew.sh/formula/tcl-tk tcl-tk formula] is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The latest versions of Homebrew now install Tcl/Tk 9.0 which does not work yet with ProB.&lt;br /&gt;
In this case install&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk@8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, as the location of the libraries is not standard, you have to define the variable &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script should set SP_TCL_DSO automatically.&lt;br /&gt;
You can also define and export this variable yourself before starting ProB from the Terminal by typing this (you may have to adapt the link if you are using another version of Tcl/Tk):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SP_TCL_DSO=/opt/homebrew/Cellar/tcl-tk@8/8.6.16/lib/libtcl8.6.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have uses MacPorts the path is probably &amp;lt;tt&amp;gt;/opt/local/lib/libtcl.dylib&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set the variable by adding &amp;lt;tt&amp;gt;-DSP_TCL_DSO=/usr/local/Cellar/tcl-tk/8.6.12/lib/libtcl8.6.dylib&amp;lt;/tt&amp;gt; to the command starting ProB. You may also have to install &amp;lt;tt&amp;gt;tk-table&amp;lt;/tt&amp;gt; package yourself (it is bundled with Active Tcl).&lt;br /&gt;
&lt;br /&gt;
==== Active Tcl ====&lt;br /&gt;
&lt;br /&gt;
The [http://www.activestate.com/activetcl/downloads/ the ActiveTcl version of Tcl/Tk] is automatically recognised by ProB and you do not have to set &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, in Active Tcl/Tk 8.6 on macOS the double click in the &amp;quot;Operations View&amp;quot; or other views  is not working correctly.&lt;br /&gt;
You have to hit the RETURN key in the &amp;quot;Operations View&amp;quot; or right-click on an operation and select &amp;quot;Perform ...&amp;quot;  to execute an operation until this is fixed.&lt;br /&gt;
The older ersion [http://bugs.python.org/issue15853 8.5.12 has a bug related to copying text], see also [http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3555211&amp;amp;group_id=12997&amp;amp;atid=112997_type here]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Other Notes ====&lt;br /&gt;
Note: on macOS Catalina or later the Tcl/Tk menu bar is sometimes not working. Switching to another application and then back to ProB seems to solve the problem.&lt;br /&gt;
If you see the message &amp;quot;&amp;lt;tt&amp;gt;macOS 11 or later required !&amp;lt;/tt&amp;gt;&amp;quot;  in the terminal when launching &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; you should re-install Tcl/Tk as described above.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Windows ===&lt;br /&gt;
We currently provide two downloads of ProB, one for Tcl/Tk 8.6 (which we recommend)&lt;br /&gt;
and a version for Tcl/Tk 8.5.&lt;br /&gt;
You can use for example the  [https://www.activestate.com/products/tcl/ ActiveTcl releases].&lt;br /&gt;
Note: For the 64 bit version of ProB for Windows, you have to install the 64 bit Tcl/Tk 8.5 version!&lt;br /&gt;
ProB 1.12 (currently available as nightly build) works with both Tcl/Tk 8.5 and 8.6.&lt;br /&gt;
You may have to point the environment variable SP_TCL_DSO to the correct DLL before starting ProB. For Tcl/Tk 8.5 this is typically&lt;br /&gt;
base-tcl8.5-thread-win32-x86_64.dll.&lt;br /&gt;
You can either go to System -&amp;gt; Settings -&amp;gt; Advanced -&amp;gt; Environment Variables&lt;br /&gt;
or use the setx command for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setx SP_TCL_DSO C:\Tcl\bin\base-tcl8.5-thread-win32-x86_64.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Linux ===&lt;br /&gt;
On Linux you can typically install Tcl/Tk using &amp;lt;tt&amp;gt;sudo apt-get install tcl8.5 tk8.5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
On very recent Linux systems (such as Ubuntu 20.04) you may want to download (and compile) [https://www.tcl.tk/software/tcltk/downloadnow85.html Tcl/Tk 8.5] or use [https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/tcl8.5_8.5.19-4_amd64.deb.html packages from earlier releases].&lt;br /&gt;
&lt;br /&gt;
On Linux OpenSuse (12.3) you may have to perform the following for ProB to work:&lt;br /&gt;
 ln -s /usr/lib/libtk8.5.so /usr/lib/libtk8.5.so.0&lt;br /&gt;
 ln -s /usr/lib/libtcl8.5.so /usr/lib/libtcl8.5.so.0&lt;br /&gt;
&lt;br /&gt;
Also, some of the feature require the table extension, which can be installed like this:&lt;br /&gt;
 sudo apt install tk-table&lt;br /&gt;
Finally, support for .png ANIMATION_IMG declarations requires the Img package:&lt;br /&gt;
 sudo apt install libtk-img&lt;br /&gt;
&lt;br /&gt;
== Graphviz Requirements ==&lt;br /&gt;
&lt;br /&gt;
If you wish to view various visualizations generated by ProB Tcl/Tk or probcli you will need [http://www.graphviz.org/ GraphViz].&lt;br /&gt;
ProB generates various graphs (state space, custom graph, machine hierarchy,...) as .dot files and then  uses the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; to layout the graph and convert it to PDF.&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can also use dot-file viewer such as the &amp;lt;tt&amp;gt;dotty&amp;lt;/tt&amp;gt; program from GraphViz in Linux.&lt;br /&gt;
On macOS and Windows  it is more difficult to obtain a good viewer application for dot files. VS Code with the [https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview Graphviz Interactive Preview] extension is a candidate.&lt;br /&gt;
The commercial OmniGraffle macOS application can import .dot files.  A free alternative on macOS may be [https://ports.macports.org/port/graphviz-gui/ graphviz-gui] by [https://www.macports.org MacPorts]. To install the application do this&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz-gui&amp;lt;/tt&amp;gt;&lt;br /&gt;
The viewer can now be found in /Applications/MacPorts/Graphviz.app (you may have to set the ProB graphical viewer preference &amp;lt;tt&amp;gt;dot_viewer&amp;lt;/tt&amp;gt; to this path).&lt;br /&gt;
If you do not manage to install a viewer, you should select Preferences -&amp;gt; Graphical Viewer -&amp;gt; PDF within ProB Tcl/Tk.&lt;br /&gt;
Indeed, many ProB commands work directly with the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; which you can install on macOS with MacPorts like this:&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
On Mac you can now install the latest version of Graphviz using [https://brew.sh HomeBrew]:&lt;br /&gt;
&lt;br /&gt;
 1. &amp;lt;tt&amp;gt;brew uninstall graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
 2. &amp;lt;tt&amp;gt;brew install graphviz --with-gts&amp;lt;/tt&amp;gt;&lt;br /&gt;
 3. &amp;lt;tt&amp;gt;brew link --overwrite graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 1. is optional; you only need to use it if you have a prior version of Graphviz installed.&lt;br /&gt;
Step3 links the binaries to /usr/local/bin.&lt;br /&gt;
This is probably better than using the [http://www.pixelglow.com/graphviz/ older version from Pixelglow].&lt;br /&gt;
&lt;br /&gt;
You can also manually set the DOT (path_to_dot) preference if ProB cannot find the Graphviz dot binary you have installed.&lt;br /&gt;
&lt;br /&gt;
== Short Release History ==&lt;br /&gt;
&lt;br /&gt;
The full  [[ProB_Release_History | ProB release history can be found here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-12-21&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.1]] is available. Automatic use of operation reuse and compression for model checking. STORE_DETAILED_TRANSITION_INFOS preference and calls LTL property. Interactive proof via animator interface for Rodin PO files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-06-26&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.0]] is available. Interactive trace replay. Many [[VisB#VisB_DEFINITIONS |VisB]] improvements (use definition files for all models, grouping of VISB objects in a single definition, VISB_CLICK_META_INFOS, ...). Profiling can be turned on via PROFILING_INFO preference. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.13.0]] is available. Better Rodin theory support. Template strings. Unicode improvements. READ_JSON and other new external functions. VisB support for groups and &amp;quot;use&amp;quot; element. [[Monte_Carlo_Tree_Search_Game_Play|MCTS game play]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-03&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2-fix1]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-08-10&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2]] is available. [[VisB#VisB_DEFINITIONS_2 |VisB]] improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-04-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.0]] is available. Call stack infos, performance improvements in parser and solver,  new [[LTL_Model_Checking#Supported_Syntax |LTL]] operators, [[VisB#VisB_Additional_SVG_Objects|VisB]] improvements, reals/floats for [[Event-B_Theories|Rodin theories]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-12-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.1]] is available. Highlights: identifiers between backquotes, flexible JSON trace replay, DPLLT solving command, improvements to Z3 backend.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-10-06&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.0]] is available. Highlights: improved support for infinite sets, operation caching (OPERATION_REUSE), faster LTL checking for safety formulas, more compact .prob files, VisB HTML export, constructive Z3 translation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-12-15&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.10.0]] is available. Highlights: well-definedness prover, REAL datatype, -lint comand for VSCode and Atom, improved unsat core and error messages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.3]] is available. Highlights: performance improvements, new external functions, performance monitoring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.2]] is available. Minor bugfix release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.1]] is available. Maintenance release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-07-12&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.0]] is available. Highlights: improved error feedback, improved Unicode support, regular expression library, memoization.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-10-01&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.2]] is available. Highlights: improved error feedback, support [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel Jupyter kernel], first [[Alloy|support for Alloy models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-03-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.0]] is available. Highlights: terminal colour support, performance improvements for displaying very large values, improved symmetry breaking and constraint solving.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-10-05&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.1]] is available. Highlights: performance, non-deterministic assigned variables shown, Z improvements, export history to HTML.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-07-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.0]] is available. Highlights: improved [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], improved XML/CSV data import and export, RULE DSL language, many improvements in constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-10-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.1]] is available. Highlights: [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], LET and IF-THEN-ELSE for expressions and predicates, XML logging, XML data import, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-04-22&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.0]] is available. Highlights: [[Tutorial_Directed_Model_Checking|directed model checking]], [[Using_ProB_with_Z3|Z3 available as backend]], B line comments and unicode symbols, improved error messages, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2015-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.5.0]] is available. Highlights: improved random enumeration, MACE/SEM style static symmetry reduction for deferred set elements, [[State_Space_Coverage_Analyses|MC/DC coverage]] analysis for guards and invariants, [[TLC|improved TLC interface]], bug fixes and improvements including but not limited to the constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.1]], a small bugfix-only release is available. For a list of new features in 1.4.0 see below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-18&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.0]] is available. Highlights: CLP(FD)-based constraint solver enabled by default, kernel can handle more operations symbolically, [[TLC|integration of the TLC model checker]], bug fixes and performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2013-03-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.6]] is available. Highlights: improved constraint propagation for division, modulo, intervals, model checking progress bar, performance improvements, [[Using_ProB_with_KODKOD | improved Kodkod backend]] and use within REPL, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-10-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.5]] is available. Highlights: support for external and recursive functions, optional Kodkod backend, [[TLA|TLA+ support]], performance improvements, pragmas, units inference, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-03-30&#039;&#039;&#039;&lt;br /&gt;
A first prototype of an online [[ProB_Logic_Calculator|ProB Logic Calculator]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-11-21&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.4 is available. Highlights: Evaluation View and Eval window, CSP assertion checking, improved editor, 64-bit version for Mac and Linux, performance improvements, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-02-10&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.3 and ProB for Rodin 2.3 is available. Highlights: improved performance, constrained-based deadlock checking, record detection, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2010-07-30&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.2 is available. Highlights: improved performance, constraint solving over integers (enable in Advanced Preferences), much improved Z support, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-12-07&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.1 is available. Highlights: new data-structure for large sets and relations (see FM 2009), multi-level validation for Event-B, improved constraint propagation for boolean connectives, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-03-20&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.0 is available for download. Highlights: New parser and integrated typechecker, install as AtelierB plugin, improved kernel with support for large sets/relations, improved CSP support, faster LTL model checker, Undo/Redo in text editor, graphical formula viewer, user definable custom animations with gifs.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Download&amp;diff=6092</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Download&amp;diff=6092"/>
		<updated>2026-02-09T12:35:54Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* ProB2-UI (based on JavaFX) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Latest Release ==&lt;br /&gt;
&lt;br /&gt;
Below are links for downloading the latest stable release of probcli (the command line version of ProB) and ProB Tcl/Tk (ProB with a graphical user interface written in Tcl/Tk).&lt;br /&gt;
Note: please use the provided start scripts (StartProB.sh or StartProBWin.bat) to start ProB.&lt;br /&gt;
The list of changes can be found in the [[ProB_Release_History | ProB release history]].&lt;br /&gt;
&lt;br /&gt;
Details of the [[ProBLicence| ProB Licence can be found here]].&lt;br /&gt;
ProB is free to use and open source. For commercial support contact  [https://www.stups.uni-duesseldorf.de/~leuschel/ Michael Leuschel]. In particular, we can provide access to the validation report for using ProB as a tool of class T2 or T3 within the European norm [https://de.wikipedia.org/wiki/EN_50128 EN50128].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;table table-bordered wikitable&amp;quot; &amp;lt;!-- table and table-bordered for Bootstrap (ProB skin), wikitable for MediaWiki (Vector, MonoBook, etc. skins) --&amp;gt;&lt;br /&gt;
! Platform&lt;br /&gt;
! Release Date&lt;br /&gt;
! Download&lt;br /&gt;
! Dependencies&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;background-color:lightgrey;&amp;quot; | 1.15.1&lt;br /&gt;
|-&lt;br /&gt;
| Linux &lt;br /&gt;
| 21.12.2025 &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.linux64.tar.gz Tarball]&amp;lt;br/&amp;gt;&lt;br /&gt;
| Java 8 or newer ([[#Java Requirements for B parser|see below]]), Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Linux|see below]]), [https://www.graphviz.org/download/ GraphViz]&lt;br /&gt;
|-&lt;br /&gt;
| Windows&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64.zip Zipfile] (Tcl/Tk 8.6), &amp;lt;br/&amp;gt; [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.windows64-tcltk-85.zip Zipfile] (Tcl/Tk 8.5)&lt;br /&gt;
| Tcl/Tk 8.5 or 8.6 ([[#Tcl/Tk on Windows|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ GraphViz], [[Windows Installation Instructions]]&lt;br /&gt;
|-&lt;br /&gt;
| macOS&lt;br /&gt;
| 21.12.2025  &lt;br /&gt;
| [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.15.1/ProB.macos.zip Zipfile] (Universal ARM/Intel notarized)&amp;lt;br/&amp;gt; &lt;br /&gt;
[https://github.com/hhu-stups/homebrew-prob Homebrew Tap]&lt;br /&gt;
| macOS 10.14 (Mojave) or newer, Tcl/Tk 8.6 ([[#Tcl/Tk on macOS|see below]]), Java 8 or newer ([[#Java Requirements for B parser|see below]]), [https://www.graphviz.org/download/ Graphviz] ([[#Graphviz_Requirements|see below]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. More details [[#Java Requirements for B parser|are available below]].&lt;br /&gt;
&lt;br /&gt;
The Graphical User Interface of ProB Tcl/Tk requires Tcl/Tk 8.5 or 8.6. More details [[#Tcl/Tk Requirements for ProB Tcl/Tk|are available below]].&lt;br /&gt;
The default Tcl/Tk on macOS is broken and will result in &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt;, and you have to [[#Tcl/Tk Requirements for ProB Tcl/Tk|install another version of Tcl/Tk]]. (Note: Tcl/Tk 9 is not binary compatible and cannot yet be used.)&lt;br /&gt;
All releases include the command-line version &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt; which does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require Tcl/Tk.&lt;br /&gt;
&lt;br /&gt;
macOS releases of ProB are universal binaries that support both &#039;&#039;&#039;aarch64&#039;&#039;&#039; (64-bit ARM/Apple Silicon) and &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel) architectures.&lt;br /&gt;
Windows and Linux releases are compiled only for &#039;&#039;&#039;x86_64&#039;&#039;&#039; (64-bit Intel).&lt;br /&gt;
&lt;br /&gt;
The last version built for the x86 architecture (32-bit Intel) is ProB 1.8.0 (see [[DownloadPriorVersions|prior versions]]).&lt;br /&gt;
If you are using an unsupported architecture or system, you may still be able to [[Running ProB from source|run ProB from source]].&lt;br /&gt;
&lt;br /&gt;
Note that: on &amp;lt;b&amp;gt;macOS&amp;lt;/b&amp;gt; you  still have to right-click on the application and use &amp;quot;Open&amp;quot;, even though ProB Tcl/Tk (and probcli and all libraries) are signed and notarized. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Commented out while there is no current beta release:&lt;br /&gt;
=== Latest Beta Release ===&lt;br /&gt;
&lt;br /&gt;
The latest beta release is [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/1.13.1-beta1 1.13.1-beta1].&lt;br /&gt;
It may be older than the latest final release.&lt;br /&gt;
An official beta release always passes all of ProB&#039;s tests.&lt;br /&gt;
However, we do not follow the stringent checklist for final releases&lt;br /&gt;
(e.g., checking SICStus Prolog Spider warnings, checking coverage and additional manual&lt;br /&gt;
UI tests).&lt;br /&gt;
Also, we do not store coverage reports and other information necessary for T2 certification.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
=== Nightly Builds ===&lt;br /&gt;
&lt;br /&gt;
More current [https://stups.hhu-hosting.de/downloads/prob/tcltk/nightly/ nightly integration builds] are also available.&lt;br /&gt;
These releases are usually updated every night and old versions are not stored.&lt;br /&gt;
&lt;br /&gt;
Note for macOS users: Nightly builds of ProB are not signed or notarized, so macOS 10.15 and later (Catalina, Big Sur or Monterey, Ventura) will refuse to run them.&lt;br /&gt;
As a workaround, you will need to run &amp;lt;code&amp;gt;xattr -r -d com.apple.quarantine *&amp;lt;/code&amp;gt; inside the ProB directory before launching ProB.&lt;br /&gt;
The stable and beta releases listed above are signed and notarized, so they will run without extra steps.&lt;br /&gt;
&lt;br /&gt;
Automatically generated test [https://stups.hhu-hosting.de/internal/coverage/html/ coverage reports are also available].&lt;br /&gt;
They are usually updated once per week.&lt;br /&gt;
&lt;br /&gt;
=== Sourcecode ===&lt;br /&gt;
&lt;br /&gt;
You can download the latest Prolog sourcecode snapshot from: https://stups.hhu-hosting.de/downloads/prob/source/&lt;br /&gt;
&lt;br /&gt;
The source code for the ProB parsers (B, LTL, ...) can be obtained from: https://github.com/hhu-stups/probparsers&lt;br /&gt;
&lt;br /&gt;
=== Prior Versions ===&lt;br /&gt;
&lt;br /&gt;
Prior Versions of ProB going back to 1.3.1 [[DownloadPriorVersions|are available for download here]]. &lt;br /&gt;
If you are interested in still earlier releases, please have a look at the [https://stups.hhu-hosting.de/downloads/prob/tcltk/releases/ Download directory].&lt;br /&gt;
&lt;br /&gt;
== Other ProB tools ==&lt;br /&gt;
&lt;br /&gt;
=== ProB Jupyter Kernel ===&lt;br /&gt;
&lt;br /&gt;
You can now create Jupyter Notebooks in B using the ProB Jupyter kernel.&lt;br /&gt;
Downloads, instructions, and source code can be found on [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel its own page].&lt;br /&gt;
&lt;br /&gt;
You can [https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.cs.uni-duesseldorf.de%2Fgeneral%2Fstups%2Fprob2-jupyter-kernel.git/master?filepath=notebooks try out the ProB Jupyter kernel in your browser] without installing it first.&lt;br /&gt;
Note that &#039;&#039;&#039;notebooks are not saved permanently in this online version!&#039;&#039;&#039;&lt;br /&gt;
To keep your notebooks, you &#039;&#039;must&#039;&#039; download them before closing the page.&lt;br /&gt;
&lt;br /&gt;
=== ProB for Rodin ===&lt;br /&gt;
To install ProB for Rodin, first download a current version of Rodin (e.g., [https://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/3.9/ Rodin 3.9]). Inside Rodin, choose Help -&amp;gt; Install New Software and choose the pre-configured ProB update site.&lt;br /&gt;
&lt;br /&gt;
More [[Tutorial Rodin First Step|detailed installation instructions and a brief tutorial]] are available.&lt;br /&gt;
&lt;br /&gt;
* Nightly builds of ProB for Rodin 3 can be obtained from within Rodin by using the update site https://stups.hhu-hosting.de/rodin/prob1/nightly.&lt;br /&gt;
&lt;br /&gt;
=== ProB2-UI (based on JavaFX) ===&lt;br /&gt;
&lt;br /&gt;
The current release of the new JavaFX-based [[ProB2-UI]] is version 1.3.1. Installers are available for the following platforms:&lt;br /&gt;
&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-1.3.1.exe Windows (x86_64) installer] - requires Windows 10 or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1-notarized.zip macOS (Apple Silicon) application ZIP] (notarized)[https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-aarch64-1.3.1.dmg macOS (Apple Silicon) application DMG] (not signed/notarized! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/ProB2-UI-x86_64-1.3.1.dmg macOS (Intel) application DMG] (not signed/notarized yet! [[#macOS issues|see below]]) - requires macOS 11 (Big Sur) or later&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui_1.3.1_amd64.deb Linux (x86_64) .deb package] - requires glibc 2.17 or later (e. g. Debian 8 &amp;quot;jessie&amp;quot; or later, or Ubuntu 14.04 &amp;quot;trusty&amp;quot; or later)&lt;br /&gt;
&lt;br /&gt;
These installers include all necessary dependencies - you do not need to install a Java runtime manually.&lt;br /&gt;
&lt;br /&gt;
We also provide a [https://stups.hhu-hosting.de/downloads/prob2/1.3.1/prob2-ui-1.3.1-multi.jar multi-platform jar] build, which requires an existing installation of Java 21 or later, but works without further installation on all supported platforms. &#039;&#039;&#039;The multi-platform jar is deprecated and will be removed in a future release.&#039;&#039;&#039; It only supports the x86_64 architecture, so it cannot run on macOS on Apple Silicon, unless you install an x86_64 JRE.&lt;br /&gt;
&lt;br /&gt;
Details about new features and improvements can be found in the [https://github.com/hhu-stups/prob2_ui/blob/develop/doc/prob2ui_release_history.md release history], along with download links for older versions.&lt;br /&gt;
&lt;br /&gt;
Snapshot builds of the current &#039;&#039;development&#039;&#039; version of ProB2-UI (1.4.0-SNAPSHOT) are also available:&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-1.4.0.exe Windows installer snapshot]&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-aarch64-1.4.0.dmg macOS (Apple Silicon) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/ProB2-UI-x86_64-1.4.0.dmg macOS (Intel) application DMG snapshot] (not signed/notarized! [[#macOS issues|see below]])&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/prob2/snapshot/prob2-ui_1.4.0_amd64.deb Debian package snapshot]&lt;br /&gt;
&lt;br /&gt;
The source code for ProB2-UI is available at https://github.com/hhu-stups/prob2_ui and can be built by following [https://github.com/hhu-stups/prob2_ui#running-from-source these instructions].&lt;br /&gt;
&lt;br /&gt;
The underlying [[ProB Java API]] of ProB2-UI (aka the ProB 2 kernel) is available to Java developers via [https://central.sonatype.com/artifact/de.hhu.stups/de.prob2.kernel Maven Central].&lt;br /&gt;
Its source code can be obtained from: https://github.com/hhu-stups/prob2_kernel.&lt;br /&gt;
&lt;br /&gt;
==== macOS issues ====&lt;br /&gt;
&lt;br /&gt;
When you run the macOS app for the first time, you might have to open the app &#039;&#039;twice&#039;&#039; for ProB2-UI to start properly.&lt;br /&gt;
This should only happen once.&lt;br /&gt;
&lt;br /&gt;
Recent ProB2-UI macOS app releases are signed and notarized, so they should run without issues.&lt;br /&gt;
However, the multi-platform jar, all snapshot app builds, and older release app builds are &#039;&#039;not&#039;&#039; signed or notarized, so macOS will refuse to run them or say that the application is damaged.&lt;br /&gt;
As a workaround:&lt;br /&gt;
&lt;br /&gt;
* On macOS 15 (Sequoia) or later: Open the System Settings, go to &amp;quot;Privacy &amp;amp; Security&amp;quot;, and next to &amp;quot;ProB2-UI was blocked to protect your Mac&amp;quot;, and click on &amp;quot;Open Anyway&amp;quot;.&lt;br /&gt;
* On macOS 14 (Sonoma) or earlier: Right-click the app, select &amp;quot;Open&amp;quot;, and confirm the security dialog. If the dialog still doesn&#039;t give you an option to open the app, click &amp;quot;Cancel&amp;quot; and do the same thing again.&lt;br /&gt;
&lt;br /&gt;
For details, see [https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unknown-developer-mh40616/mac &amp;quot;Open a Mac app from an unknown developer&amp;quot;] and [https://support.apple.com/en-us/102445#openanyway &amp;quot;Safely open apps on your Mac&amp;quot;] on Apple&#039;s support website.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
As a workaround, run this command in the folder where &#039;&#039;ProB2-UI.app&#039;&#039; is located:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xattr -r -d com.apple.quarantine &amp;quot;ProB2-UI.app&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multi-platform jar can also be started from the command line, which bypasses the signing/notarization check:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar prob2-ui-1.3.1-multi.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Editor Support ===&lt;br /&gt;
&lt;br /&gt;
==== VS Code ====&lt;br /&gt;
There is a [https://github.com/hhu-stups/b-language-extension B/ProB Language Support] extension for the Visual Studio Code (VS Code) editor. It integrates with the [[Using the Command-Line Version of ProB|command line tool probcli]] to obtain error markers for syntax and type errors. It can also be used for [[Well-Definedness Checking#VSCode|well-definedness checking]].&lt;br /&gt;
* [https://stups.hhu-hosting.de/downloads/vscode_plugin Download for manual installation]&lt;br /&gt;
&lt;br /&gt;
==== Vim ====&lt;br /&gt;
A [https://github.com/bivab/prob.vim Vim plugin for ProB is available]. It shows a quick fix list of parse and type errors for classical B machines (.mch) using the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]]. Vim has built-in syntax highlighting support for [https://github.com/vim/vim/blob/master/runtime/syntax/b.vim B].&lt;br /&gt;
&lt;br /&gt;
==== BBEdit ====&lt;br /&gt;
Some [https://github.com/leuschel/bbedit-prob BBEdit language modules for B, TLA+, CSP and Prolog] are available; these do not use the [[Using_the_Command-Line_Version_of_ProB|command line tool probcli]].&lt;br /&gt;
&lt;br /&gt;
== Java Requirements for B Parser ==&lt;br /&gt;
The B parser of ProB requires Java 8 or newer. Java 11, 17, 21, 25, etc. are also fully supported.&lt;br /&gt;
&#039;&#039;&#039;A future ProB release will require Java 17 or newer.&#039;&#039;&#039;&lt;br /&gt;
ProB 1.9.3 is the last version to support Java 7. ProB 1.5.0 is the last version to support Java 6.&lt;br /&gt;
&lt;br /&gt;
You can install a Java Runtime Environment (JRE) from various sources, such as [https://adoptium.net/ Eclipse Adoptium], [https://www.azul.com/downloads/ Azul Zulu], or your system package manager.&lt;br /&gt;
&lt;br /&gt;
Note: on some systems (macOS) you may have to install the full Java Development Kit (JDK), and not just the JRE, so that Java becomes available to the command-line tools.&lt;br /&gt;
Type &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; to check which version is used by default for command-line tools; see also [http://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x this discussion on StackOverflow].&lt;br /&gt;
In case you have trouble starting the Java parser you can now set the &amp;lt;code&amp;gt;JAVA_PATH&amp;lt;/code&amp;gt; preference of ProB to point to the &amp;lt;code&amp;gt;java&amp;lt;/code&amp;gt; tool (or java.exe on Windows).&lt;br /&gt;
&lt;br /&gt;
To check whether ProB can correctly use its Java parser you can type the following (using probcli.exe on Windows):&lt;br /&gt;
 probcli -version -v&lt;br /&gt;
This will try and start the parser and obtain the parser version.&lt;br /&gt;
In case Java is not correctly installed you should get an error message.&lt;br /&gt;
If you see the error message&lt;br /&gt;
 &amp;lt;tt&amp;gt;Unsupported major.minor version 52.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
this means you do not have Java 8 or newer installed. You can try setting the path to the correct java version by setting the JAVA_PATH preference as follows:&lt;br /&gt;
 probcli -p JAVA_PATH path/to/java -version -v&lt;br /&gt;
&lt;br /&gt;
== Tcl/Tk Requirements for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk requires an installation of Tcl/Tk 8.5 or Tcl/Tk 8.6. The command-line tool probcli does &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; require this.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on macOS ===&lt;br /&gt;
Important note: macOS comes pre-installed with a version of Tcl/Tk which is broken.&lt;br /&gt;
This may result in the display of unreadable &amp;lt;b&amp;gt;black windows&amp;lt;/b&amp;gt; or crashes in the standard file dialogs.&lt;br /&gt;
There are various options to install Tcl/Tk:&lt;br /&gt;
* with Homebrew using the [https://formulae.brew.sh/formula/tcl-tk tcl-tk formula]&lt;br /&gt;
* with [https://ports.macports.org/port/tcl/ MacPorts]&lt;br /&gt;
* use the  [http://www.activestate.com/activetcl/downloads/ ActiveTcl version of Tcl/Tk]&lt;br /&gt;
You should probably start ProB using the &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script: it will auto-detect Tcl/Tk versions and set the SP_TCL_DSO environment variable.&lt;br /&gt;
Below are more details:&lt;br /&gt;
&lt;br /&gt;
==== Tcl/Tk from Homebrew or MacPorts ====&lt;br /&gt;
&lt;br /&gt;
You can install a newer Tcl/Tk (e.g., 8.6.13) using [https://brew.sh &amp;lt;b&amp;gt;Homebrew&amp;lt;/b&amp;gt;] or [https://www.macports.org &amp;lt;b&amp;gt;MacPorts&amp;lt;/b&amp;gt;].&lt;br /&gt;
Note: In the earlier release 8.6.11 [https://bugs.python.org/issue44828 file open and file save dialogs will not work].&lt;br /&gt;
For Homebrew the command to install the[https://formulae.brew.sh/formula/tcl-tk tcl-tk formula] is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The latest versions of Homebrew now install Tcl/Tk 9.0 which does not work yet with ProB.&lt;br /&gt;
In this case install&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 brew install tcl-tk@8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, as the location of the libraries is not standard, you have to define the variable &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The &amp;lt;tt&amp;gt;StartProB.sh&amp;lt;/tt&amp;gt; script should set SP_TCL_DSO automatically.&lt;br /&gt;
You can also define and export this variable yourself before starting ProB from the Terminal by typing this (you may have to adapt the link if you are using another version of Tcl/Tk):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SP_TCL_DSO=/opt/homebrew/Cellar/tcl-tk@8/8.6.16/lib/libtcl8.6.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have uses MacPorts the path is probably &amp;lt;tt&amp;gt;/opt/local/lib/libtcl.dylib&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set the variable by adding &amp;lt;tt&amp;gt;-DSP_TCL_DSO=/usr/local/Cellar/tcl-tk/8.6.12/lib/libtcl8.6.dylib&amp;lt;/tt&amp;gt; to the command starting ProB. You may also have to install &amp;lt;tt&amp;gt;tk-table&amp;lt;/tt&amp;gt; package yourself (it is bundled with Active Tcl).&lt;br /&gt;
&lt;br /&gt;
==== Active Tcl ====&lt;br /&gt;
&lt;br /&gt;
The [http://www.activestate.com/activetcl/downloads/ the ActiveTcl version of Tcl/Tk] is automatically recognised by ProB and you do not have to set &amp;lt;tt&amp;gt;SP_TCL_DSO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, in Active Tcl/Tk 8.6 on macOS the double click in the &amp;quot;Operations View&amp;quot; or other views  is not working correctly.&lt;br /&gt;
You have to hit the RETURN key in the &amp;quot;Operations View&amp;quot; or right-click on an operation and select &amp;quot;Perform ...&amp;quot;  to execute an operation until this is fixed.&lt;br /&gt;
The older ersion [http://bugs.python.org/issue15853 8.5.12 has a bug related to copying text], see also [http://sourceforge.net/tracker/?func=detail&amp;amp;aid=3555211&amp;amp;group_id=12997&amp;amp;atid=112997_type here]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Other Notes ====&lt;br /&gt;
Note: on macOS Catalina or later the Tcl/Tk menu bar is sometimes not working. Switching to another application and then back to ProB seems to solve the problem.&lt;br /&gt;
If you see the message &amp;quot;&amp;lt;tt&amp;gt;macOS 11 or later required !&amp;lt;/tt&amp;gt;&amp;quot;  in the terminal when launching &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt; you should re-install Tcl/Tk as described above.&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Windows ===&lt;br /&gt;
We currently provide two downloads of ProB, one for Tcl/Tk 8.6 (which we recommend)&lt;br /&gt;
and a version for Tcl/Tk 8.5.&lt;br /&gt;
You can use for example the  [https://www.activestate.com/products/tcl/ ActiveTcl releases].&lt;br /&gt;
Note: For the 64 bit version of ProB for Windows, you have to install the 64 bit Tcl/Tk 8.5 version!&lt;br /&gt;
ProB 1.12 (currently available as nightly build) works with both Tcl/Tk 8.5 and 8.6.&lt;br /&gt;
You may have to point the environment variable SP_TCL_DSO to the correct DLL before starting ProB. For Tcl/Tk 8.5 this is typically&lt;br /&gt;
base-tcl8.5-thread-win32-x86_64.dll.&lt;br /&gt;
You can either go to System -&amp;gt; Settings -&amp;gt; Advanced -&amp;gt; Environment Variables&lt;br /&gt;
or use the setx command for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setx SP_TCL_DSO C:\Tcl\bin\base-tcl8.5-thread-win32-x86_64.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk on Linux ===&lt;br /&gt;
On Linux you can typically install Tcl/Tk using &amp;lt;tt&amp;gt;sudo apt-get install tcl8.5 tk8.5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
On very recent Linux systems (such as Ubuntu 20.04) you may want to download (and compile) [https://www.tcl.tk/software/tcltk/downloadnow85.html Tcl/Tk 8.5] or use [https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/tcl8.5_8.5.19-4_amd64.deb.html packages from earlier releases].&lt;br /&gt;
&lt;br /&gt;
On Linux OpenSuse (12.3) you may have to perform the following for ProB to work:&lt;br /&gt;
 ln -s /usr/lib/libtk8.5.so /usr/lib/libtk8.5.so.0&lt;br /&gt;
 ln -s /usr/lib/libtcl8.5.so /usr/lib/libtcl8.5.so.0&lt;br /&gt;
&lt;br /&gt;
Also, some of the feature require the table extension, which can be installed like this:&lt;br /&gt;
 sudo apt install tk-table&lt;br /&gt;
Finally, support for .png ANIMATION_IMG declarations requires the Img package:&lt;br /&gt;
 sudo apt install libtk-img&lt;br /&gt;
&lt;br /&gt;
== Graphviz Requirements ==&lt;br /&gt;
&lt;br /&gt;
If you wish to view various visualizations generated by ProB Tcl/Tk or probcli you will need [http://www.graphviz.org/ GraphViz].&lt;br /&gt;
ProB generates various graphs (state space, custom graph, machine hierarchy,...) as .dot files and then  uses the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; to layout the graph and convert it to PDF.&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can also use dot-file viewer such as the &amp;lt;tt&amp;gt;dotty&amp;lt;/tt&amp;gt; program from GraphViz in Linux.&lt;br /&gt;
On macOS and Windows  it is more difficult to obtain a good viewer application for dot files. VS Code with the [https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview Graphviz Interactive Preview] extension is a candidate.&lt;br /&gt;
The commercial OmniGraffle macOS application can import .dot files.  A free alternative on macOS may be [https://ports.macports.org/port/graphviz-gui/ graphviz-gui] by [https://www.macports.org MacPorts]. To install the application do this&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz-gui&amp;lt;/tt&amp;gt;&lt;br /&gt;
The viewer can now be found in /Applications/MacPorts/Graphviz.app (you may have to set the ProB graphical viewer preference &amp;lt;tt&amp;gt;dot_viewer&amp;lt;/tt&amp;gt; to this path).&lt;br /&gt;
If you do not manage to install a viewer, you should select Preferences -&amp;gt; Graphical Viewer -&amp;gt; PDF within ProB Tcl/Tk.&lt;br /&gt;
Indeed, many ProB commands work directly with the command-line tool &amp;lt;tt&amp;gt;dot&amp;lt;/tt&amp;gt; which you can install on macOS with MacPorts like this:&lt;br /&gt;
* &amp;lt;tt&amp;gt;sudo port install graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
On Mac you can now install the latest version of Graphviz using [https://brew.sh HomeBrew]:&lt;br /&gt;
&lt;br /&gt;
 1. &amp;lt;tt&amp;gt;brew uninstall graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
 2. &amp;lt;tt&amp;gt;brew install graphviz --with-gts&amp;lt;/tt&amp;gt;&lt;br /&gt;
 3. &amp;lt;tt&amp;gt;brew link --overwrite graphviz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 1. is optional; you only need to use it if you have a prior version of Graphviz installed.&lt;br /&gt;
Step3 links the binaries to /usr/local/bin.&lt;br /&gt;
This is probably better than using the [http://www.pixelglow.com/graphviz/ older version from Pixelglow].&lt;br /&gt;
&lt;br /&gt;
You can also manually set the DOT (path_to_dot) preference if ProB cannot find the Graphviz dot binary you have installed.&lt;br /&gt;
&lt;br /&gt;
== Short Release History ==&lt;br /&gt;
&lt;br /&gt;
The full  [[ProB_Release_History | ProB release history can be found here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-12-21&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.1]] is available. Automatic use of operation reuse and compression for model checking. STORE_DETAILED_TRANSITION_INFOS preference and calls LTL property. Interactive proof via animator interface for Rodin PO files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2025-06-26&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.15.0]] is available. Interactive trace replay. Many [[VisB#VisB_DEFINITIONS |VisB]] improvements (use definition files for all models, grouping of VISB objects in a single definition, VISB_CLICK_META_INFOS, ...). Profiling can be turned on via PROFILING_INFO preference. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.13.0]] is available. Better Rodin theory support. Template strings. Unicode improvements. READ_JSON and other new external functions. VisB support for groups and &amp;quot;use&amp;quot; element. [[Monte_Carlo_Tree_Search_Game_Play|MCTS game play]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2024-02-03&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2-fix1]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-08-10&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.2]] is available. [[VisB#VisB_DEFINITIONS_2 |VisB]] improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2023-04-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.12.0]] is available. Call stack infos, performance improvements in parser and solver,  new [[LTL_Model_Checking#Supported_Syntax |LTL]] operators, [[VisB#VisB_Additional_SVG_Objects|VisB]] improvements, reals/floats for [[Event-B_Theories|Rodin theories]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-12-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.1]] is available. Highlights: identifiers between backquotes, flexible JSON trace replay, DPLLT solving command, improvements to Z3 backend.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2021-10-06&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.11.0]] is available. Highlights: improved support for infinite sets, operation caching (OPERATION_REUSE), faster LTL checking for safety formulas, more compact .prob files, VisB HTML export, constructive Z3 translation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-12-15&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.10.0]] is available. Highlights: well-definedness prover, REAL datatype, -lint comand for VSCode and Atom, improved unsat core and error messages.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2020-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.3]] is available. Highlights: performance improvements, new external functions, performance monitoring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.2]] is available. Minor bugfix release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-11-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.1]] is available. Maintenance release.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2019-07-12&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.9.0]] is available. Highlights: improved error feedback, improved Unicode support, regular expression library, memoization.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-10-01&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.2]] is available. Highlights: improved error feedback, support [https://gitlab.cs.uni-duesseldorf.de/general/stups/prob2-jupyter-kernel Jupyter kernel], first [[Alloy|support for Alloy models]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2018-03-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.8.0]] is available. Highlights: terminal colour support, performance improvements for displaying very large values, improved symmetry breaking and constraint solving.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-10-05&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.1]] is available. Highlights: performance, non-deterministic assigned variables shown, Z improvements, export history to HTML.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2017-07-11&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.7.0]] is available. Highlights: improved [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], improved XML/CSV data import and export, RULE DSL language, many improvements in constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-10-20&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.1]] is available. Highlights: [[Generating_Documents_with_ProB_and_Latex |Latex document generation]], LET and IF-THEN-ELSE for expressions and predicates, XML logging, XML data import, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2016-04-22&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.6.0]] is available. Highlights: [[Tutorial_Directed_Model_Checking|directed model checking]], [[Using_ProB_with_Z3|Z3 available as backend]], B line comments and unicode symbols, improved error messages, performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2015-02-19&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.5.0]] is available. Highlights: improved random enumeration, MACE/SEM style static symmetry reduction for deferred set elements, [[State_Space_Coverage_Analyses|MC/DC coverage]] analysis for guards and invariants, [[TLC|improved TLC interface]], bug fixes and improvements including but not limited to the constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-29&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.1]], a small bugfix-only release is available. For a list of new features in 1.4.0 see below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2014-08-18&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.4.0]] is available. Highlights: CLP(FD)-based constraint solver enabled by default, kernel can handle more operations symbolically, [[TLC|integration of the TLC model checker]], bug fixes and performance improvements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2013-03-04&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.6]] is available. Highlights: improved constraint propagation for division, modulo, intervals, model checking progress bar, performance improvements, [[Using_ProB_with_KODKOD | improved Kodkod backend]] and use within REPL, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-10-08&#039;&#039;&#039;&lt;br /&gt;
[[Download|ProB 1.3.5]] is available. Highlights: support for external and recursive functions, optional Kodkod backend, [[TLA|TLA+ support]], performance improvements, pragmas, units inference, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2012-03-30&#039;&#039;&#039;&lt;br /&gt;
A first prototype of an online [[ProB_Logic_Calculator|ProB Logic Calculator]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-11-21&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.4 is available. Highlights: Evaluation View and Eval window, CSP assertion checking, improved editor, 64-bit version for Mac and Linux, performance improvements, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2011-02-10&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.3 and ProB for Rodin 2.3 is available. Highlights: improved performance, constrained-based deadlock checking, record detection, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2010-07-30&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.2 is available. Highlights: improved performance, constraint solving over integers (enable in Advanced Preferences), much improved Z support, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-12-07&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.1 is available. Highlights: new data-structure for large sets and relations (see FM 2009), multi-level validation for Event-B, improved constraint propagation for boolean connectives, and many more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2009-03-20&#039;&#039;&#039;&lt;br /&gt;
ProB 1.3.0 is available for download. Highlights: New parser and integrated typechecker, install as AtelierB plugin, improved kernel with support for large sets/relations, improved CSP support, faster LTL model checker, Undo/Redo in text editor, graphical formula viewer, user definable custom animations with gifs.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_ProB_with_Atelier_B&amp;diff=6091</id>
		<title>Using ProB with Atelier B</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_ProB_with_Atelier_B&amp;diff=6091"/>
		<updated>2026-01-30T10:59:22Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Extra Features of ProB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Atelier B Plugin ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can be installed as a plugin for Atelier B, so that ProB can be launched directly from within [http://www.atelierb.eu/ Atelier B] projects.&lt;br /&gt;
With this you can animate and model check B machines directly from within the IDE of Atelier-B.&lt;br /&gt;
&lt;br /&gt;
The easiest is to perform the menu command &amp;quot;Install AtelierB 4 Plugin...&amp;quot; in the Help menu of ProB Tcl/Tk. This will create a file called &amp;lt;tt&amp;gt;probtclk.etool&amp;lt;/tt&amp;gt; in  an extensions folder next to Atelier B&#039;s bbin folder. The extensions folder is created if necessary.&lt;br /&gt;
&lt;br /&gt;
Note: as the layout of Atelier-B&#039;s directories has changed, you need to use ProB 1.12.0 or newer for Atelier-B 4.7.1 or newer on macOS.&lt;br /&gt;
You can also create the above file yourself.&lt;br /&gt;
&lt;br /&gt;
Here is a typical &amp;lt;tt&amp;gt;probtclk.etool&amp;lt;/tt&amp;gt; file (where PathToProB depends on your location of the ProB installation folder containing the prob and probcli binaries):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;externalTool category=&amp;quot;component&amp;quot;   name=&amp;quot;ProBTclTk&amp;quot; label=&amp;quot;&amp;amp;amp;Animate with ProB (Tcl/Tk)&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;toolParameter name=&amp;quot;editor&amp;quot; type=&amp;quot;tool&amp;quot; configure=&amp;quot;yes&amp;quot;&lt;br /&gt;
   default=&amp;quot;PathToProB/StartProB.sh&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;${editor}&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;${componentPath}&amp;lt;/param&amp;gt;&lt;br /&gt;
 &amp;lt;/externalTool&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, you can also [[ProB2-UI]] within Atelier-B by creating a suitable file &amp;lt;tt&amp;gt;prob2ui.etool&amp;lt;/tt&amp;gt; in this extensions folder. Here is a typical file for macOS; the path needs to be adapted for your location and operating system (we plan to provide an installer within ProB2-UI):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;externalTool category=&amp;quot;component&amp;quot;   name=&amp;quot;ProB2UI&amp;quot; label=&amp;quot;&amp;amp;amp;Animate with ProB2-UI&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;toolParameter name=&amp;quot;editor&amp;quot; type=&amp;quot;tool&amp;quot; configure=&amp;quot;yes&amp;quot;&lt;br /&gt;
   default=&amp;quot;/Applications/Development/ProB/ProB 2 UI.app/Contents/MacOS/ProB 2 UI&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;${editor}&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;--machine-file&amp;lt;/param&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;${componentPath}&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;lt;/externalTool&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the plugins you can launch ProB for selected B machines by right-clicking on a B machine within Atelier B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_StartProB_Menu.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
== ProB as Atelier B Prover==&lt;br /&gt;
Atelier B also enables to use ProB as a prover/disprover in the interactive proof window.&lt;br /&gt;
For this you need to set the ProB_Path resource to point to probcli (command-line version of ProB). To do this you need to add the following line to the resource file of your project (replacing PATH by the the path on your machine to probcli):&lt;br /&gt;
 ATB*PR*ProB_Path:PATH/probcli&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_Resource.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Then you can type, e.g., the command &amp;lt;tt&amp;gt;prob(1)&amp;lt;/tt&amp;gt;in the interactive proof window.&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_Proof.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Two commands are provided within Atelier-B:&lt;br /&gt;
* &amp;lt;tt&amp;gt;prob(n)&amp;lt;/tt&amp;gt; tries to prove the goal with the selected hypotheses (selected using rp.n as is done for th e pp command of Atelier-B)&lt;br /&gt;
* &amp;lt;tt&amp;gt;prob(n|t)&amp;lt;/tt&amp;gt; is similar but also limits the execution time of ProB to t seconds&lt;br /&gt;
&lt;br /&gt;
Atelier-B will call probcli using the commands &amp;lt;tt&amp;gt;-cbc_assertions_tautology_proof&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-cbc_result_file&amp;lt;/tt&amp;gt; after having encoded the proof obligation into the ASSERTIONS clause of a generated B machine.&lt;br /&gt;
&lt;br /&gt;
The generated machine typically has the form:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE probNr&lt;br /&gt;
SETS ...&lt;br /&gt;
CONSTANTS ...&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  &amp;lt;&amp;lt; ALL HYPOTHESES &amp;gt;&amp;gt;&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
  ( &amp;lt;&amp;lt;SELECTED HYPOTHESES &amp;gt;&amp;gt;&lt;br /&gt;
   =&amp;gt;&lt;br /&gt;
  &amp;lt;&amp;lt; PROOF GOAL &amp;gt;&amp;gt;&lt;br /&gt;
  )&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using the Atelier B Provers inside ProB ==&lt;br /&gt;
&lt;br /&gt;
In the REPL of probcli you can [[Proving_Theorems_in_the_ProB_REPL#Calling_Atelier-B_Provers | call the provers ML and PP of Atelier-B]].&lt;br /&gt;
&lt;br /&gt;
== Differences with Atelier B ==&lt;br /&gt;
&lt;br /&gt;
As of version 1.3, ProB contains a much improved parser which tries be compliant with&lt;br /&gt;
Atelier B but provides extra features.&lt;br /&gt;
&lt;br /&gt;
=== Extra Features of ProB ===&lt;br /&gt;
&lt;br /&gt;
* Identifiers: ProB also allows identifiers consisting of a single letter. ProB also accepts enumerated set elements to be used as identifiers. Arbitrary identifiers can be used in backquotes (e..g, &amp;lt;tt&amp;gt;`id-1*`&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* Lexing: The Atelier-B parser (&amp;lt;tt&amp;gt;bcomp&amp;lt;/tt&amp;gt;) reports a lexical error (&amp;lt;tt&amp;gt;illegal token |-&amp;lt;/tt&amp;gt;) if the vertical bar (|) of a lambda abstraction is followed directly by the minus sign.&lt;br /&gt;
&lt;br /&gt;
* Typing: &lt;br /&gt;
** ProB makes use of a unification-based type inference algorithm. As such, typing information can not only flow from left-to-right inside a formula, but also from right-to-left. For example, it is sufficient to type &amp;lt;tt&amp;gt;xx&amp;lt;:yy &amp;amp; yy&amp;lt;:NAT&amp;lt;/tt&amp;gt; instead of typing both &amp;lt;tt&amp;gt;xx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;yy&amp;lt;/tt&amp;gt; in ProB.&lt;br /&gt;
** Similar to Rodin, ProB extracts typing information from all predicates. As such, it is sufficient to write &amp;lt;tt&amp;gt;xx/:{1,2}&amp;lt;/tt&amp;gt; to assign a type to &amp;lt;tt&amp;gt;xx&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** the fields of records are normalized (sorted); hence the predicate &amp;lt;tt&amp;gt;rec(a:0,b:1) = rec(b:y,a:x)&amp;lt;/tt&amp;gt; is correctly typed for ProB.&lt;br /&gt;
** As of version 1.12.1 you can apply prj1 and prj2 without providing the type arguments. For example, you can write &amp;lt;tt&amp;gt;prj2(prj1(1|-&amp;gt;2|-&amp;gt;3))&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;prj2(INTEGER,INTEGER)(prj1(INTEGER*INTEGER,INTEGER)(1|-&amp;gt;2|-&amp;gt;3))&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* DEFINITIONS: the definitions and its arguments are checked by ProB. We believe this to be an important feature for a formal method language. However, as such, every DEFINITION must be either a predicate, an expression or a substitution. You &#039;&#039;&#039;cannot&#039;&#039;&#039; use, for example, lists of identifiers as a definition. Also, for the moment, the arguments to DEFINITIONS have to be expressions. Finally, when replacing DEFINITIONS the associativity is not changed. E.g., with &amp;lt;tt&amp;gt;PLUS(x,y) == x+y&amp;lt;/tt&amp;gt;, the expression &amp;lt;tt&amp;gt;PLUS(2,3)*10&amp;lt;/tt&amp;gt; will evaluate to 50 (and not to 32 as with Atelier-B). Also, ProB will generate a warning when variable capture may occur. In Version 1.16.0 of ProB there is the new preference HYGIENIC_DEFINITIONS. By setting it to TRUE you avoid most of the variable capture problems (ProB will automatically introduce a LET for parameters if necessary to avoid code duplication and variable capture).&lt;br /&gt;
* In version 1.16.0 ProB will support EXPRESSIONS and PREDICATES sections as a hygienic replacement of DEFINITIONS&lt;br /&gt;
&lt;br /&gt;
* for a LET substitution, Atelier-B does not allow introduced identifiers to be used in the right-hand side of equations; ProB allows &amp;lt;tt&amp;gt;LET x,y BE x=2 &amp;amp; y=x*x IN ... END&amp;lt;/tt&amp;gt; but only if the preference &amp;lt;tt&amp;gt;ALLOW_COMPLEX_LETS&amp;lt;/tt&amp;gt; is set to TRUE.&lt;br /&gt;
&lt;br /&gt;
* ProB allows WHILE loops and sequential composition in abstract machines&lt;br /&gt;
&lt;br /&gt;
* ProB now allows the IF-THEN-ELSE for expressions and predicates: &amp;lt;tt&amp;gt;IF x&amp;lt;0 THEN -x ELSE x END&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ProB now allows LET constructs for expressions and predicates&lt;br /&gt;
&lt;br /&gt;
* ProB allows &amp;lt;tt&amp;gt;btrue&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;bfalse&amp;lt;/tt&amp;gt; as predicates.&lt;br /&gt;
&lt;br /&gt;
* ProB allows to use the Event-B relation operators &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;-&amp;gt;&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;&amp;lt;-&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;-&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ProB allows escape codes (\n, \&#039;, \&amp;quot;, see above) and supports UTF-8 characters in strings,  and ProB allows multi-line string literals written using three apostrophes (&amp;lt;tt&amp;gt;&amp;quot;&#039;&#039;&#039;&#039;string&#039;&#039;&#039;&#039;&amp;quot;&amp;lt;/tt&amp;gt;) as well as template strings using three backquotes (e.g., &amp;lt;tt&amp;gt;```1+2=${1+2}```&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* ProB allows WHILE loops and sequential composition in abstract machines&lt;br /&gt;
&lt;br /&gt;
* Some of the sequence operators can be applied to strings (unless you set the preference STRING_AS_SEQUENCE to FALSE): &amp;lt;tt&amp;gt;size&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;rev&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;^&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;conc&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* As of version 1.12.1 you can write Event-B style set comprehensions with an extra expression like {x•x:1..10|x*x}. You have to use the middle dot, the bullet (•) or a Unicode dot for this, though. You can also put parentheses around the identifiers and use the regular dot: {(x).x:1..10|x*x}.&lt;br /&gt;
&lt;br /&gt;
* ProB comes with several libraries of [[External_Functions | external functions]] for string manipulations, mathematical functions, Hilbert&#039;s choice operator, etc.&lt;br /&gt;
&lt;br /&gt;
* ProB supports a special section [[Free_Types|FREETYPES]] to define inductive data types&lt;br /&gt;
&lt;br /&gt;
=== Differences ===&lt;br /&gt;
* for ProB the order of fields in a record is not relevant (internally the fields are  sorted), Atelier-B reports a type error if the order of the name of the fields changes&lt;br /&gt;
&lt;br /&gt;
* [[Well-Definedness_Checking|Well-definedness]]: ProB will try to check if your predicates are well-defined during animation or model checking, but there is currently no guarantee that all well-definedness errors will be detected. To be on the safe side, you should ensure that your formulas are well-defined according to the  left-to-right definition of well-definedness employed in Rodin for Event-B. ProB now has a [[Well-Definedness_Checking|static checker for well-definedness]] which you can use for this. Note, however, that ProB may re-order conjuncts if this improves well-definedness. For example, for &amp;lt;tt&amp;gt;x:0..3 &amp;amp; y=10/x &amp;amp; x /=0&amp;lt;/tt&amp;gt; ProB will not report an error as the conjunct &amp;lt;tt&amp;gt;x/=0&amp;lt;/tt&amp;gt; is processed before the division. Indeed, while this predicate is not well-defined according to Rodin&#039;s left-to-right rule, it is well-defined according to the more liberal commutative definition of well-definedness.&lt;br /&gt;
&lt;br /&gt;
== Reflexive Closure ==&lt;br /&gt;
&lt;br /&gt;
In version 1.8.0 (March 2018) ProB changed the definition of the transitive and reflexive closure operator of B.&lt;br /&gt;
PorB now uses to the mathematical definition: &lt;br /&gt;
&amp;lt;pre&amp;gt; closure(X) = id(TypeOfX) \/ closure1(X)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means that &amp;lt;tt&amp;gt;closure({1|-&amp;gt;2}) &amp;lt;/tt&amp;gt;is now infinite and contains for example the pair &amp;lt;tt&amp;gt;3|-&amp;gt;3&amp;lt;/tt&amp;gt;. The same holds for &amp;lt;tt&amp;gt; iterate({1|-&amp;gt;2},0)&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The previous definition was closure(X) = id(ran(X)\/dom(X)) \/ closure1(X) and&lt;br /&gt;
the definition in Atelier-B was closure(X) = id(dom(X)) \/ closure1(X).&lt;br /&gt;
However, both were not compatible with the following law in the B-Book on page 169:&lt;br /&gt;
&amp;lt;pre&amp;gt; r[a] &amp;lt;: a =&amp;gt; closure(r)[a]=a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take  r = {1|-&amp;gt;2}, then  r[{3}] &amp;lt;: {3}.&lt;br /&gt;
So, according to the law we have: &amp;lt;tt&amp;gt; closure(r)[{3}] = {3}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the next version of Atelier-B in 2025 closure(R) will be defined as &amp;quot;the smallest relation&lt;br /&gt;
that contains R that is transitive and reflexive.&amp;quot;&lt;br /&gt;
This corresponds to ProB&#039;s definition prior to version 1.8.0 closure(X) = id(ran(X)\/dom(X)) \/ closure1(X) and is thus different to the B-Book.&lt;br /&gt;
ProB may provide a preference in the next release to allow the user to choose between the two interpretations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
* Parsing:  ProB will require parentheses around the comma, the relational composition, and parallel product operators. For example, you cannot write &amp;lt;tt&amp;gt;r2=rel;rel&amp;lt;/tt&amp;gt;. You need to write &amp;lt;tt&amp;gt;r2=(rel;rel)&amp;lt;/tt&amp;gt;. This allows ProB to distinguish the relational composition from the sequential composition (or other uses of the semicolon). You also generally need to put BEGIN and END around the sequential composition operator, e.g., &amp;lt;tt&amp;gt;Op = BEGIN x:=1;y:=2 END&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Similarly,  tuples without parentheses are not supported; write (a,b,c) instead of a,b,c&lt;br /&gt;
&lt;br /&gt;
* Unsupported Operators:&lt;br /&gt;
** Trees and binary trees: some tree operators (mirror, infix) are not supported by ProB. The tree operators may disappear in future version of Atelier B and may also disappear from ProB.&lt;br /&gt;
** &amp;lt;tt&amp;gt;VALUES&amp;lt;/tt&amp;gt;: This clause of the &amp;lt;tt&amp;gt;IMPLEMENTATION&amp;lt;/tt&amp;gt; machines is not yet fully supported;&lt;br /&gt;
&lt;br /&gt;
* There are also some general limitations wrt refinements. See [[Current Limitations#Multiple Machines and Refinements]] for more details.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_ProB_with_Atelier_B&amp;diff=6090</id>
		<title>Using ProB with Atelier B</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_ProB_with_Atelier_B&amp;diff=6090"/>
		<updated>2026-01-30T10:59:00Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Extra Features of ProB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Atelier B Plugin ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can be installed as a plugin for Atelier B, so that ProB can be launched directly from within [http://www.atelierb.eu/ Atelier B] projects.&lt;br /&gt;
With this you can animate and model check B machines directly from within the IDE of Atelier-B.&lt;br /&gt;
&lt;br /&gt;
The easiest is to perform the menu command &amp;quot;Install AtelierB 4 Plugin...&amp;quot; in the Help menu of ProB Tcl/Tk. This will create a file called &amp;lt;tt&amp;gt;probtclk.etool&amp;lt;/tt&amp;gt; in  an extensions folder next to Atelier B&#039;s bbin folder. The extensions folder is created if necessary.&lt;br /&gt;
&lt;br /&gt;
Note: as the layout of Atelier-B&#039;s directories has changed, you need to use ProB 1.12.0 or newer for Atelier-B 4.7.1 or newer on macOS.&lt;br /&gt;
You can also create the above file yourself.&lt;br /&gt;
&lt;br /&gt;
Here is a typical &amp;lt;tt&amp;gt;probtclk.etool&amp;lt;/tt&amp;gt; file (where PathToProB depends on your location of the ProB installation folder containing the prob and probcli binaries):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;externalTool category=&amp;quot;component&amp;quot;   name=&amp;quot;ProBTclTk&amp;quot; label=&amp;quot;&amp;amp;amp;Animate with ProB (Tcl/Tk)&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;toolParameter name=&amp;quot;editor&amp;quot; type=&amp;quot;tool&amp;quot; configure=&amp;quot;yes&amp;quot;&lt;br /&gt;
   default=&amp;quot;PathToProB/StartProB.sh&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;${editor}&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;${componentPath}&amp;lt;/param&amp;gt;&lt;br /&gt;
 &amp;lt;/externalTool&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, you can also [[ProB2-UI]] within Atelier-B by creating a suitable file &amp;lt;tt&amp;gt;prob2ui.etool&amp;lt;/tt&amp;gt; in this extensions folder. Here is a typical file for macOS; the path needs to be adapted for your location and operating system (we plan to provide an installer within ProB2-UI):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;externalTool category=&amp;quot;component&amp;quot;   name=&amp;quot;ProB2UI&amp;quot; label=&amp;quot;&amp;amp;amp;Animate with ProB2-UI&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;toolParameter name=&amp;quot;editor&amp;quot; type=&amp;quot;tool&amp;quot; configure=&amp;quot;yes&amp;quot;&lt;br /&gt;
   default=&amp;quot;/Applications/Development/ProB/ProB 2 UI.app/Contents/MacOS/ProB 2 UI&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;${editor}&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;--machine-file&amp;lt;/param&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;${componentPath}&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;lt;/externalTool&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the plugins you can launch ProB for selected B machines by right-clicking on a B machine within Atelier B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_StartProB_Menu.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
== ProB as Atelier B Prover==&lt;br /&gt;
Atelier B also enables to use ProB as a prover/disprover in the interactive proof window.&lt;br /&gt;
For this you need to set the ProB_Path resource to point to probcli (command-line version of ProB). To do this you need to add the following line to the resource file of your project (replacing PATH by the the path on your machine to probcli):&lt;br /&gt;
 ATB*PR*ProB_Path:PATH/probcli&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_Resource.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Then you can type, e.g., the command &amp;lt;tt&amp;gt;prob(1)&amp;lt;/tt&amp;gt;in the interactive proof window.&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_Proof.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Two commands are provided within Atelier-B:&lt;br /&gt;
* &amp;lt;tt&amp;gt;prob(n)&amp;lt;/tt&amp;gt; tries to prove the goal with the selected hypotheses (selected using rp.n as is done for th e pp command of Atelier-B)&lt;br /&gt;
* &amp;lt;tt&amp;gt;prob(n|t)&amp;lt;/tt&amp;gt; is similar but also limits the execution time of ProB to t seconds&lt;br /&gt;
&lt;br /&gt;
Atelier-B will call probcli using the commands &amp;lt;tt&amp;gt;-cbc_assertions_tautology_proof&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-cbc_result_file&amp;lt;/tt&amp;gt; after having encoded the proof obligation into the ASSERTIONS clause of a generated B machine.&lt;br /&gt;
&lt;br /&gt;
The generated machine typically has the form:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE probNr&lt;br /&gt;
SETS ...&lt;br /&gt;
CONSTANTS ...&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  &amp;lt;&amp;lt; ALL HYPOTHESES &amp;gt;&amp;gt;&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
  ( &amp;lt;&amp;lt;SELECTED HYPOTHESES &amp;gt;&amp;gt;&lt;br /&gt;
   =&amp;gt;&lt;br /&gt;
  &amp;lt;&amp;lt; PROOF GOAL &amp;gt;&amp;gt;&lt;br /&gt;
  )&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using the Atelier B Provers inside ProB ==&lt;br /&gt;
&lt;br /&gt;
In the REPL of probcli you can [[Proving_Theorems_in_the_ProB_REPL#Calling_Atelier-B_Provers | call the provers ML and PP of Atelier-B]].&lt;br /&gt;
&lt;br /&gt;
== Differences with Atelier B ==&lt;br /&gt;
&lt;br /&gt;
As of version 1.3, ProB contains a much improved parser which tries be compliant with&lt;br /&gt;
Atelier B but provides extra features.&lt;br /&gt;
&lt;br /&gt;
=== Extra Features of ProB ===&lt;br /&gt;
&lt;br /&gt;
* Identifiers: ProB also allows identifiers consisting of a single letter. ProB also accepts enumerated set elements to be used as identifiers. Arbitrary identifiers can be used in backquotes (e..g, &amp;lt;tt&amp;gt;`id-1*`&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* Lexing: The Atelier-B parser (&amp;lt;tt&amp;gt;bcomp&amp;lt;/tt&amp;gt;) reports a lexical error (&amp;lt;tt&amp;gt;illegal token |-&amp;lt;/tt&amp;gt;) if the vertical bar (|) of a lambda abstraction is followed directly by the minus sign.&lt;br /&gt;
&lt;br /&gt;
* Typing: &lt;br /&gt;
** ProB makes use of a unification-based type inference algorithm. As such, typing information can not only flow from left-to-right inside a formula, but also from right-to-left. For example, it is sufficient to type &amp;lt;tt&amp;gt;xx&amp;lt;:yy &amp;amp; yy&amp;lt;:NAT&amp;lt;/tt&amp;gt; instead of typing both &amp;lt;tt&amp;gt;xx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;yy&amp;lt;/tt&amp;gt; in ProB.&lt;br /&gt;
** Similar to Rodin, ProB extracts typing information from all predicates. As such, it is sufficient to write &amp;lt;tt&amp;gt;xx/:{1,2}&amp;lt;/tt&amp;gt; to assign a type to &amp;lt;tt&amp;gt;xx&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** the fields of records are normalized (sorted); hence the predicate &amp;lt;tt&amp;gt;rec(a:0,b:1) = rec(b:y,a:x)&amp;lt;/tt&amp;gt; is correctly typed for ProB.&lt;br /&gt;
** As of version 1.12.1 you can apply prj1 and prj2 without providing the type arguments. For example, you can write &amp;lt;tt&amp;gt;prj2(prj1(1|-&amp;gt;2|-&amp;gt;3))&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;prj2(INTEGER,INTEGER)(prj1(INTEGER*INTEGER,INTEGER)(1|-&amp;gt;2|-&amp;gt;3))&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* DEFINITIONS: the definitions and its arguments are checked by ProB. We believe this to be an important feature for a formal method language. However, as such, every DEFINITION must be either a predicate, an expression or a substitution. You &#039;&#039;&#039;cannot&#039;&#039;&#039; use, for example, lists of identifiers as a definition. Also, for the moment, the arguments to DEFINITIONS have to be expressions. Finally, when replacing DEFINITIONS the associativity is not changed. E.g., with &amp;lt;tt&amp;gt;PLUS(x,y) == x+y&amp;lt;/tt&amp;gt;, the expression &amp;lt;tt&amp;gt;PLUS(2,3)*10&amp;lt;/tt&amp;gt; will evaluate to 50 (and not to 32 as with Atelier-B). Also, ProB will generate a warning when variable capture may occur. In Version 1.16.0 of ProB there is the new preference HYGIENIC_DEFINITIONS. By setting it to TRUE you avoid most of the variable capture problems (ProB will automatically introduce a LET for parameters if necessary to avoid code duplication and variable capture).&lt;br /&gt;
&lt;br /&gt;
* for a LET substitution, Atelier-B does not allow introduced identifiers to be used in the right-hand side of equations; ProB allows &amp;lt;tt&amp;gt;LET x,y BE x=2 &amp;amp; y=x*x IN ... END&amp;lt;/tt&amp;gt; but only if the preference &amp;lt;tt&amp;gt;ALLOW_COMPLEX_LETS&amp;lt;/tt&amp;gt; is set to TRUE.&lt;br /&gt;
&lt;br /&gt;
* ProB allows WHILE loops and sequential composition in abstract machines&lt;br /&gt;
&lt;br /&gt;
* ProB now allows the IF-THEN-ELSE for expressions and predicates: &amp;lt;tt&amp;gt;IF x&amp;lt;0 THEN -x ELSE x END&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ProB now allows LET constructs for expressions and predicates&lt;br /&gt;
&lt;br /&gt;
* ProB allows &amp;lt;tt&amp;gt;btrue&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;bfalse&amp;lt;/tt&amp;gt; as predicates.&lt;br /&gt;
&lt;br /&gt;
* ProB allows to use the Event-B relation operators &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;-&amp;gt;&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;&amp;lt;-&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;-&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ProB allows escape codes (\n, \&#039;, \&amp;quot;, see above) and supports UTF-8 characters in strings,  and ProB allows multi-line string literals written using three apostrophes (&amp;lt;tt&amp;gt;&amp;quot;&#039;&#039;&#039;&#039;string&#039;&#039;&#039;&#039;&amp;quot;&amp;lt;/tt&amp;gt;) as well as template strings using three backquotes (e.g., &amp;lt;tt&amp;gt;```1+2=${1+2}```&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* ProB allows WHILE loops and sequential composition in abstract machines&lt;br /&gt;
&lt;br /&gt;
* Some of the sequence operators can be applied to strings (unless you set the preference STRING_AS_SEQUENCE to FALSE): &amp;lt;tt&amp;gt;size&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;rev&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;^&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;conc&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* As of version 1.12.1 you can write Event-B style set comprehensions with an extra expression like {x•x:1..10|x*x}. You have to use the middle dot, the bullet (•) or a Unicode dot for this, though. You can also put parentheses around the identifiers and use the regular dot: {(x).x:1..10|x*x}.&lt;br /&gt;
&lt;br /&gt;
* ProB comes with several libraries of [[External_Functions | external functions]] for string manipulations, mathematical functions, Hilbert&#039;s choice operator, etc.&lt;br /&gt;
&lt;br /&gt;
* ProB supports a special section [[Free_Types|FREETYPES]] to define inductive data types&lt;br /&gt;
&lt;br /&gt;
* In version 1.16.0 ProB will support EXPRESSIONS and PREDICATES sections as a hygienic replacement of DEFINITIONS&lt;br /&gt;
&lt;br /&gt;
=== Differences ===&lt;br /&gt;
* for ProB the order of fields in a record is not relevant (internally the fields are  sorted), Atelier-B reports a type error if the order of the name of the fields changes&lt;br /&gt;
&lt;br /&gt;
* [[Well-Definedness_Checking|Well-definedness]]: ProB will try to check if your predicates are well-defined during animation or model checking, but there is currently no guarantee that all well-definedness errors will be detected. To be on the safe side, you should ensure that your formulas are well-defined according to the  left-to-right definition of well-definedness employed in Rodin for Event-B. ProB now has a [[Well-Definedness_Checking|static checker for well-definedness]] which you can use for this. Note, however, that ProB may re-order conjuncts if this improves well-definedness. For example, for &amp;lt;tt&amp;gt;x:0..3 &amp;amp; y=10/x &amp;amp; x /=0&amp;lt;/tt&amp;gt; ProB will not report an error as the conjunct &amp;lt;tt&amp;gt;x/=0&amp;lt;/tt&amp;gt; is processed before the division. Indeed, while this predicate is not well-defined according to Rodin&#039;s left-to-right rule, it is well-defined according to the more liberal commutative definition of well-definedness.&lt;br /&gt;
&lt;br /&gt;
== Reflexive Closure ==&lt;br /&gt;
&lt;br /&gt;
In version 1.8.0 (March 2018) ProB changed the definition of the transitive and reflexive closure operator of B.&lt;br /&gt;
PorB now uses to the mathematical definition: &lt;br /&gt;
&amp;lt;pre&amp;gt; closure(X) = id(TypeOfX) \/ closure1(X)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means that &amp;lt;tt&amp;gt;closure({1|-&amp;gt;2}) &amp;lt;/tt&amp;gt;is now infinite and contains for example the pair &amp;lt;tt&amp;gt;3|-&amp;gt;3&amp;lt;/tt&amp;gt;. The same holds for &amp;lt;tt&amp;gt; iterate({1|-&amp;gt;2},0)&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The previous definition was closure(X) = id(ran(X)\/dom(X)) \/ closure1(X) and&lt;br /&gt;
the definition in Atelier-B was closure(X) = id(dom(X)) \/ closure1(X).&lt;br /&gt;
However, both were not compatible with the following law in the B-Book on page 169:&lt;br /&gt;
&amp;lt;pre&amp;gt; r[a] &amp;lt;: a =&amp;gt; closure(r)[a]=a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take  r = {1|-&amp;gt;2}, then  r[{3}] &amp;lt;: {3}.&lt;br /&gt;
So, according to the law we have: &amp;lt;tt&amp;gt; closure(r)[{3}] = {3}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the next version of Atelier-B in 2025 closure(R) will be defined as &amp;quot;the smallest relation&lt;br /&gt;
that contains R that is transitive and reflexive.&amp;quot;&lt;br /&gt;
This corresponds to ProB&#039;s definition prior to version 1.8.0 closure(X) = id(ran(X)\/dom(X)) \/ closure1(X) and is thus different to the B-Book.&lt;br /&gt;
ProB may provide a preference in the next release to allow the user to choose between the two interpretations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
* Parsing:  ProB will require parentheses around the comma, the relational composition, and parallel product operators. For example, you cannot write &amp;lt;tt&amp;gt;r2=rel;rel&amp;lt;/tt&amp;gt;. You need to write &amp;lt;tt&amp;gt;r2=(rel;rel)&amp;lt;/tt&amp;gt;. This allows ProB to distinguish the relational composition from the sequential composition (or other uses of the semicolon). You also generally need to put BEGIN and END around the sequential composition operator, e.g., &amp;lt;tt&amp;gt;Op = BEGIN x:=1;y:=2 END&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Similarly,  tuples without parentheses are not supported; write (a,b,c) instead of a,b,c&lt;br /&gt;
&lt;br /&gt;
* Unsupported Operators:&lt;br /&gt;
** Trees and binary trees: some tree operators (mirror, infix) are not supported by ProB. The tree operators may disappear in future version of Atelier B and may also disappear from ProB.&lt;br /&gt;
** &amp;lt;tt&amp;gt;VALUES&amp;lt;/tt&amp;gt;: This clause of the &amp;lt;tt&amp;gt;IMPLEMENTATION&amp;lt;/tt&amp;gt; machines is not yet fully supported;&lt;br /&gt;
&lt;br /&gt;
* There are also some general limitations wrt refinements. See [[Current Limitations#Multiple Machines and Refinements]] for more details.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_ProB_with_Atelier_B&amp;diff=6089</id>
		<title>Using ProB with Atelier B</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_ProB_with_Atelier_B&amp;diff=6089"/>
		<updated>2026-01-30T09:50:31Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Extra Features of ProB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Atelier B Plugin ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can be installed as a plugin for Atelier B, so that ProB can be launched directly from within [http://www.atelierb.eu/ Atelier B] projects.&lt;br /&gt;
With this you can animate and model check B machines directly from within the IDE of Atelier-B.&lt;br /&gt;
&lt;br /&gt;
The easiest is to perform the menu command &amp;quot;Install AtelierB 4 Plugin...&amp;quot; in the Help menu of ProB Tcl/Tk. This will create a file called &amp;lt;tt&amp;gt;probtclk.etool&amp;lt;/tt&amp;gt; in  an extensions folder next to Atelier B&#039;s bbin folder. The extensions folder is created if necessary.&lt;br /&gt;
&lt;br /&gt;
Note: as the layout of Atelier-B&#039;s directories has changed, you need to use ProB 1.12.0 or newer for Atelier-B 4.7.1 or newer on macOS.&lt;br /&gt;
You can also create the above file yourself.&lt;br /&gt;
&lt;br /&gt;
Here is a typical &amp;lt;tt&amp;gt;probtclk.etool&amp;lt;/tt&amp;gt; file (where PathToProB depends on your location of the ProB installation folder containing the prob and probcli binaries):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;externalTool category=&amp;quot;component&amp;quot;   name=&amp;quot;ProBTclTk&amp;quot; label=&amp;quot;&amp;amp;amp;Animate with ProB (Tcl/Tk)&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;toolParameter name=&amp;quot;editor&amp;quot; type=&amp;quot;tool&amp;quot; configure=&amp;quot;yes&amp;quot;&lt;br /&gt;
   default=&amp;quot;PathToProB/StartProB.sh&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;${editor}&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;${componentPath}&amp;lt;/param&amp;gt;&lt;br /&gt;
 &amp;lt;/externalTool&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, you can also [[ProB2-UI]] within Atelier-B by creating a suitable file &amp;lt;tt&amp;gt;prob2ui.etool&amp;lt;/tt&amp;gt; in this extensions folder. Here is a typical file for macOS; the path needs to be adapted for your location and operating system (we plan to provide an installer within ProB2-UI):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;externalTool category=&amp;quot;component&amp;quot;   name=&amp;quot;ProB2UI&amp;quot; label=&amp;quot;&amp;amp;amp;Animate with ProB2-UI&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;toolParameter name=&amp;quot;editor&amp;quot; type=&amp;quot;tool&amp;quot; configure=&amp;quot;yes&amp;quot;&lt;br /&gt;
   default=&amp;quot;/Applications/Development/ProB/ProB 2 UI.app/Contents/MacOS/ProB 2 UI&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;${editor}&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;--machine-file&amp;lt;/param&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;${componentPath}&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;lt;/externalTool&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the plugins you can launch ProB for selected B machines by right-clicking on a B machine within Atelier B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_StartProB_Menu.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
== ProB as Atelier B Prover==&lt;br /&gt;
Atelier B also enables to use ProB as a prover/disprover in the interactive proof window.&lt;br /&gt;
For this you need to set the ProB_Path resource to point to probcli (command-line version of ProB). To do this you need to add the following line to the resource file of your project (replacing PATH by the the path on your machine to probcli):&lt;br /&gt;
 ATB*PR*ProB_Path:PATH/probcli&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_Resource.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Then you can type, e.g., the command &amp;lt;tt&amp;gt;prob(1)&amp;lt;/tt&amp;gt;in the interactive proof window.&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_Proof.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Two commands are provided within Atelier-B:&lt;br /&gt;
* &amp;lt;tt&amp;gt;prob(n)&amp;lt;/tt&amp;gt; tries to prove the goal with the selected hypotheses (selected using rp.n as is done for th e pp command of Atelier-B)&lt;br /&gt;
* &amp;lt;tt&amp;gt;prob(n|t)&amp;lt;/tt&amp;gt; is similar but also limits the execution time of ProB to t seconds&lt;br /&gt;
&lt;br /&gt;
Atelier-B will call probcli using the commands &amp;lt;tt&amp;gt;-cbc_assertions_tautology_proof&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-cbc_result_file&amp;lt;/tt&amp;gt; after having encoded the proof obligation into the ASSERTIONS clause of a generated B machine.&lt;br /&gt;
&lt;br /&gt;
The generated machine typically has the form:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE probNr&lt;br /&gt;
SETS ...&lt;br /&gt;
CONSTANTS ...&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  &amp;lt;&amp;lt; ALL HYPOTHESES &amp;gt;&amp;gt;&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
  ( &amp;lt;&amp;lt;SELECTED HYPOTHESES &amp;gt;&amp;gt;&lt;br /&gt;
   =&amp;gt;&lt;br /&gt;
  &amp;lt;&amp;lt; PROOF GOAL &amp;gt;&amp;gt;&lt;br /&gt;
  )&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using the Atelier B Provers inside ProB ==&lt;br /&gt;
&lt;br /&gt;
In the REPL of probcli you can [[Proving_Theorems_in_the_ProB_REPL#Calling_Atelier-B_Provers | call the provers ML and PP of Atelier-B]].&lt;br /&gt;
&lt;br /&gt;
== Differences with Atelier B ==&lt;br /&gt;
&lt;br /&gt;
As of version 1.3, ProB contains a much improved parser which tries be compliant with&lt;br /&gt;
Atelier B but provides extra features.&lt;br /&gt;
&lt;br /&gt;
=== Extra Features of ProB ===&lt;br /&gt;
&lt;br /&gt;
* Identifiers: ProB also allows identifiers consisting of a single letter. ProB also accepts enumerated set elements to be used as identifiers. Arbitrary identifiers can be used in backquotes (e..g, &amp;lt;tt&amp;gt;`id-1*`&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* Lexing: The Atelier-B parser (&amp;lt;tt&amp;gt;bcomp&amp;lt;/tt&amp;gt;) reports a lexical error (&amp;lt;tt&amp;gt;illegal token |-&amp;lt;/tt&amp;gt;) if the vertical bar (|) of a lambda abstraction is followed directly by the minus sign.&lt;br /&gt;
&lt;br /&gt;
* Typing: &lt;br /&gt;
** ProB makes use of a unification-based type inference algorithm. As such, typing information can not only flow from left-to-right inside a formula, but also from right-to-left. For example, it is sufficient to type &amp;lt;tt&amp;gt;xx&amp;lt;:yy &amp;amp; yy&amp;lt;:NAT&amp;lt;/tt&amp;gt; instead of typing both &amp;lt;tt&amp;gt;xx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;yy&amp;lt;/tt&amp;gt; in ProB.&lt;br /&gt;
** Similar to Rodin, ProB extracts typing information from all predicates. As such, it is sufficient to write &amp;lt;tt&amp;gt;xx/:{1,2}&amp;lt;/tt&amp;gt; to assign a type to &amp;lt;tt&amp;gt;xx&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** the fields of records are normalized (sorted); hence the predicate &amp;lt;tt&amp;gt;rec(a:0,b:1) = rec(b:y,a:x)&amp;lt;/tt&amp;gt; is correctly typed for ProB.&lt;br /&gt;
** As of version 1.12.1 you can apply prj1 and prj2 without providing the type arguments. For example, you can write &amp;lt;tt&amp;gt;prj2(prj1(1|-&amp;gt;2|-&amp;gt;3))&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;prj2(INTEGER,INTEGER)(prj1(INTEGER*INTEGER,INTEGER)(1|-&amp;gt;2|-&amp;gt;3))&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* DEFINITIONS: the definitions and its arguments are checked by ProB. We believe this to be an important feature for a formal method language. However, as such, every DEFINITION must be either a predicate, an expression or a substitution. You &#039;&#039;&#039;cannot&#039;&#039;&#039; use, for example, lists of identifiers as a definition. Also, for the moment, the arguments to DEFINITIONS have to be expressions. Finally, when replacing DEFINITIONS the associativity is not changed. E.g., with &amp;lt;tt&amp;gt;PLUS(x,y) == x+y&amp;lt;/tt&amp;gt;, the expression &amp;lt;tt&amp;gt;PLUS(2,3)*10&amp;lt;/tt&amp;gt; will evaluate to 50 (and not to 32 as with Atelier-B). Also, ProB will generate a warning when variable capture may occur. In Version 1.16.0 of ProB there is the new preference HYGIENIC_DEFINITIONS. By setting it to TRUE you avoid most of the variable capture problems (ProB will automatically introduce a LET for parameters if necessary to avoid code duplication and variable capture).&lt;br /&gt;
&lt;br /&gt;
* for a LET substitution, Atelier-B does not allow introduced identifiers to be used in the right-hand side of equations; ProB allows &amp;lt;tt&amp;gt;LET x,y BE x=2 &amp;amp; y=x*x IN ... END&amp;lt;/tt&amp;gt; but only if the preference &amp;lt;tt&amp;gt;ALLOW_COMPLEX_LETS&amp;lt;/tt&amp;gt; is set to TRUE.&lt;br /&gt;
&lt;br /&gt;
* ProB allows WHILE loops and sequential composition in abstract machines&lt;br /&gt;
&lt;br /&gt;
* ProB now allows the IF-THEN-ELSE for expressions and predicates: &amp;lt;tt&amp;gt;IF x&amp;lt;0 THEN -x ELSE x END&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ProB now allows LET constructs for expressions and predicates&lt;br /&gt;
&lt;br /&gt;
* ProB allows &amp;lt;tt&amp;gt;btrue&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;bfalse&amp;lt;/tt&amp;gt; as predicates.&lt;br /&gt;
&lt;br /&gt;
* ProB allows to use the Event-B relation operators &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;-&amp;gt;&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;&amp;lt;-&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;-&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ProB allows escape codes (\n, \&#039;, \&amp;quot;, see above) and supports UTF-8 characters in strings,  and ProB allows multi-line string literals written using three apostrophes (&amp;lt;tt&amp;gt;&amp;quot;&#039;&#039;&#039;&#039;string&#039;&#039;&#039;&#039;&amp;quot;&amp;lt;/tt&amp;gt;) as well as template strings using three backquotes (e.g., &amp;lt;tt&amp;gt;```1+2=${1+2}```&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* ProB allows WHILE loops and sequential composition in abstract machines&lt;br /&gt;
&lt;br /&gt;
* Some of the sequence operators can be applied to strings (unless you set the preference STRING_AS_SEQUENCE to FALSE): &amp;lt;tt&amp;gt;size&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;rev&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;^&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;conc&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* As of version 1.12.1 you can write Event-B style set comprehensions with an extra expression like {x•x:1..10|x*x}. You have to use the middle dot, the bullet (•) or a Unicode dot for this, though. You can also put parentheses around the identifiers and use the regular dot: {(x).x:1..10|x*x}.&lt;br /&gt;
&lt;br /&gt;
* ProB comes with several libraries of [[External_Functions | external functions]] for string manipulations, mathematical functions, Hilbert&#039;s choice operator, etc.&lt;br /&gt;
&lt;br /&gt;
=== Differences ===&lt;br /&gt;
* for ProB the order of fields in a record is not relevant (internally the fields are  sorted), Atelier-B reports a type error if the order of the name of the fields changes&lt;br /&gt;
&lt;br /&gt;
* [[Well-Definedness_Checking|Well-definedness]]: ProB will try to check if your predicates are well-defined during animation or model checking, but there is currently no guarantee that all well-definedness errors will be detected. To be on the safe side, you should ensure that your formulas are well-defined according to the  left-to-right definition of well-definedness employed in Rodin for Event-B. ProB now has a [[Well-Definedness_Checking|static checker for well-definedness]] which you can use for this. Note, however, that ProB may re-order conjuncts if this improves well-definedness. For example, for &amp;lt;tt&amp;gt;x:0..3 &amp;amp; y=10/x &amp;amp; x /=0&amp;lt;/tt&amp;gt; ProB will not report an error as the conjunct &amp;lt;tt&amp;gt;x/=0&amp;lt;/tt&amp;gt; is processed before the division. Indeed, while this predicate is not well-defined according to Rodin&#039;s left-to-right rule, it is well-defined according to the more liberal commutative definition of well-definedness.&lt;br /&gt;
&lt;br /&gt;
== Reflexive Closure ==&lt;br /&gt;
&lt;br /&gt;
In version 1.8.0 (March 2018) ProB changed the definition of the transitive and reflexive closure operator of B.&lt;br /&gt;
PorB now uses to the mathematical definition: &lt;br /&gt;
&amp;lt;pre&amp;gt; closure(X) = id(TypeOfX) \/ closure1(X)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means that &amp;lt;tt&amp;gt;closure({1|-&amp;gt;2}) &amp;lt;/tt&amp;gt;is now infinite and contains for example the pair &amp;lt;tt&amp;gt;3|-&amp;gt;3&amp;lt;/tt&amp;gt;. The same holds for &amp;lt;tt&amp;gt; iterate({1|-&amp;gt;2},0)&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The previous definition was closure(X) = id(ran(X)\/dom(X)) \/ closure1(X) and&lt;br /&gt;
the definition in Atelier-B was closure(X) = id(dom(X)) \/ closure1(X).&lt;br /&gt;
However, both were not compatible with the following law in the B-Book on page 169:&lt;br /&gt;
&amp;lt;pre&amp;gt; r[a] &amp;lt;: a =&amp;gt; closure(r)[a]=a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take  r = {1|-&amp;gt;2}, then  r[{3}] &amp;lt;: {3}.&lt;br /&gt;
So, according to the law we have: &amp;lt;tt&amp;gt; closure(r)[{3}] = {3}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the next version of Atelier-B in 2025 closure(R) will be defined as &amp;quot;the smallest relation&lt;br /&gt;
that contains R that is transitive and reflexive.&amp;quot;&lt;br /&gt;
This corresponds to ProB&#039;s definition prior to version 1.8.0 closure(X) = id(ran(X)\/dom(X)) \/ closure1(X) and is thus different to the B-Book.&lt;br /&gt;
ProB may provide a preference in the next release to allow the user to choose between the two interpretations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
* Parsing:  ProB will require parentheses around the comma, the relational composition, and parallel product operators. For example, you cannot write &amp;lt;tt&amp;gt;r2=rel;rel&amp;lt;/tt&amp;gt;. You need to write &amp;lt;tt&amp;gt;r2=(rel;rel)&amp;lt;/tt&amp;gt;. This allows ProB to distinguish the relational composition from the sequential composition (or other uses of the semicolon). You also generally need to put BEGIN and END around the sequential composition operator, e.g., &amp;lt;tt&amp;gt;Op = BEGIN x:=1;y:=2 END&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Similarly,  tuples without parentheses are not supported; write (a,b,c) instead of a,b,c&lt;br /&gt;
&lt;br /&gt;
* Unsupported Operators:&lt;br /&gt;
** Trees and binary trees: some tree operators (mirror, infix) are not supported by ProB. The tree operators may disappear in future version of Atelier B and may also disappear from ProB.&lt;br /&gt;
** &amp;lt;tt&amp;gt;VALUES&amp;lt;/tt&amp;gt;: This clause of the &amp;lt;tt&amp;gt;IMPLEMENTATION&amp;lt;/tt&amp;gt; machines is not yet fully supported;&lt;br /&gt;
&lt;br /&gt;
* There are also some general limitations wrt refinements. See [[Current Limitations#Multiple Machines and Refinements]] for more details.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_ProB_with_Atelier_B&amp;diff=6088</id>
		<title>Using ProB with Atelier B</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_ProB_with_Atelier_B&amp;diff=6088"/>
		<updated>2026-01-30T09:49:11Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Extra Features of ProB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Atelier B Plugin ==&lt;br /&gt;
&lt;br /&gt;
ProB Tcl/Tk can be installed as a plugin for Atelier B, so that ProB can be launched directly from within [http://www.atelierb.eu/ Atelier B] projects.&lt;br /&gt;
With this you can animate and model check B machines directly from within the IDE of Atelier-B.&lt;br /&gt;
&lt;br /&gt;
The easiest is to perform the menu command &amp;quot;Install AtelierB 4 Plugin...&amp;quot; in the Help menu of ProB Tcl/Tk. This will create a file called &amp;lt;tt&amp;gt;probtclk.etool&amp;lt;/tt&amp;gt; in  an extensions folder next to Atelier B&#039;s bbin folder. The extensions folder is created if necessary.&lt;br /&gt;
&lt;br /&gt;
Note: as the layout of Atelier-B&#039;s directories has changed, you need to use ProB 1.12.0 or newer for Atelier-B 4.7.1 or newer on macOS.&lt;br /&gt;
You can also create the above file yourself.&lt;br /&gt;
&lt;br /&gt;
Here is a typical &amp;lt;tt&amp;gt;probtclk.etool&amp;lt;/tt&amp;gt; file (where PathToProB depends on your location of the ProB installation folder containing the prob and probcli binaries):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;externalTool category=&amp;quot;component&amp;quot;   name=&amp;quot;ProBTclTk&amp;quot; label=&amp;quot;&amp;amp;amp;Animate with ProB (Tcl/Tk)&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;toolParameter name=&amp;quot;editor&amp;quot; type=&amp;quot;tool&amp;quot; configure=&amp;quot;yes&amp;quot;&lt;br /&gt;
   default=&amp;quot;PathToProB/StartProB.sh&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;${editor}&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;${componentPath}&amp;lt;/param&amp;gt;&lt;br /&gt;
 &amp;lt;/externalTool&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, you can also [[ProB2-UI]] within Atelier-B by creating a suitable file &amp;lt;tt&amp;gt;prob2ui.etool&amp;lt;/tt&amp;gt; in this extensions folder. Here is a typical file for macOS; the path needs to be adapted for your location and operating system (we plan to provide an installer within ProB2-UI):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;externalTool category=&amp;quot;component&amp;quot;   name=&amp;quot;ProB2UI&amp;quot; label=&amp;quot;&amp;amp;amp;Animate with ProB2-UI&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;toolParameter name=&amp;quot;editor&amp;quot; type=&amp;quot;tool&amp;quot; configure=&amp;quot;yes&amp;quot;&lt;br /&gt;
   default=&amp;quot;/Applications/Development/ProB/ProB 2 UI.app/Contents/MacOS/ProB 2 UI&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;command&amp;gt;${editor}&amp;lt;/command&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;--machine-file&amp;lt;/param&amp;gt;&lt;br /&gt;
    &amp;lt;param&amp;gt;${componentPath}&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;lt;/externalTool&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the plugins you can launch ProB for selected B machines by right-clicking on a B machine within Atelier B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_StartProB_Menu.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
== ProB as Atelier B Prover==&lt;br /&gt;
Atelier B also enables to use ProB as a prover/disprover in the interactive proof window.&lt;br /&gt;
For this you need to set the ProB_Path resource to point to probcli (command-line version of ProB). To do this you need to add the following line to the resource file of your project (replacing PATH by the the path on your machine to probcli):&lt;br /&gt;
 ATB*PR*ProB_Path:PATH/probcli&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_Resource.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Then you can type, e.g., the command &amp;lt;tt&amp;gt;prob(1)&amp;lt;/tt&amp;gt;in the interactive proof window.&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_AtelierB_Proof.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Two commands are provided within Atelier-B:&lt;br /&gt;
* &amp;lt;tt&amp;gt;prob(n)&amp;lt;/tt&amp;gt; tries to prove the goal with the selected hypotheses (selected using rp.n as is done for th e pp command of Atelier-B)&lt;br /&gt;
* &amp;lt;tt&amp;gt;prob(n|t)&amp;lt;/tt&amp;gt; is similar but also limits the execution time of ProB to t seconds&lt;br /&gt;
&lt;br /&gt;
Atelier-B will call probcli using the commands &amp;lt;tt&amp;gt;-cbc_assertions_tautology_proof&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-cbc_result_file&amp;lt;/tt&amp;gt; after having encoded the proof obligation into the ASSERTIONS clause of a generated B machine.&lt;br /&gt;
&lt;br /&gt;
The generated machine typically has the form:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE probNr&lt;br /&gt;
SETS ...&lt;br /&gt;
CONSTANTS ...&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  &amp;lt;&amp;lt; ALL HYPOTHESES &amp;gt;&amp;gt;&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
  ( &amp;lt;&amp;lt;SELECTED HYPOTHESES &amp;gt;&amp;gt;&lt;br /&gt;
   =&amp;gt;&lt;br /&gt;
  &amp;lt;&amp;lt; PROOF GOAL &amp;gt;&amp;gt;&lt;br /&gt;
  )&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using the Atelier B Provers inside ProB ==&lt;br /&gt;
&lt;br /&gt;
In the REPL of probcli you can [[Proving_Theorems_in_the_ProB_REPL#Calling_Atelier-B_Provers | call the provers ML and PP of Atelier-B]].&lt;br /&gt;
&lt;br /&gt;
== Differences with Atelier B ==&lt;br /&gt;
&lt;br /&gt;
As of version 1.3, ProB contains a much improved parser which tries be compliant with&lt;br /&gt;
Atelier B but provides extra features.&lt;br /&gt;
&lt;br /&gt;
=== Extra Features of ProB ===&lt;br /&gt;
&lt;br /&gt;
* Identifiers: ProB also allows identifiers consisting of a single letter. ProB also accepts enumerated set elements to be used as identifiers. Arbitrary identifiers can be used in backquotes (e..g, &amp;lt;tt&amp;gt;`id-1*`&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* Lexing: The Atelier-B parser (&amp;lt;tt&amp;gt;bcomp&amp;lt;/tt&amp;gt;) reports a lexical error (&amp;lt;tt&amp;gt;illegal token |-&amp;lt;/tt&amp;gt;) if the vertical bar (|) of a lambda abstraction is followed directly by the minus sign.&lt;br /&gt;
&lt;br /&gt;
* Typing: &lt;br /&gt;
** ProB makes use of a unification-based type inference algorithm. As such, typing information can not only flow from left-to-right inside a formula, but also from right-to-left. For example, it is sufficient to type &amp;lt;tt&amp;gt;xx&amp;lt;:yy &amp;amp; yy&amp;lt;:NAT&amp;lt;/tt&amp;gt; instead of typing both &amp;lt;tt&amp;gt;xx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;yy&amp;lt;/tt&amp;gt; in ProB.&lt;br /&gt;
** Similar to Rodin, ProB extracts typing information from all predicates. As such, it is sufficient to write &amp;lt;tt&amp;gt;xx/:{1,2}&amp;lt;/tt&amp;gt; to assign a type to &amp;lt;tt&amp;gt;xx&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** the fields of records are normalized (sorted); hence the predicate &amp;lt;tt&amp;gt;rec(a:0,b:1) = rec(b:y,a:x)&amp;lt;/tt&amp;gt; is correctly typed for ProB.&lt;br /&gt;
** As of version 1.12.1 you can apply prj1 and prj2 without providing the type arguments. For example, you can write &amp;lt;tt&amp;gt;prj2(prj1(1|-&amp;gt;2|-&amp;gt;3))&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;prj2(INTEGER,INTEGER)(prj1(INTEGER*INTEGER,INTEGER)(1|-&amp;gt;2|-&amp;gt;3))&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* DEFINITIONS: the definitions and its arguments are checked by ProB. We believe this to be an important feature for a formal method language. However, as such, every DEFINITION must be either a predicate, an expression or a substitution. You &#039;&#039;&#039;cannot&#039;&#039;&#039; use, for example, lists of identifiers as a definition. Also, for the moment, the arguments to DEFINITIONS have to be expressions. Finally, when replacing DEFINITIONS the associativity is not changed. E.g., with &amp;lt;tt&amp;gt;PLUS(x,y) == x+y&amp;lt;/tt&amp;gt;, the expression &amp;lt;tt&amp;gt;PLUS(2,3)*10&amp;lt;/tt&amp;gt; will evaluate to 50 (and not to 32 as with Atelier-B). Also, ProB will generate a warning when variable capture may occur. In Version 1.16.0 of ProB there is the new preference HYGIENIC_DEFINITIONS. By setting it to TRUE you avoid most of the variable capture problems (ProB will automatically introduce a LET for parameters if necessary to avoid code duplication and variable capture).&lt;br /&gt;
&lt;br /&gt;
* for a LET substitution, Atelier-B does not allow introduced identifiers to be used in the right-hand side of equations; ProB allows &amp;lt;tt&amp;gt;LET x,y BE x=2 &amp;amp; y=x*x IN ... END&amp;lt;/tt&amp;gt; but only if the preference &amp;lt;tt&amp;gt;ALLOW_COMPLEX_LETS&amp;lt;/tt&amp;gt; is set to TRUE.&lt;br /&gt;
&lt;br /&gt;
* ProB allows WHILE loops and sequential composition in abstract machines&lt;br /&gt;
&lt;br /&gt;
* ProB now allows the IF-THEN-ELSE for expressions and predicates: &amp;lt;tt&amp;gt;IF x&amp;lt;0 THEN -x ELSE x END&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ProB now allows LET constructs for expressions and predicates&lt;br /&gt;
&lt;br /&gt;
* ProB allows &amp;lt;tt&amp;gt;btrue&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;bfalse&amp;lt;/tt&amp;gt; as predicates.&lt;br /&gt;
&lt;br /&gt;
* ProB allows to use the Event-B relation operators &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;-&amp;gt;&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;&amp;lt;-&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;-&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ProB allows escape codes (\n, \&#039;, \&amp;quot;, see above) and supports UTF-8 characters in strings,  and ProB allows multi-line string literals written using three apostrophes (&amp;lt;tt&amp;gt;&amp;quot;&#039;&#039;&#039;&#039;string&#039;&#039;&#039;&#039;&amp;quot;&amp;lt;/tt&amp;gt;) as well as template strings using three backquotes (e.g., &amp;lt;tt&amp;gt;```1+2=${1+2}```&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* ProB allows WHILE loops and sequential composition in abstract machines&lt;br /&gt;
&lt;br /&gt;
* Some of the sequence operators can be applied to strings (unless you set the preference STRING_AS_SEQUENCE to FALSE): &amp;lt;tt&amp;gt;size&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;rev&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;^&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;conc&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* As of version 1.12.1 you can write Event-B style set comprehensions with an extra expression like {x•x:1..10|x*x}. You have to use the middle dot, the bullet (•) or a Unicode dot for this, though.&lt;br /&gt;
&lt;br /&gt;
* ProB comes with several libraries of [[External_Functions | external functions]] for string manipulations, mathematical functions, Hilbert&#039;s choice operator, etc.&lt;br /&gt;
&lt;br /&gt;
=== Differences ===&lt;br /&gt;
* for ProB the order of fields in a record is not relevant (internally the fields are  sorted), Atelier-B reports a type error if the order of the name of the fields changes&lt;br /&gt;
&lt;br /&gt;
* [[Well-Definedness_Checking|Well-definedness]]: ProB will try to check if your predicates are well-defined during animation or model checking, but there is currently no guarantee that all well-definedness errors will be detected. To be on the safe side, you should ensure that your formulas are well-defined according to the  left-to-right definition of well-definedness employed in Rodin for Event-B. ProB now has a [[Well-Definedness_Checking|static checker for well-definedness]] which you can use for this. Note, however, that ProB may re-order conjuncts if this improves well-definedness. For example, for &amp;lt;tt&amp;gt;x:0..3 &amp;amp; y=10/x &amp;amp; x /=0&amp;lt;/tt&amp;gt; ProB will not report an error as the conjunct &amp;lt;tt&amp;gt;x/=0&amp;lt;/tt&amp;gt; is processed before the division. Indeed, while this predicate is not well-defined according to Rodin&#039;s left-to-right rule, it is well-defined according to the more liberal commutative definition of well-definedness.&lt;br /&gt;
&lt;br /&gt;
== Reflexive Closure ==&lt;br /&gt;
&lt;br /&gt;
In version 1.8.0 (March 2018) ProB changed the definition of the transitive and reflexive closure operator of B.&lt;br /&gt;
PorB now uses to the mathematical definition: &lt;br /&gt;
&amp;lt;pre&amp;gt; closure(X) = id(TypeOfX) \/ closure1(X)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This means that &amp;lt;tt&amp;gt;closure({1|-&amp;gt;2}) &amp;lt;/tt&amp;gt;is now infinite and contains for example the pair &amp;lt;tt&amp;gt;3|-&amp;gt;3&amp;lt;/tt&amp;gt;. The same holds for &amp;lt;tt&amp;gt; iterate({1|-&amp;gt;2},0)&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The previous definition was closure(X) = id(ran(X)\/dom(X)) \/ closure1(X) and&lt;br /&gt;
the definition in Atelier-B was closure(X) = id(dom(X)) \/ closure1(X).&lt;br /&gt;
However, both were not compatible with the following law in the B-Book on page 169:&lt;br /&gt;
&amp;lt;pre&amp;gt; r[a] &amp;lt;: a =&amp;gt; closure(r)[a]=a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take  r = {1|-&amp;gt;2}, then  r[{3}] &amp;lt;: {3}.&lt;br /&gt;
So, according to the law we have: &amp;lt;tt&amp;gt; closure(r)[{3}] = {3}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the next version of Atelier-B in 2025 closure(R) will be defined as &amp;quot;the smallest relation&lt;br /&gt;
that contains R that is transitive and reflexive.&amp;quot;&lt;br /&gt;
This corresponds to ProB&#039;s definition prior to version 1.8.0 closure(X) = id(ran(X)\/dom(X)) \/ closure1(X) and is thus different to the B-Book.&lt;br /&gt;
ProB may provide a preference in the next release to allow the user to choose between the two interpretations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
* Parsing:  ProB will require parentheses around the comma, the relational composition, and parallel product operators. For example, you cannot write &amp;lt;tt&amp;gt;r2=rel;rel&amp;lt;/tt&amp;gt;. You need to write &amp;lt;tt&amp;gt;r2=(rel;rel)&amp;lt;/tt&amp;gt;. This allows ProB to distinguish the relational composition from the sequential composition (or other uses of the semicolon). You also generally need to put BEGIN and END around the sequential composition operator, e.g., &amp;lt;tt&amp;gt;Op = BEGIN x:=1;y:=2 END&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Similarly,  tuples without parentheses are not supported; write (a,b,c) instead of a,b,c&lt;br /&gt;
&lt;br /&gt;
* Unsupported Operators:&lt;br /&gt;
** Trees and binary trees: some tree operators (mirror, infix) are not supported by ProB. The tree operators may disappear in future version of Atelier B and may also disappear from ProB.&lt;br /&gt;
** &amp;lt;tt&amp;gt;VALUES&amp;lt;/tt&amp;gt;: This clause of the &amp;lt;tt&amp;gt;IMPLEMENTATION&amp;lt;/tt&amp;gt; machines is not yet fully supported;&lt;br /&gt;
&lt;br /&gt;
* There are also some general limitations wrt refinements. See [[Current Limitations#Multiple Machines and Refinements]] for more details.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Current_Limitations&amp;diff=6087</id>
		<title>Current Limitations</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Current_Limitations&amp;diff=6087"/>
		<updated>2026-01-30T09:48:09Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
&lt;br /&gt;
ProB in general requires all [[Deferred Sets|deferred sets]] to be given a finite cardinality. If no cardinality is specified, a default size will be used. Also, unless finite bounds can be inferred by the ProB constraint solver, mathematical integers will only be enumerated within &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;  (and ProB will generate enumeration&lt;br /&gt;
warnings in case no solution is found).&lt;br /&gt;
&lt;br /&gt;
Other general limitations are:&lt;br /&gt;
&lt;br /&gt;
* Trees and binary trees. These constructs are specific to the AtelierB tool and are only partially supported. The tree support will also probably disappear in Atelier-B in future.&lt;br /&gt;
&lt;br /&gt;
* Definitions. Definitions (from the &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause) with arguments are supported, but in contrast to AtelierB they are parsed independently and have to be either an expression, a predicate, or a substitution; definitions which are predicates or substitutions must be declared before first use. Also: the arguments of &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; have to be expressions. Finally, when replacing DEFINITIONS the associativity is not changed. E.g., with &amp;lt;tt&amp;gt;PLUS(x,y) == x+y&amp;lt;/tt&amp;gt;, the expression &amp;lt;tt&amp;gt;PLUS(2,3)*10&amp;lt;/tt&amp;gt; will evaluate to 50 (and not to 32 as with Atelier-B). Also, ProB will generate a warning when variable capture may occur. In Version 1.16.0 of ProB there is the new preference HYGIENIC_DEFINITIONS. By setting it to TRUE you avoid most of the variable capture problems (ProB will automatically introduce a LET for parameters if necessary to avoid code duplication and variable capture).&lt;br /&gt;
&lt;br /&gt;
* There are also limitations with refinements. See below; &lt;br /&gt;
* &amp;lt;tt&amp;gt;VALUES&amp;lt;/tt&amp;gt; This clause of &amp;lt;tt&amp;gt;IMPLEMENTATION&amp;lt;/tt&amp;gt; machines is not yet fully supported;&lt;br /&gt;
&lt;br /&gt;
* Parsing:  ProB will require parentheses around the comma, the relational composition, and parallel product operators. For example, you cannot write &amp;lt;tt&amp;gt;r2=rel;rel&amp;lt;/tt&amp;gt;. You need to write &amp;lt;tt&amp;gt;r2=(rel;rel)&amp;lt;/tt&amp;gt;. This allows ProB to distinguish the relational composition from the sequential composition (or other uses of the semicolon). You also generally need to put BEGIN and END around the sequential composition operator, e.g., &amp;lt;tt&amp;gt;Op = BEGIN x:=1;y:=2 END&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See the page [[Using ProB with Atelier B]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Machines and Refinements ===&lt;br /&gt;
&lt;br /&gt;
It is possible to use multiple classical B machines with ProB. However, ProB may not enforce all of the classical B visibility rules (although we try to). As far as the visibility rules are concerned, it is thus a good idea to check the machines in another B tool, such as Atelier B or the B-Toolkit.&lt;br /&gt;
&lt;br /&gt;
While refinements are supported, the preconditions of operations are not propagated down to refinement machines. This means that you should rewrite the preconditions of operations (and, if necessary, reformulate them in terms of the variables of the refinement machine). Also, the refinement checker does not yet check the gluing invariant.&lt;br /&gt;
&lt;br /&gt;
Note however, that for Rodin Event-B models we now support multi-level animation and validation.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Current_Limitations&amp;diff=6086</id>
		<title>Current Limitations</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Current_Limitations&amp;diff=6086"/>
		<updated>2026-01-30T09:47:05Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
&lt;br /&gt;
ProB in general requires all [[Deferred Sets|deferred sets]] to be given a finite cardinality. If no cardinality is specified, a default size will be used. Also, unless finite bounds can be inferred by the ProB constraint solver, mathematical integers will only be enumerated within &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;  (and ProB will generate enumeration&lt;br /&gt;
warnings in case no solution is found).&lt;br /&gt;
&lt;br /&gt;
Other general limitations are:&lt;br /&gt;
&lt;br /&gt;
* Trees and binary trees. These constructs are specific to the AtelierB tool and are only partially supported; &lt;br /&gt;
&lt;br /&gt;
* Definitions. Definitions (from the &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause) with arguments are supported, but in contrast to AtelierB they are parsed independently and have to be either an expression, a predicate, or a substitution; definitions which are predicates or substitutions must be declared before first use. Also: the arguments of &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; have to be expressions. Finally, when replacing DEFINITIONS the associativity is not changed. E.g., with &amp;lt;tt&amp;gt;PLUS(x,y) == x+y&amp;lt;/tt&amp;gt;, the expression &amp;lt;tt&amp;gt;PLUS(2,3)*10&amp;lt;/tt&amp;gt; will evaluate to 50 (and not to 32 as with Atelier-B). Also, ProB will generate a warning when variable capture may occur. In Version 1.16.0 of ProB there is the new preference HYGIENIC_DEFINITIONS. By setting it to TRUE you avoid most of the variable capture problems (ProB will automatically introduce a LET for parameters if necessary to avoid code duplication and variable capture).&lt;br /&gt;
&lt;br /&gt;
* There are also limitations with refinements. See below; &lt;br /&gt;
* &amp;lt;tt&amp;gt;VALUES&amp;lt;/tt&amp;gt; This clause of &amp;lt;tt&amp;gt;IMPLEMENTATION&amp;lt;/tt&amp;gt; machines is not yet fully supported;&lt;br /&gt;
&lt;br /&gt;
* Parsing:  ProB will require parentheses around the comma, the relational composition, and parallel product operators. For example, you cannot write &amp;lt;tt&amp;gt;r2=rel;rel&amp;lt;/tt&amp;gt;. You need to write &amp;lt;tt&amp;gt;r2=(rel;rel)&amp;lt;/tt&amp;gt;. This allows ProB to distinguish the relational composition from the sequential composition (or other uses of the semicolon). You also generally need to put BEGIN and END around the sequential composition operator, e.g., &amp;lt;tt&amp;gt;Op = BEGIN x:=1;y:=2 END&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See the page [[Using ProB with Atelier B]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Machines and Refinements ===&lt;br /&gt;
&lt;br /&gt;
It is possible to use multiple classical B machines with ProB. However, ProB may not enforce all of the classical B visibility rules (although we try to). As far as the visibility rules are concerned, it is thus a good idea to check the machines in another B tool, such as Atelier B or the B-Toolkit.&lt;br /&gt;
&lt;br /&gt;
While refinements are supported, the preconditions of operations are not propagated down to refinement machines. This means that you should rewrite the preconditions of operations (and, if necessary, reformulate them in terms of the variables of the refinement machine). Also, the refinement checker does not yet check the gluing invariant.&lt;br /&gt;
&lt;br /&gt;
Note however, that for Rodin Event-B models we now support multi-level animation and validation.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Current_Limitations&amp;diff=6085</id>
		<title>Current Limitations</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Current_Limitations&amp;diff=6085"/>
		<updated>2026-01-30T09:46:42Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Manual]]&lt;br /&gt;
&lt;br /&gt;
ProB in general requires all [[Deferred Sets|deferred sets]] to be given a finite cardinality. If no cardinality is specified, a default size will be used. Also, unless finite bounds can be inferred by the ProB constraint solver, mathematical integers will only be enumerated within &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;  (and ProB will generate enumeration&lt;br /&gt;
warnings in case no solution is found).&lt;br /&gt;
&lt;br /&gt;
Other general limitations are:&lt;br /&gt;
&lt;br /&gt;
* Trees and binary trees. These constructs are specific to the AtelierB tool and are only partially supported; &lt;br /&gt;
&lt;br /&gt;
* Definitions. Definitions (from the &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause) with arguments are supported, but in contrast to AtelierB they are parsed independently and have to be either an expression, a predicate, or a substitution; definitions which are predicates or substitutions must be declared before first use. Also: the arguments of &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; have to be expressions. Finally, when replacing DEFINITIONS the associativity is not changed. E.g., with &amp;lt;tt&amp;gt;PLUS(x,y) == x+y&amp;lt;/tt&amp;gt;, the expression &amp;lt;tt&amp;gt;PLUS(2,3)*10&amp;lt;/tt&amp;gt; will evaluate to 50 (and not to 32 as with Atelier-B).&lt;br /&gt;
Also, ProB will generate a warning when variable capture may occur.&lt;br /&gt;
In Version 1.16.0 of ProB there is the new preference HYGIENIC_DEFINITIONS. By setting it to TRUE you avoid most of the variable capture problems (ProB will automatically introduce a LET for parameters if necessary to avoid code duplication and variable capture).&lt;br /&gt;
&lt;br /&gt;
* There are also limitations with refinements. See below; &lt;br /&gt;
* &amp;lt;tt&amp;gt;VALUES&amp;lt;/tt&amp;gt; This clause of &amp;lt;tt&amp;gt;IMPLEMENTATION&amp;lt;/tt&amp;gt; machines is not yet fully supported;&lt;br /&gt;
&lt;br /&gt;
* Parsing:  ProB will require parentheses around the comma, the relational composition, and parallel product operators. For example, you cannot write &amp;lt;tt&amp;gt;r2=rel;rel&amp;lt;/tt&amp;gt;. You need to write &amp;lt;tt&amp;gt;r2=(rel;rel)&amp;lt;/tt&amp;gt;. This allows ProB to distinguish the relational composition from the sequential composition (or other uses of the semicolon). You also generally need to put BEGIN and END around the sequential composition operator, e.g., &amp;lt;tt&amp;gt;Op = BEGIN x:=1;y:=2 END&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See the page [[Using ProB with Atelier B]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Machines and Refinements ===&lt;br /&gt;
&lt;br /&gt;
It is possible to use multiple classical B machines with ProB. However, ProB may not enforce all of the classical B visibility rules (although we try to). As far as the visibility rules are concerned, it is thus a good idea to check the machines in another B tool, such as Atelier B or the B-Toolkit.&lt;br /&gt;
&lt;br /&gt;
While refinements are supported, the preconditions of operations are not propagated down to refinement machines. This means that you should rewrite the preconditions of operations (and, if necessary, reformulate them in terms of the variables of the refinement machine). Also, the refinement checker does not yet check the gluing invariant.&lt;br /&gt;
&lt;br /&gt;
Note however, that for Rodin Event-B models we now support multi-level animation and validation.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Caching_Constants_and_Operations&amp;diff=6084</id>
		<title>Caching Constants and Operations</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Caching_Constants_and_Operations&amp;diff=6084"/>
		<updated>2026-01-29T15:05:22Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ProB can store the values of constants and operations in a cache file.&lt;br /&gt;
Compared to [[Memoization_for_Functions|memoization for functions]] and&lt;br /&gt;
[[Tutorial_Tuning_Model_Checking#Operation_Caching_.28Reuse.29|operation reuse during model checking]], this caching is persistent across different runs of probcli or ProB Tcl/Tk and is applicable to the constant setup and operations, not at the level of computation of values using (constant) functions.&lt;br /&gt;
(It thus may make sense to activate both [[Memoization_for_Functions|memoization]] and caching.)&lt;br /&gt;
&lt;br /&gt;
=== Activating Caching ===&lt;br /&gt;
&lt;br /&gt;
In the  [[Using_the_Command-Line_Version_of_ProB|command-line version probcli]] the cache can be activated using the option&lt;br /&gt;
* -cache DIRECTORY&lt;br /&gt;
This means that cache results will be stored in that directory.&lt;br /&gt;
The directory may contain multiple files, namely one file per B machine.&lt;br /&gt;
The files contain a hash to detect whether they are still up-to-date.&lt;br /&gt;
&lt;br /&gt;
The same option has to be used to activate the caching for ProB Tcl/Tk, i.e., you need to launch ProB Tcl/Tk from the command-line with the -cache option:&lt;br /&gt;
* prob -cache DIRECTORY&lt;br /&gt;
&lt;br /&gt;
Caching is currently only available for classical B machines without refinement,&lt;br /&gt;
and when symmetry reduction is off (which it is by default).&lt;br /&gt;
(Note to developers: the conditions are checked in the Prolog predicate cache_is_applicable in the module value_persistance.pl).&lt;br /&gt;
The cache feature can, however, deal with composed machines (e.g., with INCLUDES, USES, SEES) and stores constant values for individual sub-machines.&lt;br /&gt;
Constants are cached when&lt;br /&gt;
* no time-out occurred during SET_UP_CONSTANTS&lt;br /&gt;
* all enabled solutions were computed (i.e., the MAX_INITIALISATIONS limit was not reached)&lt;br /&gt;
* the machine has no parameters&lt;br /&gt;
Operations are cached when&lt;br /&gt;
* no time-out occurred&lt;br /&gt;
* all enabled operations were computed (i.e., the MAX_OPERATIONS limit was not reached)&lt;br /&gt;
* the preference CACHE_OPERATIONS is true (which it is by default; it is only available as of version 1.11.0)&lt;br /&gt;
&lt;br /&gt;
The cache file will also contain the values of relevant preferences, which can influence the computation of constants or operation results (e.g., MAXINT, MININT, DEFAULT_SETSIZE,...)&lt;br /&gt;
If the cache cannot be re-used a message will be displayed:&lt;br /&gt;
 value caching: general computations parameters have changed, no re-use of stored operations&lt;br /&gt;
&lt;br /&gt;
=== Inspecting the Cache ===&lt;br /&gt;
&lt;br /&gt;
In the  [[Using_the_Command-Line_Version_of_ProB|command-line version probcli]] a summary of the cache can be displayed using this option (together with the -cache option mentioned above).&lt;br /&gt;
* -show_cache&lt;br /&gt;
In verbose mode (-v flag) more details are displayed, but the additional information is probably only useful for ProB developers. You can also use -show_cache_verbose to this effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli CrewAllocationConstants.mch -cache cache/ -show-cache&lt;br /&gt;
&lt;br /&gt;
Contents of cache file cache/CrewAllocationConstants.probcst of type constants for machine CrewAllocationConstants:&lt;br /&gt;
     ( male={(tom|-&amp;gt;TRUE),(david|-&amp;gt;TRUE),(jeremy|-&amp;gt;TRUE),(carol|-&amp;gt;FALSE),(janet|-&amp;gt;FALSE),(tracy|-&amp;gt;FALSE)} &amp;amp;&lt;br /&gt;
       speaks={(tom|-&amp;gt;german),(david|-&amp;gt;french),(jeremy|-&amp;gt;german),(carol|-&amp;gt;spanish),(janet|-&amp;gt;french),(tracy|-&amp;gt;spanish)} &amp;amp;&lt;br /&gt;
       assign={(1|-&amp;gt;tom),(1|-&amp;gt;david),(1|-&amp;gt;jeremy),(1|-&amp;gt;carol),(1|-&amp;gt;janet),(1|-&amp;gt;tracy),(2|-&amp;gt;tom),(2|-&amp;gt;david),(2|-&amp;gt;carol),(3|-&amp;gt;jeremy),(3|-&amp;gt;janet),(3|-&amp;gt;tracy)} )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Tcl/Tk this information can be obtained by choosing the command &amp;quot;Show ProB Cache Info&amp;quot; in the Debug menu.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Take the following B machine&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE PrimeNumbers&lt;br /&gt;
// A machine with a slow constant set up to check -cache option&lt;br /&gt;
DEFINITIONS SET_PREF_TIME_OUT == 10000&lt;br /&gt;
CONSTANTS n, primes, maxprime&lt;br /&gt;
PROPERTIES&lt;br /&gt;
 n:NATURAL1 &amp;amp;&lt;br /&gt;
 primes = {x|x:2..n &amp;amp; !y.(y&amp;gt;1 &amp;amp; y*y&amp;lt;=x =&amp;gt; x mod y /= 0)} &amp;amp;&lt;br /&gt;
 (n = 10000 or n=1000) &amp;amp;&lt;br /&gt;
 maxprime = max(primes)&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
 (n = 10000 =&amp;gt; card(primes) = 1229)&lt;br /&gt;
VARIABLES x&lt;br /&gt;
INVARIANT&lt;br /&gt;
 x:2..n &amp;amp; x:primes&lt;br /&gt;
INITIALISATION x:=2&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  NextPrime(nxt) = SELECT x&amp;lt;maxprime &amp;amp; &lt;br /&gt;
                         nxt:primes &amp;amp; nxt = min(primes /\ (x+1)..n) THEN&lt;br /&gt;
       x:=nxt&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without caching we have this behaviour:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 137 ms (walltime: 140 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 1176 ms (walltime: 1187 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
real	0m2.549s&lt;br /&gt;
user	0m2.341s&lt;br /&gt;
sys	0m0.125s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With cache, we obviously do not yet see a benefit the first time around:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init -cache ./cache/&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 134 ms (walltime: 136 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 1161 ms (walltime: 1169 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
real	0m2.536s&lt;br /&gt;
user	0m2.311s&lt;br /&gt;
sys	0m0.134s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second time around we get a much faster performance; the values of the constants are simply restored from disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init -cache ./cache/&lt;br /&gt;
&lt;br /&gt;
real	0m1.210s&lt;br /&gt;
user	0m1.010s&lt;br /&gt;
sys	0m0.117s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can inspect the cache contents either using probcli or inspecting the directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli PrimeNumbers.mch -init -cache ./cache/ -show_cache&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumbers.probcst of type constants for machine PrimeNumbers:&lt;br /&gt;
     ( n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&lt;br /&gt;
$ ls -l cache/&lt;br /&gt;
total 48&lt;br /&gt;
-rw-r--r--  1 leuschel  staff      0 15 May 16:25 PrimeNumbers.opdata&lt;br /&gt;
-rw-r--r--  1 leuschel  staff  14988 15 May 16:25 PrimeNumbers.probcst&lt;br /&gt;
-rw-r--r--  1 leuschel  staff   5831 15 May 16:26 PrimeNumbers.probops&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cache option is worthwhile for constants and operations which are computation intensive.&lt;br /&gt;
For example, it is not really worthwhile for the operation NextPrime.&lt;br /&gt;
As of version 1.11.0 you can turn off caching operations by setting the preference CACHE_OPERATIONS to FALSE.&lt;br /&gt;
&lt;br /&gt;
Note that the cache is also used for when other machines include a cached machine.&lt;br /&gt;
Take for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE PrimeNumberSum&lt;br /&gt;
INCLUDES PrimeNumbers&lt;br /&gt;
CONSTANTS&lt;br /&gt;
  mx&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  mx = n&lt;br /&gt;
VARIABLES&lt;br /&gt;
  sum&lt;br /&gt;
INVARIANT&lt;br /&gt;
  sum : 0..mx&lt;br /&gt;
INITIALISATION&lt;br /&gt;
  sum := 1&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  Next(nxtP) = PRE nxtP:0..mx THEN&lt;br /&gt;
     NextPrime(nxtP) || sum := sum + 1&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see that the cache of the included machine is re-used straight away:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli PrimeNumbersSum.mch -init -cache ./cache/ -show_cache&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 32 ms (walltime: 33 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumberSum.probcst of type constants for machine PrimeNumberSum:&lt;br /&gt;
     ( mx=1000 &amp;amp;&lt;br /&gt;
       n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( mx=10000 &amp;amp;&lt;br /&gt;
       n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumbers.probcst of type constants for machine PrimeNumbers:&lt;br /&gt;
     ( n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other Useful CLI commands ===&lt;br /&gt;
&lt;br /&gt;
The following commands can also be useful:&lt;br /&gt;
* -ccache DIR works like -cache DIR but creates the directory if it does not exist&lt;br /&gt;
* -cache_statistics to print statistics about cache re-use&lt;br /&gt;
* -clear_cache to clear the cache&lt;br /&gt;
* -clear_cache_for M to clear the cache for the machine M&lt;br /&gt;
* -show_inclusion_hierarchy to display the list of included subsidiary machines and a minimal cover&lt;br /&gt;
&lt;br /&gt;
The latter command produces a list of sufficient includes to cover all machines.&lt;br /&gt;
By performing&lt;br /&gt;
 probcli FILE.mch -init -cache DIR&lt;br /&gt;
for all machines in that list you can pre-populate the cache with all&lt;br /&gt;
the necessary constants.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Useful Preferences ===&lt;br /&gt;
&lt;br /&gt;
* CACHE_CONSTANTS (default true): Cache constant values when -cache is activated&lt;br /&gt;
* CACHE_OPERATIONS (default true): Cache operations/events when -cache is activated&lt;br /&gt;
* CACHE_OPERATIONS_RUNTIME_LIMIT (default 0): Minimal runtime for operations to be stored in -cache&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Caching_Constants_and_Operations&amp;diff=6083</id>
		<title>Caching Constants and Operations</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Caching_Constants_and_Operations&amp;diff=6083"/>
		<updated>2026-01-29T15:03:00Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ProB can store the values of constants and operations in a cache file.&lt;br /&gt;
Compared to [[Memoization_for_Functions|memoization for functions]] and&lt;br /&gt;
[[Tutorial_Tuning_Model_Checking#Operation_Caching_.28Reuse.29|operation reuse during model checking]], this caching is persistent across different runs of probcli or ProB Tcl/Tk and is applicable to the constant setup and operations, not at the level of computation of values using (constant) functions.&lt;br /&gt;
(It thus may make sense to activate both [[Memoization_for_Functions|memoization]] and caching.)&lt;br /&gt;
&lt;br /&gt;
=== Activating Caching ===&lt;br /&gt;
&lt;br /&gt;
In the  [[Using_the_Command-Line_Version_of_ProB|command-line version probcli]] the cache can be activated using the option&lt;br /&gt;
* -cache DIRECTORY&lt;br /&gt;
This means that cache results will be stored in that directory.&lt;br /&gt;
The directory may contain multiple files, namely one file per B machine.&lt;br /&gt;
The files contain a hash to detect whether they are still up-to-date.&lt;br /&gt;
&lt;br /&gt;
The same option has to be used to activate the caching for ProB Tcl/Tk, i.e., you need to launch ProB Tcl/Tk from the command-line with the -cache option:&lt;br /&gt;
* prob -cache DIRECTORY&lt;br /&gt;
&lt;br /&gt;
Caching is currently only available for classical B machines without refinement,&lt;br /&gt;
and when symmetry reduction is off (which it is by default).&lt;br /&gt;
(Note to developers: the conditions are checked in the Prolog predicate cache_is_applicable in the module value_persistance.pl).&lt;br /&gt;
The cache feature can, however, deal with composed machines (e.g., with INCLUDES, USES, SEES) and stores constant values for individual sub-machines.&lt;br /&gt;
Constants are cached when&lt;br /&gt;
* no time-out occurred during SET_UP_CONSTANTS&lt;br /&gt;
* all enabled solutions were computed (i.e., the MAX_INITIALISATIONS limit was not reached)&lt;br /&gt;
* the machine has no parameters&lt;br /&gt;
Operations are cached when&lt;br /&gt;
* no time-out occurred&lt;br /&gt;
* all enabled operations were computed (i.e., the MAX_OPERATIONS limit was not reached)&lt;br /&gt;
* the preference CACHE_OPERATIONS is true (which it is by default; it is only available as of version 1.11.0)&lt;br /&gt;
&lt;br /&gt;
The cache file will also contain the values of relevant preferences, which can influence the computation of constants or operation results (e.g., MAXINT, MININT, DEFAULT_SETSIZE,...)&lt;br /&gt;
If the cache cannot be re-used a message will be displayed:&lt;br /&gt;
 value caching: general computations parameters have changed, no re-use of stored operations&lt;br /&gt;
&lt;br /&gt;
=== Inspecting the Cache ===&lt;br /&gt;
&lt;br /&gt;
In the  [[Using_the_Command-Line_Version_of_ProB|command-line version probcli]] a summary of the cache can be displayed using this option (together with the -cache option mentioned above).&lt;br /&gt;
* -show_cache&lt;br /&gt;
In verbose mode (-v flag) more details are displayed, but the additional information is probably only useful for ProB developers. You can also use -show_cache_verbose to this effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli CrewAllocationConstants.mch -cache cache/ -show-cache&lt;br /&gt;
&lt;br /&gt;
Contents of cache file cache/CrewAllocationConstants.probcst of type constants for machine CrewAllocationConstants:&lt;br /&gt;
     ( male={(tom|-&amp;gt;TRUE),(david|-&amp;gt;TRUE),(jeremy|-&amp;gt;TRUE),(carol|-&amp;gt;FALSE),(janet|-&amp;gt;FALSE),(tracy|-&amp;gt;FALSE)} &amp;amp;&lt;br /&gt;
       speaks={(tom|-&amp;gt;german),(david|-&amp;gt;french),(jeremy|-&amp;gt;german),(carol|-&amp;gt;spanish),(janet|-&amp;gt;french),(tracy|-&amp;gt;spanish)} &amp;amp;&lt;br /&gt;
       assign={(1|-&amp;gt;tom),(1|-&amp;gt;david),(1|-&amp;gt;jeremy),(1|-&amp;gt;carol),(1|-&amp;gt;janet),(1|-&amp;gt;tracy),(2|-&amp;gt;tom),(2|-&amp;gt;david),(2|-&amp;gt;carol),(3|-&amp;gt;jeremy),(3|-&amp;gt;janet),(3|-&amp;gt;tracy)} )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Tcl/Tk this information can be obtained by choosing the command &amp;quot;Show ProB Cache Info&amp;quot; in the Debug menu.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Take the following B machine&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE PrimeNumbers&lt;br /&gt;
// A machine with a slow constant set up to check -cache option&lt;br /&gt;
DEFINITIONS SET_PREF_TIME_OUT == 10000&lt;br /&gt;
CONSTANTS n, primes, maxprime&lt;br /&gt;
PROPERTIES&lt;br /&gt;
 n:NATURAL1 &amp;amp;&lt;br /&gt;
 primes = {x|x:2..n &amp;amp; !y.(y&amp;gt;1 &amp;amp; y*y&amp;lt;=x =&amp;gt; x mod y /= 0)} &amp;amp;&lt;br /&gt;
 (n = 10000 or n=1000) &amp;amp;&lt;br /&gt;
 maxprime = max(primes)&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
 (n = 10000 =&amp;gt; card(primes) = 1229)&lt;br /&gt;
VARIABLES x&lt;br /&gt;
INVARIANT&lt;br /&gt;
 x:2..n &amp;amp; x:primes&lt;br /&gt;
INITIALISATION x:=2&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  NextPrime(nxt) = SELECT x&amp;lt;maxprime &amp;amp; &lt;br /&gt;
                         nxt:primes &amp;amp; nxt = min(primes /\ (x+1)..n) THEN&lt;br /&gt;
       x:=nxt&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without caching we have this behaviour:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 137 ms (walltime: 140 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 1176 ms (walltime: 1187 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
real	0m2.549s&lt;br /&gt;
user	0m2.341s&lt;br /&gt;
sys	0m0.125s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With cache, we obviously do not yet see a benefit the first time around:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init -cache ./cache/&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 134 ms (walltime: 136 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 1161 ms (walltime: 1169 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
real	0m2.536s&lt;br /&gt;
user	0m2.311s&lt;br /&gt;
sys	0m0.134s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second time around we get a much faster performance; the values of the constants are simply restored from disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init -cache ./cache/&lt;br /&gt;
&lt;br /&gt;
real	0m1.210s&lt;br /&gt;
user	0m1.010s&lt;br /&gt;
sys	0m0.117s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can inspect the cache contents either using probcli or inspecting the directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli PrimeNumbers.mch -init -cache ./cache/ -show_cache&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumbers.probcst of type constants for machine PrimeNumbers:&lt;br /&gt;
     ( n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&lt;br /&gt;
$ ls -l cache/&lt;br /&gt;
total 48&lt;br /&gt;
-rw-r--r--  1 leuschel  staff      0 15 May 16:25 PrimeNumbers.opdata&lt;br /&gt;
-rw-r--r--  1 leuschel  staff  14988 15 May 16:25 PrimeNumbers.probcst&lt;br /&gt;
-rw-r--r--  1 leuschel  staff   5831 15 May 16:26 PrimeNumbers.probops&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cache option is worthwhile for constants and operations which are computation intensive.&lt;br /&gt;
For example, it is not really worthwhile for the operation NextPrime.&lt;br /&gt;
As of version 1.11.0 you can turn off caching operations by setting the preference CACHE_OPERATIONS to FALSE.&lt;br /&gt;
&lt;br /&gt;
Note that the cache is also used for when other machines include a cached machine.&lt;br /&gt;
Take for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE PrimeNumberSum&lt;br /&gt;
INCLUDES PrimeNumbers&lt;br /&gt;
CONSTANTS&lt;br /&gt;
  mx&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  mx = n&lt;br /&gt;
VARIABLES&lt;br /&gt;
  sum&lt;br /&gt;
INVARIANT&lt;br /&gt;
  sum : 0..mx&lt;br /&gt;
INITIALISATION&lt;br /&gt;
  sum := 1&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  Next(nxtP) = PRE nxtP:0..mx THEN&lt;br /&gt;
     NextPrime(nxtP) || sum := sum + 1&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see that the cache of the included machine is re-used straight away:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli PrimeNumbersSum.mch -init -cache ./cache/ -show_cache&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 32 ms (walltime: 33 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumberSum.probcst of type constants for machine PrimeNumberSum:&lt;br /&gt;
     ( mx=1000 &amp;amp;&lt;br /&gt;
       n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( mx=10000 &amp;amp;&lt;br /&gt;
       n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumbers.probcst of type constants for machine PrimeNumbers:&lt;br /&gt;
     ( n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
The following commands can also be useful:&lt;br /&gt;
* -ccache DIR works like -cache DIR but creates the directory if it does not exist&lt;br /&gt;
* -cache_statistics to print statistics about cache re-use&lt;br /&gt;
* -clear_cache to clear the cache&lt;br /&gt;
* -clear_cache_for M to clear the cache for the machine M&lt;br /&gt;
* -show_inclusion_hierarchy to display the list of included subsidiary machines and a minimal cover&lt;br /&gt;
&lt;br /&gt;
The latter command produces a list of sufficient includes to cover all machines.&lt;br /&gt;
By performing&lt;br /&gt;
 probcli FILE.mch -init -cache DIR&lt;br /&gt;
for all machines in that list you can pre-populate the cache with all&lt;br /&gt;
the necessary constants.&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Caching_Constants_and_Operations&amp;diff=6082</id>
		<title>Caching Constants and Operations</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Caching_Constants_and_Operations&amp;diff=6082"/>
		<updated>2026-01-29T14:55:52Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* Inspecting the Cache */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ProB can store the values of constants and operations in a cache file.&lt;br /&gt;
Compared to [[Memoization_for_Functions|memoization for functions]] and&lt;br /&gt;
[[Tutorial_Tuning_Model_Checking#Operation_Caching_.28Reuse.29|operation reuse during model checking]], this caching is persistent across different runs of probcli or ProB Tcl/Tk and is applicable to the constant setup and operations, not at the level of computation of values using (constant) functions.&lt;br /&gt;
(It thus may make sense to activate both [[Memoization_for_Functions|memoization]] and caching.)&lt;br /&gt;
&lt;br /&gt;
=== Activating Caching ===&lt;br /&gt;
&lt;br /&gt;
In the  [[Using_the_Command-Line_Version_of_ProB|command-line version probcli]] the cache can be activated using the option&lt;br /&gt;
* -cache DIRECTORY&lt;br /&gt;
This means that cache results will be stored in that directory.&lt;br /&gt;
The directory may contain multiple files, namely one file per B machine.&lt;br /&gt;
The files contain a hash to detect whether they are still up-to-date.&lt;br /&gt;
&lt;br /&gt;
The same option has to be used to activate the caching for ProB Tcl/Tk, i.e., you need to launch ProB Tcl/Tk from the command-line with the -cache option:&lt;br /&gt;
* prob -cache DIRECTORY&lt;br /&gt;
&lt;br /&gt;
Caching is currently only available for classical B machines without refinement,&lt;br /&gt;
and when symmetry reduction is off (which it is by default).&lt;br /&gt;
(Note to developers: the conditions are checked in the Prolog predicate cache_is_applicable in the module value_persistance.pl).&lt;br /&gt;
The cache feature can, however, deal with composed machines (e.g., with INCLUDES, USES, SEES) and stores constant values for individual sub-machines.&lt;br /&gt;
Constants are cached when&lt;br /&gt;
* no time-out occurred during SET_UP_CONSTANTS&lt;br /&gt;
* all enabled solutions were computed (i.e., the MAX_INITIALISATIONS limit was not reached)&lt;br /&gt;
* the machine has no parameters&lt;br /&gt;
Operations are cached when&lt;br /&gt;
* no time-out occurred&lt;br /&gt;
* all enabled operations were computed (i.e., the MAX_OPERATIONS limit was not reached)&lt;br /&gt;
* the preference CACHE_OPERATIONS is true (which it is by default; it is only available as of version 1.11.0)&lt;br /&gt;
&lt;br /&gt;
The cache file will also contain the values of relevant preferences, which can influence the computation of constants or operation results (e.g., MAXINT, MININT, DEFAULT_SETSIZE,...)&lt;br /&gt;
If the cache cannot be re-used a message will be displayed:&lt;br /&gt;
 value caching: general computations parameters have changed, no re-use of stored operations&lt;br /&gt;
&lt;br /&gt;
=== Inspecting the Cache ===&lt;br /&gt;
&lt;br /&gt;
In the  [[Using_the_Command-Line_Version_of_ProB|command-line version probcli]] a summary of the cache can be displayed using this option (together with the -cache option mentioned above).&lt;br /&gt;
* -show_cache&lt;br /&gt;
In verbose mode (-v flag) more details are displayed, but the additional information is probably only useful for ProB developers. You can also use -show_cache_verbose to this effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli CrewAllocationConstants.mch -cache cache/ -show-cache&lt;br /&gt;
&lt;br /&gt;
Contents of cache file cache/CrewAllocationConstants.probcst of type constants for machine CrewAllocationConstants:&lt;br /&gt;
     ( male={(tom|-&amp;gt;TRUE),(david|-&amp;gt;TRUE),(jeremy|-&amp;gt;TRUE),(carol|-&amp;gt;FALSE),(janet|-&amp;gt;FALSE),(tracy|-&amp;gt;FALSE)} &amp;amp;&lt;br /&gt;
       speaks={(tom|-&amp;gt;german),(david|-&amp;gt;french),(jeremy|-&amp;gt;german),(carol|-&amp;gt;spanish),(janet|-&amp;gt;french),(tracy|-&amp;gt;spanish)} &amp;amp;&lt;br /&gt;
       assign={(1|-&amp;gt;tom),(1|-&amp;gt;david),(1|-&amp;gt;jeremy),(1|-&amp;gt;carol),(1|-&amp;gt;janet),(1|-&amp;gt;tracy),(2|-&amp;gt;tom),(2|-&amp;gt;david),(2|-&amp;gt;carol),(3|-&amp;gt;jeremy),(3|-&amp;gt;janet),(3|-&amp;gt;tracy)} )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Tcl/Tk this information can be obtained by choosing the command &amp;quot;Show ProB Cache Info&amp;quot; in the Debug menu.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Take the following B machine&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE PrimeNumbers&lt;br /&gt;
// A machine with a slow constant set up to check -cache option&lt;br /&gt;
DEFINITIONS SET_PREF_TIME_OUT == 10000&lt;br /&gt;
CONSTANTS n, primes, maxprime&lt;br /&gt;
PROPERTIES&lt;br /&gt;
 n:NATURAL1 &amp;amp;&lt;br /&gt;
 primes = {x|x:2..n &amp;amp; !y.(y&amp;gt;1 &amp;amp; y*y&amp;lt;=x =&amp;gt; x mod y /= 0)} &amp;amp;&lt;br /&gt;
 (n = 10000 or n=1000) &amp;amp;&lt;br /&gt;
 maxprime = max(primes)&lt;br /&gt;
ASSERTIONS&lt;br /&gt;
 (n = 10000 =&amp;gt; card(primes) = 1229)&lt;br /&gt;
VARIABLES x&lt;br /&gt;
INVARIANT&lt;br /&gt;
 x:2..n &amp;amp; x:primes&lt;br /&gt;
INITIALISATION x:=2&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  NextPrime(nxt) = SELECT x&amp;lt;maxprime &amp;amp; &lt;br /&gt;
                         nxt:primes &amp;amp; nxt = min(primes /\ (x+1)..n) THEN&lt;br /&gt;
       x:=nxt&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without caching we have this behaviour:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 137 ms (walltime: 140 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 1176 ms (walltime: 1187 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
real	0m2.549s&lt;br /&gt;
user	0m2.341s&lt;br /&gt;
sys	0m0.125s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With cache, we obviously do not yet see a benefit the first time around:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init -cache ./cache/&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 134 ms (walltime: 136 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 1161 ms (walltime: 1169 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
real	0m2.536s&lt;br /&gt;
user	0m2.311s&lt;br /&gt;
sys	0m0.134s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second time around we get a much faster performance; the values of the constants are simply restored from disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time probcli PrimeNumbers.mch -init -cache ./cache/&lt;br /&gt;
&lt;br /&gt;
real	0m1.210s&lt;br /&gt;
user	0m1.010s&lt;br /&gt;
sys	0m0.117s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can inspect the cache contents either using probcli or inspecting the directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli PrimeNumbers.mch -init -cache ./cache/ -show_cache&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumbers.probcst of type constants for machine PrimeNumbers:&lt;br /&gt;
     ( n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&lt;br /&gt;
$ ls -l cache/&lt;br /&gt;
total 48&lt;br /&gt;
-rw-r--r--  1 leuschel  staff      0 15 May 16:25 PrimeNumbers.opdata&lt;br /&gt;
-rw-r--r--  1 leuschel  staff  14988 15 May 16:25 PrimeNumbers.probcst&lt;br /&gt;
-rw-r--r--  1 leuschel  staff   5831 15 May 16:26 PrimeNumbers.probops&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cache option is worthwhile for constants and operations which are computation intensive.&lt;br /&gt;
For example, it is not really worthwhile for the operation NextPrime.&lt;br /&gt;
As of version 1.11.0 you can turn off caching operations by setting the preference CACHE_OPERATIONS to FALSE.&lt;br /&gt;
&lt;br /&gt;
Note that the cache is also used for when other machines include a cached machine.&lt;br /&gt;
Take for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE PrimeNumberSum&lt;br /&gt;
INCLUDES PrimeNumbers&lt;br /&gt;
CONSTANTS&lt;br /&gt;
  mx&lt;br /&gt;
PROPERTIES&lt;br /&gt;
  mx = n&lt;br /&gt;
VARIABLES&lt;br /&gt;
  sum&lt;br /&gt;
INVARIANT&lt;br /&gt;
  sum : 0..mx&lt;br /&gt;
INITIALISATION&lt;br /&gt;
  sum := 1&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  Next(nxtP) = PRE nxtP:0..mx THEN&lt;br /&gt;
     NextPrime(nxtP) || sum := sum + 1&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see that the cache of the included machine is re-used straight away:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli PrimeNumbersSum.mch -init -cache ./cache/ -show_cache&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 32 ms (walltime: 33 ms)&lt;br /&gt;
% Runtime for SOLUTION for SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
% Runtime to FINALISE SETUP_CONSTANTS: 0 ms (walltime: 0 ms)&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumberSum.probcst of type constants for machine PrimeNumberSum:&lt;br /&gt;
     ( mx=1000 &amp;amp;&lt;br /&gt;
       n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( mx=10000 &amp;amp;&lt;br /&gt;
       n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&lt;br /&gt;
Contents of cache file ./cache/PrimeNumbers.probcst of type constants for machine PrimeNumbers:&lt;br /&gt;
     ( n=1000 &amp;amp;&lt;br /&gt;
       primes=#168:{2,3,...,991,997} &amp;amp;&lt;br /&gt;
       maxprime=997 )&lt;br /&gt;
     ( n=10000 &amp;amp;&lt;br /&gt;
       primes=#1229:{2,3,...,9967,9973} &amp;amp;&lt;br /&gt;
       maxprime=9973 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6081</id>
		<title>Using the Command-Line Version of ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6081"/>
		<updated>2026-01-29T14:48:43Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* -cache  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorial]]&lt;br /&gt;
[[Category:User Manual]]&lt;br /&gt;
[[Category:ProB Cli]]&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB, called &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt;, offers many of the features of the standalone Tcl/Tk Version via the command-line. As such, you can run ProB from your shell scripts or in your Makefiles.&lt;br /&gt;
These pages refer to version 1.6 of ProB. Some features are only available in the nightly build of ProB. You can run &amp;lt;tt&amp;gt;probcli –help&amp;lt;/tt&amp;gt; to find out which commands are supported by your version of ProB. For Bash users we provide [[Bash Completion|command completion]] support.&lt;br /&gt;
&lt;br /&gt;
Note: the order of commands is not relevant for &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; (except within groups of commands such as &amp;lt;tt&amp;gt;-p MAXINT 127&amp;lt;/tt&amp;gt;). Any argument that is not recognised by &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; is treated as a filename to be analysed.&lt;br /&gt;
&lt;br /&gt;
[[file:ProBTerminalizerDemo.gif|center||600px]]&lt;br /&gt;
&lt;br /&gt;
== Conventions used ==&lt;br /&gt;
&lt;br /&gt;
The following conventions are used in this guide:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;replaceme&amp;gt;&lt;br /&gt;
| All values that should be replaced with some value are shown withing &amp;lt; &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | line breaks&lt;br /&gt;
| Command synopsis for command may be broken up on several lines. When typing commands enter all option on the same line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;probcli [--help]&lt;br /&gt;
&amp;lt;filename&amp;gt; [ &amp;lt;options&amp;gt; ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore within all options can as of version 1.5.1-beta7 be replaced with dashes. Also, all commands can either be typed with single leading dashes or double leading dashes.&lt;br /&gt;
For example, all of the following commands have the same effect:&lt;br /&gt;
 probcli M.mch -model_check&lt;br /&gt;
 probcli M.mch -model-check&lt;br /&gt;
 probcli M.mch --model_check&lt;br /&gt;
 probcli M.mch --model-check&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== -mc &amp;lt;nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| model check; checking at most &amp;lt;nr&amp;gt; states&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 100&lt;br /&gt;
&lt;br /&gt;
Note: with a value of nr=1 ProB will only inspect the &amp;quot;virtual&amp;quot; root node (and compute its outgoing transitions).&lt;br /&gt;
Also see the related options &amp;lt;tt&amp;gt;-nodead, -noinv, -nogoal, -noass&amp;lt;/tt&amp;gt; to influence which kinds of errors are reported by &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set a target goal predicate using the &amp;lt;tt&amp;gt;-goal &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command and limit the scope of the model checking using the &amp;lt;tt&amp;gt;-scope &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
=== -model_check ===&lt;br /&gt;
&lt;br /&gt;
The same as &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt; but without a limit on the number of nodes checked.&lt;br /&gt;
ProB will run until the entire state space is explored.&lt;br /&gt;
&lt;br /&gt;
=== -no&amp;lt;x&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| restrict errors reported by model checking (-mc), TLC model checking (-mc_with_tlc), animation (-animate) and execution (-execute) with &amp;lt;x&amp;gt;=dead,inv,goal,ass&lt;br /&gt;
* -nodead : do not report deadlocks&lt;br /&gt;
* -noinv : do not report invariant violations&lt;br /&gt;
* -nogoal : do not stop if a state satisfying the GOAL predicate has been found&lt;br /&gt;
* -noass : do not report assertion violations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 1000 -nodead -nogoal&lt;br /&gt;
&lt;br /&gt;
=== -disable_timeout ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| turn off ProB&#039;s timeout mechanism, e.g., for computing enabled operations and invariant checking; this can sometimes speed up model checking (-mc or -model_check) and animation (-animate). Available as of version 1.5.1-beta7.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model-check -disable-timeout&lt;br /&gt;
&lt;br /&gt;
=== -bf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed breadth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -bf -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -df ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed depth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -df -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -mc_mode &amp;lt;M&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| influence how the model checker proceeds. Available as of version 1.5.1. Supersedes the &amp;lt;tt&amp;gt;-df&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; switches.&lt;br /&gt;
Possible values for the mode &amp;lt;M&amp;gt; are: &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt; (depth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;bf&amp;lt;/tt&amp;gt; (breadth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;mixed&amp;lt;/tt&amp;gt; (mixed depth-first / breadth-first traversal with random choice; currently the default),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt; (choosing next node to process completely at random), &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; (similar to random, but uses the Prolog hash function of a node instead of a random number generator),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt; (try and use &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; provided by user in &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause). Some explanations can be found [[Blocks_World_(Directed_Model_Checking)|in an example about directed model checking]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;out_degree_hash&amp;lt;/tt&amp;gt; (prioritise nodes with fewer outgoing transitions; mainly useful for deadlock checking)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
=== --timeout &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Deprecated, please use --global-time-out command instead.&lt;br /&gt;
&lt;br /&gt;
=== --global-time-out &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Global timeout in ms for model checking and refinement checking. &lt;br /&gt;
This does not influence the timeout used for computing individual transitions/operations.&lt;br /&gt;
This has to be set with the -p TIME_OUT &amp;lt;N&amp;gt;. Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference also influences other computations, such as invariant checking or static assertion checking, where it is multiplied by a factor. See the description of the -p option.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -global_timeout 10000&lt;br /&gt;
&lt;br /&gt;
=== -t ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| trace check (associated .trace file must exist)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t&lt;br /&gt;
&lt;br /&gt;
=== -trace_replay &amp;lt;KIND&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Replay a trace file in the given format (json,prolog,B).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
KIND is either json, prolog, B. The old ProB format is prolog. The trace files generated by ProB2-UI are json (with .prob2trace extension). The B format consists of a sequence of B operation calls.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -trace_replay json my.prob2trace&lt;br /&gt;
&lt;br /&gt;
Alternative command -det_trace_replay KIND FILE.&lt;br /&gt;
&lt;br /&gt;
=== -init ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| initialise specification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init&lt;br /&gt;
 nr_of_components(1)&lt;br /&gt;
 % checking_component_properties(1,[])&lt;br /&gt;
 % enumerating_constants_without_constraints([typedval(fd(_24428,ID),global(ID),iv)])&lt;br /&gt;
 % grounding_wait_flags&lt;br /&gt;
 grounding_component(1)&lt;br /&gt;
 grounding_component(2)&lt;br /&gt;
 % found_enumeration_of_constants(0,2)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,2))&lt;br /&gt;
 % found_enumeration_of_constants(0,1)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,1))&lt;br /&gt;
 &amp;lt;- 0: SETUP_CONSTANTS :: root&lt;br /&gt;
 % Could not set up constants with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation of constants.&lt;br /&gt;
  | 0: SETUP_CONSTANTS success --&amp;gt;0&lt;br /&gt;
  - &amp;lt;- 1: INITIALISATION :: 0&lt;br /&gt;
 % Could not initialise with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation.&lt;br /&gt;
 ALL OPERATIONS COVERED&lt;br /&gt;
  -  | 1: INITIALISATION success --&amp;gt;2&lt;br /&gt;
  -  - SUCCESS&lt;br /&gt;
&lt;br /&gt;
=== -cbc &amp;lt;OPNAME&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| constraint-based invariant checking for an operation (also use &amp;lt;OPNAME&amp;gt;=all)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -cbc all&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Perform constraint-based deadlock checking (also use -cbc_deadlock_pred PRED)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This will try to find a state which satisfies the invariant and properties and where no operation/event is enabled.&lt;br /&gt;
Note: if ProB finds a counter example then the machine cannot be proven to be deadlock free. However, the particular state may not be reachable from the initial state(s). If you want to find a reachable deadlock you have to use the model checker.&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock_pred &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based deadlock finding given a predicate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is like -cbc_deadlock but you provide an additional predicate. ProB will only find deadlocks which also make this predicate true.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_deadlock_pred &amp;quot;n=15&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -cbc_assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based checking of assertions on constants&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants which make an assertion (on constants) false.&lt;br /&gt;
&lt;br /&gt;
You can use the extra command &amp;lt;tt&amp;gt;-cbc_output_file FILE&amp;lt;/tt&amp;gt; to write the result of this check to a file.&lt;br /&gt;
You can also use the extra command &amp;lt;tt&amp;gt;-cbc_option contradiction_check&amp;lt;/tt&amp;gt; to ask ProB to check if there is a contradiction in the properties (in case the check did not find a counter-example to the assertions). The extra command &amp;lt;tt&amp;gt;-cbc_option unsat_core&amp;lt;/tt&amp;gt; tells ProB to compute the unsatisfiable core in case a proof the assertions was found.&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference is multiplied by 10 for this command.&lt;br /&gt;
&lt;br /&gt;
There are various variations of this command:&lt;br /&gt;
 -cbc_assertions_proof&lt;br /&gt;
 -cbc_assertions_tautology_proof &lt;br /&gt;
Both commands do not allow enumeration warnings to occur.&lt;br /&gt;
The latter command  ignores the PROPERTIES and tries to check whether the ASSERTION(s) are tautologies.&lt;br /&gt;
Both commands can be useful to use ProB as a Prover/Disprover (as is done in Atelier-B 4.3).&lt;br /&gt;
&lt;br /&gt;
=== -cbc_sequence &amp;lt;SEQ&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based searching for a sequence of operation names (separated by semicolons)&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants, initial variable values and parameters which make execution of the given sequence of operations possible.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_sequence &amp;quot;op1;op2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -strict ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| raise error and stop probcli if anything unexpected happens, e.g., if model checking finds a counter example or trace checking fails or any unexpected error happens&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t -strict&lt;br /&gt;
&lt;br /&gt;
=== -expcterr &amp;lt;ERR&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| expect error to occur (&amp;lt;ERR&amp;gt;=cbc,mc,ltl,...)&lt;br /&gt;
Tell ProB that you expect a certain error to occur. Mainly useful for regression tests (in conjunction with the -strict option).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli examples/B/Benchmarks/CarlaTravelAgencyErr.mch -mc 1000 -expcterr invariant_violation -strict&lt;br /&gt;
&lt;br /&gt;
=== -animate &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| random animation (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Animates the machine randomly, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100&lt;br /&gt;
&lt;br /&gt;
Variations&lt;br /&gt;
  -animate_all : animate until deadlock reached&lt;br /&gt;
  -animate_until_ltl P : animate until LTL property holds on trace&lt;br /&gt;
  -animate_until_ltl_state_property P : animate until current state satisifes LTL state property&lt;br /&gt;
&lt;br /&gt;
=== -execute &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| execution (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Executes the &amp;quot;first&amp;quot; enabled operation of a machine, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
In contrast to -animate, -execute will&lt;br /&gt;
* always choose the first enabled operation it finds and stop searching for further enabled operations in that state (-animate will compute all enabled operations up to the limit set by the &amp;lt;tt&amp;gt;MAX_OPERATIONS&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MAX_INITIALISATIONS&amp;lt;/tt&amp;gt; preference and then choose randomly); the order of operations in the B machine is thus important for -execute&lt;br /&gt;
* not store intermediate states in the state space; as such -execute is faster but after execution one only has access to the first state and the final state of execution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 100&lt;br /&gt;
&lt;br /&gt;
=== -execute_all===&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;tt&amp;gt;-execute &amp;lt;Nr&amp;gt;&amp;lt;/tt&amp;gt; above.&lt;br /&gt;
&lt;br /&gt;
=== -det_check ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if every step of the animation is deterministic (i.e., only one operation is possible, and it can only be executed in one possible way as far as parameters and result is concerned).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100 -det_check&lt;br /&gt;
&lt;br /&gt;
=== -det_constants ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if the SETUP_CONSTANTS step is deterministic (i.e., only one way to set up the constants is possible).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -det_constants&lt;br /&gt;
=== -his &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save animation history to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the animation (or model checking) history to a text file. Operations are separated by semicolons.&lt;br /&gt;
The output can be adapted using the -his_option command. With -his_option show_states the -his command will also write out all states to the file (in the form of comments before and after operations). With -his_option show_init only the initial state is written out.&lt;br /&gt;
The -his command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
See also the -sptxt command to only write the current values of variables and constants to a file.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
Additionally we can have the initialised variables and constants:&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_init supersimple.mch&lt;br /&gt;
&lt;br /&gt;
And we can have in addition the values of the variables in between (and at the end):&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_states supersimple.mch&lt;br /&gt;
&lt;br /&gt;
With -his_option trace_file as only option, probcli will write the history in Prolog format, which can later be used by the -t command.&lt;br /&gt;
&lt;br /&gt;
=== -i ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| interactive animation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After performing the other commands, ProB stays in interactive mode and allows the user to manually animate the loaded specification.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -i&lt;br /&gt;
&lt;br /&gt;
=== -repl ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start interactive read-eval-print-loop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p CLPFD TRUE -repl&lt;br /&gt;
&lt;br /&gt;
A list of commands can be obtained by typing &amp;lt;tt&amp;gt;:help&amp;lt;/tt&amp;gt; (just help for versions 1.3.x of probcli). The interactive read-eval-print-loop can be exited using &amp;lt;tt&amp;gt;:q&amp;lt;/tt&amp;gt; (just typing a return on a blank line for versions 1.3.x of probcli)..&lt;br /&gt;
If in addition you want see a graphical representation of the solutions found you can use the following command and open the &amp;lt;tt&amp;gt;out.dot&amp;lt;/tt&amp;gt; file using dotty or GraphViz:&lt;br /&gt;
 probcli -repl -evaldot ~/out.dot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;lt;tt&amp;gt;-eval&amp;lt;/tt&amp;gt; command to evaluate specific formulas or expressions:&lt;br /&gt;
 probcli -eval &amp;quot;1+2&amp;quot;&lt;br /&gt;
For convenience, these formulas can also be put into a separate file:&lt;br /&gt;
 probcli -eval_file MyFormula.txt&lt;br /&gt;
&lt;br /&gt;
=== -c ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print coverage statistics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -c&lt;br /&gt;
&lt;br /&gt;
You can also use the longer name for the command:&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage&lt;br /&gt;
&lt;br /&gt;
There is also a version which prints a shorter summary (and which is much faster for large state spaces):&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage_summary&lt;br /&gt;
&lt;br /&gt;
=== -cc &amp;lt;Nr&amp;gt; &amp;lt;Nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print and check coverage statistics&lt;br /&gt;
Print coverage statistics and check that the given number of nodes and transitions have been computed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -cc 10 25&lt;br /&gt;
&lt;br /&gt;
=== -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set &amp;lt;PREFERENCE&amp;gt; to &amp;lt;VALUE&amp;gt;. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use --pref instead of -p.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 8000 -p CLPFD TRUE -mc 10000&lt;br /&gt;
&lt;br /&gt;
=== -pref_group &amp;lt;PREFGROUP&amp;gt; &amp;lt;SETTING&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set to the group of preferences &amp;lt;PREFGROUP&amp;gt; to a predefined setting &amp;lt;SETTING&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pref_group model_check unlimited&lt;br /&gt;
&lt;br /&gt;
Available groups and settings are:&lt;br /&gt;
&lt;br /&gt;
* PREFERENCE GROUP integer : SETTINGS [int32] : Values for MAXINT and MININT&lt;br /&gt;
* PREFERENCE GROUP time_out : SETTINGS [disable_time_out] : To disable TIME_OUT&lt;br /&gt;
* PREFERENCE GROUP model_check : SETTINGS [disable_max,unlimited] : Model Checking Limits&lt;br /&gt;
* PREFERENCE GROUP dot_colors : SETTINGS [classic,dreams,winter] : Colours for Dot graphs&lt;br /&gt;
&lt;br /&gt;
=== -prefs &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set preferences from preference file &amp;lt;FILE&amp;gt;. The file should be created by the Tcl/Tk version of ProB; this version automatically creates a file called ProB_Preferences.pl. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -prefs ProB_Preferences.pl&lt;br /&gt;
&lt;br /&gt;
=== -card &amp;lt;GS&amp;gt; &amp;lt;VAL&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set cardinality (scope in Alloy terminology) of a B deferred set. This overrides the default cardinality (which can be set using &amp;lt;tt&amp;gt;-p DEFAULT_SETSIZE &amp;lt;VAL&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -card PID 5&lt;br /&gt;
&lt;br /&gt;
=== -goal &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set GOAL predicate for model checker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -goal &amp;quot;n=18&amp;quot;  -strict -expcterr goal_found&lt;br /&gt;
&lt;br /&gt;
=== -scope &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set SCOPE predicate for model checker; states which do not satisfy the SCOPE predicate will be ignored (invariant will not be checked and no outgoing transitions will be computed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -scope &amp;quot;n&amp;lt;18&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
=== -s &amp;lt;PORT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on given port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ss ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on port 9000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on some free port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sptxt &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants and variables to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the values of constants and variables to a text file in classical B syntax.&lt;br /&gt;
The -sptxt command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
The values are fully written out (some sets, e.g., infinite sets may be written out symbolically).&lt;br /&gt;
&lt;br /&gt;
See also the -his command.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -sptxt state.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
This will write the values of all variables and constants to the file state.txt after animating the machine 5 steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -cache &amp;lt;DIRECTORY&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants (and in future also variables) to a file to avoid recomputation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This commands saves the values of constants for the current B machine and puts those values into files in the specified directory. The command will also tell ProB to try and reuse constants saved for subsidiary machines (included using SEES for example) whenever possible.&lt;br /&gt;
The purpose of the command is to avoid recomputing constants as much as possible, as this can be very time consuming.&lt;br /&gt;
This also works for values of variables computed in the initialisation or even using operations.&lt;br /&gt;
However, we do not support refinements at the moment.&lt;br /&gt;
&lt;br /&gt;
Note: this command can also be used when starting up the ProB Tcl/Tk version.&lt;br /&gt;
&lt;br /&gt;
Note: the variation -ccache will create the directory if it does not exist.&lt;br /&gt;
The command -show_cache and -show_cache_verbose can be used to display the cache contents.&lt;br /&gt;
The command -cache_statistics provides statistics about the re-use of the cache.&lt;br /&gt;
The commands -clear_cache and -clear_cache_for MACHINE can be used to force clearing the caching.&lt;br /&gt;
&lt;br /&gt;
=== -logxml &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities and results of probcli in XML format in &amp;lt;LogFile&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A schema declaration file (xsd) can be found at &amp;lt;tt&amp;gt;doc/logxml_xsd.xml&amp;lt;/tt&amp;gt; in the ProB [[Download#Sourcecode|Prolog sources]].&lt;br /&gt;
The log file contains information about the various commands performed by probcli.&lt;br /&gt;
It also contains version information, the parameters provided to probcli and details about the errors that occured.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -logxml log.xml&lt;br /&gt;
&lt;br /&gt;
=== -logxml_write_vars &amp;lt;PREFIX&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| after processing other commands (such as -execute) write values of variables having prefix PREFIX in their name into the XML log file (if XML logging has been activated using the -logxml command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 1000 -logxml log.xml -logxml_write_vars out&lt;br /&gt;
&lt;br /&gt;
=== -l &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in &amp;lt;LogFile&amp;gt; using Prolog format&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -l my.log&lt;br /&gt;
&lt;br /&gt;
=== -ll ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in /tmp/prob_cli_debug.log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -ll&lt;br /&gt;
&lt;br /&gt;
=== -lg &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| analyse &amp;lt;LogFile&amp;gt; using gnuplot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -pp &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pp my_pp.mch&lt;br /&gt;
&lt;br /&gt;
=== -ppf &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;, force printing of all type infos&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ppf my_ppf.mch&lt;br /&gt;
&lt;br /&gt;
=== -v ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set ProB into verbose mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -v&lt;br /&gt;
&lt;br /&gt;
=== -version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an alternate command called -svers which just prints the version number of ProB.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -version&lt;br /&gt;
 ProB Command Line Interface&lt;br /&gt;
   VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
   $LastChangedDate: 2011-11-16 18:36:18 +0100 (Wed, 16 Nov 2011) $&lt;br /&gt;
   Prolog: SICStus 4.2.0 (x86_64-darwin-10.6.0): Mon Mar  7 20:03:36 CET 2011&lt;br /&gt;
   Application Path: /Users/leuschel/svn_root/NewProB&lt;br /&gt;
&lt;br /&gt;
 probcli -svers&lt;br /&gt;
 VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;probcli -version -v&amp;lt;/tt&amp;gt; to obtain more information about your version of probcli.&lt;br /&gt;
&lt;br /&gt;
=== -check_java_version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check Java and B parser version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This command is available as of ProB version 1.5.1-beta5 or higher. It can be useful to check that your Java is correctly installed and that the ProB B parser can operate correctly&lt;br /&gt;
&lt;br /&gt;
 probcli -check_java_version&lt;br /&gt;
 Result of checking Java version:&lt;br /&gt;
  Java is correctly installed and version 1.7.0_55-b13 is compatible with ProB requirements (&amp;gt;= 1.7).&lt;br /&gt;
  ProB B Java Parser available in version: 2016-02-25 15:27:18.55.&lt;br /&gt;
&lt;br /&gt;
=== -assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check ASSERTIONS of your machine&lt;br /&gt;
&lt;br /&gt;
If you provide the -t switch, the ASSERTIONS will be checked after executing your trace. Otherwise, they will be checked in an initial state.&lt;br /&gt;
ProB will automatically initialize the machine if you have not provide the -init or -t switch.&lt;br /&gt;
&lt;br /&gt;
You can also use -main_assertions to check only the ASSERTIONS found in the main file.&lt;br /&gt;
&lt;br /&gt;
If your ASSERTIONS are all static (i.e., make no reference to variables), then ProB will remove all CONSTANTS and PROPERTIES from your machine which are not linked (directly or indirectly) to the ASSERTIONS.&lt;br /&gt;
This optimization will only be made if you provide no other switch, such as -mc or -animate which may require the computation of the variables.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -assertions&lt;br /&gt;
&lt;br /&gt;
=== -property ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| virtually add predicate to PROPERTIES&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -property &amp;quot;PRED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -properties ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check PROPERTIES&lt;br /&gt;
Note: you should probably first initialise the machine (e.g., with -init).&lt;br /&gt;
If the constants have not yet been set up, probcli will debug the properties.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties&lt;br /&gt;
&lt;br /&gt;
=== -dot_output &amp;lt;PATH&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| define path for generation of dot files for false properties or assertions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This option is applicable to -properties and -assertions. It will result in individual dot files being generated for every false or unknown property or assertion. Assertions are numbered A0,A1,... and properties P0,P1,... You can also force to generate dot files for all properties (i.e., also the true ones) using the -dot_all command-line flag.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties -dot_output somewhere/&lt;br /&gt;
&lt;br /&gt;
This will generate files somewhere/my_P0_false.dot, somewhere/my_P1_false.dot, ...&lt;br /&gt;
&lt;br /&gt;
=== -rc ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| runtime checking of types/pre-/post-conditions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlfile &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL formulas in file &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlassertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL assertions (in DEFINITIONS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltllimit &amp;lt;LIMIT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| explore at most &amp;lt;LIMIT&amp;gt; states when model-checking LTL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -save &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save state space for later refinement check&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch --model_check -save my_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -refchk &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space (e.g. using -save)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -refchk abs_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -ref_check &amp;lt;MODE&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space (e.g. using -save) with particular failure/trace/divergence model&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
MODE is one of F, FD, T, R, RD, SF, V.&lt;br /&gt;
Meaning of mode: F: Failures, FD: Failure-Divergences, R: Refusals, RD: Refusals-Divergences, SF: Singleton-Failures, T: Traces, V: Revival.&lt;br /&gt;
Default used by -refchck command above is T (traces model).&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ref_check F abstract_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Generate test cases for the given specification. Each test case consists of a sequence of operations resp. events (a so-called trace) that&lt;br /&gt;
* start in a state after an initialisation&lt;br /&gt;
* contain a requested operation/event&lt;br /&gt;
* end in a state where the &amp;lt;EndPredicate&amp;gt; is fulfilled&lt;br /&gt;
&lt;br /&gt;
The user can specify what requested operations/events are with the&lt;br /&gt;
option [[#-mcm_cover &amp;lt;Operation(s)&amp;gt;|-mcm_cover]].&lt;br /&gt;
&lt;br /&gt;
ProB uses a &amp;quot;breadth-first&amp;quot; approach to search for test cases. When all requested operations/events are covered by test cases within maximum length M, the algorithm will explore the complete state space with that maximum distance M from the initialisation. It outputs all found traces that satisfy the requirements above.&lt;br /&gt;
&lt;br /&gt;
The algorithm stops if either&lt;br /&gt;
* it has covered all required operations/events with the current search depth&lt;br /&gt;
* or it has reached the maximum search depth or maximum number of explored states.&lt;br /&gt;
&lt;br /&gt;
The required parameters are:&lt;br /&gt;
;Depth&lt;br /&gt;
: The maximum length of traces that the algorithm searches for test until it stops without covering all required operations/events.&lt;br /&gt;
;MaxStates&lt;br /&gt;
: The maximum number of explored states until the algorithm stops without covering all required operations/events.&lt;br /&gt;
;EndPredicate&lt;br /&gt;
: A predicate in B syntax that the last state of a trace must fulfil. If you do not have any restrictions on that state, use a trivially true predicate like &#039;&#039;&#039;1=1&#039;&#039;&#039;&lt;br /&gt;
;FILE&lt;br /&gt;
: The found test cases a written to the XML file &amp;lt;FILE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mcm_tests 10 2000 &amp;quot;EndStateVar=TRUE&amp;quot; testcases.xml -mcm_cover op1,op2&lt;br /&gt;
&lt;br /&gt;
generates test cases for the operations &#039;&#039;&#039;op1&#039;&#039;&#039; and &#039;&#039;&#039;op2&#039;&#039;&#039; of the specification &#039;&#039;&#039;my.mch&#039;&#039;&#039;. The maximum length of traces is 10, at most 2000 states are explored. Each test case ends in a state where the predicate &#039;&#039;&#039;EndStateVar=TRUE&#039;&#039;&#039; holds. The found test cases are written to a file &#039;&#039;&#039;testcases.xml&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of version 1.6.0, the operation arguments are also written to the XML file.&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;INTERNAL_ARGUMENT_PREFIX&amp;lt;/tt&amp;gt; can be used to provide a prefix for internal operation arguments; any argument/parameter whose name starts with that prefix is considered an internal parameter and not shown in the trace file.&lt;br /&gt;
Also, as of version 1.6.0, the non-deterministic initialisations are shown in the XML trace file: all variables and constants where more than one possible initialisation exists are written into the trace file, as argument of an INITIALISATION event.&lt;br /&gt;
&lt;br /&gt;
=== -mcm_cover &amp;lt;Operation(s)&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Specify an operation or event that should be covered when generating test cases with the &#039;&#039;&#039;-mcm_test&#039;&#039;&#039; option. Multiple operations/events can be specified by seperating them by comma or by using &#039;&#039;&#039;-mcm_cover&#039;&#039;&#039; several times.&lt;br /&gt;
&lt;br /&gt;
See [[#-mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt;|-mcm-tests]] for further details.&lt;br /&gt;
&lt;br /&gt;
=== -spdot &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Write graph of the state space to a dot &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 100 -spdot my_statespace.dot&lt;br /&gt;
&lt;br /&gt;
=== -cbc_tests &amp;lt;Depth&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;File&amp;gt; ===&lt;br /&gt;
Generate test cases by constraint solving with maximum&lt;br /&gt;
length &#039;&#039;&#039;Depth&#039;&#039;&#039;, the last state satisfies &#039;&#039;&#039;EndPredicate&#039;&#039;&#039;&lt;br /&gt;
and the test cases are written to &#039;&#039;&#039;File&#039;&#039;&#039;. If the predicate is the empty string we assume truth. If the filename is the empty string no file is generated. See also the page on [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -cbc_cover &amp;lt;Operation&amp;gt; ===&lt;br /&gt;
When generating CB test cases, &#039;&#039;&#039;Operation&#039;&#039;&#039; should be covered.&lt;br /&gt;
The option can be given multiple times to specify several operations.&lt;br /&gt;
Alternatively, multiple operations can be separated by a comma. You can also use the option &amp;lt;pre&amp;gt;-cbc_cover_match PartialName&amp;lt;/pre&amp;gt; to match all operations whose name contains PartialName. See also the page about [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -test_description &amp;lt;File&amp;gt; ===&lt;br /&gt;
Read the options for constraint based test case generation from &#039;&#039;&#039;File&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== -bmc &amp;lt;Depth&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Run the [[Bounded_Model_Checking|bounded model checker]] until maximum trace depth &amp;lt;Depth&amp;gt; specified. Looks for invariant violations using the constraint-based test case generation algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -bmc 20&lt;br /&gt;
&lt;br /&gt;
=== -csp-guide &amp;lt;File&amp;gt; ===&lt;br /&gt;
Use the CSP File &#039;&#039;&#039;File&#039;&#039;&#039; to guide the B Machine (&amp;quot;CSP||B&amp;quot;).&lt;br /&gt;
(This feature is included since version 1.3.5-beta7.)&lt;br /&gt;
As of version 1.15.1 you can also specify a &amp;lt;tt&amp;gt;CSP_GUIDE_FILE&amp;lt;/tt&amp;gt;&lt;br /&gt;
DEFINITION (which also works in ProB2-UI).&lt;br /&gt;
&lt;br /&gt;
=== -rule_report &amp;lt;File&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Generates rule validation report for rules machines (.rmch) at the specified location &amp;lt;File&amp;gt; for the current animation state. Depending on the file extension an HTML or an XML version of the report is generated (.html/.xml).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.rmch -execute_all -rule_report my_report.html&lt;br /&gt;
&lt;br /&gt;
=== -machine_files_sha ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Computes SHA1 hash of all B files used by a B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.mch -machine_files_sha&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -check_machine_file_sha ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Compute and check SHA1 hash of a particular B file used by the main B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
probcli ./Demo/scheduler.mch -check_machine_file_sha scheduler.mch 1cab7ec89adc9f9b153af85c1ae16ba8a7a2a661&lt;br /&gt;
&lt;br /&gt;
== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
Set NO_COLOR environment variable to disable terminal colors.&lt;br /&gt;
See [https://no-color.org https://no-color.org].&lt;br /&gt;
&lt;br /&gt;
== Preferences ==&lt;br /&gt;
&lt;br /&gt;
You can use these preferences within the command:&lt;br /&gt;
&lt;br /&gt;
 -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;PREFERENCE&amp;gt;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;VALUE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| MAXINT&lt;br /&gt;
| nat ==&amp;gt; MaxInt, used for expressions such as xx::NAT (2147483647 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| MININT&lt;br /&gt;
| neg ==&amp;gt; MinInt, used for expressions such as xx::INT (-2147483648 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SETSIZE&lt;br /&gt;
| nat ==&amp;gt; Size of unspecified deferred sets in SETS section. Will be used if a set s is neither enumerated, has no no card(s)=nr predicate in the PROPERTIES and has no scope_s == Nr DEFINITION.&lt;br /&gt;
|-&lt;br /&gt;
| MAX_INITIALISATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Initialisations and ways to setup constants computed&lt;br /&gt;
|-&lt;br /&gt;
| MAX_OPERATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Enablings per Operation Computed&lt;br /&gt;
|-&lt;br /&gt;
| ANIMATE_SKIP_OPERATIONS&lt;br /&gt;
| bool ==&amp;gt; Animate operations which are skip or PRE C THEN skip&lt;br /&gt;
|-&lt;br /&gt;
| COMPRESSION&lt;br /&gt;
| bool ==&amp;gt; Use more aggressive COMPRESSION when storing states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_CLOSURES_FOR_STATE&lt;br /&gt;
| bool ==&amp;gt; Convert lazy form back into explicit form for Variables, Constants, Operation Arguments. ProB will sometimes try to keep certain sets symbolic. If this preference is TRUE then ProB will try to expand those sets for variables and constants after an operation has been executed.&lt;br /&gt;
|-&lt;br /&gt;
| SYMBOLIC&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of lambdas and set comprehensions. By default ProB will keep certain sets symbolic (e.g., sets it knows are infinite). When this preference is set to TRUE then all set comprehensions and lambda abstractions will at first be kept symbolic and only expanded into explicit form if needed.&lt;br /&gt;
|-&lt;br /&gt;
| CLPFD&lt;br /&gt;
| bool ==&amp;gt; Use CLP(FD) solver for B integers (restricts range to -2^28..2^28-1 on 32 bit computers). Setting this preference to TRUE should substantially improve ProB&#039;s ability to solve complicated predicates involving integers. However, it may cause CLP(FD) overflows in certain circumstances.&lt;br /&gt;
|-&lt;br /&gt;
| SMT&lt;br /&gt;
| bool ==&amp;gt; Enable SMT-Mode (aggressive treatment of : and /: inside predicates). With this predicate set to TRUE ProB will be better at solving certain constraint solving tasks. It should be enabled when doing constraint-based invariant or deadlock checking. ProB Tcl/Tk will turn this preference on automatically for those checks.&lt;br /&gt;
|-&lt;br /&gt;
| STATIC_ORDERING&lt;br /&gt;
| bool ==&amp;gt; Use static ordering to enumerate constants which occur in most PROPERTIES first&lt;br /&gt;
|-&lt;br /&gt;
| SYMMETRY_MODE&lt;br /&gt;
| [off,flood,nauty,hash] ==&amp;gt; Symmetry Mode: off,flood,canon,nauty,hash&lt;br /&gt;
|-&lt;br /&gt;
| TIME_OUT&lt;br /&gt;
| nat1 ==&amp;gt; Time out for computing enabled transitions (in ms, is multiplied by a factor for other computations)&lt;br /&gt;
|-&lt;br /&gt;
| PROOF_INFO&lt;br /&gt;
| bool ==&amp;gt; Use Proof Information to restrict invariant checking to affected unproven clauses. Most useful in EventB for models exported from Rodin.&lt;br /&gt;
|-&lt;br /&gt;
| TRY_FIND_ABORT&lt;br /&gt;
| bool ==&amp;gt; Try more aggressively to detect ill-defined expressions (e.g. applying function outside of domain), may slow down animator&lt;br /&gt;
|-&lt;br /&gt;
| NUMBER_OF_ANIMATED_ABSTRACTIONS&lt;br /&gt;
| nat ==&amp;gt; How many levels of refined models are animated by default&lt;br /&gt;
|-&lt;br /&gt;
| ALLOW_INCOMPLETE_SETUP_CONSTANTS&lt;br /&gt;
| bool ==&amp;gt; Allow ProB to proceed even if only part of the CONSTANTS have been found.&lt;br /&gt;
|-&lt;br /&gt;
| PARTITION_PROPERTIES&lt;br /&gt;
| bool ==&amp;gt; Partition predicates (PROPERTIES) into components&lt;br /&gt;
|-&lt;br /&gt;
| USE_RECORD_CONSTRUCTION&lt;br /&gt;
| bool ==&amp;gt; Records: Check if axioms/properties describe a record pattern&lt;br /&gt;
|-&lt;br /&gt;
| OPERATION_REUSE&lt;br /&gt;
| bool ==&amp;gt; Try and reuse previously computed operation effects in B/Event-B&lt;br /&gt;
|-&lt;br /&gt;
| SHOW_EVENTB_ANY_VALUES&lt;br /&gt;
| bool ==&amp;gt; Show top-level ANY variable values of B Operations without parameters as parameters&lt;br /&gt;
|-&lt;br /&gt;
| RANDOMISE_OPERATION_ORDER&lt;br /&gt;
| bool ==&amp;gt; Randomise order of operations when computing successor states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_FORALL_UPTO&lt;br /&gt;
| nat ==&amp;gt; When analysing predicates: max. domain size for expansion of forall (use 0 to disable expansion)&lt;br /&gt;
|-&lt;br /&gt;
| MAX_DISPLAY_SET&lt;br /&gt;
| int ==&amp;gt; Max size for pretty-printing sets (-1 means no limit)&lt;br /&gt;
|-&lt;br /&gt;
| CSP_STRIP_SOURCE_LOC&lt;br /&gt;
| bool ==&amp;gt; Strip source location for CSP; will speed up model checking&lt;br /&gt;
|-&lt;br /&gt;
| WARN_WHEN_EXPANDING_INFINITE_CLOSURES&lt;br /&gt;
| int ==&amp;gt; Warn when expanding infinite closures if MAXINT larger than:&lt;br /&gt;
|-&lt;br /&gt;
| TRACE_INFO&lt;br /&gt;
| bool ==&amp;gt; Provide various tracing information on the terminal/console.&lt;br /&gt;
|-&lt;br /&gt;
| DOUBLE_EVALUATION&lt;br /&gt;
| bool ==&amp;gt; Evaluate PREDICATES positively and negatively when analyzing assertions or properties&lt;br /&gt;
|-&lt;br /&gt;
| RECURSIVE&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of *Recursive* set Comprehensions and lambdas&lt;br /&gt;
|-&lt;br /&gt;
| IGNORE_HASH_COLLISIONS&lt;br /&gt;
| bool ==&amp;gt; Ignore Hash Collisions (if true not all states may be computed, visited states are not memorised !)&lt;br /&gt;
|-&lt;br /&gt;
| FORGET_STATE_SPACE&lt;br /&gt;
| bool ==&amp;gt; Do not remember state space (mainly useful in conjunction with Ignore Hash Collisions)&lt;br /&gt;
|-&lt;br /&gt;
| NEGATED_INVARIANT_CHECKING&lt;br /&gt;
| bool ==&amp;gt; Perform double evaluation (positive and negative) when checking invariants&lt;br /&gt;
|-&lt;br /&gt;
| CSE&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination&lt;br /&gt;
|-&lt;br /&gt;
| CSE_SUBST&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination also for B substitutions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 5000 -p CLPFD TRUE -p SYMMETRY_MODE hash -mc 1000&lt;br /&gt;
&lt;br /&gt;
== Some probcli examples ==&lt;br /&gt;
&lt;br /&gt;
To load a file My.mch, setup the constants and initialize it do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init My.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To load a file M.mch, setup the constants, initialize and then check all assertions with Atelier-B&#039;s default values for MININT and MAXINT and an increased timeout of 5 seconds do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init -assertions -p MAXINT 2147483647 -p MININT -2147483647 -p TIME_OUT 5000 M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fully model check a specification M.mch while tryining to minimize memory consumption do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -model_check -p COMPRESSION TRUE M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To model check a specification M.mch while trying to minimize memory consumption further by not storing processed stats and using symmetry reduction (and accepting hash collisions) do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -p COMPRESSION -p IGNORE_HASH_COLLISIONS TRUE -p FORGET_STATE_SPACE TRUE -p SYMMETRY_MODE hash -model_check M.mch &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command-line Arguments for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
Note that the stand-alone Tcl/Tk version also supports a limited form of command-line preferences:&lt;br /&gt;
* &#039;&#039;&#039;FILE&#039;&#039;&#039; (the name/path of the file to be loaded)&lt;br /&gt;
* &#039;&#039;&#039;-prefs PREF_FILE&#039;&#039;&#039;  (to use a specific preferences file, rather than the default ProB_Preferences.pl in your home folder)&lt;br /&gt;
* &#039;&#039;&#039;-batch&#039;&#039;&#039; (to instruct ProB not to try to bring up windows, but to print information only to the terminal)&lt;br /&gt;
* &#039;&#039;&#039;-selfcheck&#039;&#039;&#039; (to run the standard unit tests)&lt;br /&gt;
* &#039;&#039;&#039;-t&#039;&#039;&#039; (to perform the Trace Check on the default trace file associated with the specification)&lt;br /&gt;
* &#039;&#039;&#039;-tcl TCL_Command&#039;&#039;&#039; (to run a particular pre-defined Tcl command)&lt;br /&gt;
* &#039;&#039;&#039;-mc&#039;&#039;&#039; (to perform model checking)&lt;br /&gt;
* &#039;&#039;&#039;-c&#039;&#039;&#039; (to compute the coverage)&lt;br /&gt;
* &#039;&#039;&#039;-ref&#039;&#039;&#039; (to perform the default trace refinment check)&lt;br /&gt;
&lt;br /&gt;
However, the comand-line version of ProB, called &#039;&#039;&#039;probcli&#039;&#039;&#039;, provides more features. It also does not depend on Tcl/Tk and can therefore be run on systems without Tcl/Tk.&lt;br /&gt;
{{Feedback}}&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6059</id>
		<title>Using the Command-Line Version of ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6059"/>
		<updated>2025-12-24T07:30:49Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* --timeout  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorial]]&lt;br /&gt;
[[Category:User Manual]]&lt;br /&gt;
[[Category:ProB Cli]]&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB, called &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt;, offers many of the features of the standalone Tcl/Tk Version via the command-line. As such, you can run ProB from your shell scripts or in your Makefiles.&lt;br /&gt;
These pages refer to version 1.6 of ProB. Some features are only available in the nightly build of ProB. You can run &amp;lt;tt&amp;gt;probcli –help&amp;lt;/tt&amp;gt; to find out which commands are supported by your version of ProB. For Bash users we provide [[Bash Completion|command completion]] support.&lt;br /&gt;
&lt;br /&gt;
Note: the order of commands is not relevant for &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; (except within groups of commands such as &amp;lt;tt&amp;gt;-p MAXINT 127&amp;lt;/tt&amp;gt;). Any argument that is not recognised by &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; is treated as a filename to be analysed.&lt;br /&gt;
&lt;br /&gt;
[[file:ProBTerminalizerDemo.gif|center||600px]]&lt;br /&gt;
&lt;br /&gt;
== Conventions used ==&lt;br /&gt;
&lt;br /&gt;
The following conventions are used in this guide:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;replaceme&amp;gt;&lt;br /&gt;
| All values that should be replaced with some value are shown withing &amp;lt; &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | line breaks&lt;br /&gt;
| Command synopsis for command may be broken up on several lines. When typing commands enter all option on the same line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;probcli [--help]&lt;br /&gt;
&amp;lt;filename&amp;gt; [ &amp;lt;options&amp;gt; ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore within all options can as of version 1.5.1-beta7 be replaced with dashes. Also, all commands can either be typed with single leading dashes or double leading dashes.&lt;br /&gt;
For example, all of the following commands have the same effect:&lt;br /&gt;
 probcli M.mch -model_check&lt;br /&gt;
 probcli M.mch -model-check&lt;br /&gt;
 probcli M.mch --model_check&lt;br /&gt;
 probcli M.mch --model-check&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== -mc &amp;lt;nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| model check; checking at most &amp;lt;nr&amp;gt; states&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 100&lt;br /&gt;
&lt;br /&gt;
Note: with a value of nr=1 ProB will only inspect the &amp;quot;virtual&amp;quot; root node (and compute its outgoing transitions).&lt;br /&gt;
Also see the related options &amp;lt;tt&amp;gt;-nodead, -noinv, -nogoal, -noass&amp;lt;/tt&amp;gt; to influence which kinds of errors are reported by &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set a target goal predicate using the &amp;lt;tt&amp;gt;-goal &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command and limit the scope of the model checking using the &amp;lt;tt&amp;gt;-scope &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
=== -model_check ===&lt;br /&gt;
&lt;br /&gt;
The same as &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt; but without a limit on the number of nodes checked.&lt;br /&gt;
ProB will run until the entire state space is explored.&lt;br /&gt;
&lt;br /&gt;
=== -no&amp;lt;x&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| restrict errors reported by model checking (-mc), TLC model checking (-mc_with_tlc), animation (-animate) and execution (-execute) with &amp;lt;x&amp;gt;=dead,inv,goal,ass&lt;br /&gt;
* -nodead : do not report deadlocks&lt;br /&gt;
* -noinv : do not report invariant violations&lt;br /&gt;
* -nogoal : do not stop if a state satisfying the GOAL predicate has been found&lt;br /&gt;
* -noass : do not report assertion violations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 1000 -nodead -nogoal&lt;br /&gt;
&lt;br /&gt;
=== -disable_timeout ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| turn off ProB&#039;s timeout mechanism, e.g., for computing enabled operations and invariant checking; this can sometimes speed up model checking (-mc or -model_check) and animation (-animate). Available as of version 1.5.1-beta7.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model-check -disable-timeout&lt;br /&gt;
&lt;br /&gt;
=== -bf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed breadth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -bf -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -df ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed depth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -df -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -mc_mode &amp;lt;M&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| influence how the model checker proceeds. Available as of version 1.5.1. Supersedes the &amp;lt;tt&amp;gt;-df&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; switches.&lt;br /&gt;
Possible values for the mode &amp;lt;M&amp;gt; are: &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt; (depth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;bf&amp;lt;/tt&amp;gt; (breadth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;mixed&amp;lt;/tt&amp;gt; (mixed depth-first / breadth-first traversal with random choice; currently the default),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt; (choosing next node to process completely at random), &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; (similar to random, but uses the Prolog hash function of a node instead of a random number generator),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt; (try and use &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; provided by user in &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause). Some explanations can be found [[Blocks_World_(Directed_Model_Checking)|in an example about directed model checking]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;out_degree_hash&amp;lt;/tt&amp;gt; (prioritise nodes with fewer outgoing transitions; mainly useful for deadlock checking)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
=== --timeout &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Deprecated, please use --global-time-out command instead.&lt;br /&gt;
&lt;br /&gt;
=== --global-time-out &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Global timeout in ms for model checking and refinement checking. &lt;br /&gt;
This does not influence the timeout used for computing individual transitions/operations.&lt;br /&gt;
This has to be set with the -p TIME_OUT &amp;lt;N&amp;gt;. Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference also influences other computations, such as invariant checking or static assertion checking, where it is multiplied by a factor. See the description of the -p option.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -global_timeout 10000&lt;br /&gt;
&lt;br /&gt;
=== -t ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| trace check (associated .trace file must exist)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t&lt;br /&gt;
&lt;br /&gt;
=== -trace_replay &amp;lt;KIND&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Replay a trace file in the given format (json,prolog,B).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
KIND is either json, prolog, B. The old ProB format is prolog. The trace files generated by ProB2-UI are json (with .prob2trace extension). The B format consists of a sequence of B operation calls.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -trace_replay json my.prob2trace&lt;br /&gt;
&lt;br /&gt;
Alternative command -det_trace_replay KIND FILE.&lt;br /&gt;
&lt;br /&gt;
=== -init ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| initialise specification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init&lt;br /&gt;
 nr_of_components(1)&lt;br /&gt;
 % checking_component_properties(1,[])&lt;br /&gt;
 % enumerating_constants_without_constraints([typedval(fd(_24428,ID),global(ID),iv)])&lt;br /&gt;
 % grounding_wait_flags&lt;br /&gt;
 grounding_component(1)&lt;br /&gt;
 grounding_component(2)&lt;br /&gt;
 % found_enumeration_of_constants(0,2)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,2))&lt;br /&gt;
 % found_enumeration_of_constants(0,1)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,1))&lt;br /&gt;
 &amp;lt;- 0: SETUP_CONSTANTS :: root&lt;br /&gt;
 % Could not set up constants with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation of constants.&lt;br /&gt;
  | 0: SETUP_CONSTANTS success --&amp;gt;0&lt;br /&gt;
  - &amp;lt;- 1: INITIALISATION :: 0&lt;br /&gt;
 % Could not initialise with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation.&lt;br /&gt;
 ALL OPERATIONS COVERED&lt;br /&gt;
  -  | 1: INITIALISATION success --&amp;gt;2&lt;br /&gt;
  -  - SUCCESS&lt;br /&gt;
&lt;br /&gt;
=== -cbc &amp;lt;OPNAME&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| constraint-based invariant checking for an operation (also use &amp;lt;OPNAME&amp;gt;=all)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -cbc all&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Perform constraint-based deadlock checking (also use -cbc_deadlock_pred PRED)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This will try to find a state which satisfies the invariant and properties and where no operation/event is enabled.&lt;br /&gt;
Note: if ProB finds a counter example then the machine cannot be proven to be deadlock free. However, the particular state may not be reachable from the initial state(s). If you want to find a reachable deadlock you have to use the model checker.&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock_pred &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based deadlock finding given a predicate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is like -cbc_deadlock but you provide an additional predicate. ProB will only find deadlocks which also make this predicate true.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_deadlock_pred &amp;quot;n=15&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -cbc_assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based checking of assertions on constants&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants which make an assertion (on constants) false.&lt;br /&gt;
&lt;br /&gt;
You can use the extra command &amp;lt;tt&amp;gt;-cbc_output_file FILE&amp;lt;/tt&amp;gt; to write the result of this check to a file.&lt;br /&gt;
You can also use the extra command &amp;lt;tt&amp;gt;-cbc_option contradiction_check&amp;lt;/tt&amp;gt; to ask ProB to check if there is a contradiction in the properties (in case the check did not find a counter-example to the assertions). The extra command &amp;lt;tt&amp;gt;-cbc_option unsat_core&amp;lt;/tt&amp;gt; tells ProB to compute the unsatisfiable core in case a proof the assertions was found.&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference is multiplied by 10 for this command.&lt;br /&gt;
&lt;br /&gt;
There are various variations of this command:&lt;br /&gt;
 -cbc_assertions_proof&lt;br /&gt;
 -cbc_assertions_tautology_proof &lt;br /&gt;
Both commands do not allow enumeration warnings to occur.&lt;br /&gt;
The latter command  ignores the PROPERTIES and tries to check whether the ASSERTION(s) are tautologies.&lt;br /&gt;
Both commands can be useful to use ProB as a Prover/Disprover (as is done in Atelier-B 4.3).&lt;br /&gt;
&lt;br /&gt;
=== -cbc_sequence &amp;lt;SEQ&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based searching for a sequence of operation names (separated by semicolons)&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants, initial variable values and parameters which make execution of the given sequence of operations possible.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_sequence &amp;quot;op1;op2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -strict ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| raise error and stop probcli if anything unexpected happens, e.g., if model checking finds a counter example or trace checking fails or any unexpected error happens&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t -strict&lt;br /&gt;
&lt;br /&gt;
=== -expcterr &amp;lt;ERR&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| expect error to occur (&amp;lt;ERR&amp;gt;=cbc,mc,ltl,...)&lt;br /&gt;
Tell ProB that you expect a certain error to occur. Mainly useful for regression tests (in conjunction with the -strict option).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli examples/B/Benchmarks/CarlaTravelAgencyErr.mch -mc 1000 -expcterr invariant_violation -strict&lt;br /&gt;
&lt;br /&gt;
=== -animate &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| random animation (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Animates the machine randomly, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100&lt;br /&gt;
&lt;br /&gt;
Variations&lt;br /&gt;
  -animate_all : animate until deadlock reached&lt;br /&gt;
  -animate_until_ltl P : animate until LTL property holds on trace&lt;br /&gt;
  -animate_until_ltl_state_property P : animate until current state satisifes LTL state property&lt;br /&gt;
&lt;br /&gt;
=== -execute &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| execution (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Executes the &amp;quot;first&amp;quot; enabled operation of a machine, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
In contrast to -animate, -execute will&lt;br /&gt;
* always choose the first enabled operation it finds and stop searching for further enabled operations in that state (-animate will compute all enabled operations up to the limit set by the &amp;lt;tt&amp;gt;MAX_OPERATIONS&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MAX_INITIALISATIONS&amp;lt;/tt&amp;gt; preference and then choose randomly); the order of operations in the B machine is thus important for -execute&lt;br /&gt;
* not store intermediate states in the state space; as such -execute is faster but after execution one only has access to the first state and the final state of execution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 100&lt;br /&gt;
&lt;br /&gt;
=== -execute_all===&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;tt&amp;gt;-execute &amp;lt;Nr&amp;gt;&amp;lt;/tt&amp;gt; above.&lt;br /&gt;
&lt;br /&gt;
=== -det_check ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if every step of the animation is deterministic (i.e., only one operation is possible, and it can only be executed in one possible way as far as parameters and result is concerned).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100 -det_check&lt;br /&gt;
&lt;br /&gt;
=== -det_constants ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if the SETUP_CONSTANTS step is deterministic (i.e., only one way to set up the constants is possible).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -det_constants&lt;br /&gt;
=== -his &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save animation history to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the animation (or model checking) history to a text file. Operations are separated by semicolons.&lt;br /&gt;
The output can be adapted using the -his_option command. With -his_option show_states the -his command will also write out all states to the file (in the form of comments before and after operations). With -his_option show_init only the initial state is written out.&lt;br /&gt;
The -his command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
See also the -sptxt command to only write the current values of variables and constants to a file.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
Additionally we can have the initialised variables and constants:&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_init supersimple.mch&lt;br /&gt;
&lt;br /&gt;
And we can have in addition the values of the variables in between (and at the end):&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_states supersimple.mch&lt;br /&gt;
&lt;br /&gt;
With -his_option trace_file as only option, probcli will write the history in Prolog format, which can later be used by the -t command.&lt;br /&gt;
&lt;br /&gt;
=== -i ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| interactive animation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After performing the other commands, ProB stays in interactive mode and allows the user to manually animate the loaded specification.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -i&lt;br /&gt;
&lt;br /&gt;
=== -repl ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start interactive read-eval-print-loop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p CLPFD TRUE -repl&lt;br /&gt;
&lt;br /&gt;
A list of commands can be obtained by typing &amp;lt;tt&amp;gt;:help&amp;lt;/tt&amp;gt; (just help for versions 1.3.x of probcli). The interactive read-eval-print-loop can be exited using &amp;lt;tt&amp;gt;:q&amp;lt;/tt&amp;gt; (just typing a return on a blank line for versions 1.3.x of probcli)..&lt;br /&gt;
If in addition you want see a graphical representation of the solutions found you can use the following command and open the &amp;lt;tt&amp;gt;out.dot&amp;lt;/tt&amp;gt; file using dotty or GraphViz:&lt;br /&gt;
 probcli -repl -evaldot ~/out.dot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;lt;tt&amp;gt;-eval&amp;lt;/tt&amp;gt; command to evaluate specific formulas or expressions:&lt;br /&gt;
 probcli -eval &amp;quot;1+2&amp;quot;&lt;br /&gt;
For convenience, these formulas can also be put into a separate file:&lt;br /&gt;
 probcli -eval_file MyFormula.txt&lt;br /&gt;
&lt;br /&gt;
=== -c ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print coverage statistics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -c&lt;br /&gt;
&lt;br /&gt;
You can also use the longer name for the command:&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage&lt;br /&gt;
&lt;br /&gt;
There is also a version which prints a shorter summary (and which is much faster for large state spaces):&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage_summary&lt;br /&gt;
&lt;br /&gt;
=== -cc &amp;lt;Nr&amp;gt; &amp;lt;Nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print and check coverage statistics&lt;br /&gt;
Print coverage statistics and check that the given number of nodes and transitions have been computed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -cc 10 25&lt;br /&gt;
&lt;br /&gt;
=== -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set &amp;lt;PREFERENCE&amp;gt; to &amp;lt;VALUE&amp;gt;. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use --pref instead of -p.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 8000 -p CLPFD TRUE -mc 10000&lt;br /&gt;
&lt;br /&gt;
=== -pref_group &amp;lt;PREFGROUP&amp;gt; &amp;lt;SETTING&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set to the group of preferences &amp;lt;PREFGROUP&amp;gt; to a predefined setting &amp;lt;SETTING&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pref_group model_check unlimited&lt;br /&gt;
&lt;br /&gt;
Available groups and settings are:&lt;br /&gt;
&lt;br /&gt;
* PREFERENCE GROUP integer : SETTINGS [int32] : Values for MAXINT and MININT&lt;br /&gt;
* PREFERENCE GROUP time_out : SETTINGS [disable_time_out] : To disable TIME_OUT&lt;br /&gt;
* PREFERENCE GROUP model_check : SETTINGS [disable_max,unlimited] : Model Checking Limits&lt;br /&gt;
* PREFERENCE GROUP dot_colors : SETTINGS [classic,dreams,winter] : Colours for Dot graphs&lt;br /&gt;
&lt;br /&gt;
=== -prefs &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set preferences from preference file &amp;lt;FILE&amp;gt;. The file should be created by the Tcl/Tk version of ProB; this version automatically creates a file called ProB_Preferences.pl. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -prefs ProB_Preferences.pl&lt;br /&gt;
&lt;br /&gt;
=== -card &amp;lt;GS&amp;gt; &amp;lt;VAL&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set cardinality (scope in Alloy terminology) of a B deferred set. This overrides the default cardinality (which can be set using &amp;lt;tt&amp;gt;-p DEFAULT_SETSIZE &amp;lt;VAL&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -card PID 5&lt;br /&gt;
&lt;br /&gt;
=== -goal &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set GOAL predicate for model checker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -goal &amp;quot;n=18&amp;quot;  -strict -expcterr goal_found&lt;br /&gt;
&lt;br /&gt;
=== -scope &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set SCOPE predicate for model checker; states which do not satisfy the SCOPE predicate will be ignored (invariant will not be checked and no outgoing transitions will be computed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -scope &amp;quot;n&amp;lt;18&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
=== -s &amp;lt;PORT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on given port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ss ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on port 9000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on some free port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sptxt &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants and variables to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the values of constants and variables to a text file in classical B syntax.&lt;br /&gt;
The -sptxt command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
The values are fully written out (some sets, e.g., infinite sets may be written out symbolically).&lt;br /&gt;
&lt;br /&gt;
See also the -his command.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -sptxt state.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
This will write the values of all variables and constants to the file state.txt after animating the machine 5 steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -cache &amp;lt;DIRECTORY&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants (and in future also variables) to a file to avoid recomputation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This commands saves the values of constants for the current B machine and puts those values into files in the specified directory. The command will also tell ProB to try and reuse constants saved for subsidiary machines (included using SEES for example) whenever possible.&lt;br /&gt;
The purpose of the command is to avoid recomputing constants as much as possible, as this can be very time consuming.&lt;br /&gt;
This also works for values of variables computed in the initialisation or even using operations.&lt;br /&gt;
However, we do not support refinements at the moment.&lt;br /&gt;
&lt;br /&gt;
Note: this command can also be used when starting up the ProB Tcl/Tk version.&lt;br /&gt;
&lt;br /&gt;
=== -logxml &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities and results of probcli in XML format in &amp;lt;LogFile&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A schema declaration file (xsd) can be found at &amp;lt;tt&amp;gt;doc/logxml_xsd.xml&amp;lt;/tt&amp;gt; in the ProB [[Download#Sourcecode|Prolog sources]].&lt;br /&gt;
The log file contains information about the various commands performed by probcli.&lt;br /&gt;
It also contains version information, the parameters provided to probcli and details about the errors that occured.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -logxml log.xml&lt;br /&gt;
&lt;br /&gt;
=== -logxml_write_vars &amp;lt;PREFIX&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| after processing other commands (such as -execute) write values of variables having prefix PREFIX in their name into the XML log file (if XML logging has been activated using the -logxml command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 1000 -logxml log.xml -logxml_write_vars out&lt;br /&gt;
&lt;br /&gt;
=== -l &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in &amp;lt;LogFile&amp;gt; using Prolog format&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -l my.log&lt;br /&gt;
&lt;br /&gt;
=== -ll ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in /tmp/prob_cli_debug.log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -ll&lt;br /&gt;
&lt;br /&gt;
=== -lg &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| analyse &amp;lt;LogFile&amp;gt; using gnuplot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -pp &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pp my_pp.mch&lt;br /&gt;
&lt;br /&gt;
=== -ppf &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;, force printing of all type infos&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ppf my_ppf.mch&lt;br /&gt;
&lt;br /&gt;
=== -v ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set ProB into verbose mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -v&lt;br /&gt;
&lt;br /&gt;
=== -version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an alternate command called -svers which just prints the version number of ProB.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -version&lt;br /&gt;
 ProB Command Line Interface&lt;br /&gt;
   VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
   $LastChangedDate: 2011-11-16 18:36:18 +0100 (Wed, 16 Nov 2011) $&lt;br /&gt;
   Prolog: SICStus 4.2.0 (x86_64-darwin-10.6.0): Mon Mar  7 20:03:36 CET 2011&lt;br /&gt;
   Application Path: /Users/leuschel/svn_root/NewProB&lt;br /&gt;
&lt;br /&gt;
 probcli -svers&lt;br /&gt;
 VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;probcli -version -v&amp;lt;/tt&amp;gt; to obtain more information about your version of probcli.&lt;br /&gt;
&lt;br /&gt;
=== -check_java_version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check Java and B parser version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This command is available as of ProB version 1.5.1-beta5 or higher. It can be useful to check that your Java is correctly installed and that the ProB B parser can operate correctly&lt;br /&gt;
&lt;br /&gt;
 probcli -check_java_version&lt;br /&gt;
 Result of checking Java version:&lt;br /&gt;
  Java is correctly installed and version 1.7.0_55-b13 is compatible with ProB requirements (&amp;gt;= 1.7).&lt;br /&gt;
  ProB B Java Parser available in version: 2016-02-25 15:27:18.55.&lt;br /&gt;
&lt;br /&gt;
=== -assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check ASSERTIONS of your machine&lt;br /&gt;
&lt;br /&gt;
If you provide the -t switch, the ASSERTIONS will be checked after executing your trace. Otherwise, they will be checked in an initial state.&lt;br /&gt;
ProB will automatically initialize the machine if you have not provide the -init or -t switch.&lt;br /&gt;
&lt;br /&gt;
You can also use -main_assertions to check only the ASSERTIONS found in the main file.&lt;br /&gt;
&lt;br /&gt;
If your ASSERTIONS are all static (i.e., make no reference to variables), then ProB will remove all CONSTANTS and PROPERTIES from your machine which are not linked (directly or indirectly) to the ASSERTIONS.&lt;br /&gt;
This optimization will only be made if you provide no other switch, such as -mc or -animate which may require the computation of the variables.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -assertions&lt;br /&gt;
&lt;br /&gt;
=== -property ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| virtually add predicate to PROPERTIES&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -property &amp;quot;PRED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -properties ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check PROPERTIES&lt;br /&gt;
Note: you should probably first initialise the machine (e.g., with -init).&lt;br /&gt;
If the constants have not yet been set up, probcli will debug the properties.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties&lt;br /&gt;
&lt;br /&gt;
=== -dot_output &amp;lt;PATH&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| define path for generation of dot files for false properties or assertions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This option is applicable to -properties and -assertions. It will result in individual dot files being generated for every false or unknown property or assertion. Assertions are numbered A0,A1,... and properties P0,P1,... You can also force to generate dot files for all properties (i.e., also the true ones) using the -dot_all command-line flag.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties -dot_output somewhere/&lt;br /&gt;
&lt;br /&gt;
This will generate files somewhere/my_P0_false.dot, somewhere/my_P1_false.dot, ...&lt;br /&gt;
&lt;br /&gt;
=== -rc ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| runtime checking of types/pre-/post-conditions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlfile &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL formulas in file &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlassertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL assertions (in DEFINITIONS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltllimit &amp;lt;LIMIT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| explore at most &amp;lt;LIMIT&amp;gt; states when model-checking LTL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -save &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save state space for later refinement check&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch --model_check -save my_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -refchk &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space (e.g. using -save)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -refchk abs_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -ref_check &amp;lt;MODE&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space (e.g. using -save) with particular failure/trace/divergence model&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
MODE is one of F, FD, T, R, RD, SF, V.&lt;br /&gt;
Meaning of mode: F: Failures, FD: Failure-Divergences, R: Refusals, RD: Refusals-Divergences, SF: Singleton-Failures, T: Traces, V: Revival.&lt;br /&gt;
Default used by -refchck command above is T (traces model).&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ref_check F abstract_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Generate test cases for the given specification. Each test case consists of a sequence of operations resp. events (a so-called trace) that&lt;br /&gt;
* start in a state after an initialisation&lt;br /&gt;
* contain a requested operation/event&lt;br /&gt;
* end in a state where the &amp;lt;EndPredicate&amp;gt; is fulfilled&lt;br /&gt;
&lt;br /&gt;
The user can specify what requested operations/events are with the&lt;br /&gt;
option [[#-mcm_cover &amp;lt;Operation(s)&amp;gt;|-mcm_cover]].&lt;br /&gt;
&lt;br /&gt;
ProB uses a &amp;quot;breadth-first&amp;quot; approach to search for test cases. When all requested operations/events are covered by test cases within maximum length M, the algorithm will explore the complete state space with that maximum distance M from the initialisation. It outputs all found traces that satisfy the requirements above.&lt;br /&gt;
&lt;br /&gt;
The algorithm stops if either&lt;br /&gt;
* it has covered all required operations/events with the current search depth&lt;br /&gt;
* or it has reached the maximum search depth or maximum number of explored states.&lt;br /&gt;
&lt;br /&gt;
The required parameters are:&lt;br /&gt;
;Depth&lt;br /&gt;
: The maximum length of traces that the algorithm searches for test until it stops without covering all required operations/events.&lt;br /&gt;
;MaxStates&lt;br /&gt;
: The maximum number of explored states until the algorithm stops without covering all required operations/events.&lt;br /&gt;
;EndPredicate&lt;br /&gt;
: A predicate in B syntax that the last state of a trace must fulfil. If you do not have any restrictions on that state, use a trivially true predicate like &#039;&#039;&#039;1=1&#039;&#039;&#039;&lt;br /&gt;
;FILE&lt;br /&gt;
: The found test cases a written to the XML file &amp;lt;FILE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mcm_tests 10 2000 &amp;quot;EndStateVar=TRUE&amp;quot; testcases.xml -mcm_cover op1,op2&lt;br /&gt;
&lt;br /&gt;
generates test cases for the operations &#039;&#039;&#039;op1&#039;&#039;&#039; and &#039;&#039;&#039;op2&#039;&#039;&#039; of the specification &#039;&#039;&#039;my.mch&#039;&#039;&#039;. The maximum length of traces is 10, at most 2000 states are explored. Each test case ends in a state where the predicate &#039;&#039;&#039;EndStateVar=TRUE&#039;&#039;&#039; holds. The found test cases are written to a file &#039;&#039;&#039;testcases.xml&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of version 1.6.0, the operation arguments are also written to the XML file.&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;INTERNAL_ARGUMENT_PREFIX&amp;lt;/tt&amp;gt; can be used to provide a prefix for internal operation arguments; any argument/parameter whose name starts with that prefix is considered an internal parameter and not shown in the trace file.&lt;br /&gt;
Also, as of version 1.6.0, the non-deterministic initialisations are shown in the XML trace file: all variables and constants where more than one possible initialisation exists are written into the trace file, as argument of an INITIALISATION event.&lt;br /&gt;
&lt;br /&gt;
=== -mcm_cover &amp;lt;Operation(s)&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Specify an operation or event that should be covered when generating test cases with the &#039;&#039;&#039;-mcm_test&#039;&#039;&#039; option. Multiple operations/events can be specified by seperating them by comma or by using &#039;&#039;&#039;-mcm_cover&#039;&#039;&#039; several times.&lt;br /&gt;
&lt;br /&gt;
See [[#-mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt;|-mcm-tests]] for further details.&lt;br /&gt;
&lt;br /&gt;
=== -spdot &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Write graph of the state space to a dot &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 100 -spdot my_statespace.dot&lt;br /&gt;
&lt;br /&gt;
=== -cbc_tests &amp;lt;Depth&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;File&amp;gt; ===&lt;br /&gt;
Generate test cases by constraint solving with maximum&lt;br /&gt;
length &#039;&#039;&#039;Depth&#039;&#039;&#039;, the last state satisfies &#039;&#039;&#039;EndPredicate&#039;&#039;&#039;&lt;br /&gt;
and the test cases are written to &#039;&#039;&#039;File&#039;&#039;&#039;. If the predicate is the empty string we assume truth. If the filename is the empty string no file is generated. See also the page on [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -cbc_cover &amp;lt;Operation&amp;gt; ===&lt;br /&gt;
When generating CB test cases, &#039;&#039;&#039;Operation&#039;&#039;&#039; should be covered.&lt;br /&gt;
The option can be given multiple times to specify several operations.&lt;br /&gt;
Alternatively, multiple operations can be separated by a comma. You can also use the option &amp;lt;pre&amp;gt;-cbc_cover_match PartialName&amp;lt;/pre&amp;gt; to match all operations whose name contains PartialName. See also the page about [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -test_description &amp;lt;File&amp;gt; ===&lt;br /&gt;
Read the options for constraint based test case generation from &#039;&#039;&#039;File&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== -bmc &amp;lt;Depth&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Run the [[Bounded_Model_Checking|bounded model checker]] until maximum trace depth &amp;lt;Depth&amp;gt; specified. Looks for invariant violations using the constraint-based test case generation algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -bmc 20&lt;br /&gt;
&lt;br /&gt;
=== -csp-guide &amp;lt;File&amp;gt; ===&lt;br /&gt;
Use the CSP File &#039;&#039;&#039;File&#039;&#039;&#039; to guide the B Machine (&amp;quot;CSP||B&amp;quot;).&lt;br /&gt;
(This feature is included since version 1.3.5-beta7.)&lt;br /&gt;
As of version 1.15.1 you can also specify a &amp;lt;tt&amp;gt;CSP_GUIDE_FILE&amp;lt;/tt&amp;gt;&lt;br /&gt;
DEFINITION (which also works in ProB2-UI).&lt;br /&gt;
&lt;br /&gt;
=== -rule_report &amp;lt;File&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Generates rule validation report for rules machines (.rmch) at the specified location &amp;lt;File&amp;gt; for the current animation state. Depending on the file extension an HTML or an XML version of the report is generated (.html/.xml).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.rmch -execute_all -rule_report my_report.html&lt;br /&gt;
&lt;br /&gt;
=== -machine_files_sha ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Computes SHA1 hash of all B files used by a B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.mch -machine_files_sha&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -check_machine_file_sha ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Compute and check SHA1 hash of a particular B file used by the main B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
probcli ./Demo/scheduler.mch -check_machine_file_sha scheduler.mch 1cab7ec89adc9f9b153af85c1ae16ba8a7a2a661&lt;br /&gt;
&lt;br /&gt;
== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
Set NO_COLOR environment variable to disable terminal colors.&lt;br /&gt;
See [https://no-color.org https://no-color.org].&lt;br /&gt;
&lt;br /&gt;
== Preferences ==&lt;br /&gt;
&lt;br /&gt;
You can use these preferences within the command:&lt;br /&gt;
&lt;br /&gt;
 -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;PREFERENCE&amp;gt;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;VALUE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| MAXINT&lt;br /&gt;
| nat ==&amp;gt; MaxInt, used for expressions such as xx::NAT (2147483647 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| MININT&lt;br /&gt;
| neg ==&amp;gt; MinInt, used for expressions such as xx::INT (-2147483648 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SETSIZE&lt;br /&gt;
| nat ==&amp;gt; Size of unspecified deferred sets in SETS section. Will be used if a set s is neither enumerated, has no no card(s)=nr predicate in the PROPERTIES and has no scope_s == Nr DEFINITION.&lt;br /&gt;
|-&lt;br /&gt;
| MAX_INITIALISATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Initialisations and ways to setup constants computed&lt;br /&gt;
|-&lt;br /&gt;
| MAX_OPERATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Enablings per Operation Computed&lt;br /&gt;
|-&lt;br /&gt;
| ANIMATE_SKIP_OPERATIONS&lt;br /&gt;
| bool ==&amp;gt; Animate operations which are skip or PRE C THEN skip&lt;br /&gt;
|-&lt;br /&gt;
| COMPRESSION&lt;br /&gt;
| bool ==&amp;gt; Use more aggressive COMPRESSION when storing states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_CLOSURES_FOR_STATE&lt;br /&gt;
| bool ==&amp;gt; Convert lazy form back into explicit form for Variables, Constants, Operation Arguments. ProB will sometimes try to keep certain sets symbolic. If this preference is TRUE then ProB will try to expand those sets for variables and constants after an operation has been executed.&lt;br /&gt;
|-&lt;br /&gt;
| SYMBOLIC&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of lambdas and set comprehensions. By default ProB will keep certain sets symbolic (e.g., sets it knows are infinite). When this preference is set to TRUE then all set comprehensions and lambda abstractions will at first be kept symbolic and only expanded into explicit form if needed.&lt;br /&gt;
|-&lt;br /&gt;
| CLPFD&lt;br /&gt;
| bool ==&amp;gt; Use CLP(FD) solver for B integers (restricts range to -2^28..2^28-1 on 32 bit computers). Setting this preference to TRUE should substantially improve ProB&#039;s ability to solve complicated predicates involving integers. However, it may cause CLP(FD) overflows in certain circumstances.&lt;br /&gt;
|-&lt;br /&gt;
| SMT&lt;br /&gt;
| bool ==&amp;gt; Enable SMT-Mode (aggressive treatment of : and /: inside predicates). With this predicate set to TRUE ProB will be better at solving certain constraint solving tasks. It should be enabled when doing constraint-based invariant or deadlock checking. ProB Tcl/Tk will turn this preference on automatically for those checks.&lt;br /&gt;
|-&lt;br /&gt;
| STATIC_ORDERING&lt;br /&gt;
| bool ==&amp;gt; Use static ordering to enumerate constants which occur in most PROPERTIES first&lt;br /&gt;
|-&lt;br /&gt;
| SYMMETRY_MODE&lt;br /&gt;
| [off,flood,nauty,hash] ==&amp;gt; Symmetry Mode: off,flood,canon,nauty,hash&lt;br /&gt;
|-&lt;br /&gt;
| TIME_OUT&lt;br /&gt;
| nat1 ==&amp;gt; Time out for computing enabled transitions (in ms, is multiplied by a factor for other computations)&lt;br /&gt;
|-&lt;br /&gt;
| PROOF_INFO&lt;br /&gt;
| bool ==&amp;gt; Use Proof Information to restrict invariant checking to affected unproven clauses. Most useful in EventB for models exported from Rodin.&lt;br /&gt;
|-&lt;br /&gt;
| TRY_FIND_ABORT&lt;br /&gt;
| bool ==&amp;gt; Try more aggressively to detect ill-defined expressions (e.g. applying function outside of domain), may slow down animator&lt;br /&gt;
|-&lt;br /&gt;
| NUMBER_OF_ANIMATED_ABSTRACTIONS&lt;br /&gt;
| nat ==&amp;gt; How many levels of refined models are animated by default&lt;br /&gt;
|-&lt;br /&gt;
| ALLOW_INCOMPLETE_SETUP_CONSTANTS&lt;br /&gt;
| bool ==&amp;gt; Allow ProB to proceed even if only part of the CONSTANTS have been found.&lt;br /&gt;
|-&lt;br /&gt;
| PARTITION_PROPERTIES&lt;br /&gt;
| bool ==&amp;gt; Partition predicates (PROPERTIES) into components&lt;br /&gt;
|-&lt;br /&gt;
| USE_RECORD_CONSTRUCTION&lt;br /&gt;
| bool ==&amp;gt; Records: Check if axioms/properties describe a record pattern&lt;br /&gt;
|-&lt;br /&gt;
| OPERATION_REUSE&lt;br /&gt;
| bool ==&amp;gt; Try and reuse previously computed operation effects in B/Event-B&lt;br /&gt;
|-&lt;br /&gt;
| SHOW_EVENTB_ANY_VALUES&lt;br /&gt;
| bool ==&amp;gt; Show top-level ANY variable values of B Operations without parameters as parameters&lt;br /&gt;
|-&lt;br /&gt;
| RANDOMISE_OPERATION_ORDER&lt;br /&gt;
| bool ==&amp;gt; Randomise order of operations when computing successor states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_FORALL_UPTO&lt;br /&gt;
| nat ==&amp;gt; When analysing predicates: max. domain size for expansion of forall (use 0 to disable expansion)&lt;br /&gt;
|-&lt;br /&gt;
| MAX_DISPLAY_SET&lt;br /&gt;
| int ==&amp;gt; Max size for pretty-printing sets (-1 means no limit)&lt;br /&gt;
|-&lt;br /&gt;
| CSP_STRIP_SOURCE_LOC&lt;br /&gt;
| bool ==&amp;gt; Strip source location for CSP; will speed up model checking&lt;br /&gt;
|-&lt;br /&gt;
| WARN_WHEN_EXPANDING_INFINITE_CLOSURES&lt;br /&gt;
| int ==&amp;gt; Warn when expanding infinite closures if MAXINT larger than:&lt;br /&gt;
|-&lt;br /&gt;
| TRACE_INFO&lt;br /&gt;
| bool ==&amp;gt; Provide various tracing information on the terminal/console.&lt;br /&gt;
|-&lt;br /&gt;
| DOUBLE_EVALUATION&lt;br /&gt;
| bool ==&amp;gt; Evaluate PREDICATES positively and negatively when analyzing assertions or properties&lt;br /&gt;
|-&lt;br /&gt;
| RECURSIVE&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of *Recursive* set Comprehensions and lambdas&lt;br /&gt;
|-&lt;br /&gt;
| IGNORE_HASH_COLLISIONS&lt;br /&gt;
| bool ==&amp;gt; Ignore Hash Collisions (if true not all states may be computed, visited states are not memorised !)&lt;br /&gt;
|-&lt;br /&gt;
| FORGET_STATE_SPACE&lt;br /&gt;
| bool ==&amp;gt; Do not remember state space (mainly useful in conjunction with Ignore Hash Collisions)&lt;br /&gt;
|-&lt;br /&gt;
| NEGATED_INVARIANT_CHECKING&lt;br /&gt;
| bool ==&amp;gt; Perform double evaluation (positive and negative) when checking invariants&lt;br /&gt;
|-&lt;br /&gt;
| CSE&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination&lt;br /&gt;
|-&lt;br /&gt;
| CSE_SUBST&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination also for B substitutions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 5000 -p CLPFD TRUE -p SYMMETRY_MODE hash -mc 1000&lt;br /&gt;
&lt;br /&gt;
== Some probcli examples ==&lt;br /&gt;
&lt;br /&gt;
To load a file My.mch, setup the constants and initialize it do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init My.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To load a file M.mch, setup the constants, initialize and then check all assertions with Atelier-B&#039;s default values for MININT and MAXINT and an increased timeout of 5 seconds do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init -assertions -p MAXINT 2147483647 -p MININT -2147483647 -p TIME_OUT 5000 M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fully model check a specification M.mch while tryining to minimize memory consumption do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -model_check -p COMPRESSION TRUE M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To model check a specification M.mch while trying to minimize memory consumption further by not storing processed stats and using symmetry reduction (and accepting hash collisions) do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -p COMPRESSION -p IGNORE_HASH_COLLISIONS TRUE -p FORGET_STATE_SPACE TRUE -p SYMMETRY_MODE hash -model_check M.mch &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command-line Arguments for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
Note that the stand-alone Tcl/Tk version also supports a limited form of command-line preferences:&lt;br /&gt;
* &#039;&#039;&#039;FILE&#039;&#039;&#039; (the name/path of the file to be loaded)&lt;br /&gt;
* &#039;&#039;&#039;-prefs PREF_FILE&#039;&#039;&#039;  (to use a specific preferences file, rather than the default ProB_Preferences.pl in your home folder)&lt;br /&gt;
* &#039;&#039;&#039;-batch&#039;&#039;&#039; (to instruct ProB not to try to bring up windows, but to print information only to the terminal)&lt;br /&gt;
* &#039;&#039;&#039;-selfcheck&#039;&#039;&#039; (to run the standard unit tests)&lt;br /&gt;
* &#039;&#039;&#039;-t&#039;&#039;&#039; (to perform the Trace Check on the default trace file associated with the specification)&lt;br /&gt;
* &#039;&#039;&#039;-tcl TCL_Command&#039;&#039;&#039; (to run a particular pre-defined Tcl command)&lt;br /&gt;
* &#039;&#039;&#039;-mc&#039;&#039;&#039; (to perform model checking)&lt;br /&gt;
* &#039;&#039;&#039;-c&#039;&#039;&#039; (to compute the coverage)&lt;br /&gt;
* &#039;&#039;&#039;-ref&#039;&#039;&#039; (to perform the default trace refinment check)&lt;br /&gt;
&lt;br /&gt;
However, the comand-line version of ProB, called &#039;&#039;&#039;probcli&#039;&#039;&#039;, provides more features. It also does not depend on Tcl/Tk and can therefore be run on systems without Tcl/Tk.&lt;br /&gt;
{{Feedback}}&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6058</id>
		<title>Using the Command-Line Version of ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6058"/>
		<updated>2025-12-24T07:28:31Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* -ref_check   */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorial]]&lt;br /&gt;
[[Category:User Manual]]&lt;br /&gt;
[[Category:ProB Cli]]&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB, called &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt;, offers many of the features of the standalone Tcl/Tk Version via the command-line. As such, you can run ProB from your shell scripts or in your Makefiles.&lt;br /&gt;
These pages refer to version 1.6 of ProB. Some features are only available in the nightly build of ProB. You can run &amp;lt;tt&amp;gt;probcli –help&amp;lt;/tt&amp;gt; to find out which commands are supported by your version of ProB. For Bash users we provide [[Bash Completion|command completion]] support.&lt;br /&gt;
&lt;br /&gt;
Note: the order of commands is not relevant for &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; (except within groups of commands such as &amp;lt;tt&amp;gt;-p MAXINT 127&amp;lt;/tt&amp;gt;). Any argument that is not recognised by &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; is treated as a filename to be analysed.&lt;br /&gt;
&lt;br /&gt;
[[file:ProBTerminalizerDemo.gif|center||600px]]&lt;br /&gt;
&lt;br /&gt;
== Conventions used ==&lt;br /&gt;
&lt;br /&gt;
The following conventions are used in this guide:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;replaceme&amp;gt;&lt;br /&gt;
| All values that should be replaced with some value are shown withing &amp;lt; &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | line breaks&lt;br /&gt;
| Command synopsis for command may be broken up on several lines. When typing commands enter all option on the same line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;probcli [--help]&lt;br /&gt;
&amp;lt;filename&amp;gt; [ &amp;lt;options&amp;gt; ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore within all options can as of version 1.5.1-beta7 be replaced with dashes. Also, all commands can either be typed with single leading dashes or double leading dashes.&lt;br /&gt;
For example, all of the following commands have the same effect:&lt;br /&gt;
 probcli M.mch -model_check&lt;br /&gt;
 probcli M.mch -model-check&lt;br /&gt;
 probcli M.mch --model_check&lt;br /&gt;
 probcli M.mch --model-check&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== -mc &amp;lt;nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| model check; checking at most &amp;lt;nr&amp;gt; states&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 100&lt;br /&gt;
&lt;br /&gt;
Note: with a value of nr=1 ProB will only inspect the &amp;quot;virtual&amp;quot; root node (and compute its outgoing transitions).&lt;br /&gt;
Also see the related options &amp;lt;tt&amp;gt;-nodead, -noinv, -nogoal, -noass&amp;lt;/tt&amp;gt; to influence which kinds of errors are reported by &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set a target goal predicate using the &amp;lt;tt&amp;gt;-goal &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command and limit the scope of the model checking using the &amp;lt;tt&amp;gt;-scope &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
=== -model_check ===&lt;br /&gt;
&lt;br /&gt;
The same as &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt; but without a limit on the number of nodes checked.&lt;br /&gt;
ProB will run until the entire state space is explored.&lt;br /&gt;
&lt;br /&gt;
=== -no&amp;lt;x&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| restrict errors reported by model checking (-mc), TLC model checking (-mc_with_tlc), animation (-animate) and execution (-execute) with &amp;lt;x&amp;gt;=dead,inv,goal,ass&lt;br /&gt;
* -nodead : do not report deadlocks&lt;br /&gt;
* -noinv : do not report invariant violations&lt;br /&gt;
* -nogoal : do not stop if a state satisfying the GOAL predicate has been found&lt;br /&gt;
* -noass : do not report assertion violations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 1000 -nodead -nogoal&lt;br /&gt;
&lt;br /&gt;
=== -disable_timeout ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| turn off ProB&#039;s timeout mechanism, e.g., for computing enabled operations and invariant checking; this can sometimes speed up model checking (-mc or -model_check) and animation (-animate). Available as of version 1.5.1-beta7.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model-check -disable-timeout&lt;br /&gt;
&lt;br /&gt;
=== -bf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed breadth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -bf -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -df ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed depth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -df -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -mc_mode &amp;lt;M&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| influence how the model checker proceeds. Available as of version 1.5.1. Supersedes the &amp;lt;tt&amp;gt;-df&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; switches.&lt;br /&gt;
Possible values for the mode &amp;lt;M&amp;gt; are: &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt; (depth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;bf&amp;lt;/tt&amp;gt; (breadth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;mixed&amp;lt;/tt&amp;gt; (mixed depth-first / breadth-first traversal with random choice; currently the default),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt; (choosing next node to process completely at random), &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; (similar to random, but uses the Prolog hash function of a node instead of a random number generator),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt; (try and use &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; provided by user in &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause). Some explanations can be found [[Blocks_World_(Directed_Model_Checking)|in an example about directed model checking]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;out_degree_hash&amp;lt;/tt&amp;gt; (prioritise nodes with fewer outgoing transitions; mainly useful for deadlock checking)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
=== --timeout &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Global timeout in ms for model checking and refinement checking. &lt;br /&gt;
This does not influence the timeout used for computing individual transitions/operations.&lt;br /&gt;
This has to be set with the -p TIME_OUT &amp;lt;N&amp;gt;. Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference also influences other computations, such as invariant checking or static assertion checking, where it is multiplied by a factor. See the description of the -p option.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -timeout 10000&lt;br /&gt;
&lt;br /&gt;
=== -t ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| trace check (associated .trace file must exist)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t&lt;br /&gt;
&lt;br /&gt;
=== -trace_replay &amp;lt;KIND&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Replay a trace file in the given format (json,prolog,B).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
KIND is either json, prolog, B. The old ProB format is prolog. The trace files generated by ProB2-UI are json (with .prob2trace extension). The B format consists of a sequence of B operation calls.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -trace_replay json my.prob2trace&lt;br /&gt;
&lt;br /&gt;
Alternative command -det_trace_replay KIND FILE.&lt;br /&gt;
&lt;br /&gt;
=== -init ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| initialise specification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init&lt;br /&gt;
 nr_of_components(1)&lt;br /&gt;
 % checking_component_properties(1,[])&lt;br /&gt;
 % enumerating_constants_without_constraints([typedval(fd(_24428,ID),global(ID),iv)])&lt;br /&gt;
 % grounding_wait_flags&lt;br /&gt;
 grounding_component(1)&lt;br /&gt;
 grounding_component(2)&lt;br /&gt;
 % found_enumeration_of_constants(0,2)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,2))&lt;br /&gt;
 % found_enumeration_of_constants(0,1)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,1))&lt;br /&gt;
 &amp;lt;- 0: SETUP_CONSTANTS :: root&lt;br /&gt;
 % Could not set up constants with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation of constants.&lt;br /&gt;
  | 0: SETUP_CONSTANTS success --&amp;gt;0&lt;br /&gt;
  - &amp;lt;- 1: INITIALISATION :: 0&lt;br /&gt;
 % Could not initialise with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation.&lt;br /&gt;
 ALL OPERATIONS COVERED&lt;br /&gt;
  -  | 1: INITIALISATION success --&amp;gt;2&lt;br /&gt;
  -  - SUCCESS&lt;br /&gt;
&lt;br /&gt;
=== -cbc &amp;lt;OPNAME&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| constraint-based invariant checking for an operation (also use &amp;lt;OPNAME&amp;gt;=all)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -cbc all&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Perform constraint-based deadlock checking (also use -cbc_deadlock_pred PRED)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This will try to find a state which satisfies the invariant and properties and where no operation/event is enabled.&lt;br /&gt;
Note: if ProB finds a counter example then the machine cannot be proven to be deadlock free. However, the particular state may not be reachable from the initial state(s). If you want to find a reachable deadlock you have to use the model checker.&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock_pred &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based deadlock finding given a predicate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is like -cbc_deadlock but you provide an additional predicate. ProB will only find deadlocks which also make this predicate true.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_deadlock_pred &amp;quot;n=15&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -cbc_assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based checking of assertions on constants&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants which make an assertion (on constants) false.&lt;br /&gt;
&lt;br /&gt;
You can use the extra command &amp;lt;tt&amp;gt;-cbc_output_file FILE&amp;lt;/tt&amp;gt; to write the result of this check to a file.&lt;br /&gt;
You can also use the extra command &amp;lt;tt&amp;gt;-cbc_option contradiction_check&amp;lt;/tt&amp;gt; to ask ProB to check if there is a contradiction in the properties (in case the check did not find a counter-example to the assertions). The extra command &amp;lt;tt&amp;gt;-cbc_option unsat_core&amp;lt;/tt&amp;gt; tells ProB to compute the unsatisfiable core in case a proof the assertions was found.&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference is multiplied by 10 for this command.&lt;br /&gt;
&lt;br /&gt;
There are various variations of this command:&lt;br /&gt;
 -cbc_assertions_proof&lt;br /&gt;
 -cbc_assertions_tautology_proof &lt;br /&gt;
Both commands do not allow enumeration warnings to occur.&lt;br /&gt;
The latter command  ignores the PROPERTIES and tries to check whether the ASSERTION(s) are tautologies.&lt;br /&gt;
Both commands can be useful to use ProB as a Prover/Disprover (as is done in Atelier-B 4.3).&lt;br /&gt;
&lt;br /&gt;
=== -cbc_sequence &amp;lt;SEQ&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based searching for a sequence of operation names (separated by semicolons)&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants, initial variable values and parameters which make execution of the given sequence of operations possible.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_sequence &amp;quot;op1;op2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -strict ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| raise error and stop probcli if anything unexpected happens, e.g., if model checking finds a counter example or trace checking fails or any unexpected error happens&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t -strict&lt;br /&gt;
&lt;br /&gt;
=== -expcterr &amp;lt;ERR&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| expect error to occur (&amp;lt;ERR&amp;gt;=cbc,mc,ltl,...)&lt;br /&gt;
Tell ProB that you expect a certain error to occur. Mainly useful for regression tests (in conjunction with the -strict option).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli examples/B/Benchmarks/CarlaTravelAgencyErr.mch -mc 1000 -expcterr invariant_violation -strict&lt;br /&gt;
&lt;br /&gt;
=== -animate &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| random animation (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Animates the machine randomly, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100&lt;br /&gt;
&lt;br /&gt;
Variations&lt;br /&gt;
  -animate_all : animate until deadlock reached&lt;br /&gt;
  -animate_until_ltl P : animate until LTL property holds on trace&lt;br /&gt;
  -animate_until_ltl_state_property P : animate until current state satisifes LTL state property&lt;br /&gt;
&lt;br /&gt;
=== -execute &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| execution (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Executes the &amp;quot;first&amp;quot; enabled operation of a machine, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
In contrast to -animate, -execute will&lt;br /&gt;
* always choose the first enabled operation it finds and stop searching for further enabled operations in that state (-animate will compute all enabled operations up to the limit set by the &amp;lt;tt&amp;gt;MAX_OPERATIONS&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MAX_INITIALISATIONS&amp;lt;/tt&amp;gt; preference and then choose randomly); the order of operations in the B machine is thus important for -execute&lt;br /&gt;
* not store intermediate states in the state space; as such -execute is faster but after execution one only has access to the first state and the final state of execution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 100&lt;br /&gt;
&lt;br /&gt;
=== -execute_all===&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;tt&amp;gt;-execute &amp;lt;Nr&amp;gt;&amp;lt;/tt&amp;gt; above.&lt;br /&gt;
&lt;br /&gt;
=== -det_check ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if every step of the animation is deterministic (i.e., only one operation is possible, and it can only be executed in one possible way as far as parameters and result is concerned).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100 -det_check&lt;br /&gt;
&lt;br /&gt;
=== -det_constants ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if the SETUP_CONSTANTS step is deterministic (i.e., only one way to set up the constants is possible).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -det_constants&lt;br /&gt;
=== -his &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save animation history to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the animation (or model checking) history to a text file. Operations are separated by semicolons.&lt;br /&gt;
The output can be adapted using the -his_option command. With -his_option show_states the -his command will also write out all states to the file (in the form of comments before and after operations). With -his_option show_init only the initial state is written out.&lt;br /&gt;
The -his command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
See also the -sptxt command to only write the current values of variables and constants to a file.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
Additionally we can have the initialised variables and constants:&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_init supersimple.mch&lt;br /&gt;
&lt;br /&gt;
And we can have in addition the values of the variables in between (and at the end):&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_states supersimple.mch&lt;br /&gt;
&lt;br /&gt;
With -his_option trace_file as only option, probcli will write the history in Prolog format, which can later be used by the -t command.&lt;br /&gt;
&lt;br /&gt;
=== -i ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| interactive animation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After performing the other commands, ProB stays in interactive mode and allows the user to manually animate the loaded specification.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -i&lt;br /&gt;
&lt;br /&gt;
=== -repl ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start interactive read-eval-print-loop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p CLPFD TRUE -repl&lt;br /&gt;
&lt;br /&gt;
A list of commands can be obtained by typing &amp;lt;tt&amp;gt;:help&amp;lt;/tt&amp;gt; (just help for versions 1.3.x of probcli). The interactive read-eval-print-loop can be exited using &amp;lt;tt&amp;gt;:q&amp;lt;/tt&amp;gt; (just typing a return on a blank line for versions 1.3.x of probcli)..&lt;br /&gt;
If in addition you want see a graphical representation of the solutions found you can use the following command and open the &amp;lt;tt&amp;gt;out.dot&amp;lt;/tt&amp;gt; file using dotty or GraphViz:&lt;br /&gt;
 probcli -repl -evaldot ~/out.dot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;lt;tt&amp;gt;-eval&amp;lt;/tt&amp;gt; command to evaluate specific formulas or expressions:&lt;br /&gt;
 probcli -eval &amp;quot;1+2&amp;quot;&lt;br /&gt;
For convenience, these formulas can also be put into a separate file:&lt;br /&gt;
 probcli -eval_file MyFormula.txt&lt;br /&gt;
&lt;br /&gt;
=== -c ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print coverage statistics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -c&lt;br /&gt;
&lt;br /&gt;
You can also use the longer name for the command:&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage&lt;br /&gt;
&lt;br /&gt;
There is also a version which prints a shorter summary (and which is much faster for large state spaces):&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage_summary&lt;br /&gt;
&lt;br /&gt;
=== -cc &amp;lt;Nr&amp;gt; &amp;lt;Nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print and check coverage statistics&lt;br /&gt;
Print coverage statistics and check that the given number of nodes and transitions have been computed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -cc 10 25&lt;br /&gt;
&lt;br /&gt;
=== -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set &amp;lt;PREFERENCE&amp;gt; to &amp;lt;VALUE&amp;gt;. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use --pref instead of -p.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 8000 -p CLPFD TRUE -mc 10000&lt;br /&gt;
&lt;br /&gt;
=== -pref_group &amp;lt;PREFGROUP&amp;gt; &amp;lt;SETTING&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set to the group of preferences &amp;lt;PREFGROUP&amp;gt; to a predefined setting &amp;lt;SETTING&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pref_group model_check unlimited&lt;br /&gt;
&lt;br /&gt;
Available groups and settings are:&lt;br /&gt;
&lt;br /&gt;
* PREFERENCE GROUP integer : SETTINGS [int32] : Values for MAXINT and MININT&lt;br /&gt;
* PREFERENCE GROUP time_out : SETTINGS [disable_time_out] : To disable TIME_OUT&lt;br /&gt;
* PREFERENCE GROUP model_check : SETTINGS [disable_max,unlimited] : Model Checking Limits&lt;br /&gt;
* PREFERENCE GROUP dot_colors : SETTINGS [classic,dreams,winter] : Colours for Dot graphs&lt;br /&gt;
&lt;br /&gt;
=== -prefs &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set preferences from preference file &amp;lt;FILE&amp;gt;. The file should be created by the Tcl/Tk version of ProB; this version automatically creates a file called ProB_Preferences.pl. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -prefs ProB_Preferences.pl&lt;br /&gt;
&lt;br /&gt;
=== -card &amp;lt;GS&amp;gt; &amp;lt;VAL&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set cardinality (scope in Alloy terminology) of a B deferred set. This overrides the default cardinality (which can be set using &amp;lt;tt&amp;gt;-p DEFAULT_SETSIZE &amp;lt;VAL&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -card PID 5&lt;br /&gt;
&lt;br /&gt;
=== -goal &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set GOAL predicate for model checker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -goal &amp;quot;n=18&amp;quot;  -strict -expcterr goal_found&lt;br /&gt;
&lt;br /&gt;
=== -scope &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set SCOPE predicate for model checker; states which do not satisfy the SCOPE predicate will be ignored (invariant will not be checked and no outgoing transitions will be computed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -scope &amp;quot;n&amp;lt;18&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
=== -s &amp;lt;PORT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on given port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ss ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on port 9000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on some free port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sptxt &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants and variables to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the values of constants and variables to a text file in classical B syntax.&lt;br /&gt;
The -sptxt command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
The values are fully written out (some sets, e.g., infinite sets may be written out symbolically).&lt;br /&gt;
&lt;br /&gt;
See also the -his command.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -sptxt state.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
This will write the values of all variables and constants to the file state.txt after animating the machine 5 steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -cache &amp;lt;DIRECTORY&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants (and in future also variables) to a file to avoid recomputation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This commands saves the values of constants for the current B machine and puts those values into files in the specified directory. The command will also tell ProB to try and reuse constants saved for subsidiary machines (included using SEES for example) whenever possible.&lt;br /&gt;
The purpose of the command is to avoid recomputing constants as much as possible, as this can be very time consuming.&lt;br /&gt;
This also works for values of variables computed in the initialisation or even using operations.&lt;br /&gt;
However, we do not support refinements at the moment.&lt;br /&gt;
&lt;br /&gt;
Note: this command can also be used when starting up the ProB Tcl/Tk version.&lt;br /&gt;
&lt;br /&gt;
=== -logxml &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities and results of probcli in XML format in &amp;lt;LogFile&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A schema declaration file (xsd) can be found at &amp;lt;tt&amp;gt;doc/logxml_xsd.xml&amp;lt;/tt&amp;gt; in the ProB [[Download#Sourcecode|Prolog sources]].&lt;br /&gt;
The log file contains information about the various commands performed by probcli.&lt;br /&gt;
It also contains version information, the parameters provided to probcli and details about the errors that occured.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -logxml log.xml&lt;br /&gt;
&lt;br /&gt;
=== -logxml_write_vars &amp;lt;PREFIX&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| after processing other commands (such as -execute) write values of variables having prefix PREFIX in their name into the XML log file (if XML logging has been activated using the -logxml command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 1000 -logxml log.xml -logxml_write_vars out&lt;br /&gt;
&lt;br /&gt;
=== -l &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in &amp;lt;LogFile&amp;gt; using Prolog format&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -l my.log&lt;br /&gt;
&lt;br /&gt;
=== -ll ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in /tmp/prob_cli_debug.log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -ll&lt;br /&gt;
&lt;br /&gt;
=== -lg &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| analyse &amp;lt;LogFile&amp;gt; using gnuplot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -pp &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pp my_pp.mch&lt;br /&gt;
&lt;br /&gt;
=== -ppf &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;, force printing of all type infos&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ppf my_ppf.mch&lt;br /&gt;
&lt;br /&gt;
=== -v ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set ProB into verbose mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -v&lt;br /&gt;
&lt;br /&gt;
=== -version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an alternate command called -svers which just prints the version number of ProB.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -version&lt;br /&gt;
 ProB Command Line Interface&lt;br /&gt;
   VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
   $LastChangedDate: 2011-11-16 18:36:18 +0100 (Wed, 16 Nov 2011) $&lt;br /&gt;
   Prolog: SICStus 4.2.0 (x86_64-darwin-10.6.0): Mon Mar  7 20:03:36 CET 2011&lt;br /&gt;
   Application Path: /Users/leuschel/svn_root/NewProB&lt;br /&gt;
&lt;br /&gt;
 probcli -svers&lt;br /&gt;
 VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;probcli -version -v&amp;lt;/tt&amp;gt; to obtain more information about your version of probcli.&lt;br /&gt;
&lt;br /&gt;
=== -check_java_version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check Java and B parser version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This command is available as of ProB version 1.5.1-beta5 or higher. It can be useful to check that your Java is correctly installed and that the ProB B parser can operate correctly&lt;br /&gt;
&lt;br /&gt;
 probcli -check_java_version&lt;br /&gt;
 Result of checking Java version:&lt;br /&gt;
  Java is correctly installed and version 1.7.0_55-b13 is compatible with ProB requirements (&amp;gt;= 1.7).&lt;br /&gt;
  ProB B Java Parser available in version: 2016-02-25 15:27:18.55.&lt;br /&gt;
&lt;br /&gt;
=== -assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check ASSERTIONS of your machine&lt;br /&gt;
&lt;br /&gt;
If you provide the -t switch, the ASSERTIONS will be checked after executing your trace. Otherwise, they will be checked in an initial state.&lt;br /&gt;
ProB will automatically initialize the machine if you have not provide the -init or -t switch.&lt;br /&gt;
&lt;br /&gt;
You can also use -main_assertions to check only the ASSERTIONS found in the main file.&lt;br /&gt;
&lt;br /&gt;
If your ASSERTIONS are all static (i.e., make no reference to variables), then ProB will remove all CONSTANTS and PROPERTIES from your machine which are not linked (directly or indirectly) to the ASSERTIONS.&lt;br /&gt;
This optimization will only be made if you provide no other switch, such as -mc or -animate which may require the computation of the variables.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -assertions&lt;br /&gt;
&lt;br /&gt;
=== -property ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| virtually add predicate to PROPERTIES&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -property &amp;quot;PRED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -properties ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check PROPERTIES&lt;br /&gt;
Note: you should probably first initialise the machine (e.g., with -init).&lt;br /&gt;
If the constants have not yet been set up, probcli will debug the properties.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties&lt;br /&gt;
&lt;br /&gt;
=== -dot_output &amp;lt;PATH&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| define path for generation of dot files for false properties or assertions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This option is applicable to -properties and -assertions. It will result in individual dot files being generated for every false or unknown property or assertion. Assertions are numbered A0,A1,... and properties P0,P1,... You can also force to generate dot files for all properties (i.e., also the true ones) using the -dot_all command-line flag.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties -dot_output somewhere/&lt;br /&gt;
&lt;br /&gt;
This will generate files somewhere/my_P0_false.dot, somewhere/my_P1_false.dot, ...&lt;br /&gt;
&lt;br /&gt;
=== -rc ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| runtime checking of types/pre-/post-conditions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlfile &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL formulas in file &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlassertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL assertions (in DEFINITIONS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltllimit &amp;lt;LIMIT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| explore at most &amp;lt;LIMIT&amp;gt; states when model-checking LTL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -save &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save state space for later refinement check&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch --model_check -save my_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -refchk &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space (e.g. using -save)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -refchk abs_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -ref_check &amp;lt;MODE&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space (e.g. using -save) with particular failure/trace/divergence model&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
MODE is one of F, FD, T, R, RD, SF, V.&lt;br /&gt;
Meaning of mode: F: Failures, FD: Failure-Divergences, R: Refusals, RD: Refusals-Divergences, SF: Singleton-Failures, T: Traces, V: Revival.&lt;br /&gt;
Default used by -refchck command above is T (traces model).&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ref_check F abstract_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Generate test cases for the given specification. Each test case consists of a sequence of operations resp. events (a so-called trace) that&lt;br /&gt;
* start in a state after an initialisation&lt;br /&gt;
* contain a requested operation/event&lt;br /&gt;
* end in a state where the &amp;lt;EndPredicate&amp;gt; is fulfilled&lt;br /&gt;
&lt;br /&gt;
The user can specify what requested operations/events are with the&lt;br /&gt;
option [[#-mcm_cover &amp;lt;Operation(s)&amp;gt;|-mcm_cover]].&lt;br /&gt;
&lt;br /&gt;
ProB uses a &amp;quot;breadth-first&amp;quot; approach to search for test cases. When all requested operations/events are covered by test cases within maximum length M, the algorithm will explore the complete state space with that maximum distance M from the initialisation. It outputs all found traces that satisfy the requirements above.&lt;br /&gt;
&lt;br /&gt;
The algorithm stops if either&lt;br /&gt;
* it has covered all required operations/events with the current search depth&lt;br /&gt;
* or it has reached the maximum search depth or maximum number of explored states.&lt;br /&gt;
&lt;br /&gt;
The required parameters are:&lt;br /&gt;
;Depth&lt;br /&gt;
: The maximum length of traces that the algorithm searches for test until it stops without covering all required operations/events.&lt;br /&gt;
;MaxStates&lt;br /&gt;
: The maximum number of explored states until the algorithm stops without covering all required operations/events.&lt;br /&gt;
;EndPredicate&lt;br /&gt;
: A predicate in B syntax that the last state of a trace must fulfil. If you do not have any restrictions on that state, use a trivially true predicate like &#039;&#039;&#039;1=1&#039;&#039;&#039;&lt;br /&gt;
;FILE&lt;br /&gt;
: The found test cases a written to the XML file &amp;lt;FILE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mcm_tests 10 2000 &amp;quot;EndStateVar=TRUE&amp;quot; testcases.xml -mcm_cover op1,op2&lt;br /&gt;
&lt;br /&gt;
generates test cases for the operations &#039;&#039;&#039;op1&#039;&#039;&#039; and &#039;&#039;&#039;op2&#039;&#039;&#039; of the specification &#039;&#039;&#039;my.mch&#039;&#039;&#039;. The maximum length of traces is 10, at most 2000 states are explored. Each test case ends in a state where the predicate &#039;&#039;&#039;EndStateVar=TRUE&#039;&#039;&#039; holds. The found test cases are written to a file &#039;&#039;&#039;testcases.xml&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of version 1.6.0, the operation arguments are also written to the XML file.&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;INTERNAL_ARGUMENT_PREFIX&amp;lt;/tt&amp;gt; can be used to provide a prefix for internal operation arguments; any argument/parameter whose name starts with that prefix is considered an internal parameter and not shown in the trace file.&lt;br /&gt;
Also, as of version 1.6.0, the non-deterministic initialisations are shown in the XML trace file: all variables and constants where more than one possible initialisation exists are written into the trace file, as argument of an INITIALISATION event.&lt;br /&gt;
&lt;br /&gt;
=== -mcm_cover &amp;lt;Operation(s)&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Specify an operation or event that should be covered when generating test cases with the &#039;&#039;&#039;-mcm_test&#039;&#039;&#039; option. Multiple operations/events can be specified by seperating them by comma or by using &#039;&#039;&#039;-mcm_cover&#039;&#039;&#039; several times.&lt;br /&gt;
&lt;br /&gt;
See [[#-mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt;|-mcm-tests]] for further details.&lt;br /&gt;
&lt;br /&gt;
=== -spdot &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Write graph of the state space to a dot &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 100 -spdot my_statespace.dot&lt;br /&gt;
&lt;br /&gt;
=== -cbc_tests &amp;lt;Depth&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;File&amp;gt; ===&lt;br /&gt;
Generate test cases by constraint solving with maximum&lt;br /&gt;
length &#039;&#039;&#039;Depth&#039;&#039;&#039;, the last state satisfies &#039;&#039;&#039;EndPredicate&#039;&#039;&#039;&lt;br /&gt;
and the test cases are written to &#039;&#039;&#039;File&#039;&#039;&#039;. If the predicate is the empty string we assume truth. If the filename is the empty string no file is generated. See also the page on [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -cbc_cover &amp;lt;Operation&amp;gt; ===&lt;br /&gt;
When generating CB test cases, &#039;&#039;&#039;Operation&#039;&#039;&#039; should be covered.&lt;br /&gt;
The option can be given multiple times to specify several operations.&lt;br /&gt;
Alternatively, multiple operations can be separated by a comma. You can also use the option &amp;lt;pre&amp;gt;-cbc_cover_match PartialName&amp;lt;/pre&amp;gt; to match all operations whose name contains PartialName. See also the page about [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -test_description &amp;lt;File&amp;gt; ===&lt;br /&gt;
Read the options for constraint based test case generation from &#039;&#039;&#039;File&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== -bmc &amp;lt;Depth&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Run the [[Bounded_Model_Checking|bounded model checker]] until maximum trace depth &amp;lt;Depth&amp;gt; specified. Looks for invariant violations using the constraint-based test case generation algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -bmc 20&lt;br /&gt;
&lt;br /&gt;
=== -csp-guide &amp;lt;File&amp;gt; ===&lt;br /&gt;
Use the CSP File &#039;&#039;&#039;File&#039;&#039;&#039; to guide the B Machine (&amp;quot;CSP||B&amp;quot;).&lt;br /&gt;
(This feature is included since version 1.3.5-beta7.)&lt;br /&gt;
As of version 1.15.1 you can also specify a &amp;lt;tt&amp;gt;CSP_GUIDE_FILE&amp;lt;/tt&amp;gt;&lt;br /&gt;
DEFINITION (which also works in ProB2-UI).&lt;br /&gt;
&lt;br /&gt;
=== -rule_report &amp;lt;File&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Generates rule validation report for rules machines (.rmch) at the specified location &amp;lt;File&amp;gt; for the current animation state. Depending on the file extension an HTML or an XML version of the report is generated (.html/.xml).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.rmch -execute_all -rule_report my_report.html&lt;br /&gt;
&lt;br /&gt;
=== -machine_files_sha ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Computes SHA1 hash of all B files used by a B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.mch -machine_files_sha&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -check_machine_file_sha ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Compute and check SHA1 hash of a particular B file used by the main B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
probcli ./Demo/scheduler.mch -check_machine_file_sha scheduler.mch 1cab7ec89adc9f9b153af85c1ae16ba8a7a2a661&lt;br /&gt;
&lt;br /&gt;
== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
Set NO_COLOR environment variable to disable terminal colors.&lt;br /&gt;
See [https://no-color.org https://no-color.org].&lt;br /&gt;
&lt;br /&gt;
== Preferences ==&lt;br /&gt;
&lt;br /&gt;
You can use these preferences within the command:&lt;br /&gt;
&lt;br /&gt;
 -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;PREFERENCE&amp;gt;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;VALUE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| MAXINT&lt;br /&gt;
| nat ==&amp;gt; MaxInt, used for expressions such as xx::NAT (2147483647 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| MININT&lt;br /&gt;
| neg ==&amp;gt; MinInt, used for expressions such as xx::INT (-2147483648 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SETSIZE&lt;br /&gt;
| nat ==&amp;gt; Size of unspecified deferred sets in SETS section. Will be used if a set s is neither enumerated, has no no card(s)=nr predicate in the PROPERTIES and has no scope_s == Nr DEFINITION.&lt;br /&gt;
|-&lt;br /&gt;
| MAX_INITIALISATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Initialisations and ways to setup constants computed&lt;br /&gt;
|-&lt;br /&gt;
| MAX_OPERATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Enablings per Operation Computed&lt;br /&gt;
|-&lt;br /&gt;
| ANIMATE_SKIP_OPERATIONS&lt;br /&gt;
| bool ==&amp;gt; Animate operations which are skip or PRE C THEN skip&lt;br /&gt;
|-&lt;br /&gt;
| COMPRESSION&lt;br /&gt;
| bool ==&amp;gt; Use more aggressive COMPRESSION when storing states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_CLOSURES_FOR_STATE&lt;br /&gt;
| bool ==&amp;gt; Convert lazy form back into explicit form for Variables, Constants, Operation Arguments. ProB will sometimes try to keep certain sets symbolic. If this preference is TRUE then ProB will try to expand those sets for variables and constants after an operation has been executed.&lt;br /&gt;
|-&lt;br /&gt;
| SYMBOLIC&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of lambdas and set comprehensions. By default ProB will keep certain sets symbolic (e.g., sets it knows are infinite). When this preference is set to TRUE then all set comprehensions and lambda abstractions will at first be kept symbolic and only expanded into explicit form if needed.&lt;br /&gt;
|-&lt;br /&gt;
| CLPFD&lt;br /&gt;
| bool ==&amp;gt; Use CLP(FD) solver for B integers (restricts range to -2^28..2^28-1 on 32 bit computers). Setting this preference to TRUE should substantially improve ProB&#039;s ability to solve complicated predicates involving integers. However, it may cause CLP(FD) overflows in certain circumstances.&lt;br /&gt;
|-&lt;br /&gt;
| SMT&lt;br /&gt;
| bool ==&amp;gt; Enable SMT-Mode (aggressive treatment of : and /: inside predicates). With this predicate set to TRUE ProB will be better at solving certain constraint solving tasks. It should be enabled when doing constraint-based invariant or deadlock checking. ProB Tcl/Tk will turn this preference on automatically for those checks.&lt;br /&gt;
|-&lt;br /&gt;
| STATIC_ORDERING&lt;br /&gt;
| bool ==&amp;gt; Use static ordering to enumerate constants which occur in most PROPERTIES first&lt;br /&gt;
|-&lt;br /&gt;
| SYMMETRY_MODE&lt;br /&gt;
| [off,flood,nauty,hash] ==&amp;gt; Symmetry Mode: off,flood,canon,nauty,hash&lt;br /&gt;
|-&lt;br /&gt;
| TIME_OUT&lt;br /&gt;
| nat1 ==&amp;gt; Time out for computing enabled transitions (in ms, is multiplied by a factor for other computations)&lt;br /&gt;
|-&lt;br /&gt;
| PROOF_INFO&lt;br /&gt;
| bool ==&amp;gt; Use Proof Information to restrict invariant checking to affected unproven clauses. Most useful in EventB for models exported from Rodin.&lt;br /&gt;
|-&lt;br /&gt;
| TRY_FIND_ABORT&lt;br /&gt;
| bool ==&amp;gt; Try more aggressively to detect ill-defined expressions (e.g. applying function outside of domain), may slow down animator&lt;br /&gt;
|-&lt;br /&gt;
| NUMBER_OF_ANIMATED_ABSTRACTIONS&lt;br /&gt;
| nat ==&amp;gt; How many levels of refined models are animated by default&lt;br /&gt;
|-&lt;br /&gt;
| ALLOW_INCOMPLETE_SETUP_CONSTANTS&lt;br /&gt;
| bool ==&amp;gt; Allow ProB to proceed even if only part of the CONSTANTS have been found.&lt;br /&gt;
|-&lt;br /&gt;
| PARTITION_PROPERTIES&lt;br /&gt;
| bool ==&amp;gt; Partition predicates (PROPERTIES) into components&lt;br /&gt;
|-&lt;br /&gt;
| USE_RECORD_CONSTRUCTION&lt;br /&gt;
| bool ==&amp;gt; Records: Check if axioms/properties describe a record pattern&lt;br /&gt;
|-&lt;br /&gt;
| OPERATION_REUSE&lt;br /&gt;
| bool ==&amp;gt; Try and reuse previously computed operation effects in B/Event-B&lt;br /&gt;
|-&lt;br /&gt;
| SHOW_EVENTB_ANY_VALUES&lt;br /&gt;
| bool ==&amp;gt; Show top-level ANY variable values of B Operations without parameters as parameters&lt;br /&gt;
|-&lt;br /&gt;
| RANDOMISE_OPERATION_ORDER&lt;br /&gt;
| bool ==&amp;gt; Randomise order of operations when computing successor states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_FORALL_UPTO&lt;br /&gt;
| nat ==&amp;gt; When analysing predicates: max. domain size for expansion of forall (use 0 to disable expansion)&lt;br /&gt;
|-&lt;br /&gt;
| MAX_DISPLAY_SET&lt;br /&gt;
| int ==&amp;gt; Max size for pretty-printing sets (-1 means no limit)&lt;br /&gt;
|-&lt;br /&gt;
| CSP_STRIP_SOURCE_LOC&lt;br /&gt;
| bool ==&amp;gt; Strip source location for CSP; will speed up model checking&lt;br /&gt;
|-&lt;br /&gt;
| WARN_WHEN_EXPANDING_INFINITE_CLOSURES&lt;br /&gt;
| int ==&amp;gt; Warn when expanding infinite closures if MAXINT larger than:&lt;br /&gt;
|-&lt;br /&gt;
| TRACE_INFO&lt;br /&gt;
| bool ==&amp;gt; Provide various tracing information on the terminal/console.&lt;br /&gt;
|-&lt;br /&gt;
| DOUBLE_EVALUATION&lt;br /&gt;
| bool ==&amp;gt; Evaluate PREDICATES positively and negatively when analyzing assertions or properties&lt;br /&gt;
|-&lt;br /&gt;
| RECURSIVE&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of *Recursive* set Comprehensions and lambdas&lt;br /&gt;
|-&lt;br /&gt;
| IGNORE_HASH_COLLISIONS&lt;br /&gt;
| bool ==&amp;gt; Ignore Hash Collisions (if true not all states may be computed, visited states are not memorised !)&lt;br /&gt;
|-&lt;br /&gt;
| FORGET_STATE_SPACE&lt;br /&gt;
| bool ==&amp;gt; Do not remember state space (mainly useful in conjunction with Ignore Hash Collisions)&lt;br /&gt;
|-&lt;br /&gt;
| NEGATED_INVARIANT_CHECKING&lt;br /&gt;
| bool ==&amp;gt; Perform double evaluation (positive and negative) when checking invariants&lt;br /&gt;
|-&lt;br /&gt;
| CSE&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination&lt;br /&gt;
|-&lt;br /&gt;
| CSE_SUBST&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination also for B substitutions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 5000 -p CLPFD TRUE -p SYMMETRY_MODE hash -mc 1000&lt;br /&gt;
&lt;br /&gt;
== Some probcli examples ==&lt;br /&gt;
&lt;br /&gt;
To load a file My.mch, setup the constants and initialize it do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init My.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To load a file M.mch, setup the constants, initialize and then check all assertions with Atelier-B&#039;s default values for MININT and MAXINT and an increased timeout of 5 seconds do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init -assertions -p MAXINT 2147483647 -p MININT -2147483647 -p TIME_OUT 5000 M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fully model check a specification M.mch while tryining to minimize memory consumption do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -model_check -p COMPRESSION TRUE M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To model check a specification M.mch while trying to minimize memory consumption further by not storing processed stats and using symmetry reduction (and accepting hash collisions) do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -p COMPRESSION -p IGNORE_HASH_COLLISIONS TRUE -p FORGET_STATE_SPACE TRUE -p SYMMETRY_MODE hash -model_check M.mch &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command-line Arguments for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
Note that the stand-alone Tcl/Tk version also supports a limited form of command-line preferences:&lt;br /&gt;
* &#039;&#039;&#039;FILE&#039;&#039;&#039; (the name/path of the file to be loaded)&lt;br /&gt;
* &#039;&#039;&#039;-prefs PREF_FILE&#039;&#039;&#039;  (to use a specific preferences file, rather than the default ProB_Preferences.pl in your home folder)&lt;br /&gt;
* &#039;&#039;&#039;-batch&#039;&#039;&#039; (to instruct ProB not to try to bring up windows, but to print information only to the terminal)&lt;br /&gt;
* &#039;&#039;&#039;-selfcheck&#039;&#039;&#039; (to run the standard unit tests)&lt;br /&gt;
* &#039;&#039;&#039;-t&#039;&#039;&#039; (to perform the Trace Check on the default trace file associated with the specification)&lt;br /&gt;
* &#039;&#039;&#039;-tcl TCL_Command&#039;&#039;&#039; (to run a particular pre-defined Tcl command)&lt;br /&gt;
* &#039;&#039;&#039;-mc&#039;&#039;&#039; (to perform model checking)&lt;br /&gt;
* &#039;&#039;&#039;-c&#039;&#039;&#039; (to compute the coverage)&lt;br /&gt;
* &#039;&#039;&#039;-ref&#039;&#039;&#039; (to perform the default trace refinment check)&lt;br /&gt;
&lt;br /&gt;
However, the comand-line version of ProB, called &#039;&#039;&#039;probcli&#039;&#039;&#039;, provides more features. It also does not depend on Tcl/Tk and can therefore be run on systems without Tcl/Tk.&lt;br /&gt;
{{Feedback}}&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6057</id>
		<title>Using the Command-Line Version of ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6057"/>
		<updated>2025-12-24T07:24:00Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* -refchk  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorial]]&lt;br /&gt;
[[Category:User Manual]]&lt;br /&gt;
[[Category:ProB Cli]]&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB, called &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt;, offers many of the features of the standalone Tcl/Tk Version via the command-line. As such, you can run ProB from your shell scripts or in your Makefiles.&lt;br /&gt;
These pages refer to version 1.6 of ProB. Some features are only available in the nightly build of ProB. You can run &amp;lt;tt&amp;gt;probcli –help&amp;lt;/tt&amp;gt; to find out which commands are supported by your version of ProB. For Bash users we provide [[Bash Completion|command completion]] support.&lt;br /&gt;
&lt;br /&gt;
Note: the order of commands is not relevant for &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; (except within groups of commands such as &amp;lt;tt&amp;gt;-p MAXINT 127&amp;lt;/tt&amp;gt;). Any argument that is not recognised by &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; is treated as a filename to be analysed.&lt;br /&gt;
&lt;br /&gt;
[[file:ProBTerminalizerDemo.gif|center||600px]]&lt;br /&gt;
&lt;br /&gt;
== Conventions used ==&lt;br /&gt;
&lt;br /&gt;
The following conventions are used in this guide:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;replaceme&amp;gt;&lt;br /&gt;
| All values that should be replaced with some value are shown withing &amp;lt; &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | line breaks&lt;br /&gt;
| Command synopsis for command may be broken up on several lines. When typing commands enter all option on the same line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;probcli [--help]&lt;br /&gt;
&amp;lt;filename&amp;gt; [ &amp;lt;options&amp;gt; ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore within all options can as of version 1.5.1-beta7 be replaced with dashes. Also, all commands can either be typed with single leading dashes or double leading dashes.&lt;br /&gt;
For example, all of the following commands have the same effect:&lt;br /&gt;
 probcli M.mch -model_check&lt;br /&gt;
 probcli M.mch -model-check&lt;br /&gt;
 probcli M.mch --model_check&lt;br /&gt;
 probcli M.mch --model-check&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== -mc &amp;lt;nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| model check; checking at most &amp;lt;nr&amp;gt; states&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 100&lt;br /&gt;
&lt;br /&gt;
Note: with a value of nr=1 ProB will only inspect the &amp;quot;virtual&amp;quot; root node (and compute its outgoing transitions).&lt;br /&gt;
Also see the related options &amp;lt;tt&amp;gt;-nodead, -noinv, -nogoal, -noass&amp;lt;/tt&amp;gt; to influence which kinds of errors are reported by &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set a target goal predicate using the &amp;lt;tt&amp;gt;-goal &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command and limit the scope of the model checking using the &amp;lt;tt&amp;gt;-scope &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
=== -model_check ===&lt;br /&gt;
&lt;br /&gt;
The same as &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt; but without a limit on the number of nodes checked.&lt;br /&gt;
ProB will run until the entire state space is explored.&lt;br /&gt;
&lt;br /&gt;
=== -no&amp;lt;x&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| restrict errors reported by model checking (-mc), TLC model checking (-mc_with_tlc), animation (-animate) and execution (-execute) with &amp;lt;x&amp;gt;=dead,inv,goal,ass&lt;br /&gt;
* -nodead : do not report deadlocks&lt;br /&gt;
* -noinv : do not report invariant violations&lt;br /&gt;
* -nogoal : do not stop if a state satisfying the GOAL predicate has been found&lt;br /&gt;
* -noass : do not report assertion violations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 1000 -nodead -nogoal&lt;br /&gt;
&lt;br /&gt;
=== -disable_timeout ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| turn off ProB&#039;s timeout mechanism, e.g., for computing enabled operations and invariant checking; this can sometimes speed up model checking (-mc or -model_check) and animation (-animate). Available as of version 1.5.1-beta7.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model-check -disable-timeout&lt;br /&gt;
&lt;br /&gt;
=== -bf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed breadth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -bf -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -df ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed depth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -df -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -mc_mode &amp;lt;M&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| influence how the model checker proceeds. Available as of version 1.5.1. Supersedes the &amp;lt;tt&amp;gt;-df&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; switches.&lt;br /&gt;
Possible values for the mode &amp;lt;M&amp;gt; are: &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt; (depth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;bf&amp;lt;/tt&amp;gt; (breadth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;mixed&amp;lt;/tt&amp;gt; (mixed depth-first / breadth-first traversal with random choice; currently the default),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt; (choosing next node to process completely at random), &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; (similar to random, but uses the Prolog hash function of a node instead of a random number generator),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt; (try and use &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; provided by user in &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause). Some explanations can be found [[Blocks_World_(Directed_Model_Checking)|in an example about directed model checking]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;out_degree_hash&amp;lt;/tt&amp;gt; (prioritise nodes with fewer outgoing transitions; mainly useful for deadlock checking)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
=== --timeout &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Global timeout in ms for model checking and refinement checking. &lt;br /&gt;
This does not influence the timeout used for computing individual transitions/operations.&lt;br /&gt;
This has to be set with the -p TIME_OUT &amp;lt;N&amp;gt;. Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference also influences other computations, such as invariant checking or static assertion checking, where it is multiplied by a factor. See the description of the -p option.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -timeout 10000&lt;br /&gt;
&lt;br /&gt;
=== -t ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| trace check (associated .trace file must exist)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t&lt;br /&gt;
&lt;br /&gt;
=== -trace_replay &amp;lt;KIND&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Replay a trace file in the given format (json,prolog,B).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
KIND is either json, prolog, B. The old ProB format is prolog. The trace files generated by ProB2-UI are json (with .prob2trace extension). The B format consists of a sequence of B operation calls.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -trace_replay json my.prob2trace&lt;br /&gt;
&lt;br /&gt;
Alternative command -det_trace_replay KIND FILE.&lt;br /&gt;
&lt;br /&gt;
=== -init ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| initialise specification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init&lt;br /&gt;
 nr_of_components(1)&lt;br /&gt;
 % checking_component_properties(1,[])&lt;br /&gt;
 % enumerating_constants_without_constraints([typedval(fd(_24428,ID),global(ID),iv)])&lt;br /&gt;
 % grounding_wait_flags&lt;br /&gt;
 grounding_component(1)&lt;br /&gt;
 grounding_component(2)&lt;br /&gt;
 % found_enumeration_of_constants(0,2)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,2))&lt;br /&gt;
 % found_enumeration_of_constants(0,1)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,1))&lt;br /&gt;
 &amp;lt;- 0: SETUP_CONSTANTS :: root&lt;br /&gt;
 % Could not set up constants with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation of constants.&lt;br /&gt;
  | 0: SETUP_CONSTANTS success --&amp;gt;0&lt;br /&gt;
  - &amp;lt;- 1: INITIALISATION :: 0&lt;br /&gt;
 % Could not initialise with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation.&lt;br /&gt;
 ALL OPERATIONS COVERED&lt;br /&gt;
  -  | 1: INITIALISATION success --&amp;gt;2&lt;br /&gt;
  -  - SUCCESS&lt;br /&gt;
&lt;br /&gt;
=== -cbc &amp;lt;OPNAME&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| constraint-based invariant checking for an operation (also use &amp;lt;OPNAME&amp;gt;=all)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -cbc all&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Perform constraint-based deadlock checking (also use -cbc_deadlock_pred PRED)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This will try to find a state which satisfies the invariant and properties and where no operation/event is enabled.&lt;br /&gt;
Note: if ProB finds a counter example then the machine cannot be proven to be deadlock free. However, the particular state may not be reachable from the initial state(s). If you want to find a reachable deadlock you have to use the model checker.&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock_pred &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based deadlock finding given a predicate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is like -cbc_deadlock but you provide an additional predicate. ProB will only find deadlocks which also make this predicate true.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_deadlock_pred &amp;quot;n=15&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -cbc_assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based checking of assertions on constants&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants which make an assertion (on constants) false.&lt;br /&gt;
&lt;br /&gt;
You can use the extra command &amp;lt;tt&amp;gt;-cbc_output_file FILE&amp;lt;/tt&amp;gt; to write the result of this check to a file.&lt;br /&gt;
You can also use the extra command &amp;lt;tt&amp;gt;-cbc_option contradiction_check&amp;lt;/tt&amp;gt; to ask ProB to check if there is a contradiction in the properties (in case the check did not find a counter-example to the assertions). The extra command &amp;lt;tt&amp;gt;-cbc_option unsat_core&amp;lt;/tt&amp;gt; tells ProB to compute the unsatisfiable core in case a proof the assertions was found.&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference is multiplied by 10 for this command.&lt;br /&gt;
&lt;br /&gt;
There are various variations of this command:&lt;br /&gt;
 -cbc_assertions_proof&lt;br /&gt;
 -cbc_assertions_tautology_proof &lt;br /&gt;
Both commands do not allow enumeration warnings to occur.&lt;br /&gt;
The latter command  ignores the PROPERTIES and tries to check whether the ASSERTION(s) are tautologies.&lt;br /&gt;
Both commands can be useful to use ProB as a Prover/Disprover (as is done in Atelier-B 4.3).&lt;br /&gt;
&lt;br /&gt;
=== -cbc_sequence &amp;lt;SEQ&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based searching for a sequence of operation names (separated by semicolons)&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants, initial variable values and parameters which make execution of the given sequence of operations possible.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_sequence &amp;quot;op1;op2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -strict ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| raise error and stop probcli if anything unexpected happens, e.g., if model checking finds a counter example or trace checking fails or any unexpected error happens&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t -strict&lt;br /&gt;
&lt;br /&gt;
=== -expcterr &amp;lt;ERR&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| expect error to occur (&amp;lt;ERR&amp;gt;=cbc,mc,ltl,...)&lt;br /&gt;
Tell ProB that you expect a certain error to occur. Mainly useful for regression tests (in conjunction with the -strict option).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli examples/B/Benchmarks/CarlaTravelAgencyErr.mch -mc 1000 -expcterr invariant_violation -strict&lt;br /&gt;
&lt;br /&gt;
=== -animate &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| random animation (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Animates the machine randomly, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100&lt;br /&gt;
&lt;br /&gt;
Variations&lt;br /&gt;
  -animate_all : animate until deadlock reached&lt;br /&gt;
  -animate_until_ltl P : animate until LTL property holds on trace&lt;br /&gt;
  -animate_until_ltl_state_property P : animate until current state satisifes LTL state property&lt;br /&gt;
&lt;br /&gt;
=== -execute &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| execution (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Executes the &amp;quot;first&amp;quot; enabled operation of a machine, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
In contrast to -animate, -execute will&lt;br /&gt;
* always choose the first enabled operation it finds and stop searching for further enabled operations in that state (-animate will compute all enabled operations up to the limit set by the &amp;lt;tt&amp;gt;MAX_OPERATIONS&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MAX_INITIALISATIONS&amp;lt;/tt&amp;gt; preference and then choose randomly); the order of operations in the B machine is thus important for -execute&lt;br /&gt;
* not store intermediate states in the state space; as such -execute is faster but after execution one only has access to the first state and the final state of execution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 100&lt;br /&gt;
&lt;br /&gt;
=== -execute_all===&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;tt&amp;gt;-execute &amp;lt;Nr&amp;gt;&amp;lt;/tt&amp;gt; above.&lt;br /&gt;
&lt;br /&gt;
=== -det_check ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if every step of the animation is deterministic (i.e., only one operation is possible, and it can only be executed in one possible way as far as parameters and result is concerned).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100 -det_check&lt;br /&gt;
&lt;br /&gt;
=== -det_constants ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if the SETUP_CONSTANTS step is deterministic (i.e., only one way to set up the constants is possible).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -det_constants&lt;br /&gt;
=== -his &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save animation history to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the animation (or model checking) history to a text file. Operations are separated by semicolons.&lt;br /&gt;
The output can be adapted using the -his_option command. With -his_option show_states the -his command will also write out all states to the file (in the form of comments before and after operations). With -his_option show_init only the initial state is written out.&lt;br /&gt;
The -his command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
See also the -sptxt command to only write the current values of variables and constants to a file.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
Additionally we can have the initialised variables and constants:&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_init supersimple.mch&lt;br /&gt;
&lt;br /&gt;
And we can have in addition the values of the variables in between (and at the end):&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_states supersimple.mch&lt;br /&gt;
&lt;br /&gt;
With -his_option trace_file as only option, probcli will write the history in Prolog format, which can later be used by the -t command.&lt;br /&gt;
&lt;br /&gt;
=== -i ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| interactive animation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After performing the other commands, ProB stays in interactive mode and allows the user to manually animate the loaded specification.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -i&lt;br /&gt;
&lt;br /&gt;
=== -repl ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start interactive read-eval-print-loop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p CLPFD TRUE -repl&lt;br /&gt;
&lt;br /&gt;
A list of commands can be obtained by typing &amp;lt;tt&amp;gt;:help&amp;lt;/tt&amp;gt; (just help for versions 1.3.x of probcli). The interactive read-eval-print-loop can be exited using &amp;lt;tt&amp;gt;:q&amp;lt;/tt&amp;gt; (just typing a return on a blank line for versions 1.3.x of probcli)..&lt;br /&gt;
If in addition you want see a graphical representation of the solutions found you can use the following command and open the &amp;lt;tt&amp;gt;out.dot&amp;lt;/tt&amp;gt; file using dotty or GraphViz:&lt;br /&gt;
 probcli -repl -evaldot ~/out.dot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;lt;tt&amp;gt;-eval&amp;lt;/tt&amp;gt; command to evaluate specific formulas or expressions:&lt;br /&gt;
 probcli -eval &amp;quot;1+2&amp;quot;&lt;br /&gt;
For convenience, these formulas can also be put into a separate file:&lt;br /&gt;
 probcli -eval_file MyFormula.txt&lt;br /&gt;
&lt;br /&gt;
=== -c ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print coverage statistics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -c&lt;br /&gt;
&lt;br /&gt;
You can also use the longer name for the command:&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage&lt;br /&gt;
&lt;br /&gt;
There is also a version which prints a shorter summary (and which is much faster for large state spaces):&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage_summary&lt;br /&gt;
&lt;br /&gt;
=== -cc &amp;lt;Nr&amp;gt; &amp;lt;Nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print and check coverage statistics&lt;br /&gt;
Print coverage statistics and check that the given number of nodes and transitions have been computed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -cc 10 25&lt;br /&gt;
&lt;br /&gt;
=== -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set &amp;lt;PREFERENCE&amp;gt; to &amp;lt;VALUE&amp;gt;. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use --pref instead of -p.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 8000 -p CLPFD TRUE -mc 10000&lt;br /&gt;
&lt;br /&gt;
=== -pref_group &amp;lt;PREFGROUP&amp;gt; &amp;lt;SETTING&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set to the group of preferences &amp;lt;PREFGROUP&amp;gt; to a predefined setting &amp;lt;SETTING&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pref_group model_check unlimited&lt;br /&gt;
&lt;br /&gt;
Available groups and settings are:&lt;br /&gt;
&lt;br /&gt;
* PREFERENCE GROUP integer : SETTINGS [int32] : Values for MAXINT and MININT&lt;br /&gt;
* PREFERENCE GROUP time_out : SETTINGS [disable_time_out] : To disable TIME_OUT&lt;br /&gt;
* PREFERENCE GROUP model_check : SETTINGS [disable_max,unlimited] : Model Checking Limits&lt;br /&gt;
* PREFERENCE GROUP dot_colors : SETTINGS [classic,dreams,winter] : Colours for Dot graphs&lt;br /&gt;
&lt;br /&gt;
=== -prefs &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set preferences from preference file &amp;lt;FILE&amp;gt;. The file should be created by the Tcl/Tk version of ProB; this version automatically creates a file called ProB_Preferences.pl. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -prefs ProB_Preferences.pl&lt;br /&gt;
&lt;br /&gt;
=== -card &amp;lt;GS&amp;gt; &amp;lt;VAL&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set cardinality (scope in Alloy terminology) of a B deferred set. This overrides the default cardinality (which can be set using &amp;lt;tt&amp;gt;-p DEFAULT_SETSIZE &amp;lt;VAL&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -card PID 5&lt;br /&gt;
&lt;br /&gt;
=== -goal &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set GOAL predicate for model checker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -goal &amp;quot;n=18&amp;quot;  -strict -expcterr goal_found&lt;br /&gt;
&lt;br /&gt;
=== -scope &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set SCOPE predicate for model checker; states which do not satisfy the SCOPE predicate will be ignored (invariant will not be checked and no outgoing transitions will be computed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -scope &amp;quot;n&amp;lt;18&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
=== -s &amp;lt;PORT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on given port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ss ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on port 9000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on some free port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sptxt &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants and variables to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the values of constants and variables to a text file in classical B syntax.&lt;br /&gt;
The -sptxt command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
The values are fully written out (some sets, e.g., infinite sets may be written out symbolically).&lt;br /&gt;
&lt;br /&gt;
See also the -his command.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -sptxt state.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
This will write the values of all variables and constants to the file state.txt after animating the machine 5 steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -cache &amp;lt;DIRECTORY&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants (and in future also variables) to a file to avoid recomputation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This commands saves the values of constants for the current B machine and puts those values into files in the specified directory. The command will also tell ProB to try and reuse constants saved for subsidiary machines (included using SEES for example) whenever possible.&lt;br /&gt;
The purpose of the command is to avoid recomputing constants as much as possible, as this can be very time consuming.&lt;br /&gt;
This also works for values of variables computed in the initialisation or even using operations.&lt;br /&gt;
However, we do not support refinements at the moment.&lt;br /&gt;
&lt;br /&gt;
Note: this command can also be used when starting up the ProB Tcl/Tk version.&lt;br /&gt;
&lt;br /&gt;
=== -logxml &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities and results of probcli in XML format in &amp;lt;LogFile&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A schema declaration file (xsd) can be found at &amp;lt;tt&amp;gt;doc/logxml_xsd.xml&amp;lt;/tt&amp;gt; in the ProB [[Download#Sourcecode|Prolog sources]].&lt;br /&gt;
The log file contains information about the various commands performed by probcli.&lt;br /&gt;
It also contains version information, the parameters provided to probcli and details about the errors that occured.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -logxml log.xml&lt;br /&gt;
&lt;br /&gt;
=== -logxml_write_vars &amp;lt;PREFIX&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| after processing other commands (such as -execute) write values of variables having prefix PREFIX in their name into the XML log file (if XML logging has been activated using the -logxml command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 1000 -logxml log.xml -logxml_write_vars out&lt;br /&gt;
&lt;br /&gt;
=== -l &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in &amp;lt;LogFile&amp;gt; using Prolog format&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -l my.log&lt;br /&gt;
&lt;br /&gt;
=== -ll ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in /tmp/prob_cli_debug.log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -ll&lt;br /&gt;
&lt;br /&gt;
=== -lg &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| analyse &amp;lt;LogFile&amp;gt; using gnuplot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -pp &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pp my_pp.mch&lt;br /&gt;
&lt;br /&gt;
=== -ppf &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;, force printing of all type infos&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ppf my_ppf.mch&lt;br /&gt;
&lt;br /&gt;
=== -v ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set ProB into verbose mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -v&lt;br /&gt;
&lt;br /&gt;
=== -version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an alternate command called -svers which just prints the version number of ProB.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -version&lt;br /&gt;
 ProB Command Line Interface&lt;br /&gt;
   VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
   $LastChangedDate: 2011-11-16 18:36:18 +0100 (Wed, 16 Nov 2011) $&lt;br /&gt;
   Prolog: SICStus 4.2.0 (x86_64-darwin-10.6.0): Mon Mar  7 20:03:36 CET 2011&lt;br /&gt;
   Application Path: /Users/leuschel/svn_root/NewProB&lt;br /&gt;
&lt;br /&gt;
 probcli -svers&lt;br /&gt;
 VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;probcli -version -v&amp;lt;/tt&amp;gt; to obtain more information about your version of probcli.&lt;br /&gt;
&lt;br /&gt;
=== -check_java_version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check Java and B parser version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This command is available as of ProB version 1.5.1-beta5 or higher. It can be useful to check that your Java is correctly installed and that the ProB B parser can operate correctly&lt;br /&gt;
&lt;br /&gt;
 probcli -check_java_version&lt;br /&gt;
 Result of checking Java version:&lt;br /&gt;
  Java is correctly installed and version 1.7.0_55-b13 is compatible with ProB requirements (&amp;gt;= 1.7).&lt;br /&gt;
  ProB B Java Parser available in version: 2016-02-25 15:27:18.55.&lt;br /&gt;
&lt;br /&gt;
=== -assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check ASSERTIONS of your machine&lt;br /&gt;
&lt;br /&gt;
If you provide the -t switch, the ASSERTIONS will be checked after executing your trace. Otherwise, they will be checked in an initial state.&lt;br /&gt;
ProB will automatically initialize the machine if you have not provide the -init or -t switch.&lt;br /&gt;
&lt;br /&gt;
You can also use -main_assertions to check only the ASSERTIONS found in the main file.&lt;br /&gt;
&lt;br /&gt;
If your ASSERTIONS are all static (i.e., make no reference to variables), then ProB will remove all CONSTANTS and PROPERTIES from your machine which are not linked (directly or indirectly) to the ASSERTIONS.&lt;br /&gt;
This optimization will only be made if you provide no other switch, such as -mc or -animate which may require the computation of the variables.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -assertions&lt;br /&gt;
&lt;br /&gt;
=== -property ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| virtually add predicate to PROPERTIES&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -property &amp;quot;PRED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -properties ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check PROPERTIES&lt;br /&gt;
Note: you should probably first initialise the machine (e.g., with -init).&lt;br /&gt;
If the constants have not yet been set up, probcli will debug the properties.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties&lt;br /&gt;
&lt;br /&gt;
=== -dot_output &amp;lt;PATH&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| define path for generation of dot files for false properties or assertions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This option is applicable to -properties and -assertions. It will result in individual dot files being generated for every false or unknown property or assertion. Assertions are numbered A0,A1,... and properties P0,P1,... You can also force to generate dot files for all properties (i.e., also the true ones) using the -dot_all command-line flag.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties -dot_output somewhere/&lt;br /&gt;
&lt;br /&gt;
This will generate files somewhere/my_P0_false.dot, somewhere/my_P1_false.dot, ...&lt;br /&gt;
&lt;br /&gt;
=== -rc ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| runtime checking of types/pre-/post-conditions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlfile &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL formulas in file &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlassertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL assertions (in DEFINITIONS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltllimit &amp;lt;LIMIT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| explore at most &amp;lt;LIMIT&amp;gt; states when model-checking LTL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -save &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save state space for later refinement check&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch --model_check -save my_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -refchk &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space (e.g. using -save)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -refchk abs_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -ref_check &amp;lt;MODE&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space using provide&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
MODE is one of F, FD, T, R, RD, V, VD.&lt;br /&gt;
Default used by -refchck command above is T (traces model).&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ref_check F abstract_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Generate test cases for the given specification. Each test case consists of a sequence of operations resp. events (a so-called trace) that&lt;br /&gt;
* start in a state after an initialisation&lt;br /&gt;
* contain a requested operation/event&lt;br /&gt;
* end in a state where the &amp;lt;EndPredicate&amp;gt; is fulfilled&lt;br /&gt;
&lt;br /&gt;
The user can specify what requested operations/events are with the&lt;br /&gt;
option [[#-mcm_cover &amp;lt;Operation(s)&amp;gt;|-mcm_cover]].&lt;br /&gt;
&lt;br /&gt;
ProB uses a &amp;quot;breadth-first&amp;quot; approach to search for test cases. When all requested operations/events are covered by test cases within maximum length M, the algorithm will explore the complete state space with that maximum distance M from the initialisation. It outputs all found traces that satisfy the requirements above.&lt;br /&gt;
&lt;br /&gt;
The algorithm stops if either&lt;br /&gt;
* it has covered all required operations/events with the current search depth&lt;br /&gt;
* or it has reached the maximum search depth or maximum number of explored states.&lt;br /&gt;
&lt;br /&gt;
The required parameters are:&lt;br /&gt;
;Depth&lt;br /&gt;
: The maximum length of traces that the algorithm searches for test until it stops without covering all required operations/events.&lt;br /&gt;
;MaxStates&lt;br /&gt;
: The maximum number of explored states until the algorithm stops without covering all required operations/events.&lt;br /&gt;
;EndPredicate&lt;br /&gt;
: A predicate in B syntax that the last state of a trace must fulfil. If you do not have any restrictions on that state, use a trivially true predicate like &#039;&#039;&#039;1=1&#039;&#039;&#039;&lt;br /&gt;
;FILE&lt;br /&gt;
: The found test cases a written to the XML file &amp;lt;FILE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mcm_tests 10 2000 &amp;quot;EndStateVar=TRUE&amp;quot; testcases.xml -mcm_cover op1,op2&lt;br /&gt;
&lt;br /&gt;
generates test cases for the operations &#039;&#039;&#039;op1&#039;&#039;&#039; and &#039;&#039;&#039;op2&#039;&#039;&#039; of the specification &#039;&#039;&#039;my.mch&#039;&#039;&#039;. The maximum length of traces is 10, at most 2000 states are explored. Each test case ends in a state where the predicate &#039;&#039;&#039;EndStateVar=TRUE&#039;&#039;&#039; holds. The found test cases are written to a file &#039;&#039;&#039;testcases.xml&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of version 1.6.0, the operation arguments are also written to the XML file.&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;INTERNAL_ARGUMENT_PREFIX&amp;lt;/tt&amp;gt; can be used to provide a prefix for internal operation arguments; any argument/parameter whose name starts with that prefix is considered an internal parameter and not shown in the trace file.&lt;br /&gt;
Also, as of version 1.6.0, the non-deterministic initialisations are shown in the XML trace file: all variables and constants where more than one possible initialisation exists are written into the trace file, as argument of an INITIALISATION event.&lt;br /&gt;
&lt;br /&gt;
=== -mcm_cover &amp;lt;Operation(s)&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Specify an operation or event that should be covered when generating test cases with the &#039;&#039;&#039;-mcm_test&#039;&#039;&#039; option. Multiple operations/events can be specified by seperating them by comma or by using &#039;&#039;&#039;-mcm_cover&#039;&#039;&#039; several times.&lt;br /&gt;
&lt;br /&gt;
See [[#-mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt;|-mcm-tests]] for further details.&lt;br /&gt;
&lt;br /&gt;
=== -spdot &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Write graph of the state space to a dot &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 100 -spdot my_statespace.dot&lt;br /&gt;
&lt;br /&gt;
=== -cbc_tests &amp;lt;Depth&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;File&amp;gt; ===&lt;br /&gt;
Generate test cases by constraint solving with maximum&lt;br /&gt;
length &#039;&#039;&#039;Depth&#039;&#039;&#039;, the last state satisfies &#039;&#039;&#039;EndPredicate&#039;&#039;&#039;&lt;br /&gt;
and the test cases are written to &#039;&#039;&#039;File&#039;&#039;&#039;. If the predicate is the empty string we assume truth. If the filename is the empty string no file is generated. See also the page on [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -cbc_cover &amp;lt;Operation&amp;gt; ===&lt;br /&gt;
When generating CB test cases, &#039;&#039;&#039;Operation&#039;&#039;&#039; should be covered.&lt;br /&gt;
The option can be given multiple times to specify several operations.&lt;br /&gt;
Alternatively, multiple operations can be separated by a comma. You can also use the option &amp;lt;pre&amp;gt;-cbc_cover_match PartialName&amp;lt;/pre&amp;gt; to match all operations whose name contains PartialName. See also the page about [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -test_description &amp;lt;File&amp;gt; ===&lt;br /&gt;
Read the options for constraint based test case generation from &#039;&#039;&#039;File&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== -bmc &amp;lt;Depth&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Run the [[Bounded_Model_Checking|bounded model checker]] until maximum trace depth &amp;lt;Depth&amp;gt; specified. Looks for invariant violations using the constraint-based test case generation algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -bmc 20&lt;br /&gt;
&lt;br /&gt;
=== -csp-guide &amp;lt;File&amp;gt; ===&lt;br /&gt;
Use the CSP File &#039;&#039;&#039;File&#039;&#039;&#039; to guide the B Machine (&amp;quot;CSP||B&amp;quot;).&lt;br /&gt;
(This feature is included since version 1.3.5-beta7.)&lt;br /&gt;
As of version 1.15.1 you can also specify a &amp;lt;tt&amp;gt;CSP_GUIDE_FILE&amp;lt;/tt&amp;gt;&lt;br /&gt;
DEFINITION (which also works in ProB2-UI).&lt;br /&gt;
&lt;br /&gt;
=== -rule_report &amp;lt;File&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Generates rule validation report for rules machines (.rmch) at the specified location &amp;lt;File&amp;gt; for the current animation state. Depending on the file extension an HTML or an XML version of the report is generated (.html/.xml).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.rmch -execute_all -rule_report my_report.html&lt;br /&gt;
&lt;br /&gt;
=== -machine_files_sha ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Computes SHA1 hash of all B files used by a B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.mch -machine_files_sha&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -check_machine_file_sha ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Compute and check SHA1 hash of a particular B file used by the main B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
probcli ./Demo/scheduler.mch -check_machine_file_sha scheduler.mch 1cab7ec89adc9f9b153af85c1ae16ba8a7a2a661&lt;br /&gt;
&lt;br /&gt;
== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
Set NO_COLOR environment variable to disable terminal colors.&lt;br /&gt;
See [https://no-color.org https://no-color.org].&lt;br /&gt;
&lt;br /&gt;
== Preferences ==&lt;br /&gt;
&lt;br /&gt;
You can use these preferences within the command:&lt;br /&gt;
&lt;br /&gt;
 -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;PREFERENCE&amp;gt;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;VALUE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| MAXINT&lt;br /&gt;
| nat ==&amp;gt; MaxInt, used for expressions such as xx::NAT (2147483647 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| MININT&lt;br /&gt;
| neg ==&amp;gt; MinInt, used for expressions such as xx::INT (-2147483648 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SETSIZE&lt;br /&gt;
| nat ==&amp;gt; Size of unspecified deferred sets in SETS section. Will be used if a set s is neither enumerated, has no no card(s)=nr predicate in the PROPERTIES and has no scope_s == Nr DEFINITION.&lt;br /&gt;
|-&lt;br /&gt;
| MAX_INITIALISATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Initialisations and ways to setup constants computed&lt;br /&gt;
|-&lt;br /&gt;
| MAX_OPERATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Enablings per Operation Computed&lt;br /&gt;
|-&lt;br /&gt;
| ANIMATE_SKIP_OPERATIONS&lt;br /&gt;
| bool ==&amp;gt; Animate operations which are skip or PRE C THEN skip&lt;br /&gt;
|-&lt;br /&gt;
| COMPRESSION&lt;br /&gt;
| bool ==&amp;gt; Use more aggressive COMPRESSION when storing states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_CLOSURES_FOR_STATE&lt;br /&gt;
| bool ==&amp;gt; Convert lazy form back into explicit form for Variables, Constants, Operation Arguments. ProB will sometimes try to keep certain sets symbolic. If this preference is TRUE then ProB will try to expand those sets for variables and constants after an operation has been executed.&lt;br /&gt;
|-&lt;br /&gt;
| SYMBOLIC&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of lambdas and set comprehensions. By default ProB will keep certain sets symbolic (e.g., sets it knows are infinite). When this preference is set to TRUE then all set comprehensions and lambda abstractions will at first be kept symbolic and only expanded into explicit form if needed.&lt;br /&gt;
|-&lt;br /&gt;
| CLPFD&lt;br /&gt;
| bool ==&amp;gt; Use CLP(FD) solver for B integers (restricts range to -2^28..2^28-1 on 32 bit computers). Setting this preference to TRUE should substantially improve ProB&#039;s ability to solve complicated predicates involving integers. However, it may cause CLP(FD) overflows in certain circumstances.&lt;br /&gt;
|-&lt;br /&gt;
| SMT&lt;br /&gt;
| bool ==&amp;gt; Enable SMT-Mode (aggressive treatment of : and /: inside predicates). With this predicate set to TRUE ProB will be better at solving certain constraint solving tasks. It should be enabled when doing constraint-based invariant or deadlock checking. ProB Tcl/Tk will turn this preference on automatically for those checks.&lt;br /&gt;
|-&lt;br /&gt;
| STATIC_ORDERING&lt;br /&gt;
| bool ==&amp;gt; Use static ordering to enumerate constants which occur in most PROPERTIES first&lt;br /&gt;
|-&lt;br /&gt;
| SYMMETRY_MODE&lt;br /&gt;
| [off,flood,nauty,hash] ==&amp;gt; Symmetry Mode: off,flood,canon,nauty,hash&lt;br /&gt;
|-&lt;br /&gt;
| TIME_OUT&lt;br /&gt;
| nat1 ==&amp;gt; Time out for computing enabled transitions (in ms, is multiplied by a factor for other computations)&lt;br /&gt;
|-&lt;br /&gt;
| PROOF_INFO&lt;br /&gt;
| bool ==&amp;gt; Use Proof Information to restrict invariant checking to affected unproven clauses. Most useful in EventB for models exported from Rodin.&lt;br /&gt;
|-&lt;br /&gt;
| TRY_FIND_ABORT&lt;br /&gt;
| bool ==&amp;gt; Try more aggressively to detect ill-defined expressions (e.g. applying function outside of domain), may slow down animator&lt;br /&gt;
|-&lt;br /&gt;
| NUMBER_OF_ANIMATED_ABSTRACTIONS&lt;br /&gt;
| nat ==&amp;gt; How many levels of refined models are animated by default&lt;br /&gt;
|-&lt;br /&gt;
| ALLOW_INCOMPLETE_SETUP_CONSTANTS&lt;br /&gt;
| bool ==&amp;gt; Allow ProB to proceed even if only part of the CONSTANTS have been found.&lt;br /&gt;
|-&lt;br /&gt;
| PARTITION_PROPERTIES&lt;br /&gt;
| bool ==&amp;gt; Partition predicates (PROPERTIES) into components&lt;br /&gt;
|-&lt;br /&gt;
| USE_RECORD_CONSTRUCTION&lt;br /&gt;
| bool ==&amp;gt; Records: Check if axioms/properties describe a record pattern&lt;br /&gt;
|-&lt;br /&gt;
| OPERATION_REUSE&lt;br /&gt;
| bool ==&amp;gt; Try and reuse previously computed operation effects in B/Event-B&lt;br /&gt;
|-&lt;br /&gt;
| SHOW_EVENTB_ANY_VALUES&lt;br /&gt;
| bool ==&amp;gt; Show top-level ANY variable values of B Operations without parameters as parameters&lt;br /&gt;
|-&lt;br /&gt;
| RANDOMISE_OPERATION_ORDER&lt;br /&gt;
| bool ==&amp;gt; Randomise order of operations when computing successor states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_FORALL_UPTO&lt;br /&gt;
| nat ==&amp;gt; When analysing predicates: max. domain size for expansion of forall (use 0 to disable expansion)&lt;br /&gt;
|-&lt;br /&gt;
| MAX_DISPLAY_SET&lt;br /&gt;
| int ==&amp;gt; Max size for pretty-printing sets (-1 means no limit)&lt;br /&gt;
|-&lt;br /&gt;
| CSP_STRIP_SOURCE_LOC&lt;br /&gt;
| bool ==&amp;gt; Strip source location for CSP; will speed up model checking&lt;br /&gt;
|-&lt;br /&gt;
| WARN_WHEN_EXPANDING_INFINITE_CLOSURES&lt;br /&gt;
| int ==&amp;gt; Warn when expanding infinite closures if MAXINT larger than:&lt;br /&gt;
|-&lt;br /&gt;
| TRACE_INFO&lt;br /&gt;
| bool ==&amp;gt; Provide various tracing information on the terminal/console.&lt;br /&gt;
|-&lt;br /&gt;
| DOUBLE_EVALUATION&lt;br /&gt;
| bool ==&amp;gt; Evaluate PREDICATES positively and negatively when analyzing assertions or properties&lt;br /&gt;
|-&lt;br /&gt;
| RECURSIVE&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of *Recursive* set Comprehensions and lambdas&lt;br /&gt;
|-&lt;br /&gt;
| IGNORE_HASH_COLLISIONS&lt;br /&gt;
| bool ==&amp;gt; Ignore Hash Collisions (if true not all states may be computed, visited states are not memorised !)&lt;br /&gt;
|-&lt;br /&gt;
| FORGET_STATE_SPACE&lt;br /&gt;
| bool ==&amp;gt; Do not remember state space (mainly useful in conjunction with Ignore Hash Collisions)&lt;br /&gt;
|-&lt;br /&gt;
| NEGATED_INVARIANT_CHECKING&lt;br /&gt;
| bool ==&amp;gt; Perform double evaluation (positive and negative) when checking invariants&lt;br /&gt;
|-&lt;br /&gt;
| CSE&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination&lt;br /&gt;
|-&lt;br /&gt;
| CSE_SUBST&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination also for B substitutions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 5000 -p CLPFD TRUE -p SYMMETRY_MODE hash -mc 1000&lt;br /&gt;
&lt;br /&gt;
== Some probcli examples ==&lt;br /&gt;
&lt;br /&gt;
To load a file My.mch, setup the constants and initialize it do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init My.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To load a file M.mch, setup the constants, initialize and then check all assertions with Atelier-B&#039;s default values for MININT and MAXINT and an increased timeout of 5 seconds do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init -assertions -p MAXINT 2147483647 -p MININT -2147483647 -p TIME_OUT 5000 M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fully model check a specification M.mch while tryining to minimize memory consumption do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -model_check -p COMPRESSION TRUE M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To model check a specification M.mch while trying to minimize memory consumption further by not storing processed stats and using symmetry reduction (and accepting hash collisions) do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -p COMPRESSION -p IGNORE_HASH_COLLISIONS TRUE -p FORGET_STATE_SPACE TRUE -p SYMMETRY_MODE hash -model_check M.mch &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command-line Arguments for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
Note that the stand-alone Tcl/Tk version also supports a limited form of command-line preferences:&lt;br /&gt;
* &#039;&#039;&#039;FILE&#039;&#039;&#039; (the name/path of the file to be loaded)&lt;br /&gt;
* &#039;&#039;&#039;-prefs PREF_FILE&#039;&#039;&#039;  (to use a specific preferences file, rather than the default ProB_Preferences.pl in your home folder)&lt;br /&gt;
* &#039;&#039;&#039;-batch&#039;&#039;&#039; (to instruct ProB not to try to bring up windows, but to print information only to the terminal)&lt;br /&gt;
* &#039;&#039;&#039;-selfcheck&#039;&#039;&#039; (to run the standard unit tests)&lt;br /&gt;
* &#039;&#039;&#039;-t&#039;&#039;&#039; (to perform the Trace Check on the default trace file associated with the specification)&lt;br /&gt;
* &#039;&#039;&#039;-tcl TCL_Command&#039;&#039;&#039; (to run a particular pre-defined Tcl command)&lt;br /&gt;
* &#039;&#039;&#039;-mc&#039;&#039;&#039; (to perform model checking)&lt;br /&gt;
* &#039;&#039;&#039;-c&#039;&#039;&#039; (to compute the coverage)&lt;br /&gt;
* &#039;&#039;&#039;-ref&#039;&#039;&#039; (to perform the default trace refinment check)&lt;br /&gt;
&lt;br /&gt;
However, the comand-line version of ProB, called &#039;&#039;&#039;probcli&#039;&#039;&#039;, provides more features. It also does not depend on Tcl/Tk and can therefore be run on systems without Tcl/Tk.&lt;br /&gt;
{{Feedback}}&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6056</id>
		<title>Using the Command-Line Version of ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6056"/>
		<updated>2025-12-24T07:23:36Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* -save  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorial]]&lt;br /&gt;
[[Category:User Manual]]&lt;br /&gt;
[[Category:ProB Cli]]&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB, called &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt;, offers many of the features of the standalone Tcl/Tk Version via the command-line. As such, you can run ProB from your shell scripts or in your Makefiles.&lt;br /&gt;
These pages refer to version 1.6 of ProB. Some features are only available in the nightly build of ProB. You can run &amp;lt;tt&amp;gt;probcli –help&amp;lt;/tt&amp;gt; to find out which commands are supported by your version of ProB. For Bash users we provide [[Bash Completion|command completion]] support.&lt;br /&gt;
&lt;br /&gt;
Note: the order of commands is not relevant for &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; (except within groups of commands such as &amp;lt;tt&amp;gt;-p MAXINT 127&amp;lt;/tt&amp;gt;). Any argument that is not recognised by &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; is treated as a filename to be analysed.&lt;br /&gt;
&lt;br /&gt;
[[file:ProBTerminalizerDemo.gif|center||600px]]&lt;br /&gt;
&lt;br /&gt;
== Conventions used ==&lt;br /&gt;
&lt;br /&gt;
The following conventions are used in this guide:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;replaceme&amp;gt;&lt;br /&gt;
| All values that should be replaced with some value are shown withing &amp;lt; &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | line breaks&lt;br /&gt;
| Command synopsis for command may be broken up on several lines. When typing commands enter all option on the same line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;probcli [--help]&lt;br /&gt;
&amp;lt;filename&amp;gt; [ &amp;lt;options&amp;gt; ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore within all options can as of version 1.5.1-beta7 be replaced with dashes. Also, all commands can either be typed with single leading dashes or double leading dashes.&lt;br /&gt;
For example, all of the following commands have the same effect:&lt;br /&gt;
 probcli M.mch -model_check&lt;br /&gt;
 probcli M.mch -model-check&lt;br /&gt;
 probcli M.mch --model_check&lt;br /&gt;
 probcli M.mch --model-check&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== -mc &amp;lt;nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| model check; checking at most &amp;lt;nr&amp;gt; states&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 100&lt;br /&gt;
&lt;br /&gt;
Note: with a value of nr=1 ProB will only inspect the &amp;quot;virtual&amp;quot; root node (and compute its outgoing transitions).&lt;br /&gt;
Also see the related options &amp;lt;tt&amp;gt;-nodead, -noinv, -nogoal, -noass&amp;lt;/tt&amp;gt; to influence which kinds of errors are reported by &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set a target goal predicate using the &amp;lt;tt&amp;gt;-goal &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command and limit the scope of the model checking using the &amp;lt;tt&amp;gt;-scope &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
=== -model_check ===&lt;br /&gt;
&lt;br /&gt;
The same as &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt; but without a limit on the number of nodes checked.&lt;br /&gt;
ProB will run until the entire state space is explored.&lt;br /&gt;
&lt;br /&gt;
=== -no&amp;lt;x&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| restrict errors reported by model checking (-mc), TLC model checking (-mc_with_tlc), animation (-animate) and execution (-execute) with &amp;lt;x&amp;gt;=dead,inv,goal,ass&lt;br /&gt;
* -nodead : do not report deadlocks&lt;br /&gt;
* -noinv : do not report invariant violations&lt;br /&gt;
* -nogoal : do not stop if a state satisfying the GOAL predicate has been found&lt;br /&gt;
* -noass : do not report assertion violations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 1000 -nodead -nogoal&lt;br /&gt;
&lt;br /&gt;
=== -disable_timeout ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| turn off ProB&#039;s timeout mechanism, e.g., for computing enabled operations and invariant checking; this can sometimes speed up model checking (-mc or -model_check) and animation (-animate). Available as of version 1.5.1-beta7.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model-check -disable-timeout&lt;br /&gt;
&lt;br /&gt;
=== -bf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed breadth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -bf -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -df ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed depth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -df -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -mc_mode &amp;lt;M&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| influence how the model checker proceeds. Available as of version 1.5.1. Supersedes the &amp;lt;tt&amp;gt;-df&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; switches.&lt;br /&gt;
Possible values for the mode &amp;lt;M&amp;gt; are: &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt; (depth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;bf&amp;lt;/tt&amp;gt; (breadth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;mixed&amp;lt;/tt&amp;gt; (mixed depth-first / breadth-first traversal with random choice; currently the default),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt; (choosing next node to process completely at random), &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; (similar to random, but uses the Prolog hash function of a node instead of a random number generator),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt; (try and use &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; provided by user in &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause). Some explanations can be found [[Blocks_World_(Directed_Model_Checking)|in an example about directed model checking]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;out_degree_hash&amp;lt;/tt&amp;gt; (prioritise nodes with fewer outgoing transitions; mainly useful for deadlock checking)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
=== --timeout &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Global timeout in ms for model checking and refinement checking. &lt;br /&gt;
This does not influence the timeout used for computing individual transitions/operations.&lt;br /&gt;
This has to be set with the -p TIME_OUT &amp;lt;N&amp;gt;. Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference also influences other computations, such as invariant checking or static assertion checking, where it is multiplied by a factor. See the description of the -p option.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -timeout 10000&lt;br /&gt;
&lt;br /&gt;
=== -t ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| trace check (associated .trace file must exist)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t&lt;br /&gt;
&lt;br /&gt;
=== -trace_replay &amp;lt;KIND&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Replay a trace file in the given format (json,prolog,B).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
KIND is either json, prolog, B. The old ProB format is prolog. The trace files generated by ProB2-UI are json (with .prob2trace extension). The B format consists of a sequence of B operation calls.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -trace_replay json my.prob2trace&lt;br /&gt;
&lt;br /&gt;
Alternative command -det_trace_replay KIND FILE.&lt;br /&gt;
&lt;br /&gt;
=== -init ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| initialise specification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init&lt;br /&gt;
 nr_of_components(1)&lt;br /&gt;
 % checking_component_properties(1,[])&lt;br /&gt;
 % enumerating_constants_without_constraints([typedval(fd(_24428,ID),global(ID),iv)])&lt;br /&gt;
 % grounding_wait_flags&lt;br /&gt;
 grounding_component(1)&lt;br /&gt;
 grounding_component(2)&lt;br /&gt;
 % found_enumeration_of_constants(0,2)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,2))&lt;br /&gt;
 % found_enumeration_of_constants(0,1)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,1))&lt;br /&gt;
 &amp;lt;- 0: SETUP_CONSTANTS :: root&lt;br /&gt;
 % Could not set up constants with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation of constants.&lt;br /&gt;
  | 0: SETUP_CONSTANTS success --&amp;gt;0&lt;br /&gt;
  - &amp;lt;- 1: INITIALISATION :: 0&lt;br /&gt;
 % Could not initialise with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation.&lt;br /&gt;
 ALL OPERATIONS COVERED&lt;br /&gt;
  -  | 1: INITIALISATION success --&amp;gt;2&lt;br /&gt;
  -  - SUCCESS&lt;br /&gt;
&lt;br /&gt;
=== -cbc &amp;lt;OPNAME&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| constraint-based invariant checking for an operation (also use &amp;lt;OPNAME&amp;gt;=all)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -cbc all&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Perform constraint-based deadlock checking (also use -cbc_deadlock_pred PRED)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This will try to find a state which satisfies the invariant and properties and where no operation/event is enabled.&lt;br /&gt;
Note: if ProB finds a counter example then the machine cannot be proven to be deadlock free. However, the particular state may not be reachable from the initial state(s). If you want to find a reachable deadlock you have to use the model checker.&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock_pred &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based deadlock finding given a predicate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is like -cbc_deadlock but you provide an additional predicate. ProB will only find deadlocks which also make this predicate true.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_deadlock_pred &amp;quot;n=15&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -cbc_assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based checking of assertions on constants&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants which make an assertion (on constants) false.&lt;br /&gt;
&lt;br /&gt;
You can use the extra command &amp;lt;tt&amp;gt;-cbc_output_file FILE&amp;lt;/tt&amp;gt; to write the result of this check to a file.&lt;br /&gt;
You can also use the extra command &amp;lt;tt&amp;gt;-cbc_option contradiction_check&amp;lt;/tt&amp;gt; to ask ProB to check if there is a contradiction in the properties (in case the check did not find a counter-example to the assertions). The extra command &amp;lt;tt&amp;gt;-cbc_option unsat_core&amp;lt;/tt&amp;gt; tells ProB to compute the unsatisfiable core in case a proof the assertions was found.&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference is multiplied by 10 for this command.&lt;br /&gt;
&lt;br /&gt;
There are various variations of this command:&lt;br /&gt;
 -cbc_assertions_proof&lt;br /&gt;
 -cbc_assertions_tautology_proof &lt;br /&gt;
Both commands do not allow enumeration warnings to occur.&lt;br /&gt;
The latter command  ignores the PROPERTIES and tries to check whether the ASSERTION(s) are tautologies.&lt;br /&gt;
Both commands can be useful to use ProB as a Prover/Disprover (as is done in Atelier-B 4.3).&lt;br /&gt;
&lt;br /&gt;
=== -cbc_sequence &amp;lt;SEQ&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based searching for a sequence of operation names (separated by semicolons)&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants, initial variable values and parameters which make execution of the given sequence of operations possible.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_sequence &amp;quot;op1;op2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -strict ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| raise error and stop probcli if anything unexpected happens, e.g., if model checking finds a counter example or trace checking fails or any unexpected error happens&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t -strict&lt;br /&gt;
&lt;br /&gt;
=== -expcterr &amp;lt;ERR&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| expect error to occur (&amp;lt;ERR&amp;gt;=cbc,mc,ltl,...)&lt;br /&gt;
Tell ProB that you expect a certain error to occur. Mainly useful for regression tests (in conjunction with the -strict option).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli examples/B/Benchmarks/CarlaTravelAgencyErr.mch -mc 1000 -expcterr invariant_violation -strict&lt;br /&gt;
&lt;br /&gt;
=== -animate &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| random animation (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Animates the machine randomly, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100&lt;br /&gt;
&lt;br /&gt;
Variations&lt;br /&gt;
  -animate_all : animate until deadlock reached&lt;br /&gt;
  -animate_until_ltl P : animate until LTL property holds on trace&lt;br /&gt;
  -animate_until_ltl_state_property P : animate until current state satisifes LTL state property&lt;br /&gt;
&lt;br /&gt;
=== -execute &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| execution (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Executes the &amp;quot;first&amp;quot; enabled operation of a machine, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
In contrast to -animate, -execute will&lt;br /&gt;
* always choose the first enabled operation it finds and stop searching for further enabled operations in that state (-animate will compute all enabled operations up to the limit set by the &amp;lt;tt&amp;gt;MAX_OPERATIONS&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MAX_INITIALISATIONS&amp;lt;/tt&amp;gt; preference and then choose randomly); the order of operations in the B machine is thus important for -execute&lt;br /&gt;
* not store intermediate states in the state space; as such -execute is faster but after execution one only has access to the first state and the final state of execution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 100&lt;br /&gt;
&lt;br /&gt;
=== -execute_all===&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;tt&amp;gt;-execute &amp;lt;Nr&amp;gt;&amp;lt;/tt&amp;gt; above.&lt;br /&gt;
&lt;br /&gt;
=== -det_check ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if every step of the animation is deterministic (i.e., only one operation is possible, and it can only be executed in one possible way as far as parameters and result is concerned).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100 -det_check&lt;br /&gt;
&lt;br /&gt;
=== -det_constants ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if the SETUP_CONSTANTS step is deterministic (i.e., only one way to set up the constants is possible).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -det_constants&lt;br /&gt;
=== -his &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save animation history to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the animation (or model checking) history to a text file. Operations are separated by semicolons.&lt;br /&gt;
The output can be adapted using the -his_option command. With -his_option show_states the -his command will also write out all states to the file (in the form of comments before and after operations). With -his_option show_init only the initial state is written out.&lt;br /&gt;
The -his command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
See also the -sptxt command to only write the current values of variables and constants to a file.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
Additionally we can have the initialised variables and constants:&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_init supersimple.mch&lt;br /&gt;
&lt;br /&gt;
And we can have in addition the values of the variables in between (and at the end):&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_states supersimple.mch&lt;br /&gt;
&lt;br /&gt;
With -his_option trace_file as only option, probcli will write the history in Prolog format, which can later be used by the -t command.&lt;br /&gt;
&lt;br /&gt;
=== -i ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| interactive animation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After performing the other commands, ProB stays in interactive mode and allows the user to manually animate the loaded specification.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -i&lt;br /&gt;
&lt;br /&gt;
=== -repl ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start interactive read-eval-print-loop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p CLPFD TRUE -repl&lt;br /&gt;
&lt;br /&gt;
A list of commands can be obtained by typing &amp;lt;tt&amp;gt;:help&amp;lt;/tt&amp;gt; (just help for versions 1.3.x of probcli). The interactive read-eval-print-loop can be exited using &amp;lt;tt&amp;gt;:q&amp;lt;/tt&amp;gt; (just typing a return on a blank line for versions 1.3.x of probcli)..&lt;br /&gt;
If in addition you want see a graphical representation of the solutions found you can use the following command and open the &amp;lt;tt&amp;gt;out.dot&amp;lt;/tt&amp;gt; file using dotty or GraphViz:&lt;br /&gt;
 probcli -repl -evaldot ~/out.dot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;lt;tt&amp;gt;-eval&amp;lt;/tt&amp;gt; command to evaluate specific formulas or expressions:&lt;br /&gt;
 probcli -eval &amp;quot;1+2&amp;quot;&lt;br /&gt;
For convenience, these formulas can also be put into a separate file:&lt;br /&gt;
 probcli -eval_file MyFormula.txt&lt;br /&gt;
&lt;br /&gt;
=== -c ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print coverage statistics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -c&lt;br /&gt;
&lt;br /&gt;
You can also use the longer name for the command:&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage&lt;br /&gt;
&lt;br /&gt;
There is also a version which prints a shorter summary (and which is much faster for large state spaces):&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage_summary&lt;br /&gt;
&lt;br /&gt;
=== -cc &amp;lt;Nr&amp;gt; &amp;lt;Nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print and check coverage statistics&lt;br /&gt;
Print coverage statistics and check that the given number of nodes and transitions have been computed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -cc 10 25&lt;br /&gt;
&lt;br /&gt;
=== -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set &amp;lt;PREFERENCE&amp;gt; to &amp;lt;VALUE&amp;gt;. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use --pref instead of -p.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 8000 -p CLPFD TRUE -mc 10000&lt;br /&gt;
&lt;br /&gt;
=== -pref_group &amp;lt;PREFGROUP&amp;gt; &amp;lt;SETTING&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set to the group of preferences &amp;lt;PREFGROUP&amp;gt; to a predefined setting &amp;lt;SETTING&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pref_group model_check unlimited&lt;br /&gt;
&lt;br /&gt;
Available groups and settings are:&lt;br /&gt;
&lt;br /&gt;
* PREFERENCE GROUP integer : SETTINGS [int32] : Values for MAXINT and MININT&lt;br /&gt;
* PREFERENCE GROUP time_out : SETTINGS [disable_time_out] : To disable TIME_OUT&lt;br /&gt;
* PREFERENCE GROUP model_check : SETTINGS [disable_max,unlimited] : Model Checking Limits&lt;br /&gt;
* PREFERENCE GROUP dot_colors : SETTINGS [classic,dreams,winter] : Colours for Dot graphs&lt;br /&gt;
&lt;br /&gt;
=== -prefs &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set preferences from preference file &amp;lt;FILE&amp;gt;. The file should be created by the Tcl/Tk version of ProB; this version automatically creates a file called ProB_Preferences.pl. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -prefs ProB_Preferences.pl&lt;br /&gt;
&lt;br /&gt;
=== -card &amp;lt;GS&amp;gt; &amp;lt;VAL&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set cardinality (scope in Alloy terminology) of a B deferred set. This overrides the default cardinality (which can be set using &amp;lt;tt&amp;gt;-p DEFAULT_SETSIZE &amp;lt;VAL&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -card PID 5&lt;br /&gt;
&lt;br /&gt;
=== -goal &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set GOAL predicate for model checker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -goal &amp;quot;n=18&amp;quot;  -strict -expcterr goal_found&lt;br /&gt;
&lt;br /&gt;
=== -scope &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set SCOPE predicate for model checker; states which do not satisfy the SCOPE predicate will be ignored (invariant will not be checked and no outgoing transitions will be computed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -scope &amp;quot;n&amp;lt;18&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
=== -s &amp;lt;PORT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on given port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ss ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on port 9000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on some free port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sptxt &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants and variables to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the values of constants and variables to a text file in classical B syntax.&lt;br /&gt;
The -sptxt command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
The values are fully written out (some sets, e.g., infinite sets may be written out symbolically).&lt;br /&gt;
&lt;br /&gt;
See also the -his command.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -sptxt state.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
This will write the values of all variables and constants to the file state.txt after animating the machine 5 steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -cache &amp;lt;DIRECTORY&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants (and in future also variables) to a file to avoid recomputation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This commands saves the values of constants for the current B machine and puts those values into files in the specified directory. The command will also tell ProB to try and reuse constants saved for subsidiary machines (included using SEES for example) whenever possible.&lt;br /&gt;
The purpose of the command is to avoid recomputing constants as much as possible, as this can be very time consuming.&lt;br /&gt;
This also works for values of variables computed in the initialisation or even using operations.&lt;br /&gt;
However, we do not support refinements at the moment.&lt;br /&gt;
&lt;br /&gt;
Note: this command can also be used when starting up the ProB Tcl/Tk version.&lt;br /&gt;
&lt;br /&gt;
=== -logxml &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities and results of probcli in XML format in &amp;lt;LogFile&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A schema declaration file (xsd) can be found at &amp;lt;tt&amp;gt;doc/logxml_xsd.xml&amp;lt;/tt&amp;gt; in the ProB [[Download#Sourcecode|Prolog sources]].&lt;br /&gt;
The log file contains information about the various commands performed by probcli.&lt;br /&gt;
It also contains version information, the parameters provided to probcli and details about the errors that occured.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -logxml log.xml&lt;br /&gt;
&lt;br /&gt;
=== -logxml_write_vars &amp;lt;PREFIX&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| after processing other commands (such as -execute) write values of variables having prefix PREFIX in their name into the XML log file (if XML logging has been activated using the -logxml command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 1000 -logxml log.xml -logxml_write_vars out&lt;br /&gt;
&lt;br /&gt;
=== -l &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in &amp;lt;LogFile&amp;gt; using Prolog format&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -l my.log&lt;br /&gt;
&lt;br /&gt;
=== -ll ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in /tmp/prob_cli_debug.log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -ll&lt;br /&gt;
&lt;br /&gt;
=== -lg &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| analyse &amp;lt;LogFile&amp;gt; using gnuplot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -pp &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pp my_pp.mch&lt;br /&gt;
&lt;br /&gt;
=== -ppf &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;, force printing of all type infos&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ppf my_ppf.mch&lt;br /&gt;
&lt;br /&gt;
=== -v ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set ProB into verbose mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -v&lt;br /&gt;
&lt;br /&gt;
=== -version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an alternate command called -svers which just prints the version number of ProB.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -version&lt;br /&gt;
 ProB Command Line Interface&lt;br /&gt;
   VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
   $LastChangedDate: 2011-11-16 18:36:18 +0100 (Wed, 16 Nov 2011) $&lt;br /&gt;
   Prolog: SICStus 4.2.0 (x86_64-darwin-10.6.0): Mon Mar  7 20:03:36 CET 2011&lt;br /&gt;
   Application Path: /Users/leuschel/svn_root/NewProB&lt;br /&gt;
&lt;br /&gt;
 probcli -svers&lt;br /&gt;
 VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;probcli -version -v&amp;lt;/tt&amp;gt; to obtain more information about your version of probcli.&lt;br /&gt;
&lt;br /&gt;
=== -check_java_version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check Java and B parser version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This command is available as of ProB version 1.5.1-beta5 or higher. It can be useful to check that your Java is correctly installed and that the ProB B parser can operate correctly&lt;br /&gt;
&lt;br /&gt;
 probcli -check_java_version&lt;br /&gt;
 Result of checking Java version:&lt;br /&gt;
  Java is correctly installed and version 1.7.0_55-b13 is compatible with ProB requirements (&amp;gt;= 1.7).&lt;br /&gt;
  ProB B Java Parser available in version: 2016-02-25 15:27:18.55.&lt;br /&gt;
&lt;br /&gt;
=== -assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check ASSERTIONS of your machine&lt;br /&gt;
&lt;br /&gt;
If you provide the -t switch, the ASSERTIONS will be checked after executing your trace. Otherwise, they will be checked in an initial state.&lt;br /&gt;
ProB will automatically initialize the machine if you have not provide the -init or -t switch.&lt;br /&gt;
&lt;br /&gt;
You can also use -main_assertions to check only the ASSERTIONS found in the main file.&lt;br /&gt;
&lt;br /&gt;
If your ASSERTIONS are all static (i.e., make no reference to variables), then ProB will remove all CONSTANTS and PROPERTIES from your machine which are not linked (directly or indirectly) to the ASSERTIONS.&lt;br /&gt;
This optimization will only be made if you provide no other switch, such as -mc or -animate which may require the computation of the variables.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -assertions&lt;br /&gt;
&lt;br /&gt;
=== -property ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| virtually add predicate to PROPERTIES&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -property &amp;quot;PRED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -properties ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check PROPERTIES&lt;br /&gt;
Note: you should probably first initialise the machine (e.g., with -init).&lt;br /&gt;
If the constants have not yet been set up, probcli will debug the properties.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties&lt;br /&gt;
&lt;br /&gt;
=== -dot_output &amp;lt;PATH&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| define path for generation of dot files for false properties or assertions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This option is applicable to -properties and -assertions. It will result in individual dot files being generated for every false or unknown property or assertion. Assertions are numbered A0,A1,... and properties P0,P1,... You can also force to generate dot files for all properties (i.e., also the true ones) using the -dot_all command-line flag.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties -dot_output somewhere/&lt;br /&gt;
&lt;br /&gt;
This will generate files somewhere/my_P0_false.dot, somewhere/my_P1_false.dot, ...&lt;br /&gt;
&lt;br /&gt;
=== -rc ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| runtime checking of types/pre-/post-conditions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlfile &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL formulas in file &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlassertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL assertions (in DEFINITIONS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltllimit &amp;lt;LIMIT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| explore at most &amp;lt;LIMIT&amp;gt; states when model-checking LTL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -save &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save state space for later refinement check&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch --model_check -save my_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -refchk &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -refchk abs_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -ref_check &amp;lt;MODE&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space using provide&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
MODE is one of F, FD, T, R, RD, V, VD.&lt;br /&gt;
Default used by -refchck command above is T (traces model).&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ref_check F abstract_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Generate test cases for the given specification. Each test case consists of a sequence of operations resp. events (a so-called trace) that&lt;br /&gt;
* start in a state after an initialisation&lt;br /&gt;
* contain a requested operation/event&lt;br /&gt;
* end in a state where the &amp;lt;EndPredicate&amp;gt; is fulfilled&lt;br /&gt;
&lt;br /&gt;
The user can specify what requested operations/events are with the&lt;br /&gt;
option [[#-mcm_cover &amp;lt;Operation(s)&amp;gt;|-mcm_cover]].&lt;br /&gt;
&lt;br /&gt;
ProB uses a &amp;quot;breadth-first&amp;quot; approach to search for test cases. When all requested operations/events are covered by test cases within maximum length M, the algorithm will explore the complete state space with that maximum distance M from the initialisation. It outputs all found traces that satisfy the requirements above.&lt;br /&gt;
&lt;br /&gt;
The algorithm stops if either&lt;br /&gt;
* it has covered all required operations/events with the current search depth&lt;br /&gt;
* or it has reached the maximum search depth or maximum number of explored states.&lt;br /&gt;
&lt;br /&gt;
The required parameters are:&lt;br /&gt;
;Depth&lt;br /&gt;
: The maximum length of traces that the algorithm searches for test until it stops without covering all required operations/events.&lt;br /&gt;
;MaxStates&lt;br /&gt;
: The maximum number of explored states until the algorithm stops without covering all required operations/events.&lt;br /&gt;
;EndPredicate&lt;br /&gt;
: A predicate in B syntax that the last state of a trace must fulfil. If you do not have any restrictions on that state, use a trivially true predicate like &#039;&#039;&#039;1=1&#039;&#039;&#039;&lt;br /&gt;
;FILE&lt;br /&gt;
: The found test cases a written to the XML file &amp;lt;FILE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mcm_tests 10 2000 &amp;quot;EndStateVar=TRUE&amp;quot; testcases.xml -mcm_cover op1,op2&lt;br /&gt;
&lt;br /&gt;
generates test cases for the operations &#039;&#039;&#039;op1&#039;&#039;&#039; and &#039;&#039;&#039;op2&#039;&#039;&#039; of the specification &#039;&#039;&#039;my.mch&#039;&#039;&#039;. The maximum length of traces is 10, at most 2000 states are explored. Each test case ends in a state where the predicate &#039;&#039;&#039;EndStateVar=TRUE&#039;&#039;&#039; holds. The found test cases are written to a file &#039;&#039;&#039;testcases.xml&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of version 1.6.0, the operation arguments are also written to the XML file.&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;INTERNAL_ARGUMENT_PREFIX&amp;lt;/tt&amp;gt; can be used to provide a prefix for internal operation arguments; any argument/parameter whose name starts with that prefix is considered an internal parameter and not shown in the trace file.&lt;br /&gt;
Also, as of version 1.6.0, the non-deterministic initialisations are shown in the XML trace file: all variables and constants where more than one possible initialisation exists are written into the trace file, as argument of an INITIALISATION event.&lt;br /&gt;
&lt;br /&gt;
=== -mcm_cover &amp;lt;Operation(s)&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Specify an operation or event that should be covered when generating test cases with the &#039;&#039;&#039;-mcm_test&#039;&#039;&#039; option. Multiple operations/events can be specified by seperating them by comma or by using &#039;&#039;&#039;-mcm_cover&#039;&#039;&#039; several times.&lt;br /&gt;
&lt;br /&gt;
See [[#-mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt;|-mcm-tests]] for further details.&lt;br /&gt;
&lt;br /&gt;
=== -spdot &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Write graph of the state space to a dot &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 100 -spdot my_statespace.dot&lt;br /&gt;
&lt;br /&gt;
=== -cbc_tests &amp;lt;Depth&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;File&amp;gt; ===&lt;br /&gt;
Generate test cases by constraint solving with maximum&lt;br /&gt;
length &#039;&#039;&#039;Depth&#039;&#039;&#039;, the last state satisfies &#039;&#039;&#039;EndPredicate&#039;&#039;&#039;&lt;br /&gt;
and the test cases are written to &#039;&#039;&#039;File&#039;&#039;&#039;. If the predicate is the empty string we assume truth. If the filename is the empty string no file is generated. See also the page on [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -cbc_cover &amp;lt;Operation&amp;gt; ===&lt;br /&gt;
When generating CB test cases, &#039;&#039;&#039;Operation&#039;&#039;&#039; should be covered.&lt;br /&gt;
The option can be given multiple times to specify several operations.&lt;br /&gt;
Alternatively, multiple operations can be separated by a comma. You can also use the option &amp;lt;pre&amp;gt;-cbc_cover_match PartialName&amp;lt;/pre&amp;gt; to match all operations whose name contains PartialName. See also the page about [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -test_description &amp;lt;File&amp;gt; ===&lt;br /&gt;
Read the options for constraint based test case generation from &#039;&#039;&#039;File&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== -bmc &amp;lt;Depth&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Run the [[Bounded_Model_Checking|bounded model checker]] until maximum trace depth &amp;lt;Depth&amp;gt; specified. Looks for invariant violations using the constraint-based test case generation algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -bmc 20&lt;br /&gt;
&lt;br /&gt;
=== -csp-guide &amp;lt;File&amp;gt; ===&lt;br /&gt;
Use the CSP File &#039;&#039;&#039;File&#039;&#039;&#039; to guide the B Machine (&amp;quot;CSP||B&amp;quot;).&lt;br /&gt;
(This feature is included since version 1.3.5-beta7.)&lt;br /&gt;
As of version 1.15.1 you can also specify a &amp;lt;tt&amp;gt;CSP_GUIDE_FILE&amp;lt;/tt&amp;gt;&lt;br /&gt;
DEFINITION (which also works in ProB2-UI).&lt;br /&gt;
&lt;br /&gt;
=== -rule_report &amp;lt;File&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Generates rule validation report for rules machines (.rmch) at the specified location &amp;lt;File&amp;gt; for the current animation state. Depending on the file extension an HTML or an XML version of the report is generated (.html/.xml).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.rmch -execute_all -rule_report my_report.html&lt;br /&gt;
&lt;br /&gt;
=== -machine_files_sha ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Computes SHA1 hash of all B files used by a B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.mch -machine_files_sha&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -check_machine_file_sha ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Compute and check SHA1 hash of a particular B file used by the main B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
probcli ./Demo/scheduler.mch -check_machine_file_sha scheduler.mch 1cab7ec89adc9f9b153af85c1ae16ba8a7a2a661&lt;br /&gt;
&lt;br /&gt;
== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
Set NO_COLOR environment variable to disable terminal colors.&lt;br /&gt;
See [https://no-color.org https://no-color.org].&lt;br /&gt;
&lt;br /&gt;
== Preferences ==&lt;br /&gt;
&lt;br /&gt;
You can use these preferences within the command:&lt;br /&gt;
&lt;br /&gt;
 -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;PREFERENCE&amp;gt;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;VALUE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| MAXINT&lt;br /&gt;
| nat ==&amp;gt; MaxInt, used for expressions such as xx::NAT (2147483647 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| MININT&lt;br /&gt;
| neg ==&amp;gt; MinInt, used for expressions such as xx::INT (-2147483648 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SETSIZE&lt;br /&gt;
| nat ==&amp;gt; Size of unspecified deferred sets in SETS section. Will be used if a set s is neither enumerated, has no no card(s)=nr predicate in the PROPERTIES and has no scope_s == Nr DEFINITION.&lt;br /&gt;
|-&lt;br /&gt;
| MAX_INITIALISATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Initialisations and ways to setup constants computed&lt;br /&gt;
|-&lt;br /&gt;
| MAX_OPERATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Enablings per Operation Computed&lt;br /&gt;
|-&lt;br /&gt;
| ANIMATE_SKIP_OPERATIONS&lt;br /&gt;
| bool ==&amp;gt; Animate operations which are skip or PRE C THEN skip&lt;br /&gt;
|-&lt;br /&gt;
| COMPRESSION&lt;br /&gt;
| bool ==&amp;gt; Use more aggressive COMPRESSION when storing states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_CLOSURES_FOR_STATE&lt;br /&gt;
| bool ==&amp;gt; Convert lazy form back into explicit form for Variables, Constants, Operation Arguments. ProB will sometimes try to keep certain sets symbolic. If this preference is TRUE then ProB will try to expand those sets for variables and constants after an operation has been executed.&lt;br /&gt;
|-&lt;br /&gt;
| SYMBOLIC&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of lambdas and set comprehensions. By default ProB will keep certain sets symbolic (e.g., sets it knows are infinite). When this preference is set to TRUE then all set comprehensions and lambda abstractions will at first be kept symbolic and only expanded into explicit form if needed.&lt;br /&gt;
|-&lt;br /&gt;
| CLPFD&lt;br /&gt;
| bool ==&amp;gt; Use CLP(FD) solver for B integers (restricts range to -2^28..2^28-1 on 32 bit computers). Setting this preference to TRUE should substantially improve ProB&#039;s ability to solve complicated predicates involving integers. However, it may cause CLP(FD) overflows in certain circumstances.&lt;br /&gt;
|-&lt;br /&gt;
| SMT&lt;br /&gt;
| bool ==&amp;gt; Enable SMT-Mode (aggressive treatment of : and /: inside predicates). With this predicate set to TRUE ProB will be better at solving certain constraint solving tasks. It should be enabled when doing constraint-based invariant or deadlock checking. ProB Tcl/Tk will turn this preference on automatically for those checks.&lt;br /&gt;
|-&lt;br /&gt;
| STATIC_ORDERING&lt;br /&gt;
| bool ==&amp;gt; Use static ordering to enumerate constants which occur in most PROPERTIES first&lt;br /&gt;
|-&lt;br /&gt;
| SYMMETRY_MODE&lt;br /&gt;
| [off,flood,nauty,hash] ==&amp;gt; Symmetry Mode: off,flood,canon,nauty,hash&lt;br /&gt;
|-&lt;br /&gt;
| TIME_OUT&lt;br /&gt;
| nat1 ==&amp;gt; Time out for computing enabled transitions (in ms, is multiplied by a factor for other computations)&lt;br /&gt;
|-&lt;br /&gt;
| PROOF_INFO&lt;br /&gt;
| bool ==&amp;gt; Use Proof Information to restrict invariant checking to affected unproven clauses. Most useful in EventB for models exported from Rodin.&lt;br /&gt;
|-&lt;br /&gt;
| TRY_FIND_ABORT&lt;br /&gt;
| bool ==&amp;gt; Try more aggressively to detect ill-defined expressions (e.g. applying function outside of domain), may slow down animator&lt;br /&gt;
|-&lt;br /&gt;
| NUMBER_OF_ANIMATED_ABSTRACTIONS&lt;br /&gt;
| nat ==&amp;gt; How many levels of refined models are animated by default&lt;br /&gt;
|-&lt;br /&gt;
| ALLOW_INCOMPLETE_SETUP_CONSTANTS&lt;br /&gt;
| bool ==&amp;gt; Allow ProB to proceed even if only part of the CONSTANTS have been found.&lt;br /&gt;
|-&lt;br /&gt;
| PARTITION_PROPERTIES&lt;br /&gt;
| bool ==&amp;gt; Partition predicates (PROPERTIES) into components&lt;br /&gt;
|-&lt;br /&gt;
| USE_RECORD_CONSTRUCTION&lt;br /&gt;
| bool ==&amp;gt; Records: Check if axioms/properties describe a record pattern&lt;br /&gt;
|-&lt;br /&gt;
| OPERATION_REUSE&lt;br /&gt;
| bool ==&amp;gt; Try and reuse previously computed operation effects in B/Event-B&lt;br /&gt;
|-&lt;br /&gt;
| SHOW_EVENTB_ANY_VALUES&lt;br /&gt;
| bool ==&amp;gt; Show top-level ANY variable values of B Operations without parameters as parameters&lt;br /&gt;
|-&lt;br /&gt;
| RANDOMISE_OPERATION_ORDER&lt;br /&gt;
| bool ==&amp;gt; Randomise order of operations when computing successor states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_FORALL_UPTO&lt;br /&gt;
| nat ==&amp;gt; When analysing predicates: max. domain size for expansion of forall (use 0 to disable expansion)&lt;br /&gt;
|-&lt;br /&gt;
| MAX_DISPLAY_SET&lt;br /&gt;
| int ==&amp;gt; Max size for pretty-printing sets (-1 means no limit)&lt;br /&gt;
|-&lt;br /&gt;
| CSP_STRIP_SOURCE_LOC&lt;br /&gt;
| bool ==&amp;gt; Strip source location for CSP; will speed up model checking&lt;br /&gt;
|-&lt;br /&gt;
| WARN_WHEN_EXPANDING_INFINITE_CLOSURES&lt;br /&gt;
| int ==&amp;gt; Warn when expanding infinite closures if MAXINT larger than:&lt;br /&gt;
|-&lt;br /&gt;
| TRACE_INFO&lt;br /&gt;
| bool ==&amp;gt; Provide various tracing information on the terminal/console.&lt;br /&gt;
|-&lt;br /&gt;
| DOUBLE_EVALUATION&lt;br /&gt;
| bool ==&amp;gt; Evaluate PREDICATES positively and negatively when analyzing assertions or properties&lt;br /&gt;
|-&lt;br /&gt;
| RECURSIVE&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of *Recursive* set Comprehensions and lambdas&lt;br /&gt;
|-&lt;br /&gt;
| IGNORE_HASH_COLLISIONS&lt;br /&gt;
| bool ==&amp;gt; Ignore Hash Collisions (if true not all states may be computed, visited states are not memorised !)&lt;br /&gt;
|-&lt;br /&gt;
| FORGET_STATE_SPACE&lt;br /&gt;
| bool ==&amp;gt; Do not remember state space (mainly useful in conjunction with Ignore Hash Collisions)&lt;br /&gt;
|-&lt;br /&gt;
| NEGATED_INVARIANT_CHECKING&lt;br /&gt;
| bool ==&amp;gt; Perform double evaluation (positive and negative) when checking invariants&lt;br /&gt;
|-&lt;br /&gt;
| CSE&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination&lt;br /&gt;
|-&lt;br /&gt;
| CSE_SUBST&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination also for B substitutions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 5000 -p CLPFD TRUE -p SYMMETRY_MODE hash -mc 1000&lt;br /&gt;
&lt;br /&gt;
== Some probcli examples ==&lt;br /&gt;
&lt;br /&gt;
To load a file My.mch, setup the constants and initialize it do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init My.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To load a file M.mch, setup the constants, initialize and then check all assertions with Atelier-B&#039;s default values for MININT and MAXINT and an increased timeout of 5 seconds do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init -assertions -p MAXINT 2147483647 -p MININT -2147483647 -p TIME_OUT 5000 M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fully model check a specification M.mch while tryining to minimize memory consumption do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -model_check -p COMPRESSION TRUE M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To model check a specification M.mch while trying to minimize memory consumption further by not storing processed stats and using symmetry reduction (and accepting hash collisions) do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -p COMPRESSION -p IGNORE_HASH_COLLISIONS TRUE -p FORGET_STATE_SPACE TRUE -p SYMMETRY_MODE hash -model_check M.mch &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command-line Arguments for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
Note that the stand-alone Tcl/Tk version also supports a limited form of command-line preferences:&lt;br /&gt;
* &#039;&#039;&#039;FILE&#039;&#039;&#039; (the name/path of the file to be loaded)&lt;br /&gt;
* &#039;&#039;&#039;-prefs PREF_FILE&#039;&#039;&#039;  (to use a specific preferences file, rather than the default ProB_Preferences.pl in your home folder)&lt;br /&gt;
* &#039;&#039;&#039;-batch&#039;&#039;&#039; (to instruct ProB not to try to bring up windows, but to print information only to the terminal)&lt;br /&gt;
* &#039;&#039;&#039;-selfcheck&#039;&#039;&#039; (to run the standard unit tests)&lt;br /&gt;
* &#039;&#039;&#039;-t&#039;&#039;&#039; (to perform the Trace Check on the default trace file associated with the specification)&lt;br /&gt;
* &#039;&#039;&#039;-tcl TCL_Command&#039;&#039;&#039; (to run a particular pre-defined Tcl command)&lt;br /&gt;
* &#039;&#039;&#039;-mc&#039;&#039;&#039; (to perform model checking)&lt;br /&gt;
* &#039;&#039;&#039;-c&#039;&#039;&#039; (to compute the coverage)&lt;br /&gt;
* &#039;&#039;&#039;-ref&#039;&#039;&#039; (to perform the default trace refinment check)&lt;br /&gt;
&lt;br /&gt;
However, the comand-line version of ProB, called &#039;&#039;&#039;probcli&#039;&#039;&#039;, provides more features. It also does not depend on Tcl/Tk and can therefore be run on systems without Tcl/Tk.&lt;br /&gt;
{{Feedback}}&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6055</id>
		<title>Using the Command-Line Version of ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6055"/>
		<updated>2025-12-24T07:22:31Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* -refchk  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorial]]&lt;br /&gt;
[[Category:User Manual]]&lt;br /&gt;
[[Category:ProB Cli]]&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB, called &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt;, offers many of the features of the standalone Tcl/Tk Version via the command-line. As such, you can run ProB from your shell scripts or in your Makefiles.&lt;br /&gt;
These pages refer to version 1.6 of ProB. Some features are only available in the nightly build of ProB. You can run &amp;lt;tt&amp;gt;probcli –help&amp;lt;/tt&amp;gt; to find out which commands are supported by your version of ProB. For Bash users we provide [[Bash Completion|command completion]] support.&lt;br /&gt;
&lt;br /&gt;
Note: the order of commands is not relevant for &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; (except within groups of commands such as &amp;lt;tt&amp;gt;-p MAXINT 127&amp;lt;/tt&amp;gt;). Any argument that is not recognised by &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; is treated as a filename to be analysed.&lt;br /&gt;
&lt;br /&gt;
[[file:ProBTerminalizerDemo.gif|center||600px]]&lt;br /&gt;
&lt;br /&gt;
== Conventions used ==&lt;br /&gt;
&lt;br /&gt;
The following conventions are used in this guide:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;replaceme&amp;gt;&lt;br /&gt;
| All values that should be replaced with some value are shown withing &amp;lt; &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | line breaks&lt;br /&gt;
| Command synopsis for command may be broken up on several lines. When typing commands enter all option on the same line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;probcli [--help]&lt;br /&gt;
&amp;lt;filename&amp;gt; [ &amp;lt;options&amp;gt; ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore within all options can as of version 1.5.1-beta7 be replaced with dashes. Also, all commands can either be typed with single leading dashes or double leading dashes.&lt;br /&gt;
For example, all of the following commands have the same effect:&lt;br /&gt;
 probcli M.mch -model_check&lt;br /&gt;
 probcli M.mch -model-check&lt;br /&gt;
 probcli M.mch --model_check&lt;br /&gt;
 probcli M.mch --model-check&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== -mc &amp;lt;nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| model check; checking at most &amp;lt;nr&amp;gt; states&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 100&lt;br /&gt;
&lt;br /&gt;
Note: with a value of nr=1 ProB will only inspect the &amp;quot;virtual&amp;quot; root node (and compute its outgoing transitions).&lt;br /&gt;
Also see the related options &amp;lt;tt&amp;gt;-nodead, -noinv, -nogoal, -noass&amp;lt;/tt&amp;gt; to influence which kinds of errors are reported by &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set a target goal predicate using the &amp;lt;tt&amp;gt;-goal &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command and limit the scope of the model checking using the &amp;lt;tt&amp;gt;-scope &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
=== -model_check ===&lt;br /&gt;
&lt;br /&gt;
The same as &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt; but without a limit on the number of nodes checked.&lt;br /&gt;
ProB will run until the entire state space is explored.&lt;br /&gt;
&lt;br /&gt;
=== -no&amp;lt;x&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| restrict errors reported by model checking (-mc), TLC model checking (-mc_with_tlc), animation (-animate) and execution (-execute) with &amp;lt;x&amp;gt;=dead,inv,goal,ass&lt;br /&gt;
* -nodead : do not report deadlocks&lt;br /&gt;
* -noinv : do not report invariant violations&lt;br /&gt;
* -nogoal : do not stop if a state satisfying the GOAL predicate has been found&lt;br /&gt;
* -noass : do not report assertion violations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 1000 -nodead -nogoal&lt;br /&gt;
&lt;br /&gt;
=== -disable_timeout ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| turn off ProB&#039;s timeout mechanism, e.g., for computing enabled operations and invariant checking; this can sometimes speed up model checking (-mc or -model_check) and animation (-animate). Available as of version 1.5.1-beta7.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model-check -disable-timeout&lt;br /&gt;
&lt;br /&gt;
=== -bf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed breadth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -bf -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -df ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed depth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -df -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -mc_mode &amp;lt;M&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| influence how the model checker proceeds. Available as of version 1.5.1. Supersedes the &amp;lt;tt&amp;gt;-df&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; switches.&lt;br /&gt;
Possible values for the mode &amp;lt;M&amp;gt; are: &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt; (depth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;bf&amp;lt;/tt&amp;gt; (breadth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;mixed&amp;lt;/tt&amp;gt; (mixed depth-first / breadth-first traversal with random choice; currently the default),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt; (choosing next node to process completely at random), &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; (similar to random, but uses the Prolog hash function of a node instead of a random number generator),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt; (try and use &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; provided by user in &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause). Some explanations can be found [[Blocks_World_(Directed_Model_Checking)|in an example about directed model checking]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;out_degree_hash&amp;lt;/tt&amp;gt; (prioritise nodes with fewer outgoing transitions; mainly useful for deadlock checking)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
=== --timeout &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Global timeout in ms for model checking and refinement checking. &lt;br /&gt;
This does not influence the timeout used for computing individual transitions/operations.&lt;br /&gt;
This has to be set with the -p TIME_OUT &amp;lt;N&amp;gt;. Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference also influences other computations, such as invariant checking or static assertion checking, where it is multiplied by a factor. See the description of the -p option.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -timeout 10000&lt;br /&gt;
&lt;br /&gt;
=== -t ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| trace check (associated .trace file must exist)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t&lt;br /&gt;
&lt;br /&gt;
=== -trace_replay &amp;lt;KIND&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Replay a trace file in the given format (json,prolog,B).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
KIND is either json, prolog, B. The old ProB format is prolog. The trace files generated by ProB2-UI are json (with .prob2trace extension). The B format consists of a sequence of B operation calls.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -trace_replay json my.prob2trace&lt;br /&gt;
&lt;br /&gt;
Alternative command -det_trace_replay KIND FILE.&lt;br /&gt;
&lt;br /&gt;
=== -init ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| initialise specification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init&lt;br /&gt;
 nr_of_components(1)&lt;br /&gt;
 % checking_component_properties(1,[])&lt;br /&gt;
 % enumerating_constants_without_constraints([typedval(fd(_24428,ID),global(ID),iv)])&lt;br /&gt;
 % grounding_wait_flags&lt;br /&gt;
 grounding_component(1)&lt;br /&gt;
 grounding_component(2)&lt;br /&gt;
 % found_enumeration_of_constants(0,2)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,2))&lt;br /&gt;
 % found_enumeration_of_constants(0,1)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,1))&lt;br /&gt;
 &amp;lt;- 0: SETUP_CONSTANTS :: root&lt;br /&gt;
 % Could not set up constants with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation of constants.&lt;br /&gt;
  | 0: SETUP_CONSTANTS success --&amp;gt;0&lt;br /&gt;
  - &amp;lt;- 1: INITIALISATION :: 0&lt;br /&gt;
 % Could not initialise with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation.&lt;br /&gt;
 ALL OPERATIONS COVERED&lt;br /&gt;
  -  | 1: INITIALISATION success --&amp;gt;2&lt;br /&gt;
  -  - SUCCESS&lt;br /&gt;
&lt;br /&gt;
=== -cbc &amp;lt;OPNAME&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| constraint-based invariant checking for an operation (also use &amp;lt;OPNAME&amp;gt;=all)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -cbc all&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Perform constraint-based deadlock checking (also use -cbc_deadlock_pred PRED)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This will try to find a state which satisfies the invariant and properties and where no operation/event is enabled.&lt;br /&gt;
Note: if ProB finds a counter example then the machine cannot be proven to be deadlock free. However, the particular state may not be reachable from the initial state(s). If you want to find a reachable deadlock you have to use the model checker.&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock_pred &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based deadlock finding given a predicate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is like -cbc_deadlock but you provide an additional predicate. ProB will only find deadlocks which also make this predicate true.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_deadlock_pred &amp;quot;n=15&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -cbc_assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based checking of assertions on constants&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants which make an assertion (on constants) false.&lt;br /&gt;
&lt;br /&gt;
You can use the extra command &amp;lt;tt&amp;gt;-cbc_output_file FILE&amp;lt;/tt&amp;gt; to write the result of this check to a file.&lt;br /&gt;
You can also use the extra command &amp;lt;tt&amp;gt;-cbc_option contradiction_check&amp;lt;/tt&amp;gt; to ask ProB to check if there is a contradiction in the properties (in case the check did not find a counter-example to the assertions). The extra command &amp;lt;tt&amp;gt;-cbc_option unsat_core&amp;lt;/tt&amp;gt; tells ProB to compute the unsatisfiable core in case a proof the assertions was found.&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference is multiplied by 10 for this command.&lt;br /&gt;
&lt;br /&gt;
There are various variations of this command:&lt;br /&gt;
 -cbc_assertions_proof&lt;br /&gt;
 -cbc_assertions_tautology_proof &lt;br /&gt;
Both commands do not allow enumeration warnings to occur.&lt;br /&gt;
The latter command  ignores the PROPERTIES and tries to check whether the ASSERTION(s) are tautologies.&lt;br /&gt;
Both commands can be useful to use ProB as a Prover/Disprover (as is done in Atelier-B 4.3).&lt;br /&gt;
&lt;br /&gt;
=== -cbc_sequence &amp;lt;SEQ&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based searching for a sequence of operation names (separated by semicolons)&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants, initial variable values and parameters which make execution of the given sequence of operations possible.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_sequence &amp;quot;op1;op2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -strict ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| raise error and stop probcli if anything unexpected happens, e.g., if model checking finds a counter example or trace checking fails or any unexpected error happens&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t -strict&lt;br /&gt;
&lt;br /&gt;
=== -expcterr &amp;lt;ERR&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| expect error to occur (&amp;lt;ERR&amp;gt;=cbc,mc,ltl,...)&lt;br /&gt;
Tell ProB that you expect a certain error to occur. Mainly useful for regression tests (in conjunction with the -strict option).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli examples/B/Benchmarks/CarlaTravelAgencyErr.mch -mc 1000 -expcterr invariant_violation -strict&lt;br /&gt;
&lt;br /&gt;
=== -animate &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| random animation (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Animates the machine randomly, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100&lt;br /&gt;
&lt;br /&gt;
Variations&lt;br /&gt;
  -animate_all : animate until deadlock reached&lt;br /&gt;
  -animate_until_ltl P : animate until LTL property holds on trace&lt;br /&gt;
  -animate_until_ltl_state_property P : animate until current state satisifes LTL state property&lt;br /&gt;
&lt;br /&gt;
=== -execute &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| execution (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Executes the &amp;quot;first&amp;quot; enabled operation of a machine, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
In contrast to -animate, -execute will&lt;br /&gt;
* always choose the first enabled operation it finds and stop searching for further enabled operations in that state (-animate will compute all enabled operations up to the limit set by the &amp;lt;tt&amp;gt;MAX_OPERATIONS&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MAX_INITIALISATIONS&amp;lt;/tt&amp;gt; preference and then choose randomly); the order of operations in the B machine is thus important for -execute&lt;br /&gt;
* not store intermediate states in the state space; as such -execute is faster but after execution one only has access to the first state and the final state of execution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 100&lt;br /&gt;
&lt;br /&gt;
=== -execute_all===&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;tt&amp;gt;-execute &amp;lt;Nr&amp;gt;&amp;lt;/tt&amp;gt; above.&lt;br /&gt;
&lt;br /&gt;
=== -det_check ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if every step of the animation is deterministic (i.e., only one operation is possible, and it can only be executed in one possible way as far as parameters and result is concerned).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100 -det_check&lt;br /&gt;
&lt;br /&gt;
=== -det_constants ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if the SETUP_CONSTANTS step is deterministic (i.e., only one way to set up the constants is possible).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -det_constants&lt;br /&gt;
=== -his &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save animation history to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the animation (or model checking) history to a text file. Operations are separated by semicolons.&lt;br /&gt;
The output can be adapted using the -his_option command. With -his_option show_states the -his command will also write out all states to the file (in the form of comments before and after operations). With -his_option show_init only the initial state is written out.&lt;br /&gt;
The -his command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
See also the -sptxt command to only write the current values of variables and constants to a file.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
Additionally we can have the initialised variables and constants:&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_init supersimple.mch&lt;br /&gt;
&lt;br /&gt;
And we can have in addition the values of the variables in between (and at the end):&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_states supersimple.mch&lt;br /&gt;
&lt;br /&gt;
With -his_option trace_file as only option, probcli will write the history in Prolog format, which can later be used by the -t command.&lt;br /&gt;
&lt;br /&gt;
=== -i ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| interactive animation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After performing the other commands, ProB stays in interactive mode and allows the user to manually animate the loaded specification.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -i&lt;br /&gt;
&lt;br /&gt;
=== -repl ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start interactive read-eval-print-loop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p CLPFD TRUE -repl&lt;br /&gt;
&lt;br /&gt;
A list of commands can be obtained by typing &amp;lt;tt&amp;gt;:help&amp;lt;/tt&amp;gt; (just help for versions 1.3.x of probcli). The interactive read-eval-print-loop can be exited using &amp;lt;tt&amp;gt;:q&amp;lt;/tt&amp;gt; (just typing a return on a blank line for versions 1.3.x of probcli)..&lt;br /&gt;
If in addition you want see a graphical representation of the solutions found you can use the following command and open the &amp;lt;tt&amp;gt;out.dot&amp;lt;/tt&amp;gt; file using dotty or GraphViz:&lt;br /&gt;
 probcli -repl -evaldot ~/out.dot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;lt;tt&amp;gt;-eval&amp;lt;/tt&amp;gt; command to evaluate specific formulas or expressions:&lt;br /&gt;
 probcli -eval &amp;quot;1+2&amp;quot;&lt;br /&gt;
For convenience, these formulas can also be put into a separate file:&lt;br /&gt;
 probcli -eval_file MyFormula.txt&lt;br /&gt;
&lt;br /&gt;
=== -c ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print coverage statistics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -c&lt;br /&gt;
&lt;br /&gt;
You can also use the longer name for the command:&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage&lt;br /&gt;
&lt;br /&gt;
There is also a version which prints a shorter summary (and which is much faster for large state spaces):&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage_summary&lt;br /&gt;
&lt;br /&gt;
=== -cc &amp;lt;Nr&amp;gt; &amp;lt;Nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print and check coverage statistics&lt;br /&gt;
Print coverage statistics and check that the given number of nodes and transitions have been computed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -cc 10 25&lt;br /&gt;
&lt;br /&gt;
=== -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set &amp;lt;PREFERENCE&amp;gt; to &amp;lt;VALUE&amp;gt;. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use --pref instead of -p.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 8000 -p CLPFD TRUE -mc 10000&lt;br /&gt;
&lt;br /&gt;
=== -pref_group &amp;lt;PREFGROUP&amp;gt; &amp;lt;SETTING&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set to the group of preferences &amp;lt;PREFGROUP&amp;gt; to a predefined setting &amp;lt;SETTING&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pref_group model_check unlimited&lt;br /&gt;
&lt;br /&gt;
Available groups and settings are:&lt;br /&gt;
&lt;br /&gt;
* PREFERENCE GROUP integer : SETTINGS [int32] : Values for MAXINT and MININT&lt;br /&gt;
* PREFERENCE GROUP time_out : SETTINGS [disable_time_out] : To disable TIME_OUT&lt;br /&gt;
* PREFERENCE GROUP model_check : SETTINGS [disable_max,unlimited] : Model Checking Limits&lt;br /&gt;
* PREFERENCE GROUP dot_colors : SETTINGS [classic,dreams,winter] : Colours for Dot graphs&lt;br /&gt;
&lt;br /&gt;
=== -prefs &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set preferences from preference file &amp;lt;FILE&amp;gt;. The file should be created by the Tcl/Tk version of ProB; this version automatically creates a file called ProB_Preferences.pl. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -prefs ProB_Preferences.pl&lt;br /&gt;
&lt;br /&gt;
=== -card &amp;lt;GS&amp;gt; &amp;lt;VAL&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set cardinality (scope in Alloy terminology) of a B deferred set. This overrides the default cardinality (which can be set using &amp;lt;tt&amp;gt;-p DEFAULT_SETSIZE &amp;lt;VAL&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -card PID 5&lt;br /&gt;
&lt;br /&gt;
=== -goal &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set GOAL predicate for model checker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -goal &amp;quot;n=18&amp;quot;  -strict -expcterr goal_found&lt;br /&gt;
&lt;br /&gt;
=== -scope &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set SCOPE predicate for model checker; states which do not satisfy the SCOPE predicate will be ignored (invariant will not be checked and no outgoing transitions will be computed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -scope &amp;quot;n&amp;lt;18&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
=== -s &amp;lt;PORT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on given port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ss ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on port 9000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on some free port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sptxt &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants and variables to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the values of constants and variables to a text file in classical B syntax.&lt;br /&gt;
The -sptxt command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
The values are fully written out (some sets, e.g., infinite sets may be written out symbolically).&lt;br /&gt;
&lt;br /&gt;
See also the -his command.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -sptxt state.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
This will write the values of all variables and constants to the file state.txt after animating the machine 5 steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -cache &amp;lt;DIRECTORY&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants (and in future also variables) to a file to avoid recomputation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This commands saves the values of constants for the current B machine and puts those values into files in the specified directory. The command will also tell ProB to try and reuse constants saved for subsidiary machines (included using SEES for example) whenever possible.&lt;br /&gt;
The purpose of the command is to avoid recomputing constants as much as possible, as this can be very time consuming.&lt;br /&gt;
This also works for values of variables computed in the initialisation or even using operations.&lt;br /&gt;
However, we do not support refinements at the moment.&lt;br /&gt;
&lt;br /&gt;
Note: this command can also be used when starting up the ProB Tcl/Tk version.&lt;br /&gt;
&lt;br /&gt;
=== -logxml &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities and results of probcli in XML format in &amp;lt;LogFile&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A schema declaration file (xsd) can be found at &amp;lt;tt&amp;gt;doc/logxml_xsd.xml&amp;lt;/tt&amp;gt; in the ProB [[Download#Sourcecode|Prolog sources]].&lt;br /&gt;
The log file contains information about the various commands performed by probcli.&lt;br /&gt;
It also contains version information, the parameters provided to probcli and details about the errors that occured.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -logxml log.xml&lt;br /&gt;
&lt;br /&gt;
=== -logxml_write_vars &amp;lt;PREFIX&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| after processing other commands (such as -execute) write values of variables having prefix PREFIX in their name into the XML log file (if XML logging has been activated using the -logxml command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 1000 -logxml log.xml -logxml_write_vars out&lt;br /&gt;
&lt;br /&gt;
=== -l &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in &amp;lt;LogFile&amp;gt; using Prolog format&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -l my.log&lt;br /&gt;
&lt;br /&gt;
=== -ll ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in /tmp/prob_cli_debug.log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -ll&lt;br /&gt;
&lt;br /&gt;
=== -lg &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| analyse &amp;lt;LogFile&amp;gt; using gnuplot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -pp &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pp my_pp.mch&lt;br /&gt;
&lt;br /&gt;
=== -ppf &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;, force printing of all type infos&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ppf my_ppf.mch&lt;br /&gt;
&lt;br /&gt;
=== -v ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set ProB into verbose mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -v&lt;br /&gt;
&lt;br /&gt;
=== -version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an alternate command called -svers which just prints the version number of ProB.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -version&lt;br /&gt;
 ProB Command Line Interface&lt;br /&gt;
   VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
   $LastChangedDate: 2011-11-16 18:36:18 +0100 (Wed, 16 Nov 2011) $&lt;br /&gt;
   Prolog: SICStus 4.2.0 (x86_64-darwin-10.6.0): Mon Mar  7 20:03:36 CET 2011&lt;br /&gt;
   Application Path: /Users/leuschel/svn_root/NewProB&lt;br /&gt;
&lt;br /&gt;
 probcli -svers&lt;br /&gt;
 VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;probcli -version -v&amp;lt;/tt&amp;gt; to obtain more information about your version of probcli.&lt;br /&gt;
&lt;br /&gt;
=== -check_java_version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check Java and B parser version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This command is available as of ProB version 1.5.1-beta5 or higher. It can be useful to check that your Java is correctly installed and that the ProB B parser can operate correctly&lt;br /&gt;
&lt;br /&gt;
 probcli -check_java_version&lt;br /&gt;
 Result of checking Java version:&lt;br /&gt;
  Java is correctly installed and version 1.7.0_55-b13 is compatible with ProB requirements (&amp;gt;= 1.7).&lt;br /&gt;
  ProB B Java Parser available in version: 2016-02-25 15:27:18.55.&lt;br /&gt;
&lt;br /&gt;
=== -assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check ASSERTIONS of your machine&lt;br /&gt;
&lt;br /&gt;
If you provide the -t switch, the ASSERTIONS will be checked after executing your trace. Otherwise, they will be checked in an initial state.&lt;br /&gt;
ProB will automatically initialize the machine if you have not provide the -init or -t switch.&lt;br /&gt;
&lt;br /&gt;
You can also use -main_assertions to check only the ASSERTIONS found in the main file.&lt;br /&gt;
&lt;br /&gt;
If your ASSERTIONS are all static (i.e., make no reference to variables), then ProB will remove all CONSTANTS and PROPERTIES from your machine which are not linked (directly or indirectly) to the ASSERTIONS.&lt;br /&gt;
This optimization will only be made if you provide no other switch, such as -mc or -animate which may require the computation of the variables.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -assertions&lt;br /&gt;
&lt;br /&gt;
=== -property ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| virtually add predicate to PROPERTIES&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -property &amp;quot;PRED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -properties ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check PROPERTIES&lt;br /&gt;
Note: you should probably first initialise the machine (e.g., with -init).&lt;br /&gt;
If the constants have not yet been set up, probcli will debug the properties.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties&lt;br /&gt;
&lt;br /&gt;
=== -dot_output &amp;lt;PATH&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| define path for generation of dot files for false properties or assertions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This option is applicable to -properties and -assertions. It will result in individual dot files being generated for every false or unknown property or assertion. Assertions are numbered A0,A1,... and properties P0,P1,... You can also force to generate dot files for all properties (i.e., also the true ones) using the -dot_all command-line flag.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties -dot_output somewhere/&lt;br /&gt;
&lt;br /&gt;
This will generate files somewhere/my_P0_false.dot, somewhere/my_P1_false.dot, ...&lt;br /&gt;
&lt;br /&gt;
=== -rc ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| runtime checking of types/pre-/post-conditions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlfile &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL formulas in file &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlassertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL assertions (in DEFINITIONS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltllimit &amp;lt;LIMIT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| explore at most &amp;lt;LIMIT&amp;gt; states when model-checking LTL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -save &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save state space for later refinement check&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -refchk &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -refchk abs_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -ref_check &amp;lt;MODE&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space using provide&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
MODE is one of F, FD, T, R, RD, V, VD.&lt;br /&gt;
Default used by -refchck command above is T (traces model).&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ref_check F abstract_saved.P&lt;br /&gt;
&lt;br /&gt;
=== -mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Generate test cases for the given specification. Each test case consists of a sequence of operations resp. events (a so-called trace) that&lt;br /&gt;
* start in a state after an initialisation&lt;br /&gt;
* contain a requested operation/event&lt;br /&gt;
* end in a state where the &amp;lt;EndPredicate&amp;gt; is fulfilled&lt;br /&gt;
&lt;br /&gt;
The user can specify what requested operations/events are with the&lt;br /&gt;
option [[#-mcm_cover &amp;lt;Operation(s)&amp;gt;|-mcm_cover]].&lt;br /&gt;
&lt;br /&gt;
ProB uses a &amp;quot;breadth-first&amp;quot; approach to search for test cases. When all requested operations/events are covered by test cases within maximum length M, the algorithm will explore the complete state space with that maximum distance M from the initialisation. It outputs all found traces that satisfy the requirements above.&lt;br /&gt;
&lt;br /&gt;
The algorithm stops if either&lt;br /&gt;
* it has covered all required operations/events with the current search depth&lt;br /&gt;
* or it has reached the maximum search depth or maximum number of explored states.&lt;br /&gt;
&lt;br /&gt;
The required parameters are:&lt;br /&gt;
;Depth&lt;br /&gt;
: The maximum length of traces that the algorithm searches for test until it stops without covering all required operations/events.&lt;br /&gt;
;MaxStates&lt;br /&gt;
: The maximum number of explored states until the algorithm stops without covering all required operations/events.&lt;br /&gt;
;EndPredicate&lt;br /&gt;
: A predicate in B syntax that the last state of a trace must fulfil. If you do not have any restrictions on that state, use a trivially true predicate like &#039;&#039;&#039;1=1&#039;&#039;&#039;&lt;br /&gt;
;FILE&lt;br /&gt;
: The found test cases a written to the XML file &amp;lt;FILE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mcm_tests 10 2000 &amp;quot;EndStateVar=TRUE&amp;quot; testcases.xml -mcm_cover op1,op2&lt;br /&gt;
&lt;br /&gt;
generates test cases for the operations &#039;&#039;&#039;op1&#039;&#039;&#039; and &#039;&#039;&#039;op2&#039;&#039;&#039; of the specification &#039;&#039;&#039;my.mch&#039;&#039;&#039;. The maximum length of traces is 10, at most 2000 states are explored. Each test case ends in a state where the predicate &#039;&#039;&#039;EndStateVar=TRUE&#039;&#039;&#039; holds. The found test cases are written to a file &#039;&#039;&#039;testcases.xml&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of version 1.6.0, the operation arguments are also written to the XML file.&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;INTERNAL_ARGUMENT_PREFIX&amp;lt;/tt&amp;gt; can be used to provide a prefix for internal operation arguments; any argument/parameter whose name starts with that prefix is considered an internal parameter and not shown in the trace file.&lt;br /&gt;
Also, as of version 1.6.0, the non-deterministic initialisations are shown in the XML trace file: all variables and constants where more than one possible initialisation exists are written into the trace file, as argument of an INITIALISATION event.&lt;br /&gt;
&lt;br /&gt;
=== -mcm_cover &amp;lt;Operation(s)&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Specify an operation or event that should be covered when generating test cases with the &#039;&#039;&#039;-mcm_test&#039;&#039;&#039; option. Multiple operations/events can be specified by seperating them by comma or by using &#039;&#039;&#039;-mcm_cover&#039;&#039;&#039; several times.&lt;br /&gt;
&lt;br /&gt;
See [[#-mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt;|-mcm-tests]] for further details.&lt;br /&gt;
&lt;br /&gt;
=== -spdot &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Write graph of the state space to a dot &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 100 -spdot my_statespace.dot&lt;br /&gt;
&lt;br /&gt;
=== -cbc_tests &amp;lt;Depth&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;File&amp;gt; ===&lt;br /&gt;
Generate test cases by constraint solving with maximum&lt;br /&gt;
length &#039;&#039;&#039;Depth&#039;&#039;&#039;, the last state satisfies &#039;&#039;&#039;EndPredicate&#039;&#039;&#039;&lt;br /&gt;
and the test cases are written to &#039;&#039;&#039;File&#039;&#039;&#039;. If the predicate is the empty string we assume truth. If the filename is the empty string no file is generated. See also the page on [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -cbc_cover &amp;lt;Operation&amp;gt; ===&lt;br /&gt;
When generating CB test cases, &#039;&#039;&#039;Operation&#039;&#039;&#039; should be covered.&lt;br /&gt;
The option can be given multiple times to specify several operations.&lt;br /&gt;
Alternatively, multiple operations can be separated by a comma. You can also use the option &amp;lt;pre&amp;gt;-cbc_cover_match PartialName&amp;lt;/pre&amp;gt; to match all operations whose name contains PartialName. See also the page about [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -test_description &amp;lt;File&amp;gt; ===&lt;br /&gt;
Read the options for constraint based test case generation from &#039;&#039;&#039;File&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== -bmc &amp;lt;Depth&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Run the [[Bounded_Model_Checking|bounded model checker]] until maximum trace depth &amp;lt;Depth&amp;gt; specified. Looks for invariant violations using the constraint-based test case generation algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -bmc 20&lt;br /&gt;
&lt;br /&gt;
=== -csp-guide &amp;lt;File&amp;gt; ===&lt;br /&gt;
Use the CSP File &#039;&#039;&#039;File&#039;&#039;&#039; to guide the B Machine (&amp;quot;CSP||B&amp;quot;).&lt;br /&gt;
(This feature is included since version 1.3.5-beta7.)&lt;br /&gt;
As of version 1.15.1 you can also specify a &amp;lt;tt&amp;gt;CSP_GUIDE_FILE&amp;lt;/tt&amp;gt;&lt;br /&gt;
DEFINITION (which also works in ProB2-UI).&lt;br /&gt;
&lt;br /&gt;
=== -rule_report &amp;lt;File&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Generates rule validation report for rules machines (.rmch) at the specified location &amp;lt;File&amp;gt; for the current animation state. Depending on the file extension an HTML or an XML version of the report is generated (.html/.xml).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.rmch -execute_all -rule_report my_report.html&lt;br /&gt;
&lt;br /&gt;
=== -machine_files_sha ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Computes SHA1 hash of all B files used by a B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.mch -machine_files_sha&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -check_machine_file_sha ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Compute and check SHA1 hash of a particular B file used by the main B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
probcli ./Demo/scheduler.mch -check_machine_file_sha scheduler.mch 1cab7ec89adc9f9b153af85c1ae16ba8a7a2a661&lt;br /&gt;
&lt;br /&gt;
== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
Set NO_COLOR environment variable to disable terminal colors.&lt;br /&gt;
See [https://no-color.org https://no-color.org].&lt;br /&gt;
&lt;br /&gt;
== Preferences ==&lt;br /&gt;
&lt;br /&gt;
You can use these preferences within the command:&lt;br /&gt;
&lt;br /&gt;
 -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;PREFERENCE&amp;gt;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;VALUE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| MAXINT&lt;br /&gt;
| nat ==&amp;gt; MaxInt, used for expressions such as xx::NAT (2147483647 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| MININT&lt;br /&gt;
| neg ==&amp;gt; MinInt, used for expressions such as xx::INT (-2147483648 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SETSIZE&lt;br /&gt;
| nat ==&amp;gt; Size of unspecified deferred sets in SETS section. Will be used if a set s is neither enumerated, has no no card(s)=nr predicate in the PROPERTIES and has no scope_s == Nr DEFINITION.&lt;br /&gt;
|-&lt;br /&gt;
| MAX_INITIALISATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Initialisations and ways to setup constants computed&lt;br /&gt;
|-&lt;br /&gt;
| MAX_OPERATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Enablings per Operation Computed&lt;br /&gt;
|-&lt;br /&gt;
| ANIMATE_SKIP_OPERATIONS&lt;br /&gt;
| bool ==&amp;gt; Animate operations which are skip or PRE C THEN skip&lt;br /&gt;
|-&lt;br /&gt;
| COMPRESSION&lt;br /&gt;
| bool ==&amp;gt; Use more aggressive COMPRESSION when storing states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_CLOSURES_FOR_STATE&lt;br /&gt;
| bool ==&amp;gt; Convert lazy form back into explicit form for Variables, Constants, Operation Arguments. ProB will sometimes try to keep certain sets symbolic. If this preference is TRUE then ProB will try to expand those sets for variables and constants after an operation has been executed.&lt;br /&gt;
|-&lt;br /&gt;
| SYMBOLIC&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of lambdas and set comprehensions. By default ProB will keep certain sets symbolic (e.g., sets it knows are infinite). When this preference is set to TRUE then all set comprehensions and lambda abstractions will at first be kept symbolic and only expanded into explicit form if needed.&lt;br /&gt;
|-&lt;br /&gt;
| CLPFD&lt;br /&gt;
| bool ==&amp;gt; Use CLP(FD) solver for B integers (restricts range to -2^28..2^28-1 on 32 bit computers). Setting this preference to TRUE should substantially improve ProB&#039;s ability to solve complicated predicates involving integers. However, it may cause CLP(FD) overflows in certain circumstances.&lt;br /&gt;
|-&lt;br /&gt;
| SMT&lt;br /&gt;
| bool ==&amp;gt; Enable SMT-Mode (aggressive treatment of : and /: inside predicates). With this predicate set to TRUE ProB will be better at solving certain constraint solving tasks. It should be enabled when doing constraint-based invariant or deadlock checking. ProB Tcl/Tk will turn this preference on automatically for those checks.&lt;br /&gt;
|-&lt;br /&gt;
| STATIC_ORDERING&lt;br /&gt;
| bool ==&amp;gt; Use static ordering to enumerate constants which occur in most PROPERTIES first&lt;br /&gt;
|-&lt;br /&gt;
| SYMMETRY_MODE&lt;br /&gt;
| [off,flood,nauty,hash] ==&amp;gt; Symmetry Mode: off,flood,canon,nauty,hash&lt;br /&gt;
|-&lt;br /&gt;
| TIME_OUT&lt;br /&gt;
| nat1 ==&amp;gt; Time out for computing enabled transitions (in ms, is multiplied by a factor for other computations)&lt;br /&gt;
|-&lt;br /&gt;
| PROOF_INFO&lt;br /&gt;
| bool ==&amp;gt; Use Proof Information to restrict invariant checking to affected unproven clauses. Most useful in EventB for models exported from Rodin.&lt;br /&gt;
|-&lt;br /&gt;
| TRY_FIND_ABORT&lt;br /&gt;
| bool ==&amp;gt; Try more aggressively to detect ill-defined expressions (e.g. applying function outside of domain), may slow down animator&lt;br /&gt;
|-&lt;br /&gt;
| NUMBER_OF_ANIMATED_ABSTRACTIONS&lt;br /&gt;
| nat ==&amp;gt; How many levels of refined models are animated by default&lt;br /&gt;
|-&lt;br /&gt;
| ALLOW_INCOMPLETE_SETUP_CONSTANTS&lt;br /&gt;
| bool ==&amp;gt; Allow ProB to proceed even if only part of the CONSTANTS have been found.&lt;br /&gt;
|-&lt;br /&gt;
| PARTITION_PROPERTIES&lt;br /&gt;
| bool ==&amp;gt; Partition predicates (PROPERTIES) into components&lt;br /&gt;
|-&lt;br /&gt;
| USE_RECORD_CONSTRUCTION&lt;br /&gt;
| bool ==&amp;gt; Records: Check if axioms/properties describe a record pattern&lt;br /&gt;
|-&lt;br /&gt;
| OPERATION_REUSE&lt;br /&gt;
| bool ==&amp;gt; Try and reuse previously computed operation effects in B/Event-B&lt;br /&gt;
|-&lt;br /&gt;
| SHOW_EVENTB_ANY_VALUES&lt;br /&gt;
| bool ==&amp;gt; Show top-level ANY variable values of B Operations without parameters as parameters&lt;br /&gt;
|-&lt;br /&gt;
| RANDOMISE_OPERATION_ORDER&lt;br /&gt;
| bool ==&amp;gt; Randomise order of operations when computing successor states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_FORALL_UPTO&lt;br /&gt;
| nat ==&amp;gt; When analysing predicates: max. domain size for expansion of forall (use 0 to disable expansion)&lt;br /&gt;
|-&lt;br /&gt;
| MAX_DISPLAY_SET&lt;br /&gt;
| int ==&amp;gt; Max size for pretty-printing sets (-1 means no limit)&lt;br /&gt;
|-&lt;br /&gt;
| CSP_STRIP_SOURCE_LOC&lt;br /&gt;
| bool ==&amp;gt; Strip source location for CSP; will speed up model checking&lt;br /&gt;
|-&lt;br /&gt;
| WARN_WHEN_EXPANDING_INFINITE_CLOSURES&lt;br /&gt;
| int ==&amp;gt; Warn when expanding infinite closures if MAXINT larger than:&lt;br /&gt;
|-&lt;br /&gt;
| TRACE_INFO&lt;br /&gt;
| bool ==&amp;gt; Provide various tracing information on the terminal/console.&lt;br /&gt;
|-&lt;br /&gt;
| DOUBLE_EVALUATION&lt;br /&gt;
| bool ==&amp;gt; Evaluate PREDICATES positively and negatively when analyzing assertions or properties&lt;br /&gt;
|-&lt;br /&gt;
| RECURSIVE&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of *Recursive* set Comprehensions and lambdas&lt;br /&gt;
|-&lt;br /&gt;
| IGNORE_HASH_COLLISIONS&lt;br /&gt;
| bool ==&amp;gt; Ignore Hash Collisions (if true not all states may be computed, visited states are not memorised !)&lt;br /&gt;
|-&lt;br /&gt;
| FORGET_STATE_SPACE&lt;br /&gt;
| bool ==&amp;gt; Do not remember state space (mainly useful in conjunction with Ignore Hash Collisions)&lt;br /&gt;
|-&lt;br /&gt;
| NEGATED_INVARIANT_CHECKING&lt;br /&gt;
| bool ==&amp;gt; Perform double evaluation (positive and negative) when checking invariants&lt;br /&gt;
|-&lt;br /&gt;
| CSE&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination&lt;br /&gt;
|-&lt;br /&gt;
| CSE_SUBST&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination also for B substitutions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 5000 -p CLPFD TRUE -p SYMMETRY_MODE hash -mc 1000&lt;br /&gt;
&lt;br /&gt;
== Some probcli examples ==&lt;br /&gt;
&lt;br /&gt;
To load a file My.mch, setup the constants and initialize it do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init My.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To load a file M.mch, setup the constants, initialize and then check all assertions with Atelier-B&#039;s default values for MININT and MAXINT and an increased timeout of 5 seconds do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init -assertions -p MAXINT 2147483647 -p MININT -2147483647 -p TIME_OUT 5000 M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fully model check a specification M.mch while tryining to minimize memory consumption do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -model_check -p COMPRESSION TRUE M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To model check a specification M.mch while trying to minimize memory consumption further by not storing processed stats and using symmetry reduction (and accepting hash collisions) do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -p COMPRESSION -p IGNORE_HASH_COLLISIONS TRUE -p FORGET_STATE_SPACE TRUE -p SYMMETRY_MODE hash -model_check M.mch &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command-line Arguments for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
Note that the stand-alone Tcl/Tk version also supports a limited form of command-line preferences:&lt;br /&gt;
* &#039;&#039;&#039;FILE&#039;&#039;&#039; (the name/path of the file to be loaded)&lt;br /&gt;
* &#039;&#039;&#039;-prefs PREF_FILE&#039;&#039;&#039;  (to use a specific preferences file, rather than the default ProB_Preferences.pl in your home folder)&lt;br /&gt;
* &#039;&#039;&#039;-batch&#039;&#039;&#039; (to instruct ProB not to try to bring up windows, but to print information only to the terminal)&lt;br /&gt;
* &#039;&#039;&#039;-selfcheck&#039;&#039;&#039; (to run the standard unit tests)&lt;br /&gt;
* &#039;&#039;&#039;-t&#039;&#039;&#039; (to perform the Trace Check on the default trace file associated with the specification)&lt;br /&gt;
* &#039;&#039;&#039;-tcl TCL_Command&#039;&#039;&#039; (to run a particular pre-defined Tcl command)&lt;br /&gt;
* &#039;&#039;&#039;-mc&#039;&#039;&#039; (to perform model checking)&lt;br /&gt;
* &#039;&#039;&#039;-c&#039;&#039;&#039; (to compute the coverage)&lt;br /&gt;
* &#039;&#039;&#039;-ref&#039;&#039;&#039; (to perform the default trace refinment check)&lt;br /&gt;
&lt;br /&gt;
However, the comand-line version of ProB, called &#039;&#039;&#039;probcli&#039;&#039;&#039;, provides more features. It also does not depend on Tcl/Tk and can therefore be run on systems without Tcl/Tk.&lt;br /&gt;
{{Feedback}}&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6054</id>
		<title>Using the Command-Line Version of ProB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Using_the_Command-Line_Version_of_ProB&amp;diff=6054"/>
		<updated>2025-12-23T15:56:55Z</updated>

		<summary type="html">&lt;p&gt;Michael Leuschel: /* -animate  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorial]]&lt;br /&gt;
[[Category:User Manual]]&lt;br /&gt;
[[Category:ProB Cli]]&lt;br /&gt;
&lt;br /&gt;
The command-line version of ProB, called &amp;lt;b&amp;gt;probcli&amp;lt;/b&amp;gt;, offers many of the features of the standalone Tcl/Tk Version via the command-line. As such, you can run ProB from your shell scripts or in your Makefiles.&lt;br /&gt;
These pages refer to version 1.6 of ProB. Some features are only available in the nightly build of ProB. You can run &amp;lt;tt&amp;gt;probcli –help&amp;lt;/tt&amp;gt; to find out which commands are supported by your version of ProB. For Bash users we provide [[Bash Completion|command completion]] support.&lt;br /&gt;
&lt;br /&gt;
Note: the order of commands is not relevant for &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; (except within groups of commands such as &amp;lt;tt&amp;gt;-p MAXINT 127&amp;lt;/tt&amp;gt;). Any argument that is not recognised by &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; is treated as a filename to be analysed.&lt;br /&gt;
&lt;br /&gt;
[[file:ProBTerminalizerDemo.gif|center||600px]]&lt;br /&gt;
&lt;br /&gt;
== Conventions used ==&lt;br /&gt;
&lt;br /&gt;
The following conventions are used in this guide:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;replaceme&amp;gt;&lt;br /&gt;
| All values that should be replaced with some value are shown withing &amp;lt; &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | line breaks&lt;br /&gt;
| Command synopsis for command may be broken up on several lines. When typing commands enter all option on the same line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;probcli [--help]&lt;br /&gt;
&amp;lt;filename&amp;gt; [ &amp;lt;options&amp;gt; ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The underscore within all options can as of version 1.5.1-beta7 be replaced with dashes. Also, all commands can either be typed with single leading dashes or double leading dashes.&lt;br /&gt;
For example, all of the following commands have the same effect:&lt;br /&gt;
 probcli M.mch -model_check&lt;br /&gt;
 probcli M.mch -model-check&lt;br /&gt;
 probcli M.mch --model_check&lt;br /&gt;
 probcli M.mch --model-check&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
=== -mc &amp;lt;nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| model check; checking at most &amp;lt;nr&amp;gt; states&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 100&lt;br /&gt;
&lt;br /&gt;
Note: with a value of nr=1 ProB will only inspect the &amp;quot;virtual&amp;quot; root node (and compute its outgoing transitions).&lt;br /&gt;
Also see the related options &amp;lt;tt&amp;gt;-nodead, -noinv, -nogoal, -noass&amp;lt;/tt&amp;gt; to influence which kinds of errors are reported by &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You can also set a target goal predicate using the &amp;lt;tt&amp;gt;-goal &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command and limit the scope of the model checking using the &amp;lt;tt&amp;gt;-scope &amp;quot;PRED&amp;quot;&amp;lt;/tt&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
=== -model_check ===&lt;br /&gt;
&lt;br /&gt;
The same as &amp;lt;tt&amp;gt;-mc&amp;lt;/tt&amp;gt; but without a limit on the number of nodes checked.&lt;br /&gt;
ProB will run until the entire state space is explored.&lt;br /&gt;
&lt;br /&gt;
=== -no&amp;lt;x&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| restrict errors reported by model checking (-mc), TLC model checking (-mc_with_tlc), animation (-animate) and execution (-execute) with &amp;lt;x&amp;gt;=dead,inv,goal,ass&lt;br /&gt;
* -nodead : do not report deadlocks&lt;br /&gt;
* -noinv : do not report invariant violations&lt;br /&gt;
* -nogoal : do not stop if a state satisfying the GOAL predicate has been found&lt;br /&gt;
* -noass : do not report assertion violations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -mc 1000 -nodead -nogoal&lt;br /&gt;
&lt;br /&gt;
=== -disable_timeout ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| turn off ProB&#039;s timeout mechanism, e.g., for computing enabled operations and invariant checking; this can sometimes speed up model checking (-mc or -model_check) and animation (-animate). Available as of version 1.5.1-beta7.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model-check -disable-timeout&lt;br /&gt;
&lt;br /&gt;
=== -bf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed breadth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -bf -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -df ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| proceed depth-first during model checking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -df -mc 1000&lt;br /&gt;
&lt;br /&gt;
=== -mc_mode &amp;lt;M&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| influence how the model checker proceeds. Available as of version 1.5.1. Supersedes the &amp;lt;tt&amp;gt;-df&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; switches.&lt;br /&gt;
Possible values for the mode &amp;lt;M&amp;gt; are: &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt; (depth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;bf&amp;lt;/tt&amp;gt; (breadth-first traversal),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;mixed&amp;lt;/tt&amp;gt; (mixed depth-first / breadth-first traversal with random choice; currently the default),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt; (choosing next node to process completely at random), &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; (similar to random, but uses the Prolog hash function of a node instead of a random number generator),&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt; (try and use &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; provided by user in &amp;lt;tt&amp;gt;DEFINITIONS&amp;lt;/tt&amp;gt; clause). Some explanations can be found [[Blocks_World_(Directed_Model_Checking)|in an example about directed model checking]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;tt&amp;gt;out_degree_hash&amp;lt;/tt&amp;gt; (prioritise nodes with fewer outgoing transitions; mainly useful for deadlock checking)&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
  probcli my.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
=== --timeout &amp;lt;N&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Global timeout in ms for model checking and refinement checking. &lt;br /&gt;
This does not influence the timeout used for computing individual transitions/operations.&lt;br /&gt;
This has to be set with the -p TIME_OUT &amp;lt;N&amp;gt;. Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference also influences other computations, such as invariant checking or static assertion checking, where it is multiplied by a factor. See the description of the -p option.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -timeout 10000&lt;br /&gt;
&lt;br /&gt;
=== -t ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| trace check (associated .trace file must exist)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t&lt;br /&gt;
&lt;br /&gt;
=== -trace_replay &amp;lt;KIND&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Replay a trace file in the given format (json,prolog,B).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
KIND is either json, prolog, B. The old ProB format is prolog. The trace files generated by ProB2-UI are json (with .prob2trace extension). The B format consists of a sequence of B operation calls.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -trace_replay json my.prob2trace&lt;br /&gt;
&lt;br /&gt;
Alternative command -det_trace_replay KIND FILE.&lt;br /&gt;
&lt;br /&gt;
=== -init ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| initialise specification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init&lt;br /&gt;
 nr_of_components(1)&lt;br /&gt;
 % checking_component_properties(1,[])&lt;br /&gt;
 % enumerating_constants_without_constraints([typedval(fd(_24428,ID),global(ID),iv)])&lt;br /&gt;
 % grounding_wait_flags&lt;br /&gt;
 grounding_component(1)&lt;br /&gt;
 grounding_component(2)&lt;br /&gt;
 % found_enumeration_of_constants(0,2)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,2))&lt;br /&gt;
 % found_enumeration_of_constants(0,1)&lt;br /&gt;
 % backtrack(found_enumeration_of_constants(0,1))&lt;br /&gt;
 &amp;lt;- 0: SETUP_CONSTANTS :: root&lt;br /&gt;
 % Could not set up constants with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation of constants.&lt;br /&gt;
  | 0: SETUP_CONSTANTS success --&amp;gt;0&lt;br /&gt;
  - &amp;lt;- 1: INITIALISATION :: 0&lt;br /&gt;
 % Could not initialise with parameters from trace file.&lt;br /&gt;
 % Will attempt any possible initialisation.&lt;br /&gt;
 ALL OPERATIONS COVERED&lt;br /&gt;
  -  | 1: INITIALISATION success --&amp;gt;2&lt;br /&gt;
  -  - SUCCESS&lt;br /&gt;
&lt;br /&gt;
=== -cbc &amp;lt;OPNAME&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| constraint-based invariant checking for an operation (also use &amp;lt;OPNAME&amp;gt;=all)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -cbc all&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Perform constraint-based deadlock checking (also use -cbc_deadlock_pred PRED)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This will try to find a state which satisfies the invariant and properties and where no operation/event is enabled.&lt;br /&gt;
Note: if ProB finds a counter example then the machine cannot be proven to be deadlock free. However, the particular state may not be reachable from the initial state(s). If you want to find a reachable deadlock you have to use the model checker.&lt;br /&gt;
&lt;br /&gt;
=== -cbc_deadlock_pred &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based deadlock finding given a predicate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is like -cbc_deadlock but you provide an additional predicate. ProB will only find deadlocks which also make this predicate true.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_deadlock_pred &amp;quot;n=15&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -cbc_assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based checking of assertions on constants&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants which make an assertion (on constants) false.&lt;br /&gt;
&lt;br /&gt;
You can use the extra command &amp;lt;tt&amp;gt;-cbc_output_file FILE&amp;lt;/tt&amp;gt; to write the result of this check to a file.&lt;br /&gt;
You can also use the extra command &amp;lt;tt&amp;gt;-cbc_option contradiction_check&amp;lt;/tt&amp;gt; to ask ProB to check if there is a contradiction in the properties (in case the check did not find a counter-example to the assertions). The extra command &amp;lt;tt&amp;gt;-cbc_option unsat_core&amp;lt;/tt&amp;gt; tells ProB to compute the unsatisfiable core in case a proof the assertions was found.&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;TIME_OUT&amp;lt;/tt&amp;gt; preference is multiplied by 10 for this command.&lt;br /&gt;
&lt;br /&gt;
There are various variations of this command:&lt;br /&gt;
 -cbc_assertions_proof&lt;br /&gt;
 -cbc_assertions_tautology_proof &lt;br /&gt;
Both commands do not allow enumeration warnings to occur.&lt;br /&gt;
The latter command  ignores the PROPERTIES and tries to check whether the ASSERTION(s) are tautologies.&lt;br /&gt;
Both commands can be useful to use ProB as a Prover/Disprover (as is done in Atelier-B 4.3).&lt;br /&gt;
&lt;br /&gt;
=== -cbc_sequence &amp;lt;SEQ&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Constraint-based searching for a sequence of operation names (separated by semicolons)&lt;br /&gt;
|}&lt;br /&gt;
This will try and find a solution for the constants, initial variable values and parameters which make execution of the given sequence of operations possible.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch  -cbc_sequence &amp;quot;op1;op2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -strict ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| raise error and stop probcli if anything unexpected happens, e.g., if model checking finds a counter example or trace checking fails or any unexpected error happens&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -t -strict&lt;br /&gt;
&lt;br /&gt;
=== -expcterr &amp;lt;ERR&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| expect error to occur (&amp;lt;ERR&amp;gt;=cbc,mc,ltl,...)&lt;br /&gt;
Tell ProB that you expect a certain error to occur. Mainly useful for regression tests (in conjunction with the -strict option).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli examples/B/Benchmarks/CarlaTravelAgencyErr.mch -mc 1000 -expcterr invariant_violation -strict&lt;br /&gt;
&lt;br /&gt;
=== -animate &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| random animation (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Animates the machine randomly, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-animate_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100&lt;br /&gt;
&lt;br /&gt;
Variations&lt;br /&gt;
  -animate_all : animate until deadlock reached&lt;br /&gt;
  -animate_until_ltl P : animate until LTL property holds on trace&lt;br /&gt;
  -animate_until_ltl_state_property P : animate until current state satisifes LTL state property&lt;br /&gt;
&lt;br /&gt;
=== -execute &amp;lt;Nr&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| execution (max Nr steps)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Executes the &amp;quot;first&amp;quot; enabled operation of a machine, maximally Nr of steps. It will stop if a deadlock is reached and report an error. You can also use the command &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;, which will only stop at a deadlock (and not report an error). Be careful: &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt; could run forever.&lt;br /&gt;
&lt;br /&gt;
In contrast to -animate, -execute will&lt;br /&gt;
* always choose the first enabled operation it finds and stop searching for further enabled operations in that state (-animate will compute all enabled operations up to the limit set by the &amp;lt;tt&amp;gt;MAX_OPERATIONS&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MAX_INITIALISATIONS&amp;lt;/tt&amp;gt; preference and then choose randomly); the order of operations in the B machine is thus important for -execute&lt;br /&gt;
* not store intermediate states in the state space; as such -execute is faster but after execution one only has access to the first state and the final state of execution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 100&lt;br /&gt;
&lt;br /&gt;
=== -execute_all===&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;tt&amp;gt;-execute &amp;lt;Nr&amp;gt;&amp;lt;/tt&amp;gt; above.&lt;br /&gt;
&lt;br /&gt;
=== -det_check ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if every step of the animation is deterministic (i.e., only one operation is possible, and it can only be executed in one possible way as far as parameters and result is concerned).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -animate 100 -det_check&lt;br /&gt;
&lt;br /&gt;
=== -det_constants ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check if animation steps are deterministic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Checks if the SETUP_CONSTANTS step is deterministic (i.e., only one way to set up the constants is possible).&lt;br /&gt;
Currently this option has only an effect for the -animate &amp;lt;Nr&amp;gt; and the -init commands.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -det_constants&lt;br /&gt;
=== -his &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save animation history to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the animation (or model checking) history to a text file. Operations are separated by semicolons.&lt;br /&gt;
The output can be adapted using the -his_option command. With -his_option show_states the -his command will also write out all states to the file (in the form of comments before and after operations). With -his_option show_init only the initial state is written out.&lt;br /&gt;
The -his command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
See also the -sptxt command to only write the current values of variables and constants to a file.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
Additionally we can have the initialised variables and constants:&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_init supersimple.mch&lt;br /&gt;
&lt;br /&gt;
And we can have in addition the values of the variables in between (and at the end):&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -his history.txt -his_option show_states supersimple.mch&lt;br /&gt;
&lt;br /&gt;
With -his_option trace_file as only option, probcli will write the history in Prolog format, which can later be used by the -t command.&lt;br /&gt;
&lt;br /&gt;
=== -i ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| interactive animation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After performing the other commands, ProB stays in interactive mode and allows the user to manually animate the loaded specification.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -i&lt;br /&gt;
&lt;br /&gt;
=== -repl ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start interactive read-eval-print-loop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p CLPFD TRUE -repl&lt;br /&gt;
&lt;br /&gt;
A list of commands can be obtained by typing &amp;lt;tt&amp;gt;:help&amp;lt;/tt&amp;gt; (just help for versions 1.3.x of probcli). The interactive read-eval-print-loop can be exited using &amp;lt;tt&amp;gt;:q&amp;lt;/tt&amp;gt; (just typing a return on a blank line for versions 1.3.x of probcli)..&lt;br /&gt;
If in addition you want see a graphical representation of the solutions found you can use the following command and open the &amp;lt;tt&amp;gt;out.dot&amp;lt;/tt&amp;gt; file using dotty or GraphViz:&lt;br /&gt;
 probcli -repl -evaldot ~/out.dot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;lt;tt&amp;gt;-eval&amp;lt;/tt&amp;gt; command to evaluate specific formulas or expressions:&lt;br /&gt;
 probcli -eval &amp;quot;1+2&amp;quot;&lt;br /&gt;
For convenience, these formulas can also be put into a separate file:&lt;br /&gt;
 probcli -eval_file MyFormula.txt&lt;br /&gt;
&lt;br /&gt;
=== -c ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print coverage statistics&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -c&lt;br /&gt;
&lt;br /&gt;
You can also use the longer name for the command:&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage&lt;br /&gt;
&lt;br /&gt;
There is also a version which prints a shorter summary (and which is much faster for large state spaces):&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 --coverage_summary&lt;br /&gt;
&lt;br /&gt;
=== -cc &amp;lt;Nr&amp;gt; &amp;lt;Nr&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print and check coverage statistics&lt;br /&gt;
Print coverage statistics and check that the given number of nodes and transitions have been computed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -cc 10 25&lt;br /&gt;
&lt;br /&gt;
=== -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set &amp;lt;PREFERENCE&amp;gt; to &amp;lt;VALUE&amp;gt;. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can also use --pref instead of -p.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 8000 -p CLPFD TRUE -mc 10000&lt;br /&gt;
&lt;br /&gt;
=== -pref_group &amp;lt;PREFGROUP&amp;gt; &amp;lt;SETTING&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set to the group of preferences &amp;lt;PREFGROUP&amp;gt; to a predefined setting &amp;lt;SETTING&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pref_group model_check unlimited&lt;br /&gt;
&lt;br /&gt;
Available groups and settings are:&lt;br /&gt;
&lt;br /&gt;
* PREFERENCE GROUP integer : SETTINGS [int32] : Values for MAXINT and MININT&lt;br /&gt;
* PREFERENCE GROUP time_out : SETTINGS [disable_time_out] : To disable TIME_OUT&lt;br /&gt;
* PREFERENCE GROUP model_check : SETTINGS [disable_max,unlimited] : Model Checking Limits&lt;br /&gt;
* PREFERENCE GROUP dot_colors : SETTINGS [classic,dreams,winter] : Colours for Dot graphs&lt;br /&gt;
&lt;br /&gt;
=== -prefs &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Set preferences from preference file &amp;lt;FILE&amp;gt;. The file should be created by the Tcl/Tk version of ProB; this version automatically creates a file called ProB_Preferences.pl. For more information about preferences please have a look at [[Using_the_Command-Line_Version_of_ProB#Preferences | Preferences]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -prefs ProB_Preferences.pl&lt;br /&gt;
&lt;br /&gt;
=== -card &amp;lt;GS&amp;gt; &amp;lt;VAL&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set cardinality (scope in Alloy terminology) of a B deferred set. This overrides the default cardinality (which can be set using &amp;lt;tt&amp;gt;-p DEFAULT_SETSIZE &amp;lt;VAL&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -card PID 5&lt;br /&gt;
&lt;br /&gt;
=== -goal &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set GOAL predicate for model checker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -goal &amp;quot;n=18&amp;quot;  -strict -expcterr goal_found&lt;br /&gt;
&lt;br /&gt;
=== -scope &amp;lt;PRED&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set SCOPE predicate for model checker; states which do not satisfy the SCOPE predicate will be ignored (invariant will not be checked and no outgoing transitions will be computed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 10000000 -scope &amp;quot;n&amp;lt;18&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
=== -s &amp;lt;PORT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on given port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ss ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on port 9000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sf ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| start socket server on some free port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -sptxt &amp;lt;FILE&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants and variables to a file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save the values of constants and variables to a text file in classical B syntax.&lt;br /&gt;
The -sptxt command is executed after the -init, -animate, -t or -mc commands.&lt;br /&gt;
The values are fully written out (some sets, e.g., infinite sets may be written out symbolically).&lt;br /&gt;
&lt;br /&gt;
See also the -his command.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -animate 5 -sptxt state.txt  supersimple.mch&lt;br /&gt;
&lt;br /&gt;
This will write the values of all variables and constants to the file state.txt after animating the machine 5 steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -cache &amp;lt;DIRECTORY&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save constants (and in future also variables) to a file to avoid recomputation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This commands saves the values of constants for the current B machine and puts those values into files in the specified directory. The command will also tell ProB to try and reuse constants saved for subsidiary machines (included using SEES for example) whenever possible.&lt;br /&gt;
The purpose of the command is to avoid recomputing constants as much as possible, as this can be very time consuming.&lt;br /&gt;
This also works for values of variables computed in the initialisation or even using operations.&lt;br /&gt;
However, we do not support refinements at the moment.&lt;br /&gt;
&lt;br /&gt;
Note: this command can also be used when starting up the ProB Tcl/Tk version.&lt;br /&gt;
&lt;br /&gt;
=== -logxml &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities and results of probcli in XML format in &amp;lt;LogFile&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A schema declaration file (xsd) can be found at &amp;lt;tt&amp;gt;doc/logxml_xsd.xml&amp;lt;/tt&amp;gt; in the ProB [[Download#Sourcecode|Prolog sources]].&lt;br /&gt;
The log file contains information about the various commands performed by probcli.&lt;br /&gt;
It also contains version information, the parameters provided to probcli and details about the errors that occured.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -logxml log.xml&lt;br /&gt;
&lt;br /&gt;
=== -logxml_write_vars &amp;lt;PREFIX&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| after processing other commands (such as -execute) write values of variables having prefix PREFIX in their name into the XML log file (if XML logging has been activated using the -logxml command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -execute 1000 -logxml log.xml -logxml_write_vars out&lt;br /&gt;
&lt;br /&gt;
=== -l &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in &amp;lt;LogFile&amp;gt; using Prolog format&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -l my.log&lt;br /&gt;
&lt;br /&gt;
=== -ll ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| log activities in /tmp/prob_cli_debug.log&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -ll&lt;br /&gt;
&lt;br /&gt;
=== -lg &amp;lt;LogFile&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| analyse &amp;lt;LogFile&amp;gt; using gnuplot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -pp &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -pp my_pp.mch&lt;br /&gt;
&lt;br /&gt;
=== -ppf &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| pretty-print internal representation to &amp;lt;FILE&amp;gt;, force printing of all type infos&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -ppf my_ppf.mch&lt;br /&gt;
&lt;br /&gt;
=== -v ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| set ProB into verbose mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 1000 -v&lt;br /&gt;
&lt;br /&gt;
=== -version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| print version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an alternate command called -svers which just prints the version number of ProB.&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli -version&lt;br /&gt;
 ProB Command Line Interface&lt;br /&gt;
   VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
   $LastChangedDate: 2011-11-16 18:36:18 +0100 (Wed, 16 Nov 2011) $&lt;br /&gt;
   Prolog: SICStus 4.2.0 (x86_64-darwin-10.6.0): Mon Mar  7 20:03:36 CET 2011&lt;br /&gt;
   Application Path: /Users/leuschel/svn_root/NewProB&lt;br /&gt;
&lt;br /&gt;
 probcli -svers&lt;br /&gt;
 VERSION 1.3.4-rc1 (9556:9570M)&lt;br /&gt;
&lt;br /&gt;
You can use &amp;lt;tt&amp;gt;probcli -version -v&amp;lt;/tt&amp;gt; to obtain more information about your version of probcli.&lt;br /&gt;
&lt;br /&gt;
=== -check_java_version ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check Java and B parser version information&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This command is available as of ProB version 1.5.1-beta5 or higher. It can be useful to check that your Java is correctly installed and that the ProB B parser can operate correctly&lt;br /&gt;
&lt;br /&gt;
 probcli -check_java_version&lt;br /&gt;
 Result of checking Java version:&lt;br /&gt;
  Java is correctly installed and version 1.7.0_55-b13 is compatible with ProB requirements (&amp;gt;= 1.7).&lt;br /&gt;
  ProB B Java Parser available in version: 2016-02-25 15:27:18.55.&lt;br /&gt;
&lt;br /&gt;
=== -assertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check ASSERTIONS of your machine&lt;br /&gt;
&lt;br /&gt;
If you provide the -t switch, the ASSERTIONS will be checked after executing your trace. Otherwise, they will be checked in an initial state.&lt;br /&gt;
ProB will automatically initialize the machine if you have not provide the -init or -t switch.&lt;br /&gt;
&lt;br /&gt;
You can also use -main_assertions to check only the ASSERTIONS found in the main file.&lt;br /&gt;
&lt;br /&gt;
If your ASSERTIONS are all static (i.e., make no reference to variables), then ProB will remove all CONSTANTS and PROPERTIES from your machine which are not linked (directly or indirectly) to the ASSERTIONS.&lt;br /&gt;
This optimization will only be made if you provide no other switch, such as -mc or -animate which may require the computation of the variables.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -assertions&lt;br /&gt;
&lt;br /&gt;
=== -property ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| virtually add predicate to PROPERTIES&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -property &amp;quot;PRED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== -properties ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check PROPERTIES&lt;br /&gt;
Note: you should probably first initialise the machine (e.g., with -init).&lt;br /&gt;
If the constants have not yet been set up, probcli will debug the properties.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties&lt;br /&gt;
&lt;br /&gt;
=== -dot_output &amp;lt;PATH&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| define path for generation of dot files for false properties or assertions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This option is applicable to -properties and -assertions. It will result in individual dot files being generated for every false or unknown property or assertion. Assertions are numbered A0,A1,... and properties P0,P1,... You can also force to generate dot files for all properties (i.e., also the true ones) using the -dot_all command-line flag.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -init -properties -dot_output somewhere/&lt;br /&gt;
&lt;br /&gt;
This will generate files somewhere/my_P0_false.dot, somewhere/my_P1_false.dot, ...&lt;br /&gt;
&lt;br /&gt;
=== -rc ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| runtime checking of types/pre-/post-conditions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlfile &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL formulas in file &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltlassertions ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| check LTL assertions (in DEFINITIONS)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -ltllimit &amp;lt;LIMIT&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| explore at most &amp;lt;LIMIT&amp;gt; states when model-checking LTL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -save &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| save state space for later refinement check&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -refchk &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| refinement check against previous saved state space&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch ...&lt;br /&gt;
&lt;br /&gt;
=== -mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Generate test cases for the given specification. Each test case consists of a sequence of operations resp. events (a so-called trace) that&lt;br /&gt;
* start in a state after an initialisation&lt;br /&gt;
* contain a requested operation/event&lt;br /&gt;
* end in a state where the &amp;lt;EndPredicate&amp;gt; is fulfilled&lt;br /&gt;
&lt;br /&gt;
The user can specify what requested operations/events are with the&lt;br /&gt;
option [[#-mcm_cover &amp;lt;Operation(s)&amp;gt;|-mcm_cover]].&lt;br /&gt;
&lt;br /&gt;
ProB uses a &amp;quot;breadth-first&amp;quot; approach to search for test cases. When all requested operations/events are covered by test cases within maximum length M, the algorithm will explore the complete state space with that maximum distance M from the initialisation. It outputs all found traces that satisfy the requirements above.&lt;br /&gt;
&lt;br /&gt;
The algorithm stops if either&lt;br /&gt;
* it has covered all required operations/events with the current search depth&lt;br /&gt;
* or it has reached the maximum search depth or maximum number of explored states.&lt;br /&gt;
&lt;br /&gt;
The required parameters are:&lt;br /&gt;
;Depth&lt;br /&gt;
: The maximum length of traces that the algorithm searches for test until it stops without covering all required operations/events.&lt;br /&gt;
;MaxStates&lt;br /&gt;
: The maximum number of explored states until the algorithm stops without covering all required operations/events.&lt;br /&gt;
;EndPredicate&lt;br /&gt;
: A predicate in B syntax that the last state of a trace must fulfil. If you do not have any restrictions on that state, use a trivially true predicate like &#039;&#039;&#039;1=1&#039;&#039;&#039;&lt;br /&gt;
;FILE&lt;br /&gt;
: The found test cases a written to the XML file &amp;lt;FILE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mcm_tests 10 2000 &amp;quot;EndStateVar=TRUE&amp;quot; testcases.xml -mcm_cover op1,op2&lt;br /&gt;
&lt;br /&gt;
generates test cases for the operations &#039;&#039;&#039;op1&#039;&#039;&#039; and &#039;&#039;&#039;op2&#039;&#039;&#039; of the specification &#039;&#039;&#039;my.mch&#039;&#039;&#039;. The maximum length of traces is 10, at most 2000 states are explored. Each test case ends in a state where the predicate &#039;&#039;&#039;EndStateVar=TRUE&#039;&#039;&#039; holds. The found test cases are written to a file &#039;&#039;&#039;testcases.xml&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of version 1.6.0, the operation arguments are also written to the XML file.&lt;br /&gt;
The preference &amp;lt;tt&amp;gt;INTERNAL_ARGUMENT_PREFIX&amp;lt;/tt&amp;gt; can be used to provide a prefix for internal operation arguments; any argument/parameter whose name starts with that prefix is considered an internal parameter and not shown in the trace file.&lt;br /&gt;
Also, as of version 1.6.0, the non-deterministic initialisations are shown in the XML trace file: all variables and constants where more than one possible initialisation exists are written into the trace file, as argument of an INITIALISATION event.&lt;br /&gt;
&lt;br /&gt;
=== -mcm_cover &amp;lt;Operation(s)&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Specify an operation or event that should be covered when generating test cases with the &#039;&#039;&#039;-mcm_test&#039;&#039;&#039; option. Multiple operations/events can be specified by seperating them by comma or by using &#039;&#039;&#039;-mcm_cover&#039;&#039;&#039; several times.&lt;br /&gt;
&lt;br /&gt;
See [[#-mcm_tests &amp;lt;Depth&amp;gt; &amp;lt;MaxStates&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;FILE&amp;gt;|-mcm-tests]] for further details.&lt;br /&gt;
&lt;br /&gt;
=== -spdot &amp;lt;FILE&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Write graph of the state space to a dot &amp;lt;FILE&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -mc 100 -spdot my_statespace.dot&lt;br /&gt;
&lt;br /&gt;
=== -cbc_tests &amp;lt;Depth&amp;gt; &amp;lt;EndPredicate&amp;gt; &amp;lt;File&amp;gt; ===&lt;br /&gt;
Generate test cases by constraint solving with maximum&lt;br /&gt;
length &#039;&#039;&#039;Depth&#039;&#039;&#039;, the last state satisfies &#039;&#039;&#039;EndPredicate&#039;&#039;&#039;&lt;br /&gt;
and the test cases are written to &#039;&#039;&#039;File&#039;&#039;&#039;. If the predicate is the empty string we assume truth. If the filename is the empty string no file is generated. See also the page on [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -cbc_cover &amp;lt;Operation&amp;gt; ===&lt;br /&gt;
When generating CB test cases, &#039;&#039;&#039;Operation&#039;&#039;&#039; should be covered.&lt;br /&gt;
The option can be given multiple times to specify several operations.&lt;br /&gt;
Alternatively, multiple operations can be separated by a comma. You can also use the option &amp;lt;pre&amp;gt;-cbc_cover_match PartialName&amp;lt;/pre&amp;gt; to match all operations whose name contains PartialName. See also the page about [[Test_Case_Generation]].&lt;br /&gt;
&lt;br /&gt;
=== -test_description &amp;lt;File&amp;gt; ===&lt;br /&gt;
Read the options for constraint based test case generation from &#039;&#039;&#039;File&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== -bmc &amp;lt;Depth&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Run the [[Bounded_Model_Checking|bounded model checker]] until maximum trace depth &amp;lt;Depth&amp;gt; specified. Looks for invariant violations using the constraint-based test case generation algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -bmc 20&lt;br /&gt;
&lt;br /&gt;
=== -csp-guide &amp;lt;File&amp;gt; ===&lt;br /&gt;
Use the CSP File &#039;&#039;&#039;File&#039;&#039;&#039; to guide the B Machine (&amp;quot;CSP||B&amp;quot;).&lt;br /&gt;
(This feature is included since version 1.3.5-beta7.)&lt;br /&gt;
As of version 1.15.1 you can also specify a &amp;lt;tt&amp;gt;CSP_GUIDE_FILE&amp;lt;/tt&amp;gt;&lt;br /&gt;
DEFINITION (which also works in ProB2-UI).&lt;br /&gt;
&lt;br /&gt;
=== -rule_report &amp;lt;File&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Generates rule validation report for rules machines (.rmch) at the specified location &amp;lt;File&amp;gt; for the current animation state. Depending on the file extension an HTML or an XML version of the report is generated (.html/.xml).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.rmch -execute_all -rule_report my_report.html&lt;br /&gt;
&lt;br /&gt;
=== -machine_files_sha ===&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Computes SHA1 hash of all B files used by a B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Useful in combination with &amp;lt;tt&amp;gt;-execute&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-execute_all&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli myrules.mch -machine_files_sha&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== -check_machine_file_sha ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:black; background-color:#FFFFEF; border:1px solid lightgray;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| Compute and check SHA1 hash of a particular B file used by the main B model.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
probcli ./Demo/scheduler.mch -check_machine_file_sha scheduler.mch 1cab7ec89adc9f9b153af85c1ae16ba8a7a2a661&lt;br /&gt;
&lt;br /&gt;
== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
Set NO_COLOR environment variable to disable terminal colors.&lt;br /&gt;
See [https://no-color.org https://no-color.org].&lt;br /&gt;
&lt;br /&gt;
== Preferences ==&lt;br /&gt;
&lt;br /&gt;
You can use these preferences within the command:&lt;br /&gt;
&lt;br /&gt;
 -p &amp;lt;PREFERENCE&amp;gt; &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;PREFERENCE&amp;gt;&lt;br /&gt;
!style=&amp;quot;background-color:lightgrey;&amp;quot; | &amp;lt;VALUE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| MAXINT&lt;br /&gt;
| nat ==&amp;gt; MaxInt, used for expressions such as xx::NAT (2147483647 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| MININT&lt;br /&gt;
| neg ==&amp;gt; MinInt, used for expressions such as xx::INT (-2147483648 for 4 byte ints)&lt;br /&gt;
|-&lt;br /&gt;
| DEFAULT_SETSIZE&lt;br /&gt;
| nat ==&amp;gt; Size of unspecified deferred sets in SETS section. Will be used if a set s is neither enumerated, has no no card(s)=nr predicate in the PROPERTIES and has no scope_s == Nr DEFINITION.&lt;br /&gt;
|-&lt;br /&gt;
| MAX_INITIALISATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Initialisations and ways to setup constants computed&lt;br /&gt;
|-&lt;br /&gt;
| MAX_OPERATIONS&lt;br /&gt;
| nat ==&amp;gt; Max Number of Enablings per Operation Computed&lt;br /&gt;
|-&lt;br /&gt;
| ANIMATE_SKIP_OPERATIONS&lt;br /&gt;
| bool ==&amp;gt; Animate operations which are skip or PRE C THEN skip&lt;br /&gt;
|-&lt;br /&gt;
| COMPRESSION&lt;br /&gt;
| bool ==&amp;gt; Use more aggressive COMPRESSION when storing states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_CLOSURES_FOR_STATE&lt;br /&gt;
| bool ==&amp;gt; Convert lazy form back into explicit form for Variables, Constants, Operation Arguments. ProB will sometimes try to keep certain sets symbolic. If this preference is TRUE then ProB will try to expand those sets for variables and constants after an operation has been executed.&lt;br /&gt;
|-&lt;br /&gt;
| SYMBOLIC&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of lambdas and set comprehensions. By default ProB will keep certain sets symbolic (e.g., sets it knows are infinite). When this preference is set to TRUE then all set comprehensions and lambda abstractions will at first be kept symbolic and only expanded into explicit form if needed.&lt;br /&gt;
|-&lt;br /&gt;
| CLPFD&lt;br /&gt;
| bool ==&amp;gt; Use CLP(FD) solver for B integers (restricts range to -2^28..2^28-1 on 32 bit computers). Setting this preference to TRUE should substantially improve ProB&#039;s ability to solve complicated predicates involving integers. However, it may cause CLP(FD) overflows in certain circumstances.&lt;br /&gt;
|-&lt;br /&gt;
| SMT&lt;br /&gt;
| bool ==&amp;gt; Enable SMT-Mode (aggressive treatment of : and /: inside predicates). With this predicate set to TRUE ProB will be better at solving certain constraint solving tasks. It should be enabled when doing constraint-based invariant or deadlock checking. ProB Tcl/Tk will turn this preference on automatically for those checks.&lt;br /&gt;
|-&lt;br /&gt;
| STATIC_ORDERING&lt;br /&gt;
| bool ==&amp;gt; Use static ordering to enumerate constants which occur in most PROPERTIES first&lt;br /&gt;
|-&lt;br /&gt;
| SYMMETRY_MODE&lt;br /&gt;
| [off,flood,nauty,hash] ==&amp;gt; Symmetry Mode: off,flood,canon,nauty,hash&lt;br /&gt;
|-&lt;br /&gt;
| TIME_OUT&lt;br /&gt;
| nat1 ==&amp;gt; Time out for computing enabled transitions (in ms, is multiplied by a factor for other computations)&lt;br /&gt;
|-&lt;br /&gt;
| PROOF_INFO&lt;br /&gt;
| bool ==&amp;gt; Use Proof Information to restrict invariant checking to affected unproven clauses. Most useful in EventB for models exported from Rodin.&lt;br /&gt;
|-&lt;br /&gt;
| TRY_FIND_ABORT&lt;br /&gt;
| bool ==&amp;gt; Try more aggressively to detect ill-defined expressions (e.g. applying function outside of domain), may slow down animator&lt;br /&gt;
|-&lt;br /&gt;
| NUMBER_OF_ANIMATED_ABSTRACTIONS&lt;br /&gt;
| nat ==&amp;gt; How many levels of refined models are animated by default&lt;br /&gt;
|-&lt;br /&gt;
| ALLOW_INCOMPLETE_SETUP_CONSTANTS&lt;br /&gt;
| bool ==&amp;gt; Allow ProB to proceed even if only part of the CONSTANTS have been found.&lt;br /&gt;
|-&lt;br /&gt;
| PARTITION_PROPERTIES&lt;br /&gt;
| bool ==&amp;gt; Partition predicates (PROPERTIES) into components&lt;br /&gt;
|-&lt;br /&gt;
| USE_RECORD_CONSTRUCTION&lt;br /&gt;
| bool ==&amp;gt; Records: Check if axioms/properties describe a record pattern&lt;br /&gt;
|-&lt;br /&gt;
| OPERATION_REUSE&lt;br /&gt;
| bool ==&amp;gt; Try and reuse previously computed operation effects in B/Event-B&lt;br /&gt;
|-&lt;br /&gt;
| SHOW_EVENTB_ANY_VALUES&lt;br /&gt;
| bool ==&amp;gt; Show top-level ANY variable values of B Operations without parameters as parameters&lt;br /&gt;
|-&lt;br /&gt;
| RANDOMISE_OPERATION_ORDER&lt;br /&gt;
| bool ==&amp;gt; Randomise order of operations when computing successor states&lt;br /&gt;
|-&lt;br /&gt;
| EXPAND_FORALL_UPTO&lt;br /&gt;
| nat ==&amp;gt; When analysing predicates: max. domain size for expansion of forall (use 0 to disable expansion)&lt;br /&gt;
|-&lt;br /&gt;
| MAX_DISPLAY_SET&lt;br /&gt;
| int ==&amp;gt; Max size for pretty-printing sets (-1 means no limit)&lt;br /&gt;
|-&lt;br /&gt;
| CSP_STRIP_SOURCE_LOC&lt;br /&gt;
| bool ==&amp;gt; Strip source location for CSP; will speed up model checking&lt;br /&gt;
|-&lt;br /&gt;
| WARN_WHEN_EXPANDING_INFINITE_CLOSURES&lt;br /&gt;
| int ==&amp;gt; Warn when expanding infinite closures if MAXINT larger than:&lt;br /&gt;
|-&lt;br /&gt;
| TRACE_INFO&lt;br /&gt;
| bool ==&amp;gt; Provide various tracing information on the terminal/console.&lt;br /&gt;
|-&lt;br /&gt;
| DOUBLE_EVALUATION&lt;br /&gt;
| bool ==&amp;gt; Evaluate PREDICATES positively and negatively when analyzing assertions or properties&lt;br /&gt;
|-&lt;br /&gt;
| RECURSIVE&lt;br /&gt;
| bool ==&amp;gt; Lazy expansion of *Recursive* set Comprehensions and lambdas&lt;br /&gt;
|-&lt;br /&gt;
| IGNORE_HASH_COLLISIONS&lt;br /&gt;
| bool ==&amp;gt; Ignore Hash Collisions (if true not all states may be computed, visited states are not memorised !)&lt;br /&gt;
|-&lt;br /&gt;
| FORGET_STATE_SPACE&lt;br /&gt;
| bool ==&amp;gt; Do not remember state space (mainly useful in conjunction with Ignore Hash Collisions)&lt;br /&gt;
|-&lt;br /&gt;
| NEGATED_INVARIANT_CHECKING&lt;br /&gt;
| bool ==&amp;gt; Perform double evaluation (positive and negative) when checking invariants&lt;br /&gt;
|-&lt;br /&gt;
| CSE&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination&lt;br /&gt;
|-&lt;br /&gt;
| CSE_SUBST&lt;br /&gt;
| bool ==&amp;gt; Perform common-sub-expression elimination also for B substitutions&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 probcli my.mch -p TIME_OUT 5000 -p CLPFD TRUE -p SYMMETRY_MODE hash -mc 1000&lt;br /&gt;
&lt;br /&gt;
== Some probcli examples ==&lt;br /&gt;
&lt;br /&gt;
To load a file My.mch, setup the constants and initialize it do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init My.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To load a file M.mch, setup the constants, initialize and then check all assertions with Atelier-B&#039;s default values for MININT and MAXINT and an increased timeout of 5 seconds do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -init -assertions -p MAXINT 2147483647 -p MININT -2147483647 -p TIME_OUT 5000 M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fully model check a specification M.mch while tryining to minimize memory consumption do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -model_check -p COMPRESSION TRUE M.mch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To model check a specification M.mch while trying to minimize memory consumption further by not storing processed stats and using symmetry reduction (and accepting hash collisions) do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
probcli -p COMPRESSION -p IGNORE_HASH_COLLISIONS TRUE -p FORGET_STATE_SPACE TRUE -p SYMMETRY_MODE hash -model_check M.mch &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Command-line Arguments for ProB Tcl/Tk ==&lt;br /&gt;
&lt;br /&gt;
Note that the stand-alone Tcl/Tk version also supports a limited form of command-line preferences:&lt;br /&gt;
* &#039;&#039;&#039;FILE&#039;&#039;&#039; (the name/path of the file to be loaded)&lt;br /&gt;
* &#039;&#039;&#039;-prefs PREF_FILE&#039;&#039;&#039;  (to use a specific preferences file, rather than the default ProB_Preferences.pl in your home folder)&lt;br /&gt;
* &#039;&#039;&#039;-batch&#039;&#039;&#039; (to instruct ProB not to try to bring up windows, but to print information only to the terminal)&lt;br /&gt;
* &#039;&#039;&#039;-selfcheck&#039;&#039;&#039; (to run the standard unit tests)&lt;br /&gt;
* &#039;&#039;&#039;-t&#039;&#039;&#039; (to perform the Trace Check on the default trace file associated with the specification)&lt;br /&gt;
* &#039;&#039;&#039;-tcl TCL_Command&#039;&#039;&#039; (to run a particular pre-defined Tcl command)&lt;br /&gt;
* &#039;&#039;&#039;-mc&#039;&#039;&#039; (to perform model checking)&lt;br /&gt;
* &#039;&#039;&#039;-c&#039;&#039;&#039; (to compute the coverage)&lt;br /&gt;
* &#039;&#039;&#039;-ref&#039;&#039;&#039; (to perform the default trace refinment check)&lt;br /&gt;
&lt;br /&gt;
However, the comand-line version of ProB, called &#039;&#039;&#039;probcli&#039;&#039;&#039;, provides more features. It also does not depend on Tcl/Tk and can therefore be run on systems without Tcl/Tk.&lt;br /&gt;
{{Feedback}}&lt;/div&gt;</summary>
		<author><name>Michael Leuschel</name></author>
	</entry>
</feed>