<?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=Jens+Bendisposto</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=Jens+Bendisposto"/>
	<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Special:Contributions/Jens_Bendisposto"/>
	<updated>2026-05-27T06:00:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=4235</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=4235"/>
		<updated>2020-02-13T12:47:52Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
[[Image:EvalB.png|600px |link=http://eval-b.stups.uni-duesseldorf.de]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Does not work in Safari/... on Mac as http in https does not work&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://eval-b.stups.uni-duesseldorf.de/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://eval-b.stups.uni-duesseldorf.de/ Start ProB Logic Calculator].&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
&amp;lt;!-- An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website]. --&amp;gt;&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z].&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=4234</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=4234"/>
		<updated>2020-02-13T12:47:28Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
[[Image:EvalB.png|600px |link=http://eval-b.stups.uni-duesseldorf.de]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Does not work in Safari/... on Mac as http in https does not work&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://eval-b.stups.uni-duesseldorf.de/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://eval-b.stups.uni-duesseldorf.de/ Start ProB Logic Calculator].&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
&amp;lt;!-- An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website]. --&amp;gt;&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z].&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=4233</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=4233"/>
		<updated>2020-02-13T12:46:53Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
[[Image:EvalB.png|600px |link=http://eval-b.stups.uni-duesseldorf.de/]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Does not work in Safari/... on Mac as http in https does not work&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://eval-b.stups.uni-duesseldorf.de/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://eval-b.stups.uni-duesseldorf.de/ Start ProB Logic Calculator].&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
&amp;lt;!-- An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website]. --&amp;gt;&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z].&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Main_Page/&amp;diff=4013</id>
		<title>Main Page/</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Main_Page/&amp;diff=4013"/>
		<updated>2018-07-19T12:24:50Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: Redirected page to The ProB Animator and Model Checker&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[The ProB Animator and Model Checker]]&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Main_Page/&amp;diff=4012</id>
		<title>Main Page/</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Main_Page/&amp;diff=4012"/>
		<updated>2018-07-19T12:23:59Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: Redirected page to Main Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Main Page]]&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Getting_Involved&amp;diff=4003</id>
		<title>Getting Involved</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Getting_Involved&amp;diff=4003"/>
		<updated>2018-06-20T09:44:48Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Manual]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
