m grammatical edits, punctuation edits |
Update paper link |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:User Manual]] | [[Category:User Manual]] | ||
__NOTOC__ | __NOTOC__ | ||
ProB supports machine readable CSP<ref>M. Butler and M. Leuschel: ''Combining CSP and B for specification and property verification''. FM 2005, LNCS 3582, Springer-Verlag, 2005 [ | ProB supports machine readable CSP<ref>M. Butler and M. Leuschel: ''Combining CSP and B for specification and property verification''. FM 2005, LNCS 3582, Springer-Verlag, 2005 [https://www3.hhu.de/stups/downloads/pdf/LeBu05_1.pdf]</ref> as supported by FDR and ProBE. CSP files can be animated and model checked on their own simply by opening a file ending with ".csp". | ||
You can also use a CSP file to guide a B machine by first opening the B machine and then using the "Open Special" | You can also use a CSP file to guide a B machine by first opening the B machine and then using the "Open Special" sub-menu of the File menu: | ||
* use CSP file: uses the CSP file to control the current B machine (see below) | * use CSP file: uses the CSP file to control the current B machine (see below) | ||
* use default CSP file: trys to use a CSP with the same name as the current B machine to control it | * use default CSP file: trys to use a CSP with the same name as the current B machine to control it | ||
Line 10: | Line 10: | ||
ProB now supports FDR and ProBE compatible CSP-M syntax, with the following outstanding issues | ProB now supports FDR and ProBE compatible CSP-M syntax, with the following outstanding issues | ||
* currying and lambda expressions have only been partially tested | * currying and lambda expressions have only been partially tested | ||
* extensions and productions are not yet supported (but {| |} is) | * extensions and productions are not yet supported (but {| |} is) | ||
* the priority of rename compared to external choice is unfortunately different than in FDR; please use parentheses | |||
* mixing of closure with other set operations (especially diff) is not yet fully supported | * mixing of closure with other set operations (especially diff) is not yet fully supported | ||
* input patterns can only contain variables, tuples, integers and constants (ch?(x,1) is ok, ch?(y+1,x) not). Also, for a record, all arguments must be provided (e.g., for datatype r.Val.Val you have to write r?x?y you cannot write r?xy). Finally, for the moment within "ch? x.y:Set" the ":Set" associates only with y; if you want to check that "x.y" is in Set you need to write: "ch?(x.y):Set. | * input patterns can only contain variables, tuples, integers and constants (ch?(x,1) is ok, ch?(y+1,x) not). Also, for a record, all arguments must be provided (e.g., for datatype r.Val.Val you have to write r?x?y you cannot write r?xy). Finally, for the moment within "ch? x.y:Set" the ":Set" associates only with y; if you want to check that "x.y" is in Set you need to write: "ch?(x.y):Set. | ||
* channel declarations can either use associative dot tuples or non-associative tuples but not yet both. Also, sets of tuples as channel types will not work the same way as in FDR. I.e., for channel a:LinkData you should not use LinkData = {0.0, 0.1, 1.0, 1.1} but rather nametype LinkData = {0,1}.{0,1}. | * channel declarations can either use associative dot tuples or non-associative tuples but not yet both. Also, sets of tuples as channel types will not work the same way as in FDR. I.e., for channel a:LinkData you should not use LinkData = {0.0, 0.1, 1.0, 1.1} but rather nametype LinkData = {0,1}.{0,1}. | ||
Also, in the first phase we have striven for compatibility and coverage. We still need to tune the animator and model checker for efficiency (there are few known bottlenecks which will be improved, especially with deeply nested CSP | Also, in the first phase we have striven for compatibility and coverage. We still need to tune the animator and model checker for efficiency (there are few known bottlenecks which will be improved, especially with deeply nested CSP synchronization constructs). | ||
== Guiding B Machines with CSP == | == Guiding B Machines with CSP == | ||
Line 38: | Line 38: | ||
For the syntax definition see [[CSP-M Syntax]] | For the syntax definition see [[CSP-M Syntax]] | ||
====== Command Line option for guided CSP||B ====== | |||
From the command line, you can specify a CSP File that should be used to guide the B machine with | |||
-csp-guide <Filename> | |||
(This feature is included since version 1.3.5-beta7.) | |||
== References == | == References == | ||
<references /> | <references /> |
ProB supports machine readable CSP[1] as supported by FDR and ProBE. CSP files can be animated and model checked on their own simply by opening a file ending with ".csp".
You can also use a CSP file to guide a B machine by first opening the B machine and then using the "Open Special" sub-menu of the File menu:
ProB now supports FDR and ProBE compatible CSP-M syntax, with the following outstanding issues
Also, in the first phase we have striven for compatibility and coverage. We still need to tune the animator and model checker for efficiency (there are few known bottlenecks which will be improved, especially with deeply nested CSP synchronization constructs).
To use this feature of ProB: first open a B Machine, then select "Use CSP File to Guide B..." or "Use Default CSP File" in the "Open Special" submenu of the File menu (you must be in normal user mode to see it).
The CSP file should define a process called "MAIN". This process will be executed in parallel with the B machine. The synchronization between the B machine and the CSP specification is as follows:
CSP [| {op1,...,opn} |] Bwhere op1,...,opn are the visible operations defined in the B machine.
add!1 -> will match add(1,1) or add(1,2) or ... (supposing add has 2 parameters in B) add -> will match add(1,2), add(2,1), ...
add!1!2 -> will only match add(1,2)
lookup!X!2 will match lookup(X) --> 2Note however, that for non-deterministic operations you generally should only retrieve the output value using a ? and not match against it using a !. Otherwise, the non-determinism of the B operation will be treated as an external choice for the CSP. So, if lookup is non-deterministic then we should do lookup!X?Res -> Res=2 & Cont rather than lookup!X!2 -> Cont.
For the syntax definition see CSP-M Syntax
From the command line, you can specify a CSP File that should be used to guide the B machine with
-csp-guide <Filename>
(This feature is included since version 1.3.5-beta7.)