murphi-format1
Reformat murphi models
Usage
murphi-format options
[FILE]
Overview
murphi-format is a utility bundled with the Rumur model checker. It can be used to reflow the text of a Murphi model into a consistent indentation style.
murphi-format intentionally has very few options. It aims to settle style debates by simply mandating a universally disliked format.
No line length limit is applied. The content within comments is not reflowed. If your input contains long expressions, these will appear as long lines in the output. The intention behind this choice is to encourage users to outline long expressions into functions.
See rumur(1) for more information about Rumur or Murphi.
Options
-
--debug or -d -
Enable debug mode. This produces some extra output intended for developers who are debugging
murphi-formatitself.
--help or fR
Show this documentation.
-
--in-place or -i -
Write the output of reformatting back into the same path as the source. This is only valid when one or more paths are given; it cannot be used when reformatting
stdin.
-
--output=FILE or -o FILE -
Write output to the given path. By default, output is written to
stdout.
-
--tab=STRING or -t STRING -
Text to use as one tab worth of indentation. By default, this is two spaces.
-
--version -
Print
murphi-formatversion and then exit.
Notes
To disable formatting for a specific section of code, special comments are recognised:
rule begin x := y; y := z; -- murphi-format: off z := w; w := x; -- murphi-format: on end;
Code between the murphi-format: off and murphi-format: on comments will be preserved as-is. Note that these must be line comments, not multi‐line comments. Additionally they must have the exact spacing shown, not arbitrary white space between e.g. the : and off.