=== The ProB Java Core and UI ===&lt;br /&gt;
see the README in our [https://github.com/bendisposto/prob Github Repository]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Prolog Sources ===&lt;br /&gt;
If you want to contribute to the Prolog part of ProB, if you want to extend the ProB API, or need them as reference, you need the Prolog sources which can be downloaded from [https://www3.hhu.de/stups/downloads/prob/source/ https://www3.hhu.de/stups/downloads/prob/source/]. To compile the sources you need a [http://www.sics.se/isl/sicstuswww/site/index.html SICStus Prolog] licence.&lt;br /&gt;
&lt;br /&gt;
=== Running ProB from Prolog ===&lt;br /&gt;
&lt;br /&gt;
You first need to download and install [http://www.sics.se/isl/sicstuswww/site/index.html SICStus Prolog]. Evaluation licenses (30-days) are available. You need SICStus 4.2 or newer (we will switch to SICStus 4.3 in summer or autumn of 2014).&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;
Probably you should also install a recent Active Tcl distribution.&lt;br /&gt;
&lt;br /&gt;
Now, you need the ProB Prolog sources.&lt;br /&gt;
&lt;br /&gt;
Now, add the following to your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file (at least on Mac OS; 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 $PROB_SOURCE_DIR; 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 &amp;lt;tt&amp;gt;prob&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&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 test=&#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;
Before using ProB for the first time from source you should build the extensions. The minimal extensions are counter 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;
&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;
On Mac you may have to add a symbolic link to gawk in order to build the ProZ fuzz extension:&lt;br /&gt;
 sudo ln -s /usr/bin/awk /usr/bin/gawk&lt;br /&gt;
&lt;br /&gt;
Now you can start the testing console using &amp;lt;tt&amp;gt;test&amp;lt;/tt&amp;gt;. You can e.g. type the number of a unit test to run it, 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;
=== 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;
&lt;br /&gt;
Supposing you have set the variable &amp;lt;tt&amp;gt; PROBDIR&amp;lt;/tt&amp;gt; (see above) and have the &amp;lt;tt&amp;gt;rlwrap&amp;lt;/tt&amp;gt; tool, you can define the following alias (e.g., in your &amp;lt;tt&amp;gt;.bash_login&amp;lt;/tt&amp;gt; file on Mac OS X):&lt;br /&gt;
 alias test=&#039;cd $PROBDIR; rlwrap sicstus -Dprob_safe_mode=true -l $PROBDIR/src/test_runner.pl --goal &amp;quot;test_repl.&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Now you can start the test runner:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ test&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 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;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Java_API&amp;diff=3973</id>
		<title>ProB Java API</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Java_API&amp;diff=3973"/>
		<updated>2018-02-14T18:31:48Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: /* Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Components]]&lt;br /&gt;
[[Category:ProB Java API]]&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
                    &amp;lt;p class=&amp;quot;btn btn-lg btn-outline&amp;quot;&amp;gt;&lt;br /&gt;
		      &amp;lt;i class=&amp;quot;fa fa-road&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; [[ProB Java API Tutorial | Tutorial]]&lt;br /&gt;
                    &amp;lt;/p&amp;gt;&lt;br /&gt;
                    &amp;lt;p class=&amp;quot;btn btn-lg btn-outline&amp;quot;&amp;gt;&lt;br /&gt;
		      &amp;lt;i class=&amp;quot;fa fa-cog&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; [https://www3.hhu.de/stups/handbook/prob2/handbook.html  Developer Manual]&lt;br /&gt;
                    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Additional Material ==&lt;br /&gt;
*[[ProB 2.0 Development]]&lt;br /&gt;
*[https://github.com/bendisposto/prob2_tooling_template ProB 2.0 Tooling Template]&lt;br /&gt;
*[[Programmatic_Abstractions_in_the_ProB_2.0_API]]&lt;br /&gt;
*[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q ProB 2.0 Requirements Document] &amp;lt;br/&amp;gt;(if you want to comment on the Document, please use goo.gl/KS2bh)&lt;br /&gt;
&lt;br /&gt;
*[[Media:Extending prob.pdf|Rodin User and Developer Workshop 2012 - Tutorial Presentation]]&lt;br /&gt;
&lt;br /&gt;
*[[Tutorial13|Rodin User and Developer Workshop 2013 - Tutorial]]&lt;br /&gt;
&lt;br /&gt;
*[[ProB 2.0 within Rodin and a HTML Visualization Example]]&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Nightly builds of ProB 2 for Rodin 3 can be obtained from within Rodin using the update site [http://nightly.cobra.cs.uni-duesseldorf.de/prob2/updates/nightly/ http://nightly.cobra.cs.uni-duesseldorf.de/prob2/updates/nightly/].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Java_API&amp;diff=3972</id>
		<title>ProB Java API</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Java_API&amp;diff=3972"/>
		<updated>2018-02-13T02:52:15Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: /* Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Components]]&lt;br /&gt;
[[Category:ProB Java API]]&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
                    &amp;lt;p class=&amp;quot;btn btn-lg btn-outline&amp;quot;&amp;gt;&lt;br /&gt;
		      &amp;lt;i class=&amp;quot;fa fa-road&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; [[ProB Java API Tutorial | Tutorial]]&lt;br /&gt;
                    &amp;lt;/p&amp;gt;&lt;br /&gt;
                    &amp;lt;p class=&amp;quot;btn btn-lg btn-outline&amp;quot;&amp;gt;&lt;br /&gt;
		      &amp;lt;i class=&amp;quot;fa fa-cog&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; [https://www3.hhu.de/stups/handbook/prob2/current/devel/html/ Developer Manual]&lt;br /&gt;
                    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Additional Material ==&lt;br /&gt;
*[[ProB 2.0 Development]]&lt;br /&gt;
*[https://github.com/bendisposto/prob2_tooling_template ProB 2.0 Tooling Template]&lt;br /&gt;
*[[Programmatic_Abstractions_in_the_ProB_2.0_API]]&lt;br /&gt;
*[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q ProB 2.0 Requirements Document] &amp;lt;br/&amp;gt;(if you want to comment on the Document, please use goo.gl/KS2bh)&lt;br /&gt;
&lt;br /&gt;
*[[Media:Extending prob.pdf|Rodin User and Developer Workshop 2012 - Tutorial Presentation]]&lt;br /&gt;
&lt;br /&gt;
*[[Tutorial13|Rodin User and Developer Workshop 2013 - Tutorial]]&lt;br /&gt;
&lt;br /&gt;
*[[ProB 2.0 within Rodin and a HTML Visualization Example]]&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Nightly builds of ProB 2 for Rodin 3 can be obtained from within Rodin using the update site [http://nightly.cobra.cs.uni-duesseldorf.de/prob2/updates/nightly/ http://nightly.cobra.cs.uni-duesseldorf.de/prob2/updates/nightly/].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3970</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3970"/>
		<updated>2018-02-07T12:59:58Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to submit a bug report, please use our &amp;lt;a id=&amp;quot;myCustomTrigger&amp;quot;&amp;gt; bug tracker&amp;lt;/a&amp;gt;. You may also want to ask questions within our &amp;lt;a href=&amp;quot;https://groups.google.com/d/forum/prob-users&amp;quot;&amp;gt;prob-users group&amp;lt;/a&amp;gt;.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&lt;br /&gt;
  src=&amp;quot;https://code.jquery.com/jquery-2.2.4.min.js&amp;quot;&lt;br /&gt;
  integrity=&amp;quot;sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=&amp;quot;&lt;br /&gt;
  crossorigin=&amp;quot;anonymous&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://probjira.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-w0bwo4/b/14/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&amp;amp;collectorId=9e060bbf&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;window.ATL_JQ_PAGE_PROPS =  {&lt;br /&gt;
	&amp;quot;triggerFunction&amp;quot;: function(showCollectorDialog) {&lt;br /&gt;
		//Requires that jQuery is available! &lt;br /&gt;
		jQuery(&amp;quot;#myCustomTrigger&amp;quot;).click(function(e) {&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
			showCollectorDialog();&lt;br /&gt;
		});&lt;br /&gt;
	}};&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We use a free [http://www.atlassian.com/software/views/open-source-license-request/ Open Source license] from Atlassian!&lt;br /&gt;
&lt;br /&gt;
[[Image:jira.png|200px|]]&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3969</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3969"/>
		<updated>2018-02-07T12:48:15Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to submit a bug report, please use our &amp;lt;a id=&amp;quot;myCustomTrigger&amp;quot;&amp;gt; bug tracker&amp;lt;/a&amp;gt;. You may also want to ask questions within our [https://groups.google.com/d/forum/prob-users prob-users group].&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&lt;br /&gt;
  src=&amp;quot;https://code.jquery.com/jquery-2.2.4.min.js&amp;quot;&lt;br /&gt;
  integrity=&amp;quot;sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=&amp;quot;&lt;br /&gt;
  crossorigin=&amp;quot;anonymous&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://probjira.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-w0bwo4/b/14/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&amp;amp;collectorId=9e060bbf&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;window.ATL_JQ_PAGE_PROPS =  {&lt;br /&gt;
	&amp;quot;triggerFunction&amp;quot;: function(showCollectorDialog) {&lt;br /&gt;
		//Requires that jQuery is available! &lt;br /&gt;
		jQuery(&amp;quot;#myCustomTrigger&amp;quot;).click(function(e) {&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
			showCollectorDialog();&lt;br /&gt;
		});&lt;br /&gt;
	}};&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We use a free [http://www.atlassian.com/software/views/open-source-license-request/ Open Source license] from Atlassian!&lt;br /&gt;
&lt;br /&gt;
[[Image:jira.png|200px|]]&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3968</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3968"/>
		<updated>2018-02-07T12:46:19Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to submit a bug report, please use our [https://probjira.atlassian.net bug tracker]. You may also want to ask questions within our [https://groups.google.com/d/forum/prob-users prob-users group].&lt;br /&gt;
&lt;br /&gt;
[[Image:jira.png|200px|link=https://probjira.atlassian.net]]&lt;br /&gt;
&lt;br /&gt;
We use a free [http://www.atlassian.com/software/views/open-source-license-request/ Open Source license] from Atlassian!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;a id=&amp;quot;myCustomTrigger&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Click&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&lt;br /&gt;
  src=&amp;quot;https://code.jquery.com/jquery-2.2.4.min.js&amp;quot;&lt;br /&gt;
  integrity=&amp;quot;sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=&amp;quot;&lt;br /&gt;
  crossorigin=&amp;quot;anonymous&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://probjira.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-w0bwo4/b/14/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&amp;amp;collectorId=9e060bbf&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;window.ATL_JQ_PAGE_PROPS =  {&lt;br /&gt;
	&amp;quot;triggerFunction&amp;quot;: function(showCollectorDialog) {&lt;br /&gt;
		//Requires that jQuery is available! &lt;br /&gt;
		jQuery(&amp;quot;#myCustomTrigger&amp;quot;).click(function(e) {&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
			showCollectorDialog();&lt;br /&gt;
		});&lt;br /&gt;
	}};&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3967</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3967"/>
		<updated>2018-02-07T12:44:51Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to submit a bug report, please use our [https://probjira.atlassian.net bug tracker]. You may also want to ask questions within our [https://groups.google.com/d/forum/prob-users prob-users group].&lt;br /&gt;
&lt;br /&gt;
[[Image:jira.png|200px|link=https://probjira.atlassian.net]]&lt;br /&gt;
&lt;br /&gt;
We use a free [http://www.atlassian.com/software/views/open-source-license-request/ Open Source license] from Atlassian!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&lt;br /&gt;
  src=&amp;quot;https://code.jquery.com/jquery-2.2.4.min.js&amp;quot;&lt;br /&gt;
  integrity=&amp;quot;sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=&amp;quot;&lt;br /&gt;
  crossorigin=&amp;quot;anonymous&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://probjira.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-w0bwo4/b/14/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&amp;amp;collectorId=9e060bbf&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;window.ATL_JQ_PAGE_PROPS =  {&lt;br /&gt;
	&amp;quot;triggerFunction&amp;quot;: function(showCollectorDialog) {&lt;br /&gt;
		//Requires that jQuery is available! &lt;br /&gt;
		jQuery(&amp;quot;#myCustomTrigger&amp;quot;).click(function(e) {&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
			showCollectorDialog();&lt;br /&gt;
		});&lt;br /&gt;
	}};&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3966</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3966"/>
		<updated>2018-02-07T12:41:03Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to submit a bug report, please use our [https://probjira.atlassian.net bug tracker]. You may also want to ask questions within our [https://groups.google.com/d/forum/prob-users prob-users group].&lt;br /&gt;
&lt;br /&gt;
[[Image:jira.png|200px|link=https://probjira.atlassian.net]]&lt;br /&gt;
&lt;br /&gt;
We use a free [http://www.atlassian.com/software/views/open-source-license-request/ Open Source license] from Atlassian!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;foo&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://probjira.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-w0bwo4/b/14/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&amp;amp;collectorId=9e060bbf&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;window.ATL_JQ_PAGE_PROPS =  {&lt;br /&gt;
	&amp;quot;triggerFunction&amp;quot;: function(showCollectorDialog) {&lt;br /&gt;
		//Requires that jQuery is available! &lt;br /&gt;
		jQuery(&amp;quot;#myCustomTrigger&amp;quot;).click(function(e) {&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
			showCollectorDialog();&lt;br /&gt;
		});&lt;br /&gt;
	}};&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3965</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3965"/>
		<updated>2018-02-07T12:39:29Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to submit a bug report, please use our [https://probjira.atlassian.net bug tracker]. You may also want to ask questions within our [https://groups.google.com/d/forum/prob-users prob-users group].&lt;br /&gt;
&lt;br /&gt;
[[Image:jira.png|200px|link=https://probjira.atlassian.net]]&lt;br /&gt;
&lt;br /&gt;
We use a free [http://www.atlassian.com/software/views/open-source-license-request/ Open Source license] from Atlassian!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://probjira.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-w0bwo4/b/14/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&amp;amp;collectorId=9e060bbf&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;window.ATL_JQ_PAGE_PROPS =  {&lt;br /&gt;
	&amp;quot;triggerFunction&amp;quot;: function(showCollectorDialog) {&lt;br /&gt;
		//Requires that jQuery is available! &lt;br /&gt;
		jQuery(&amp;quot;#myCustomTrigger&amp;quot;).click(function(e) {&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
			showCollectorDialog();&lt;br /&gt;
		});&lt;br /&gt;
	}};&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3964</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3964"/>
		<updated>2018-02-07T12:39:12Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to submit a bug report, please use our [https://probjira.atlassian.net bug tracker]. You may also want to ask questions within our [https://groups.google.com/d/forum/prob-users prob-users group].&lt;br /&gt;
&lt;br /&gt;
[[Image:jira.png|200px|link=https://probjira.atlassian.net]]&lt;br /&gt;
&lt;br /&gt;
We use a free [http://www.atlassian.com/software/views/open-source-license-request/ Open Source license] from Atlassian!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
fooo&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3907</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3907"/>
		<updated>2017-10-06T07:53:15Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
[[Image:EvalB.png|600px |link=http://wyvern.cs.uni-duesseldorf.de:8443/index.html]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Does not work in Safari/... on Mac as http in https does not work&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8443/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://wyvern.cs.uni-duesseldorf.de:8443/index.html Start ProB Logic Calculator].&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
&amp;lt;!-- An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website]. --&amp;gt;&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z].&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://wyvern.cs.uni-duesseldorf.de:8443/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3878</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3878"/>
		<updated>2017-10-04T15:22:10Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8443/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
A front-end with larger text areas is [http://wyvern.cs.uni-duesseldorf.de:8080/evalB/index.html available here].&lt;br /&gt;
An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://wyvern.cs.uni-duesseldorf.de:8443/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3877</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3877"/>
		<updated>2017-10-04T15:21:31Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;https://wyvern.cs.uni-duesseldorf.de:8443/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
A front-end with larger text areas is [http://wyvern.cs.uni-duesseldorf.de:8080/evalB/index.html available here].&lt;br /&gt;
An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://wyvern.cs.uni-duesseldorf.de:8443/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Java_API&amp;diff=3700</id>
		<title>ProB Java API</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Java_API&amp;diff=3700"/>
		<updated>2016-09-30T08:09:16Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: /* Additional Material */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Components]]&lt;br /&gt;
[[Category:ProB Java API]]&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
                    &amp;lt;p class=&amp;quot;btn btn-lg btn-outline&amp;quot;&amp;gt;&lt;br /&gt;
		      &amp;lt;i class=&amp;quot;fa fa-road&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; [[ProB Java API Tutorial | Tutorial]]&lt;br /&gt;
                    &amp;lt;/p&amp;gt;&lt;br /&gt;
                    &amp;lt;p class=&amp;quot;btn btn-lg btn-outline&amp;quot;&amp;gt;&lt;br /&gt;
		      &amp;lt;i class=&amp;quot;fa fa-cog&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; [http://nightly.cobra.cs.uni-duesseldorf.de/prob2/prob2-handbook/nightly/devel/html Developer Manual]&lt;br /&gt;
                    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Additional Material ==&lt;br /&gt;
*[[ProB 2.0 Development]]&lt;br /&gt;
*[[Programmatic_Abstractions_in_the_ProB_2.0_API]]&lt;br /&gt;
*[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q ProB 2.0 Requirements Document] &amp;lt;br/&amp;gt;(if you want to comment on the Document, please use goo.gl/KS2bh)&lt;br /&gt;
&lt;br /&gt;
*[[Media:Extending prob.pdf|Rodin User and Developer Workshop 2012 - Tutorial Presentation]]&lt;br /&gt;
&lt;br /&gt;
*[[Tutorial13|Rodin User and Developer Workshop 2013 - Tutorial]]&lt;br /&gt;
&lt;br /&gt;
*[[ProB 2.0 within Rodin and a HTML Visualization Example]]&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Nightly builds of ProB 2 for Rodin 3 can be obtained from within Rodin using the update site [http://nightly.cobra.cs.uni-duesseldorf.de/prob2/updates/nightly/ http://nightly.cobra.cs.uni-duesseldorf.de/prob2/updates/nightly/].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3685</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Bugs&amp;diff=3685"/>
		<updated>2016-07-29T12:46:42Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to submit a bug report, please use our [https://probjira.atlassian.net bug tracker]. You may also want to ask questions within our [https://groups.google.com/d/forum/prob-users prob-users group].&lt;br /&gt;
&lt;br /&gt;
[[Image:jira.png|200px|link=https://probjira.atlassian.net]]&lt;br /&gt;
&lt;br /&gt;
We use a free [http://www.atlassian.com/software/views/open-source-license-request/ Open Source license] from Atlassian!&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=The_ProB_Animator_and_Model_Checker&amp;diff=3124</id>
		<title>The ProB Animator and Model Checker</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=The_ProB_Animator_and_Model_Checker&amp;diff=3124"/>
		<updated>2015-10-15T11:17:14Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|width=&amp;quot;60%&amp;quot; style=&amp;quot;padding-right:20px;&amp;quot; |ProB is an animator, constraint solver and model checker for the [http://en.wikipedia.org/wiki/B-Method B-Method] (see the [http://www.clearsy.com/en/our-specific-know-how/b-method/?lang=en B-Method site of Clearsy]). It allows fully automatic animation of B specifications, and can be used to systematically check a specification for a wide range of errors. The constraint-solving capabilities of ProB can also be used for model finding, deadlock checking and test-case generation.&lt;br /&gt;
&lt;br /&gt;
In addition to the B language, ProB also supports [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. ProB can be installed within [http://sourceforge.net/projects/rodin-b-sharp/ Rodin], where it comes with [http://www.stups.uni-duesseldorf.de/BMotionStudio/ BMotionStudio] to easily generate domain specific graphical visualizations.&lt;br /&gt;
&lt;br /&gt;
ProB is being used within Siemens, Alstom, and several other companies for [http://www.data-validation.fr data validation] of complicated properties for safety critical systems. Commercial support is provided by the spin-off company [http://www.formalmind.com Formal Mind].&lt;br /&gt;
&lt;br /&gt;
Part of the research and development was conducted within various research projects, such as the [http://www.epsrc.ac.uk/default.htm EPSRC] funded projects [http://users.ecs.soton.ac.uk/phh/abcd/ ABCD] and [http://users.ecs.soton.ac.uk/mal/ISM.html iMoc], the EU funded projects [http://rodin.cs.ncl.ac.uk/ Rodin], [http://www.deploy-project.eu/ Deploy] and [http://www.advance-ict.eu/ Advance] as well as the [http://www.dfg.de/ DFG] project [http://www.gepavas.de/ Gepavas]. &lt;br /&gt;
&lt;br /&gt;
Automatically generated test [http://nightly.cobra.cs.uni-duesseldorf.de/coverage/html/ coverage reports are available].&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;40%&amp;quot; style=&amp;quot;background:#EDF2F2;padding:15px;&amp;quot; | &#039;&#039;&#039;News&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;19/2/2015&#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, MC/DC coverage analysis for guards and invariants, improved TLC interface, bug fixes and improvements including but not limited to the constraint solver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3/6/2014&#039;&#039;&#039;&lt;br /&gt;
ProB supports [[Event-B Theories]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;30/03/2012&#039;&#039;&#039;&lt;br /&gt;
A first version of the online [[ProB_Logic_Calculator|ProB Logic Calculator]] is available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; &#039;&#039;&#039;&lt;br /&gt;
[[Download#Short Release History|More in Release History]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
The core of ProB is implemented in [http://www.sics.se/isl/sicstuswww/site/index.html SICStus Prolog] (but can be run without a SICStus Prolog license). The ProB constraint solver is implemented using co-routining and the CLP(FD) finite domain library of SICStus. An alternate [[Using_ProB_with_KODKOD | constraint solver based on Kodkod (and thus SAT)]] is also available within ProB, as is an alternate [[TLC|model checking engine (TLC)]] for low-level B specifications. The [[ProBLicence | ProB Licence can be found here]].&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
ProB covers a [[Summary of B Syntax|large part of B]], and we are striving towards full coverage of Atelier B and B4Free constructs. ProB supports B features such as non-deterministic operations, ANY statements, operations with complex arguments, sets, sequences, functions, lambda abstractions, set comprehensions, records, constants and properties, and many more. Not supported are the Atelier B tree operations and there are restrictions on DEFINITIONS. ProB does support multiple machines, refinements, and implementations. ProB can also be used for automated refinement checking and [[LTL Model Checking|LTL model checking]]. It also [[CSP-M|supports almost full CSP-M]] process descriptions (as of version 1.2.7), to be used on their own or to guide B machines for specification and property validation. The state space of the specifications can be [[Graphical Viewer|graphically visualized]]. &lt;br /&gt;
ProB also supports Z specifications (ProB in this context is sometimes called [[ProZ]]) as well as [[TLA|TLA+ specifications]]. We now also have an online [[ProB Logic Calculator]].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=3110</id>
		<title>User:Jens Bendisposto</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=3110"/>
		<updated>2015-09-18T15:48:52Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Formating_Sandbox]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Conferences]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Model Checkers]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:ProB 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[DMC]]&lt;br /&gt;
&lt;br /&gt;
[[parB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe id=&amp;quot;forum_embed&amp;quot;&lt;br /&gt;
 src=&amp;quot;javascript:void(0)&amp;quot;&lt;br /&gt;
 scrolling=&amp;quot;no&amp;quot;&lt;br /&gt;
 frameborder=&amp;quot;0&amp;quot;&lt;br /&gt;
 width=&amp;quot;900&amp;quot;&lt;br /&gt;
 height=&amp;quot;700&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 document.getElementById(&#039;forum_embed&#039;).src =&lt;br /&gt;
    &#039;https://groups.google.com/forum/embed/?place=forum/prob-users&#039;&lt;br /&gt;
    + &#039;&amp;amp;showsearch=true&amp;amp;showpopout=true&amp;amp;showtabs=false&#039;&lt;br /&gt;
    + &#039;&amp;amp;parenturl=&#039; + encodeURIComponent(window.location.href);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q  ProB 2.0 Requirements Document]&lt;br /&gt;
&lt;br /&gt;
{{Bugtrack}}&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=3109</id>
		<title>User:Jens Bendisposto</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=3109"/>
		<updated>2015-09-18T15:47:43Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Formating_Sandbox]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Conferences]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Model Checkers]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:ProB 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[DMC]]&lt;br /&gt;
&lt;br /&gt;
[[parB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe id=&amp;quot;forum_embed&amp;quot;&lt;br /&gt;
 src=&#039;https://groups.google.com/forum/embed/?place=forum/prob-users&#039;&lt;br /&gt;
    + &#039;&amp;amp;showsearch=true&amp;amp;showpopout=true&amp;amp;showtabs=false&amp;amp;parenturl=http://stups.hhu.de/ProB/w/User:Jens_Bendisposto&#039;&lt;br /&gt;
 scrolling=&amp;quot;no&amp;quot;&lt;br /&gt;
 frameborder=&amp;quot;0&amp;quot;&lt;br /&gt;
 width=&amp;quot;900&amp;quot;&lt;br /&gt;
 height=&amp;quot;700&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q  ProB 2.0 Requirements Document]&lt;br /&gt;
&lt;br /&gt;
{{Bugtrack}}&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=3108</id>
		<title>User:Jens Bendisposto</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=3108"/>
		<updated>2015-09-18T15:46:25Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Formating_Sandbox]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Conferences]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Model Checkers]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:ProB 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[DMC]]&lt;br /&gt;
&lt;br /&gt;
[[parB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe id=&amp;quot;forum_embed&amp;quot;&lt;br /&gt;
 src=&#039;https://groups.google.com/forum/embed/?place=forum/prob-users&#039;&lt;br /&gt;
    + &#039;&amp;amp;showsearch=true&amp;amp;showpopout=true&amp;amp;showtabs=false&#039;&lt;br /&gt;
 scrolling=&amp;quot;no&amp;quot;&lt;br /&gt;
 frameborder=&amp;quot;0&amp;quot;&lt;br /&gt;
 width=&amp;quot;900&amp;quot;&lt;br /&gt;
 height=&amp;quot;700&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q  ProB 2.0 Requirements Document]&lt;br /&gt;
&lt;br /&gt;
{{Bugtrack}}&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=3107</id>
		<title>User:Jens Bendisposto</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=3107"/>
		<updated>2015-09-18T15:45:15Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Formating_Sandbox]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Conferences]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Model Checkers]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:ProB 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[DMC]]&lt;br /&gt;
&lt;br /&gt;
[[parB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe id=&amp;quot;forum_embed&amp;quot;&lt;br /&gt;
 src=&amp;quot;javascript:void(0)&amp;quot;&lt;br /&gt;
 scrolling=&amp;quot;no&amp;quot;&lt;br /&gt;
 frameborder=&amp;quot;0&amp;quot;&lt;br /&gt;
 width=&amp;quot;900&amp;quot;&lt;br /&gt;
 height=&amp;quot;700&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 document.getElementById(&#039;forum_embed&#039;).src =&lt;br /&gt;
    &#039;https://groups.google.com/forum/embed/?place=forum/prob-users&#039;&lt;br /&gt;
    + &#039;&amp;amp;showsearch=true&amp;amp;showpopout=true&amp;amp;showtabs=false&#039;&lt;br /&gt;
    + &#039;&amp;amp;parenturl=&#039; + encodeURIComponent(window.location.href);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q  ProB 2.0 Requirements Document]&lt;br /&gt;
&lt;br /&gt;
{{Bugtrack}}&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3091</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3091"/>
		<updated>2015-09-14T10:29:53Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8080/evalB/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
A front-end with larger text areas is [http://wyvern.cs.uni-duesseldorf.de:8080/evalB/index.html available here].&lt;br /&gt;
An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://wyvern.cs.uni-duesseldorf.de:8080/evalB/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3090</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=3090"/>
		<updated>2015-09-14T10:28:52Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;!-- &amp;lt;iframe src=&amp;quot;http://cobra.cs.uni-duesseldorf.de/evalB/embedded.jsp&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8080/evalB/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
A front-end with larger text areas is [http://wyvern.cs.uni-duesseldorf.de:8080/evalB/index.html available here].&lt;br /&gt;
An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://cobra.cs.uni-duesseldorf.de/evalB/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=MediaWiki:Sidebar&amp;diff=2883</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=MediaWiki:Sidebar&amp;diff=2883"/>
		<updated>2015-06-22T07:29:03Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*Navigation&lt;br /&gt;
** Main Page|Main Page&lt;br /&gt;
** User Manual|User Manual&lt;br /&gt;
** Tutorial|Tutorials&lt;br /&gt;
** Developer Manual|Developer Manual&lt;br /&gt;
** Benchmarks|Benchmarks&lt;br /&gt;
** ProBLicence|Licence&lt;br /&gt;
* Special Pages&lt;br /&gt;
** recentchanges-url|recentchanges&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2864</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2864"/>
		<updated>2015-04-27T11:25:05Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;!-- &amp;lt;iframe src=&amp;quot;http://cobra.cs.uni-duesseldorf.de/evalB/embedded.jsp&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8080/evalB/embedded.html&amp;quot; width=&amp;quot;780&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
A front-end with larger text areas is [http://wyvern.cs.uni-duesseldorf.de:8080/evalB/index.html available here].&lt;br /&gt;
An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://cobra.cs.uni-duesseldorf.de/evalB/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt; and it can easily be run locally using &amp;lt;tt&amp;gt;gradle jWR&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The [[ProB_Logic_Calculator_old|old version of the ProB Logic Calculator is still available]].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2863</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2863"/>
		<updated>2015-04-27T11:24:41Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;!-- &amp;lt;iframe src=&amp;quot;http://cobra.cs.uni-duesseldorf.de/evalB/embedded.jsp&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8080/evalB/embedded.html&amp;quot; width=&amp;quot;750&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
A front-end with larger text areas is [http://wyvern.cs.uni-duesseldorf.de:8080/evalB/index.html available here].&lt;br /&gt;
An alternative, older version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://cobra.cs.uni-duesseldorf.de/evalB/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt; and it can easily be run locally using &amp;lt;tt&amp;gt;gradle jWR&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The [[ProB_Logic_Calculator_old|old version of the ProB Logic Calculator is still available]].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2857</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2857"/>
		<updated>2015-04-26T17:24:51Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;!-- &amp;lt;iframe src=&amp;quot;http://cobra.cs.uni-duesseldorf.de/evalB/embedded.jsp&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8080/evalB/embedded.html&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;370&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
An alternative version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://cobra.cs.uni-duesseldorf.de/evalB/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt; and it can easily be run locally using &amp;lt;tt&amp;gt;gradle jWR&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The [[ProB_Logic_Calculator_old|old version of the ProB Logic Calculator is still available]].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2856</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2856"/>
		<updated>2015-04-26T17:16:13Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield.  A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;!-- &amp;lt;iframe src=&amp;quot;http://cobra.cs.uni-duesseldorf.de/evalB/embedded.jsp&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8080/evalB/embedded.html&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 3 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
An alternative version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://cobra.cs.uni-duesseldorf.de/evalB/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt; and it can easily be run locally using &amp;lt;tt&amp;gt;gradle jWR&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The [[ProB_Logic_Calculator_old|old version of the ProB Logic Calculator is still available]].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2855</id>
		<title>ProB Logic Calculator</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ProB_Logic_Calculator&amp;diff=2855"/>
		<updated>2015-04-26T17:14:50Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a ProB-based [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html logic calculator]. You can enter predicates and expressions in the upper textfield ([[Summary_of_B_Syntax|using B syntax]]). When you stop typing, ProB will evaluate the formula and display the result in the lower textfield. You can change the implicit quantification of free variables using the dropdown box on the right side. A series of examples for the &amp;quot;Evaluate&amp;quot; mode can be loaded from the examples menu. There is a [[ProB_Logic_Calculator#Small_Tutorial|small tutorial]] at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://cobra.cs.uni-duesseldorf.de/evalB/embedded.jsp&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;iframe src=&amp;quot;http://wyvern.cs.uni-duesseldorf.de:8080/evalB/embedded.html&amp;quot; width=&amp;quot;770&amp;quot; height=&amp;quot;450&amp;quot; border=&amp;quot;0&amp;quot; frameborder=&amp;quot;0&amp;quot; scrolling=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Your Browser does not suport IFrames.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above calculator has a time-out of 2.5 seconds, and &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt; is set to 127 and &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt; to -128.&lt;br /&gt;
An alternative version of the calculator is available at the [http://www.formalmind.com/en/blog/prob-logic-calculator Formal Mind website].&lt;br /&gt;
You can also [[Download|download ProB]] for execution on your computer, along with support for [http://en.wikipedia.org/wiki/B B], [http://www.event-b.org/ Event-B], [http://en.wikipedia.org/wiki/Communicating_sequential_processes CSP-M],&lt;br /&gt;
[http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+], and [http://en.wikipedia.org/wiki/Z_notation Z]. There are also 64-bit versions available for Linux and Mac (the above calculator only uses the 32-bit version).&lt;br /&gt;
&lt;br /&gt;
Short syntax guide for some of B&#039;s constructs: &lt;br /&gt;
* comments &amp;lt;tt&amp;gt;/* ... */&amp;lt;/tt&amp;gt;&lt;br /&gt;
* conjunction &amp;lt;tt&amp;gt;P &amp;amp; Q&amp;lt;/tt&amp;gt;, disjunction &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;, implication &amp;lt;tt&amp;gt;P =&amp;gt; Q&amp;lt;/tt&amp;gt;, equivalence &amp;lt;tt&amp;gt;P &amp;lt;=&amp;gt; Q&amp;lt;/tt&amp;gt;, negation &amp;lt;tt&amp;gt;not(P)&amp;lt;/tt&amp;gt;, existential quantification &amp;lt;tt&amp;gt;#x.(P)&amp;lt;/tt&amp;gt;, universal quantification &amp;lt;tt&amp;gt;!x.(P=&amp;gt;Q)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* equality &amp;lt;tt&amp;gt;x=y&amp;lt;/tt&amp;gt;, disequality &amp;lt;tt&amp;gt;x/=y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, converting predicate to value &amp;lt;tt&amp;gt;bool(P)&amp;lt;/tt&amp;gt;; Warning: &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt; are values and &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; predicates in B and cannot be combined using logical connectives.&lt;br /&gt;
* strings &amp;lt;tt&amp;gt;&amp;quot;...&amp;quot;&amp;lt;/tt&amp;gt;, set of all strings &amp;lt;tt&amp;gt;STRING&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic comparisons &amp;lt;tt&amp;gt;x &amp;lt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt; y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;lt;= y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x &amp;gt;= y&amp;lt;/tt&amp;gt;&lt;br /&gt;
* membership &amp;lt;tt&amp;gt;x:S&amp;lt;/tt&amp;gt;, not membership, &amp;lt;tt&amp;gt;x/:S&amp;lt;/tt&amp;gt;, subset &amp;lt;tt&amp;gt;S&amp;lt;:R&amp;lt;/tt&amp;gt;, strict subset &amp;lt;tt&amp;gt;S &amp;lt;&amp;lt;: R&amp;lt;/tt&amp;gt;&lt;br /&gt;
* arithmetic operators   &amp;lt;tt&amp;gt;x+y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x-y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x*y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x/y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x mod y&amp;lt;/tt&amp;gt;,  &amp;lt;tt&amp;gt;x**y&amp;lt;/tt&amp;gt; ,  &amp;lt;tt&amp;gt;succ(x)&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;pred(x)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* mathematical integers &amp;lt;tt&amp;gt;INTEGER&amp;lt;/tt&amp;gt;, mathematical natural numbers &amp;lt;tt&amp;gt;NATURAL&amp;lt;/tt&amp;gt;, implementable integers &amp;lt;tt&amp;gt;INT&amp;lt;/tt&amp;gt;, implementable naturals &amp;lt;tt&amp;gt;NAT&amp;lt;/tt&amp;gt;, maximum implementable integer &amp;lt;tt&amp;gt;MAXINT&amp;lt;/tt&amp;gt;, minimum implementable integer &amp;lt;tt&amp;gt;MININT&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty set &amp;lt;tt&amp;gt;{}&amp;lt;/tt&amp;gt;, set enumeration &amp;lt;tt&amp;gt;{x,y,...}&amp;lt;/tt&amp;gt;, comprehension set defined by predicate &amp;lt;tt&amp;gt;{x|P}&amp;lt;/tt&amp;gt;, lambda abstraction &amp;lt;tt&amp;gt;%x.(P|E)&amp;lt;/tt&amp;gt;, interval &amp;lt;tt&amp;gt;m..n&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set union &amp;lt;tt&amp;gt;S \/ T&amp;lt;/tt&amp;gt;, set intersection &amp;lt;tt&amp;gt;S /\ T&amp;lt;/tt&amp;gt;, set difference &amp;lt;tt&amp;gt;S - T&amp;lt;/tt&amp;gt;, power set &amp;lt;tt&amp;gt;POW(S)&amp;lt;/tt&amp;gt;, Cartesian product &amp;lt;tt&amp;gt;S*T&amp;lt;/tt&amp;gt;, cardinality of set &amp;lt;tt&amp;gt;card(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* set of relations between two sets &amp;lt;tt&amp;gt;S &amp;lt;-&amp;gt; T&amp;lt;/tt&amp;gt;, set of partial functions &amp;lt;tt&amp;gt;S +-&amp;gt; T&amp;lt;/tt&amp;gt;, set of total functions &amp;lt;tt&amp;gt;S --&amp;gt; T&amp;lt;/tt&amp;gt;&lt;br /&gt;
* relational image &amp;lt;tt&amp;gt;r[S]&amp;lt;/tt&amp;gt;, relational composition &amp;lt;tt&amp;gt;(r1 ; r2)&amp;lt;/tt&amp;gt;, transitive closure &amp;lt;tt&amp;gt;closure1(r)&amp;lt;/tt&amp;gt;, identity relation over a set &amp;lt;tt&amp;gt;id(S)&amp;lt;/tt&amp;gt;, domain of a relation &amp;lt;tt&amp;gt;dom(r)&amp;lt;/tt&amp;gt;, its range &amp;lt;tt&amp;gt;ran(r)&amp;lt;/tt&amp;gt;, its inverse &amp;lt;tt&amp;gt;r~&amp;lt;/tt&amp;gt;, relational overriding &amp;lt;tt&amp;gt;r1 &amp;lt;+ r2&amp;lt;/tt&amp;gt;&lt;br /&gt;
* empty sequence &amp;lt;tt&amp;gt;[]&amp;lt;/tt&amp;gt;, explicit sequence &amp;lt;tt&amp;gt;[x,y,...]&amp;lt;/tt&amp;gt;, concatenation &amp;lt;tt&amp;gt;s1^s2&amp;lt;/tt&amp;gt;, first element &amp;lt;tt&amp;gt;first(s)&amp;lt;/tt&amp;gt;, tail &amp;lt;tt&amp;gt;tail(s)&amp;lt;/tt&amp;gt;, prepend an element &amp;lt;tt&amp;gt;E-&amp;gt;s&amp;lt;/tt&amp;gt;, size of a sequence &amp;lt;tt&amp;gt;size(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* sets of sequences over a set &amp;lt;tt&amp;gt;seq(S)&amp;lt;/tt&amp;gt;, set of injective sequences &amp;lt;tt&amp;gt;iseq(S)&amp;lt;/tt&amp;gt;, set of permutations &amp;lt;tt&amp;gt;perm(S)&amp;lt;/tt&amp;gt;&lt;br /&gt;
More details can be found on our [[Summary_of_B_Syntax|page on the B syntax]]. Note: statements (aka substitutions) and B machine construction elements cannot be used above; you must enter either a predicate or an expression.&lt;br /&gt;
&lt;br /&gt;
The term &amp;lt;em&amp;gt;logic calculator&amp;lt;/em&amp;gt; is taken over from [http://research.microsoft.com/en-us/um/people/lamport/tla/logic-calculators.html Leslie Lamport].&lt;br /&gt;
An early implementation of a logic calculator is the [http://en.wikipedia.org/wiki/William_Stanley_Jevons#Logic Logic Piano].&lt;br /&gt;
&lt;br /&gt;
We are grateful for feedback about our logic calculator (send an email to [http://www.stups.uni-duesseldorf.de/~leuschel Michael Leuschel]). &lt;br /&gt;
You can also switch the calculator into [http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html TLA+] mode.&lt;br /&gt;
In future we plan to provide additional features:&lt;br /&gt;
* getting an unsat core for unsatisfiable formulas&lt;br /&gt;
* better feedback for syntax and type errors&lt;br /&gt;
* graphical visualization of formulas and models&lt;br /&gt;
* support for further alternative input syntax, such as [http://en.wikipedia.org/wiki/Z_notation Z]&lt;br /&gt;
* ability to change the parameters, e.g., use the [http://www.stups.uni-duesseldorf.de/w/Special:Publication/PlaggeLeuschel_Kodkod2012 ProB-Kodkod backend] instead of the default constraint-logic programming kernel.&lt;br /&gt;
&lt;br /&gt;
== Small Tutorial ==&lt;br /&gt;
&lt;br /&gt;
Here is a small tutorial to get you started.&lt;br /&gt;
B distinguishes &amp;lt;em&amp;gt;expressions&amp;lt;/em&amp;gt;, which have a value, and &amp;lt;em&amp;gt;predicates&amp;lt;/em&amp;gt; which can be either true or false.&lt;br /&gt;
First, let us type an expression:&lt;br /&gt;
 1+1&lt;br /&gt;
The calculator returns the value &amp;lt;tt&amp;gt;2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
A more complicated expression is:&lt;br /&gt;
 {1,2,3} \/ {1+2+3}&lt;br /&gt;
which has the value &amp;lt;tt&amp;gt;{1,2,3,6}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Now, let us type a simple predicate:&lt;br /&gt;
 1&amp;gt;2&lt;br /&gt;
The calculator tells us that this predicate is false.&lt;br /&gt;
We can combine predicates using the logical connectives.&lt;br /&gt;
For example, the following predicate is true:&lt;br /&gt;
 1&amp;gt;2 or 2&amp;gt;1&lt;br /&gt;
We can also use existential quantification to produce a predicate:&lt;br /&gt;
 #(x).(x+10=30)&lt;br /&gt;
which is true and ProB will give you a solution &amp;lt;tt&amp;gt;x=20&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In the calculator, any variable that is not explicitly introduced is considered existentially quantified. Thus, you get the same effect by simply typing:&lt;br /&gt;
 x+10=30&lt;br /&gt;
If you want to get all solutions for the equation x+10=30, you can make use of a set comprehension:&lt;br /&gt;
 {x|x+10=30}&lt;br /&gt;
Here the calculator will compute the value of the expression to be &amp;lt;tt&amp;gt;{20}&amp;lt;/tt&amp;gt;, i.e., we know that 20 is the only solution for &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Note that the B language has Boolean values &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FALSE&amp;lt;/tt&amp;gt;, but these are &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; considered predicates in B.&lt;br /&gt;
Thus if we type:&lt;br /&gt;
 TRUE&lt;br /&gt;
this is considered an expression and not a predicate.&lt;br /&gt;
This also means that &amp;lt;tt&amp;gt;TRUE or FALSE&amp;lt;/tt&amp;gt; is not considered a legal predicate in pure B.&lt;br /&gt;
However, for convenience, the logic calculator accepts this and as such you can type:&lt;br /&gt;
 TRUE or FALSE&lt;br /&gt;
which is determined to be true.&lt;br /&gt;
In pure B, you would have to write something like:&lt;br /&gt;
 1=1 or 1=2&lt;br /&gt;
Finally, in pure B, variables can only range over values in B, not over predicates. Thus &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt; is not allowed in pure B, but our logic calculator does accept it. &lt;br /&gt;
As such you can type&lt;br /&gt;
 P or Q&lt;br /&gt;
which is equivalent to typing&lt;br /&gt;
 P=TRUE or Q=TRUE&lt;br /&gt;
If you want to find all models of the formula, you can use a set comprehension:&lt;br /&gt;
 {P,Q | P or Q}&lt;br /&gt;
Also, if you want to check whether your formula is a tautology you can select the &amp;quot;Universal (Checking)&amp;quot; entry in the Quantification Mode menu. In this case (for &amp;lt;tt&amp;gt;P or Q&amp;lt;/tt&amp;gt;) a counter example is produced by the tool.&lt;br /&gt;
More generally, you can check proof rules using the &amp;quot;Tautology Check&amp;quot; button.&lt;br /&gt;
E.g., our tool will confirm that the following is a tautology:&lt;br /&gt;
 (A =&amp;gt; B) &amp;amp; not(B) =&amp;gt; not(A)&lt;br /&gt;
Note, however, that our tool is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; a prover in general: you can use it to find solutions and counter-examples, but in general it cannot be used to prove formulas using variables with infinite type.&lt;br /&gt;
In those cases, you may see enumeration warnings in the output, which means  that ProB was only able to check a finite number of values from an infinite set. This could mean that the result displayed is not correct (even though in general solutions and counter-examples tend to be correct; in future we will refine ProB&#039;s output to also indicate when the solution/counter-example is still guaranteed to be correct)!&lt;br /&gt;
&lt;br /&gt;
== Executing the Calculator locally ==&lt;br /&gt;
You can evaluate formulas on your machine in the same way as the calculator above, by [[Download|downloading ProB]]  (ideally a nightly build) and then executing one of the following commands:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_file MYFILE&lt;br /&gt;
The above command requires you to put the formula into a file &amp;lt;tt&amp;gt;MYFILE&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The command below allows you to put the formula directly into the command:  &lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval &amp;quot;MYFORMULA&amp;quot;&lt;br /&gt;
If you want to perform the tautology check you have to do the following using the -eval_rule_file command:&lt;br /&gt;
 ./probcli -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128 -p TIME_OUT 500 -eval_rule_file MYFILE&lt;br /&gt;
You can also start your own REPL using the -repl command (you may wish to use the rlwrap tool):&lt;br /&gt;
 ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
You can of course adapt the preferences (TIME_OUT, MININT, MAXINT, ...) according to your needs; the [[Using_the_Command-Line_Version_of_ProB|user manual]] provides more details.&lt;br /&gt;
You may wish to use the rlwrap tool:&lt;br /&gt;
 rlwrap ./probcli -repl -p BOOL_AS_PREDICATE TRUE -p CLPFD TRUE -p MAXINT 127 -p MININT -128&lt;br /&gt;
&lt;br /&gt;
Probably, you may want to generate full-fledged B machines as input to &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This allows you to introduce enumerated and deferred sets; compared to using sets of strings, this has benefits in terms of more stringent typechecking and more efficient constraint solving.&lt;br /&gt;
&lt;br /&gt;
An alternate front-end to the calculator is [http://cobra.cs.uni-duesseldorf.de/evalB/ available here]. &lt;br /&gt;
Its code is available at &amp;lt;tt&amp;gt;https://github.com/bendisposto/evalB&amp;lt;/tt&amp;gt; and it can easily be run locally using &amp;lt;tt&amp;gt;gradle jWR&amp;lt;/tt&amp;gt;.&lt;br /&gt;
The [[ProB_Logic_Calculator_old|old version of the ProB Logic Calculator is still available]].&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Blocks_World_(Directed_Model_Checking)&amp;diff=2813</id>
		<title>Blocks World (Directed Model Checking)</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Blocks_World_(Directed_Model_Checking)&amp;diff=2813"/>
		<updated>2015-04-17T08:23:19Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: Undo revision 2812 by Jens Bendisposto (Talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this example we want to highlight the new directed model checking features of ProB (available as of version 1.5.1), which allow one to &amp;lt;em&amp;gt;direct&amp;lt;/em&amp;gt; the model checker towards a desired goal. Technically speaking, the model checker now maintains a weighted priority queue of unprocessed states, and the user can influence how the weights for the unprocessed states are to be computed. &lt;br /&gt;
The techniques are also explained and evaluated in a scientific paper&lt;br /&gt;
&amp;lt;ref name=&amp;quot;vispaper&amp;quot;&amp;gt;M. Leuschel and J. Bendisposto: Directed Model Checking for B: An Evaluation and New Techniques. In Proceedings SBMF&#039;2010, LNCS 6527. Springer-Verlag, 2010 http://www.stups.uni-duesseldorf.de/w/Special:Publication/LeBe2010&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To illustrate the directed model checking feature, we use the following model of Blocks-World, where we manipulate a given set of blocks (a,b,c,d,e,f). A robot arm can pick of blocks (provided no other block is on top of it) and either move it onto a table or onto another block (provided this block has no other block on top of it).&lt;br /&gt;
The goal is, given a starting position, to find a plan for the robot to achieve a certain goal (here: block a is on top of b, which is on top of c, ...).&lt;br /&gt;
&lt;br /&gt;
In B we can model this task as follows.&lt;br /&gt;
We have two operations, on to move a block onto the table and one to move a block onto another one. The initial configuration is specified in the INITIALISATION; the target is specified by the GOAL definition (which the ProB model checker recognises).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE BlocksWorldGeneric6&lt;br /&gt;
SETS&lt;br /&gt;
 Objects={a,b,c,d,e,f}&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
      GOAL == (on = ongoal);&lt;br /&gt;
      ongoal == {a|-&amp;gt;b, b|-&amp;gt;c, c|-&amp;gt;d, d|-&amp;gt;e, e|-&amp;gt;f}&lt;br /&gt;
VARIABLES on&lt;br /&gt;
INVARIANT&lt;br /&gt;
  on: Objects +-&amp;gt; Objects&lt;br /&gt;
INITIALISATION&lt;br /&gt;
  on := {a|-&amp;gt;b, c|-&amp;gt;a}&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  move_on_table(obj) = PRE obj /: ran(on) &amp;amp; obj : dom(on) THEN&lt;br /&gt;
    on := {obj} &amp;lt;&amp;lt;| on&lt;br /&gt;
  END;&lt;br /&gt;
  move_on_object(obj,onobj) = PRE obj/:ran(on) &amp;amp; onobj /:ran(on) &amp;amp; obj /= onobj THEN&lt;br /&gt;
      on(obj) := onobj&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Adding a graphical visualization&amp;lt;/h3&amp;gt;&lt;br /&gt;
Adding a [[Graphical_Visualization|graphical visualization]] is independent of the model checking, but helps visualising the traces found by the model checker.&lt;br /&gt;
For this we can add &amp;lt;tt&amp;gt;ANIMATION_FUNCTION&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ANIMATION_FUNCTION_DEFAULT&amp;lt;/tt&amp;gt; definition, as specified in the complete model at the end of this page.&lt;br /&gt;
&lt;br /&gt;
The initial state of our model then looks as follows, when loaded using ProB Tcl/Tk:&lt;br /&gt;
[[File:ProB_BlockInit_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Finding the GOAL&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use the default mixed depth-first/breadth-first search you can type:&lt;br /&gt;
&lt;br /&gt;
 $ probcli BlocksWorldGeneric6.mch -model_check&lt;br /&gt;
&lt;br /&gt;
As it has a random component, runtimes vary (typically 0.5 to 3.5 seconds on a Mac Book Air 1.7 GHz). It finds reasonably short counter examples.&lt;br /&gt;
&lt;br /&gt;
You can use depth-first search using the -df flag:&lt;br /&gt;
 $ probcli BlocksWorldGeneric6.mch -model_check -df&lt;br /&gt;
This finds a counter-example of length 48 relatively quickly (120 ms model checking time).&lt;br /&gt;
You can use the &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; flag to force breadth-first search, thus obtaining shortest counter-examples (of length 7; model checking time about 3.3 seconds).&lt;br /&gt;
&lt;br /&gt;
As of version 1.5.1 you can use the &amp;lt;tt&amp;gt;-mc_mode&amp;lt;/tt&amp;gt; flag to provide other options to control the model checking.&lt;br /&gt;
&lt;br /&gt;
One option is &amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt;, which gives every node (aka unprocesses state) a random weight. The difference over the mixed depth-first/breadth-first mode is that it completely disregards when nodes where generated. The mixed depth-first/breadth-first mode will try to do a mixture of depth-first and breadth-first traversal; the random mode here is ``just&#039;&#039; random:&lt;br /&gt;
 probcli BlocksWorldGeneric6.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
A variation of the above is the &amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; mode, which simply uses the state&#039;s Prolog hash as the random weight. The difference is that the result here is predictable, i.e., you will always get the same result when you run the model checker:&lt;br /&gt;
 probcli BlocksWorldGeneric6.mch -model_check -mc_mode hash&lt;br /&gt;
&lt;br /&gt;
Possibly a more interesting mode is &amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt;. It looks for a user-provided DEFINITION for &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; and uses this a s priority for states to process next.&lt;br /&gt;
For example, we can provide the following definition to measure the distance to our target goal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      DIFF(A,TARGET) == (card(A-TARGET) - card(TARGET /\ A));&lt;br /&gt;
      HEURISTIC_FUNCTION == DIFF(on,ongoal);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we get very good model checking time and short counter-examples (aka solution traces):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli BlocksWorldGeneric6.mch -model_check -mc_mode heuristic&lt;br /&gt;
&lt;br /&gt;
ALL OPERATIONS COVERED&lt;br /&gt;
&lt;br /&gt;
found_error(goal_found,62)&lt;br /&gt;
finding_trace_from_to(root)&lt;br /&gt;
.&lt;br /&gt;
Model Checking Time: 80 ms (80 ms walltime)&lt;br /&gt;
States analysed: 12&lt;br /&gt;
Transitions fired: 99&lt;br /&gt;
*** COUNTER EXAMPLE FOUND ***&lt;br /&gt;
&lt;br /&gt;
goal_found&lt;br /&gt;
*** TRACE: &lt;br /&gt;
 1: INITIALISATION({(a|-&amp;gt;b),(c|-&amp;gt;a)}): &lt;br /&gt;
 2: move_on_object(c,d): &lt;br /&gt;
 3: move_on_object(e,f): &lt;br /&gt;
 4: move_on_table(c): &lt;br /&gt;
 5: move_on_object(d,e): &lt;br /&gt;
 6: move_on_object(c,d): &lt;br /&gt;
 7: move_on_table(a): &lt;br /&gt;
 8: move_on_object(b,c): &lt;br /&gt;
 9: move_on_object(a,b): &lt;br /&gt;
! *** error occurred ***&lt;br /&gt;
! goal_found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In ProB Tcl/Tk you simply use the standard model checking dialog (in the Verify menu) and choose the &amp;quot;Heuristic Function / Random&amp;quot; option in the &amp;quot;Search Strategy&amp;quot; pop-up menu:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_MC_Heuristic.png|200px|center]]&lt;br /&gt;
&lt;br /&gt;
After that you can find the solution quickly by simply pressing the &amp;quot;Model Check&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_BlockGoal_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; The complete model for reference &amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE BlocksWorldGeneric6&lt;br /&gt;
SETS&lt;br /&gt;
 Objects={a,b,c,d,e,f}&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
      ANIMATION_FUNCTION_DEFAULT == {r,c,img|r:1..card(Objects) &amp;amp; img=0 &amp;amp; c:1..card(Objects)};&lt;br /&gt;
      ANIMATION_FUNCTION == (  {r,c,i| r=card(Objects) &amp;amp; i:Objects &amp;amp; c:Objects &amp;amp; c=i &amp;amp; i/:dom(on)} \/&lt;br /&gt;
                               {r,c,i| r:1..(card(Objects)-1) &amp;amp; i:Objects &amp;amp; c:Objects &amp;amp;&lt;br /&gt;
                                       i|-&amp;gt;c:iterate(on,card(Objects)-r) &amp;amp; c/:dom(on)}&lt;br /&gt;
                              );&lt;br /&gt;
      ANIMATION_IMG0 == &amp;quot;images/empty_box_white.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG1 == &amp;quot;images/A.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG2 == &amp;quot;images/B.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG3 == &amp;quot;images/C.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG4 == &amp;quot;images/D.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG5 == &amp;quot;images/E.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG6 == &amp;quot;images/F.gif&amp;quot;;&lt;br /&gt;
      GOAL == (on = ongoal);&lt;br /&gt;
      ongoal == {a|-&amp;gt;b, b|-&amp;gt;c, c|-&amp;gt;d, d|-&amp;gt;e, e|-&amp;gt;f};&lt;br /&gt;
      DIFF(A,TARGET) == (card(A-TARGET) - card(TARGET /\ A));&lt;br /&gt;
      HEURISTIC_FUNCTION == DIFF(on,ongoal);&lt;br /&gt;
VARIABLES on&lt;br /&gt;
INVARIANT&lt;br /&gt;
  on: Objects +-&amp;gt; Objects&lt;br /&gt;
INITIALISATION&lt;br /&gt;
  on := {a|-&amp;gt;b, c|-&amp;gt;a}&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  move_on_table(obj) = PRE obj /: ran(on) &amp;amp; obj : dom(on) THEN&lt;br /&gt;
    on := {obj} &amp;lt;&amp;lt;| on&lt;br /&gt;
  END;&lt;br /&gt;
  move_on_object(obj,onobj) = PRE obj/:ran(on) &amp;amp; onobj /:ran(on) &amp;amp; obj /= onobj THEN&lt;br /&gt;
      on(obj) := onobj&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Blocks_World_(Directed_Model_Checking)&amp;diff=2812</id>
		<title>Blocks World (Directed Model Checking)</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Blocks_World_(Directed_Model_Checking)&amp;diff=2812"/>
		<updated>2015-04-17T08:22:03Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
In this example we want to highlight the new directed model checking features of ProB (available as of version 1.5.1), which allow one to &amp;lt;em&amp;gt;direct&amp;lt;/em&amp;gt; the model checker towards a desired goal. Technically speaking, the model checker now maintains a weighted priority queue of unprocessed states, and the user can influence how the weights for the unprocessed states are to be computed. &lt;br /&gt;
The techniques are also explained and evaluated in a scientific paper&lt;br /&gt;
&amp;lt;ref name=&amp;quot;vispaper&amp;quot;&amp;gt;M. Leuschel and J. Bendisposto: Directed Model Checking for B: An Evaluation and New Techniques. In Proceedings SBMF&#039;2010, LNCS 6527. Springer-Verlag, 2010 http://www.stups.uni-duesseldorf.de/w/Special:Publication/LeBe2010&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To illustrate the directed model checking feature, we use the following model of Blocks-World, where we manipulate a given set of blocks (a,b,c,d,e,f). A robot arm can pick of blocks (provided no other block is on top of it) and either move it onto a table or onto another block (provided this block has no other block on top of it).&lt;br /&gt;
The goal is, given a starting position, to find a plan for the robot to achieve a certain goal (here: block a is on top of b, which is on top of c, ...).&lt;br /&gt;
&lt;br /&gt;
In B we can model this task as follows.&lt;br /&gt;
We have two operations, on to move a block onto the table and one to move a block onto another one. The initial configuration is specified in the INITIALISATION; the target is specified by the GOAL definition (which the ProB model checker recognises).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE BlocksWorldGeneric6&lt;br /&gt;
SETS&lt;br /&gt;
 Objects={a,b,c,d,e,f}&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
      GOAL == (on = ongoal);&lt;br /&gt;
      ongoal == {a|-&amp;gt;b, b|-&amp;gt;c, c|-&amp;gt;d, d|-&amp;gt;e, e|-&amp;gt;f}&lt;br /&gt;
VARIABLES on&lt;br /&gt;
INVARIANT&lt;br /&gt;
  on: Objects +-&amp;gt; Objects&lt;br /&gt;
INITIALISATION&lt;br /&gt;
  on := {a|-&amp;gt;b, c|-&amp;gt;a}&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  move_on_table(obj) = PRE obj /: ran(on) &amp;amp; obj : dom(on) THEN&lt;br /&gt;
    on := {obj} &amp;lt;&amp;lt;| on&lt;br /&gt;
  END;&lt;br /&gt;
  move_on_object(obj,onobj) = PRE obj/:ran(on) &amp;amp; onobj /:ran(on) &amp;amp; obj /= onobj THEN&lt;br /&gt;
      on(obj) := onobj&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Adding a graphical visualization&amp;lt;/h3&amp;gt;&lt;br /&gt;
Adding a [[Graphical_Visualization|graphical visualization]] is independent of the model checking, but helps visualising the traces found by the model checker.&lt;br /&gt;
For this we can add &amp;lt;tt&amp;gt;ANIMATION_FUNCTION&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ANIMATION_FUNCTION_DEFAULT&amp;lt;/tt&amp;gt; definition, as specified in the complete model at the end of this page.&lt;br /&gt;
&lt;br /&gt;
The initial state of our model then looks as follows, when loaded using ProB Tcl/Tk:&lt;br /&gt;
[[File:ProB_BlockInit_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Finding the GOAL&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use the default mixed depth-first/breadth-first search you can type:&lt;br /&gt;
&lt;br /&gt;
 $ probcli BlocksWorldGeneric6.mch -model_check&lt;br /&gt;
&lt;br /&gt;
As it has a random component, runtimes vary (typically 0.5 to 3.5 seconds on a Mac Book Air 1.7 GHz). It finds reasonably short sequences of operations to reach a state where the goal holds.&lt;br /&gt;
&lt;br /&gt;
You can use depth-first search using the -df flag:&lt;br /&gt;
 $ probcli BlocksWorldGeneric6.mch -model_check -df&lt;br /&gt;
This finds a counter-example of length 48 relatively quickly (120 ms model checking time).&lt;br /&gt;
You can use the &amp;lt;tt&amp;gt;-bf&amp;lt;/tt&amp;gt; flag to force breadth-first search, thus obtaining shortest counter-examples (of length 7; model checking time about 3.3 seconds).&lt;br /&gt;
&lt;br /&gt;
As of version 1.5.1 you can use the &amp;lt;tt&amp;gt;-mc_mode&amp;lt;/tt&amp;gt; flag to provide other options to control the model checking.&lt;br /&gt;
&lt;br /&gt;
One option is &amp;lt;tt&amp;gt;random&amp;lt;/tt&amp;gt;, which gives every node (aka unprocesses state) a random weight. The difference over the mixed depth-first/breadth-first mode is that it completely disregards when nodes where generated. The mixed depth-first/breadth-first mode will try to do a mixture of depth-first and breadth-first traversal; the random mode here is ``just&#039;&#039; random:&lt;br /&gt;
 probcli BlocksWorldGeneric6.mch -model_check -mc_mode random&lt;br /&gt;
&lt;br /&gt;
A variation of the above is the &amp;lt;tt&amp;gt;hash&amp;lt;/tt&amp;gt; mode, which simply uses the state&#039;s Prolog hash as the random weight. The difference is that the result here is predictable, i.e., you will always get the same result when you run the model checker:&lt;br /&gt;
 probcli BlocksWorldGeneric6.mch -model_check -mc_mode hash&lt;br /&gt;
&lt;br /&gt;
Possibly a more interesting mode is &amp;lt;tt&amp;gt;heuristic&amp;lt;/tt&amp;gt;. It looks for a user-provided DEFINITION for &amp;lt;tt&amp;gt;HEURISTIC_FUNCTION&amp;lt;/tt&amp;gt; and uses this a s priority for states to process next.&lt;br /&gt;
For example, we can provide the following definition to measure the distance to our target goal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      DIFF(A,TARGET) == (card(A-TARGET) - card(TARGET /\ A));&lt;br /&gt;
      HEURISTIC_FUNCTION == DIFF(on,ongoal);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we get very good model checking time and short counter-examples (aka solution traces):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ probcli BlocksWorldGeneric6.mch -model_check -mc_mode heuristic&lt;br /&gt;
&lt;br /&gt;
ALL OPERATIONS COVERED&lt;br /&gt;
&lt;br /&gt;
found_error(goal_found,62)&lt;br /&gt;
finding_trace_from_to(root)&lt;br /&gt;
.&lt;br /&gt;
Model Checking Time: 80 ms (80 ms walltime)&lt;br /&gt;
States analysed: 12&lt;br /&gt;
Transitions fired: 99&lt;br /&gt;
*** COUNTER EXAMPLE FOUND ***&lt;br /&gt;
&lt;br /&gt;
goal_found&lt;br /&gt;
*** TRACE: &lt;br /&gt;
 1: INITIALISATION({(a|-&amp;gt;b),(c|-&amp;gt;a)}): &lt;br /&gt;
 2: move_on_object(c,d): &lt;br /&gt;
 3: move_on_object(e,f): &lt;br /&gt;
 4: move_on_table(c): &lt;br /&gt;
 5: move_on_object(d,e): &lt;br /&gt;
 6: move_on_object(c,d): &lt;br /&gt;
 7: move_on_table(a): &lt;br /&gt;
 8: move_on_object(b,c): &lt;br /&gt;
 9: move_on_object(a,b): &lt;br /&gt;
! *** error occurred ***&lt;br /&gt;
! goal_found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In ProB Tcl/Tk you simply use the standard model checking dialog (in the Verify menu) and choose the &amp;quot;Heuristic Function / Random&amp;quot; option in the &amp;quot;Search Strategy&amp;quot; pop-up menu:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_MC_Heuristic.png|200px|center]]&lt;br /&gt;
&lt;br /&gt;
After that you can find the solution quickly by simply pressing the &amp;quot;Model Check&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
[[File:ProB_BlockGoal_Screenshot.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; The complete model for reference &amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE BlocksWorldGeneric6&lt;br /&gt;
SETS&lt;br /&gt;
 Objects={a,b,c,d,e,f}&lt;br /&gt;
DEFINITIONS&lt;br /&gt;
      ANIMATION_FUNCTION_DEFAULT == {r,c,img|r:1..card(Objects) &amp;amp; img=0 &amp;amp; c:1..card(Objects)};&lt;br /&gt;
      ANIMATION_FUNCTION == (  {r,c,i| r=card(Objects) &amp;amp; i:Objects &amp;amp; c:Objects &amp;amp; c=i &amp;amp; i/:dom(on)} \/&lt;br /&gt;
                               {r,c,i| r:1..(card(Objects)-1) &amp;amp; i:Objects &amp;amp; c:Objects &amp;amp;&lt;br /&gt;
                                       i|-&amp;gt;c:iterate(on,card(Objects)-r) &amp;amp; c/:dom(on)}&lt;br /&gt;
                              );&lt;br /&gt;
      ANIMATION_IMG0 == &amp;quot;images/empty_box_white.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG1 == &amp;quot;images/A.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG2 == &amp;quot;images/B.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG3 == &amp;quot;images/C.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG4 == &amp;quot;images/D.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG5 == &amp;quot;images/E.gif&amp;quot;;&lt;br /&gt;
      ANIMATION_IMG6 == &amp;quot;images/F.gif&amp;quot;;&lt;br /&gt;
      GOAL == (on = ongoal);&lt;br /&gt;
      ongoal == {a|-&amp;gt;b, b|-&amp;gt;c, c|-&amp;gt;d, d|-&amp;gt;e, e|-&amp;gt;f};&lt;br /&gt;
      DIFF(A,TARGET) == (card(A-TARGET) - card(TARGET /\ A));&lt;br /&gt;
      HEURISTIC_FUNCTION == DIFF(on,ongoal);&lt;br /&gt;
VARIABLES on&lt;br /&gt;
INVARIANT&lt;br /&gt;
  on: Objects +-&amp;gt; Objects&lt;br /&gt;
INITIALISATION&lt;br /&gt;
  on := {a|-&amp;gt;b, c|-&amp;gt;a}&lt;br /&gt;
OPERATIONS&lt;br /&gt;
  move_on_table(obj) = PRE obj /: ran(on) &amp;amp; obj : dom(on) THEN&lt;br /&gt;
    on := {obj} &amp;lt;&amp;lt;| on&lt;br /&gt;
  END;&lt;br /&gt;
  move_on_object(obj,onobj) = PRE obj/:ran(on) &amp;amp; onobj /:ran(on) &amp;amp; obj /= onobj THEN&lt;br /&gt;
      on(obj) := onobj&lt;br /&gt;
  END&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=DMC&amp;diff=2776</id>
		<title>DMC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=DMC&amp;diff=2776"/>
		<updated>2015-04-09T04:13:13Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Distributed Model Checking : Experimental evaluation}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
We used three different setups to evaluate the distributed version of ProB.&lt;br /&gt;
&lt;br /&gt;
* A standalone multi core computer&lt;br /&gt;
* Amazon EC2 Instances&lt;br /&gt;
* The HILBERT cluster &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Multicore Computer ==&lt;br /&gt;
We used a hexacore 3.33GHz Mac Pro with 16GB of RAM. On this computer we benchmarked all models regardless whether we expected them to be scalable or not. We varied the number of used cores from 1 up to 12 hyperthreads.  Each experiment was repeated at least 5 times.&lt;br /&gt;
&lt;br /&gt;
== Amazon EC2 Instances ==&lt;br /&gt;
We used c3.8xlarge instances, each of which has 32 virtual CPUs and is equipped with 64 GB of RAM. We used the Mac Pro to get an impression if and how well the B models scale. From the experiments, we chose those models that seemed to scale well and ran the benchmarks on the Amazon EC computer with a higher number of workers. Models that did not scale on the Mac Pro were not considered as they would not scale on more processors. We used 2 or 4 instances connected with 10 GBit ethernet connection.  Each experiment was repeated  at least 5 times. &lt;br /&gt;
&lt;br /&gt;
== HILBERT ==&lt;br /&gt;
We used the high performance cluster at the university of Düsseldorf (HILBERT) for a single model. The model could not be cheked using a single core because it would have taken too long. Based on a partial execution, it would take about 17 days on a single core on the Mac Pro. The model was checked with different numbers of cores on the HILBERT cluster. We varied between 44 and 140 cores. On the cluster we only executed the experiments once but all experiments on the other platforms indicated that the variation between experiments could be ignored. Also the execution times of all 6 experiments seem to be consistent.&lt;br /&gt;
&lt;br /&gt;
== Models ==&lt;br /&gt;
We cannot make all models public, because they we provided by industrial partners from various research projects. The models that could be make available can be downloaded from [http://www.stups.hhu.de/models/parb/]&lt;br /&gt;
&lt;br /&gt;
== RESULTS ==&lt;br /&gt;
The results of the experiments are shown in Jens Bendisposto&#039;s dissertation. A preprint is available from [http://www.stups.uni-duesseldorf.de/w/Directed_and_Distributed_Model_Checking_of_B_Specifications_(Preprint)]&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Sefm2015&amp;diff=2769</id>
		<title>Sefm2015</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Sefm2015&amp;diff=2769"/>
		<updated>2015-03-26T11:17:46Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: Created page with &amp;#039;{{DISPLAYTITLE:Benchmarks for the ProB (Dis)prover}}&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Benchmarks for the ProB (Dis)prover}}&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=Benchmarks&amp;diff=2768</id>
		<title>Benchmarks</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=Benchmarks&amp;diff=2768"/>
		<updated>2015-03-26T11:16:48Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: Created page with &amp;#039;Here you will find links to benchmarks (sometimes with raw data) we produced to evaluate ProB.   Disprover&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here you will find links to benchmarks (sometimes with raw data) we produced to evaluate ProB. &lt;br /&gt;
&lt;br /&gt;
[[sefm2015|Disprover]]&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=MediaWiki:Sidebar&amp;diff=2767</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=MediaWiki:Sidebar&amp;diff=2767"/>
		<updated>2015-03-26T11:14:33Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*Navigation&lt;br /&gt;
** Main Page|Main Page&lt;br /&gt;
** User Manual|User Manual&lt;br /&gt;
** Tutorial|Tutorial&lt;br /&gt;
** Developer Manual|Developer Manual&lt;br /&gt;
** Benchmarks|Benchmarks&lt;br /&gt;
** ProBLicence|Licence&lt;br /&gt;
* Special Pages&lt;br /&gt;
** recentchanges-url|recentchanges&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2759</id>
		<title>ParB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2759"/>
		<updated>2015-03-18T12:17:58Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: /* Running in the Cloud/Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains how to run the distributed model checking prototype. &lt;br /&gt;
&lt;br /&gt;
Note that the implementation does not work with Windows, only Linux andMac OS are supported.  &lt;br /&gt;
&lt;br /&gt;
It is required to set the limits for shared memory on some systems, this can be done using sysctl. Here is a little script that sets the limits. It takes the size of shared memory as parameter (usually the size of your memory in GB). You need to run the script with root rights.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 if [ $# -gt 0 ]; then&lt;br /&gt;
     echo &amp;quot;Setting SHM sizes:&amp;quot;&lt;br /&gt;
     sysctl -w kern.sysv.shmmax=`perl -e &amp;quot;print 1073741824*$1&amp;quot;`&lt;br /&gt;
     sysctl -w kern.sysv.shmseg=4096&lt;br /&gt;
     sysctl -w kern.sysv.shmall=`perl -e &amp;quot;print 262144*$1&amp;quot;`&lt;br /&gt;
     echo &amp;quot;Here are the current values:&amp;quot;&lt;br /&gt;
     sysctl -a | grep shm&lt;br /&gt;
 else&lt;br /&gt;
     echo &amp;quot;You need to provide the size of shared memort (in full GB)&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
After setting up shared memory, you can use the &amp;lt;tt&amp;gt;parB.sh&amp;lt;/tt&amp;gt; script that comes with the ProB distribution (see [[Download]]).&lt;br /&gt;
&lt;br /&gt;
Usage&lt;br /&gt;
 ./parB &amp;lt;Nr. of workers&amp;gt; &amp;lt;logfile&amp;gt; &amp;lt;file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
 $ ./parB.sh 2 ~/parB.log scheduler.mch&lt;br /&gt;
&lt;br /&gt;
== Running in the Cloud/Cluster ==&lt;br /&gt;
The script can only be used for computation on a single physical computer. If you want to use multiple computers, the setup is a bit more complex:&lt;br /&gt;
&lt;br /&gt;
* On each physical computer  you need to start exactly one copy of &amp;lt;tt&amp;gt;lib/hasher&amp;lt;/tt&amp;gt;. &lt;br /&gt;
 lib/hasher &amp;lt;MASTER_IP&amp;gt; &amp;lt;MASTER_PORT&amp;gt; 1&lt;br /&gt;
* Multiple Copies of  &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as workers:&lt;br /&gt;
 probcli -zmq_worker2 &amp;lt;MASTER_IP&amp;gt; &amp;lt;MASTER_PORT&amp;gt; 0&lt;br /&gt;
* A single instance of &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as  the master:&lt;br /&gt;
 probcli -zmq_master2 &amp;lt;MIN QUEUE SIZE&amp;gt; &amp;lt;MAX NR OF STATES&amp;gt; &amp;lt;MASTER_PORT&amp;gt;  0 &amp;lt;LOGFILE&amp;gt; &amp;lt;MODEL_FILE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The minimal queue length is used to determine if a worker is allowed to share its queue. The experiments have shown, that a number between 10 and 100 is fine.  parB will stop after (at least) the maximal number of states have been explored, a value of -1 will explore all states (beware of this, if the state space is infinite!). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb use one real core for each of the processes. On hyperthreads the model checking still becomes faster, but the speedup is only 1/4 for each additional hyperthread.  &lt;br /&gt;
&lt;br /&gt;
We plan to develop a control interface that allows configuring the logical network in a more convenient way and running the model checker from within ProB.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
You can use preferences in parB.sh (and the master) : &lt;br /&gt;
 ./parB &amp;lt;Nr. of workers&amp;gt; &amp;lt;logfile&amp;gt; &amp;lt;file&amp;gt; &amp;lt;additional probcli options&amp;gt;&lt;br /&gt;
  ./probcli &amp;lt;additional probcli options&amp;gt; -zmq_master2 &amp;lt;MIN QUEUE SIZE&amp;gt; &amp;lt;MAX NR OF STATES&amp;gt; &amp;lt;MASTER_PORT&amp;gt;  0 &amp;lt;LOGFILE&amp;gt; &amp;lt;MODEL_FILE&amp;gt; &amp;lt;additional probcli options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use -strict, parB will stop as soon as a violation is found, otherwise parB will explore the full state space (up to the maximal number of states) &lt;br /&gt;
&lt;br /&gt;
== Cleaning up ==&lt;br /&gt;
If something goes wrong it may be necessary to clean up your shared memory.  &lt;br /&gt;
You can find out if there are still memory blocks occupied using &amp;lt;tt&amp;gt;ipcs&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Removal can be done using:&lt;br /&gt;
 ipcrm -M `ipcs | grep &amp;lt;YOUR USERNAME&amp;gt; | grep -o &amp;quot;0x[^ ]*&amp;quot; | sed &#039;:a;N;$!ba;s/\n/ -M /g&#039;`&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2758</id>
		<title>ParB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2758"/>
		<updated>2015-03-18T12:14:04Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains how to run the distributed model checking prototype. &lt;br /&gt;
&lt;br /&gt;
Note that the implementation does not work with Windows, only Linux andMac OS are supported.  &lt;br /&gt;
&lt;br /&gt;
It is required to set the limits for shared memory on some systems, this can be done using sysctl. Here is a little script that sets the limits. It takes the size of shared memory as parameter (usually the size of your memory in GB). You need to run the script with root rights.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 if [ $# -gt 0 ]; then&lt;br /&gt;
     echo &amp;quot;Setting SHM sizes:&amp;quot;&lt;br /&gt;
     sysctl -w kern.sysv.shmmax=`perl -e &amp;quot;print 1073741824*$1&amp;quot;`&lt;br /&gt;
     sysctl -w kern.sysv.shmseg=4096&lt;br /&gt;
     sysctl -w kern.sysv.shmall=`perl -e &amp;quot;print 262144*$1&amp;quot;`&lt;br /&gt;
     echo &amp;quot;Here are the current values:&amp;quot;&lt;br /&gt;
     sysctl -a | grep shm&lt;br /&gt;
 else&lt;br /&gt;
     echo &amp;quot;You need to provide the size of shared memort (in full GB)&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
After setting up shared memory, you can use the &amp;lt;tt&amp;gt;parB.sh&amp;lt;/tt&amp;gt; script that comes with the ProB distribution (see [[Download]]).&lt;br /&gt;
&lt;br /&gt;
Usage&lt;br /&gt;
 ./parB &amp;lt;Nr. of workers&amp;gt; &amp;lt;logfile&amp;gt; &amp;lt;file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
 $ ./parB.sh 2 ~/parB.log scheduler.mch&lt;br /&gt;
&lt;br /&gt;
== Running in the Cloud/Cluster ==&lt;br /&gt;
The script can only be used for computation on a single physical computer. If you want to use multiple computers, the setup is a bit more complex:&lt;br /&gt;
&lt;br /&gt;
* On each physical computer  you need to start exactly one copy of &amp;lt;tt&amp;gt;lib/hasher&amp;lt;/tt&amp;gt;. &lt;br /&gt;
* Multiple Copies of  &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as workers:&lt;br /&gt;
 probcli -zmq_worker2 &amp;lt;MASTER_IP&amp;gt; &amp;lt;MASTER_PORT&amp;gt; 0&lt;br /&gt;
* A single instance of &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as  the master:&lt;br /&gt;
 probcli -zmq_master2 &amp;lt;MIN QUEUE SIZE&amp;gt; &amp;lt;MAX NR OF STATES&amp;gt; &amp;lt;MASTER_PORT&amp;gt;  0 &amp;lt;LOGFILE&amp;gt; &amp;lt;MODEL_FILE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The minimal queue length is used to determine if a worker is allowed to share its queue. The experiments have shown, that a number between 10 and 100 is fine.  parB will stop after (at least) the maximal number of states have been explored, a value of -1 will explore all states (beware of this, if the state space is infinite!). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb use one real core for each of the processes. On hyperthreads the model checking still becomes faster, but the speedup is only 1/4 for each additional hyperthread.  &lt;br /&gt;
&lt;br /&gt;
We plan to develop a control interface that allows configuring the logical network in a more convenient way and running the model checker from within ProB. &lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
You can use preferences in parB.sh (and the master) : &lt;br /&gt;
 ./parB &amp;lt;Nr. of workers&amp;gt; &amp;lt;logfile&amp;gt; &amp;lt;file&amp;gt; &amp;lt;additional probcli options&amp;gt;&lt;br /&gt;
  ./probcli &amp;lt;additional probcli options&amp;gt; -zmq_master2 &amp;lt;MIN QUEUE SIZE&amp;gt; &amp;lt;MAX NR OF STATES&amp;gt; &amp;lt;MASTER_PORT&amp;gt;  0 &amp;lt;LOGFILE&amp;gt; &amp;lt;MODEL_FILE&amp;gt; &amp;lt;additional probcli options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use -strict, parB will stop as soon as a violation is found, otherwise parB will explore the full state space (up to the maximal number of states) &lt;br /&gt;
&lt;br /&gt;
== Cleaning up ==&lt;br /&gt;
If something goes wrong it may be necessary to clean up your shared memory.  &lt;br /&gt;
You can find out if there are still memory blocks occupied using &amp;lt;tt&amp;gt;ipcs&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Removal can be done using:&lt;br /&gt;
 ipcrm -M `ipcs | grep &amp;lt;YOUR USERNAME&amp;gt; | grep -o &amp;quot;0x[^ ]*&amp;quot; | sed &#039;:a;N;$!ba;s/\n/ -M /g&#039;`&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=DMC&amp;diff=2757</id>
		<title>DMC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=DMC&amp;diff=2757"/>
		<updated>2015-03-18T10:41:14Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Distributed Model Checking : Experimental evaluation}}&lt;br /&gt;
&lt;br /&gt;
This page explains the methodology of the experiments carried out to evaluate the distributed version of ProB.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2756</id>
		<title>ParB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2756"/>
		<updated>2015-03-18T10:31:08Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains how to run the distributed model checking prototype. &lt;br /&gt;
&lt;br /&gt;
Note that the implementation does not work with Windows, only Linux andMac OS are supported.  &lt;br /&gt;
&lt;br /&gt;
It is required to set the limits for shared memory on some systems, this can be done using sysctl. Here is a little script that sets the limits. It takes the size of shared memory as parameter (usually the size of your memory in GB). You need to run the script with root rights.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 if [ $# -gt 0 ]; then&lt;br /&gt;
     echo &amp;quot;Setting SHM sizes:&amp;quot;&lt;br /&gt;
     sysctl -w kern.sysv.shmmax=`perl -e &amp;quot;print 1073741824*$1&amp;quot;`&lt;br /&gt;
     sysctl -w kern.sysv.shmseg=4096&lt;br /&gt;
     sysctl -w kern.sysv.shmall=`perl -e &amp;quot;print 262144*$1&amp;quot;`&lt;br /&gt;
     echo &amp;quot;Here are the current values:&amp;quot;&lt;br /&gt;
     sysctl -a | grep shm&lt;br /&gt;
 else&lt;br /&gt;
     echo &amp;quot;You need to provide the size of shared memort (in full GB)&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
After setting up shared memory, you can use the &amp;lt;tt&amp;gt;parB.sh&amp;lt;/tt&amp;gt; script that comes with the ProB distribution (see [[Download]]).&lt;br /&gt;
&lt;br /&gt;
Usage&lt;br /&gt;
 ./parB &amp;lt;Nr. of workers&amp;gt; &amp;lt;logfile&amp;gt; &amp;lt;file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
 $ ./parB.sh 2 ~/parB.log scheduler.mch&lt;br /&gt;
&lt;br /&gt;
== Running in the Cloud/Cluster ==&lt;br /&gt;
The script can only be used for computation on a single physical computer. If you want to use multiple computers, the setup is a bit more complex:&lt;br /&gt;
&lt;br /&gt;
* On each physical computer  you need to start exactly one copy of &amp;lt;tt&amp;gt;lib/hasher&amp;lt;/tt&amp;gt;. &lt;br /&gt;
* Multiple Copies of  &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as workers:&lt;br /&gt;
 probcli -zmq_worker2 &amp;lt;MASTER_IP&amp;gt; &amp;lt;MASTER_PORT&amp;gt; 0&lt;br /&gt;
* A single instance of &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as  the master:&lt;br /&gt;
 probcli -zmq_master2 &amp;lt;MIN QUEUE SIZE&amp;gt; &amp;lt;MAX NR OF STATES&amp;gt; &amp;lt;MASTER_PORT&amp;gt;  0 &amp;lt;LOGFILE&amp;gt; &amp;lt;MODEL_FILE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb use one real core for each of the processes. On hyperthreads the model checking still becomes faster, but the speedup is only 1/4 for each additional hyperthread.  &lt;br /&gt;
&lt;br /&gt;
We plan to develop a control interface that allows configuring the logical network in a more convenient way and running the model checker from within ProB. &lt;br /&gt;
&lt;br /&gt;
== Cleaning up ==&lt;br /&gt;
If something goes wrong it may be necessary to clean up your shared memory.  &lt;br /&gt;
You can find out if there are still memory blocks occupied using &amp;lt;tt&amp;gt;ipcs&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Removal can be done using:&lt;br /&gt;
 ipcrm -M `ipcs | grep &amp;lt;YOUR USERNAME&amp;gt; | grep -o &amp;quot;0x[^ ]*&amp;quot; | sed &#039;:a;N;$!ba;s/\n/ -M /g&#039;`&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2755</id>
		<title>ParB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2755"/>
		<updated>2015-03-18T10:27:13Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains how to run the distributed model checking prototype. &lt;br /&gt;
&lt;br /&gt;
Note that the implementation does not work with Windows, only Linux andMac OS are supported.  &lt;br /&gt;
&lt;br /&gt;
It is required to set the limits for shared memory on some systems, this can be done using sysctl. Here is a little script that sets the limits. It takes the size of shared memory as parameter (usually the size of your memory in GB). You need to run the script with root rights.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 if [ $# -gt 0 ]; then&lt;br /&gt;
     echo &amp;quot;Setting SHM sizes:&amp;quot;&lt;br /&gt;
     sysctl -w kern.sysv.shmmax=`perl -e &amp;quot;print 1073741824*$1&amp;quot;`&lt;br /&gt;
     sysctl -w kern.sysv.shmseg=4096&lt;br /&gt;
     sysctl -w kern.sysv.shmall=`perl -e &amp;quot;print 262144*$1&amp;quot;`&lt;br /&gt;
     echo &amp;quot;Here are the current values:&amp;quot;&lt;br /&gt;
     sysctl -a | grep shm&lt;br /&gt;
 else&lt;br /&gt;
     echo &amp;quot;You need to provide the size of shared memort (in full GB)&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
After setting up shared memory, you can use the &amp;lt;tt&amp;gt;parB.sh&amp;lt;/tt&amp;gt; script that comes with the ProB distribution (see [[Download]]).&lt;br /&gt;
&lt;br /&gt;
Usage&lt;br /&gt;
 ./parB &amp;lt;Nr. of workers&amp;gt; &amp;lt;logfile&amp;gt; &amp;lt;file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
 $ ./parB.sh 2 ~/parB.log scheduler.mch&lt;br /&gt;
&lt;br /&gt;
The script can only be used for computation on a single physical computer. If you want to use multiple computers, the setup is a bit more complex:&lt;br /&gt;
&lt;br /&gt;
* On each physical computer  you need to start exactly one copy of &amp;lt;tt&amp;gt;lib/hasher&amp;lt;/tt&amp;gt;. &lt;br /&gt;
* Multiple Copies of  &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as workers:&lt;br /&gt;
 probcli -zmq_worker2 &amp;lt;MASTER_IP&amp;gt; &amp;lt;MASTER_PORT&amp;gt; 0&lt;br /&gt;
* A single instance of &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as  the master:&lt;br /&gt;
 probcli -zmq_master2 &amp;lt;MIN QUEUE SIZE&amp;gt; &amp;lt;MAX NR OF STATES&amp;gt; &amp;lt;MASTER_PORT&amp;gt;  0 &amp;lt;LOGFILE&amp;gt; &amp;lt;MODEL_FILE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb use one real core for each of the processes. On hyperthreads the model checking still becomes faster, but the speedup is only 1/4 for each additional hyperthread.  &lt;br /&gt;
&lt;br /&gt;
If something goes wrong it may be necessary to clean up your shared memory.  &lt;br /&gt;
You can find out if there are still memory blocks occupied using &amp;lt;tt&amp;gt;ipcs&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Removal can be done using:&lt;br /&gt;
 ipcrm -M `ipcs | grep &amp;lt;YOUR USERNAME&amp;gt; | grep -o &amp;quot;0x[^ ]*&amp;quot; | sed &#039;:a;N;$!ba;s/\n/ -M /g&#039;`&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2754</id>
		<title>ParB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2754"/>
		<updated>2015-03-18T10:20:55Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains how to run the distributed model checking prototype. &lt;br /&gt;
&lt;br /&gt;
Note that the implementation does not work with Windows, only Linux andMac OS are supported.  &lt;br /&gt;
&lt;br /&gt;
It is required to set the limits for shared memory on some systems, this can be done using sysctl. Here is a little script that sets the limits. It takes the size of shared memory as parameter (usually the size of your memory in GB). You need to run the script with root rights.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 if [ $# -gt 0 ]; then&lt;br /&gt;
     echo &amp;quot;Setting SHM sizes:&amp;quot;&lt;br /&gt;
     sysctl -w kern.sysv.shmmax=`perl -e &amp;quot;print 1073741824*$1&amp;quot;`&lt;br /&gt;
     sysctl -w kern.sysv.shmseg=4096&lt;br /&gt;
     sysctl -w kern.sysv.shmall=`perl -e &amp;quot;print 262144*$1&amp;quot;`&lt;br /&gt;
     echo &amp;quot;Here are the current values:&amp;quot;&lt;br /&gt;
     sysctl -a | grep shm&lt;br /&gt;
 else&lt;br /&gt;
     echo &amp;quot;You need to provide the size of shared memort (in full GB)&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
After setting up shared memory, you can use the &amp;lt;tt&amp;gt;parB.sh&amp;lt;/tt&amp;gt; script that comes with the ProB distribution (see [[Download]]).&lt;br /&gt;
&lt;br /&gt;
Usage&lt;br /&gt;
 ./parB &amp;lt;Nr. of workers&amp;gt; &amp;lt;logfile&amp;gt; &amp;lt;file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
 $ ./parB.sh 2 ~/parB.log scheduler.mch&lt;br /&gt;
&lt;br /&gt;
The script can only be used for computation on a single physical computer. If you want to use multiple computers, the setup is a bit more complex:&lt;br /&gt;
&lt;br /&gt;
* On each physical computer  you need to start exactly one copy of &amp;lt;tt&amp;gt;lib/hasher&amp;lt;/tt&amp;gt;. &lt;br /&gt;
* Multiple Copies of  &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as workers:&lt;br /&gt;
 probcli -zmq_worker2 &amp;lt;MASTER_IP&amp;gt; &amp;lt;MASTER_PORT&amp;gt; 0&lt;br /&gt;
* A single instance of &amp;lt;tt&amp;gt;probcli&amp;lt;/tt&amp;gt; configured as  the master:&lt;br /&gt;
 probcli -zmq_master2 &amp;lt;MINIMAL QUEUE SIZE&amp;gt; &amp;lt;MAX NR OF STATES&amp;gt; &amp;lt;MASTER_PORT&amp;gt;  0 &amp;lt;LOGFILE&amp;gt; &amp;lt;MODEL_FILE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a rule of thumb use one real core for each of the processes. On hyperthreads the model checking still becomes faster, but the speedup is only 1/4 for each additional hyperthread.  &lt;br /&gt;
&lt;br /&gt;
If something goes wrong it may be necessary to clean up your shared memory.  &lt;br /&gt;
You can find out if there are still memory blocks occupied using &amp;lt;tt&amp;gt;ipcs&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Removal can be done using:&lt;br /&gt;
 ipcrm -M `ipcs | grep &amp;lt;YOUR USERNAME&amp;gt; | grep -o &amp;quot;0x[^ ]*&amp;quot; | sed &#039;:a;N;$!ba;s/\n/ -M /g&#039;`&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2745</id>
		<title>ParB</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=ParB&amp;diff=2745"/>
		<updated>2015-03-16T17:34:50Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: Created page with &amp;#039;This page explains how to run the distributed model checking Prototype.&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains how to run the distributed model checking Prototype.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=2744</id>
		<title>User:Jens Bendisposto</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=2744"/>
		<updated>2015-03-16T17:34:07Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Formating_Sandbox]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Conferences]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Model Checkers]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:ProB 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[DMC]]&lt;br /&gt;
&lt;br /&gt;
[[parB]]&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q  ProB 2.0 Requirements Document]&lt;br /&gt;
&lt;br /&gt;
{{Bugtrack}}&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=DMC&amp;diff=2743</id>
		<title>DMC</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=DMC&amp;diff=2743"/>
		<updated>2015-03-16T17:32:26Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: Created page with &amp;#039;This page explains the methodology of the experiments carried out to evaluate the distributed version of ProB.&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains the methodology of the experiments carried out to evaluate the distributed version of ProB.&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=2742</id>
		<title>User:Jens Bendisposto</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=2742"/>
		<updated>2015-03-16T17:31:19Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Formating_Sandbox]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Conferences]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Model Checkers]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:ProB 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[DMC]]&lt;br /&gt;
&lt;br /&gt;
[[Using parB]]&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q  ProB 2.0 Requirements Document]&lt;br /&gt;
&lt;br /&gt;
{{Bugtrack}}&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
	<entry>
		<id>https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=2731</id>
		<title>User:Jens Bendisposto</title>
		<link rel="alternate" type="text/html" href="https://prob.hhu.de/w/index.php?title=User:Jens_Bendisposto&amp;diff=2731"/>
		<updated>2015-03-16T11:14:05Z</updated>

		<summary type="html">&lt;p&gt;Jens Bendisposto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Formating_Sandbox]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Conferences]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:Model Checkers]]&lt;br /&gt;
&lt;br /&gt;
[[Jens_Bendisposto:ProB 2.0]]&lt;br /&gt;
&lt;br /&gt;
[[Directed and Distributed Model Checking]]&lt;br /&gt;
&lt;br /&gt;
[[Using parB]]&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/document/pub?id=109z3qG6_KBUqm0NC9FaEF1C6_NYCJl453wcXzbovj2Q  ProB 2.0 Requirements Document]&lt;br /&gt;
&lt;br /&gt;
{{Bugtrack}}&lt;/div&gt;</summary>
		<author><name>Jens Bendisposto</name></author>
	</entry>
</feed>