Commit c2b33cb1 authored by Point Gerald's avatar Point Gerald
Browse files

changes documentation related to preprocessors

parent b55f4198
......@@ -3,6 +3,9 @@ Details can be found in the ChangeLog file.
arc 1.4:
New features:
. add a by-extension preprocessing mechanism. A preprocessor can be
associated to a filename extension. A default preprocessor can also be
defined.
. add 'attribute id' formula in Acheck specifications that is the set of
transitions whose event contains a component with the attribute 'id'.
. add CTL* logic into acheck specifications. Formulas are introduced using
......
ARC NEWS - History of user visible changes.
What's new in 1.4:
* add a by-extension preprocessing mechanism
* add CTL* specifications into Acheck specs
* add 'attribute id' formula in Acheck specifications
* the 'info' command now displays dimension of nodes and their hierachy
......
......@@ -2,10 +2,10 @@ node Board
state
/* 1 */ c : [0, 1][2][2];
event
/* 1 */ one;
/* 2 */ col_or_line;
/* 3 */ diagonal;
/* 4 */ '$';
/* 1 */ '$';
/* 2 */ diagonal;
/* 3 */ col_or_line;
/* 4 */ one;
trans
true |- one -> 'c[0][0]' := ('c[0][0]'+1) mod 2;
true |- one -> 'c[0][1]' := ('c[0][1]'+1) mod 2;
......@@ -19,5 +19,6 @@ node Board
true |- diagonal -> 'c[1][0]' := ('c[1][0]'+1) mod 2, 'c[0][1]' := ('c[0][1]'+1) mod 2;
true |- '$' -> ;
// assertion is (implicitly) 'true'.
// no initialization is specified.
// no initial assignment is specified.
// no initial constraint is specified.
edon
......@@ -2,18 +2,18 @@
* Properties for node : Board
* # state properties : 6
*
* initial = 16
* O = 8
* CL = 4
* D = 2
* any_s = 16
* O = 8
* W = 2
* CL = 4
* any_s = 16
* initial = 16
*
* # trans properties : 5
*
* any_t = 176
* epsilon = 16
* not_deterministic = 160
* self = 16
* self_epsilon = 16
* not_deterministic = 160
* any_t = 176
*/
set arc.shell.preprocessor "/usr/bin/cpp"
set arc.shell.preprocessor.default.command "/usr/bin/cpp"
load game.alt
show Board > Board.alt
load game.ack
......
digraph "Board/Q" {
label="Board/Q (1 classes)";
node[shape="box"]
C0[label="c[0][0]=0,c[0][1]=0,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=1,c[1][0]=0,c[1][1]=0\nc[0][0]=0,c[0][1]=1,c[1][0]=0,c[1][1]=0\nc[0][0]=0,c[0][1]=1,c[1][0]=1,c[1][1]=0\nc[0][0]=1,c[0][1]=1,c[1][0]=1,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=1,c[1][1]=0\nc[0][0]=0,c[0][1]=0,c[1][0]=1,c[1][1]=0\nc[0][0]=0,c[0][1]=0,c[1][0]=1,c[1][1]=1\nc[0][0]=1,c[0][1]=0,c[1][0]=1,c[1][1]=1\nc[0][0]=1,c[0][1]=1,c[1][0]=1,c[1][1]=1\nc[0][0]=0,c[0][1]=1,c[1][0]=1,c[1][1]=1\nc[0][0]=0,c[0][1]=1,c[1][0]=0,c[1][1]=1\nc[0][0]=1,c[0][1]=1,c[1][0]=0,c[1][1]=1\nc[0][0]=1,c[0][1]=0,c[1][0]=0,c[1][1]=1\nc[0][0]=0,c[0][1]=0,c[1][0]=0,c[1][1]=1",URL="#",tooltip="initial, any_s"]
C0 -> C0[label=""]
C0 -> C0[label="diagonal"]
C0 -> C0[label="col_or_line"]
C0 -> C0[label="one"]
C0x9ba9f88[label="c[0][0]=0,c[0][1]=0,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=1,c[1][0]=0,c[1][1]=0\nc[0][0]=0,c[0][1]=1,c[1][0]=0,c[1][1]=0\nc[0][0]=0,c[0][1]=1,c[1][0]=1,c[1][1]=0\nc[0][0]=1,c[0][1]=1,c[1][0]=1,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=1,c[1][1]=0\nc[0][0]=0,c[0][1]=0,c[1][0]=1,c[1][1]=0\nc[0][0]=0,c[0][1]=0,c[1][0]=1,c[1][1]=1\nc[0][0]=1,c[0][1]=0,c[1][0]=1,c[1][1]=1\nc[0][0]=1,c[0][1]=1,c[1][0]=1,c[1][1]=1\nc[0][0]=0,c[0][1]=1,c[1][0]=1,c[1][1]=1\nc[0][0]=0,c[0][1]=1,c[1][0]=0,c[1][1]=1\nc[0][0]=1,c[0][1]=1,c[1][0]=0,c[1][1]=1\nc[0][0]=1,c[0][1]=0,c[1][0]=0,c[1][1]=1\nc[0][0]=0,c[0][1]=0,c[1][0]=0,c[1][1]=1\n",URL="#", tooltip="initial, any_s"];
C0x9ba9f88 -> C0x9ba9f88 [label="diagonal"];
C0x9ba9f88 -> C0x9ba9f88 [label="one"];
C0x9ba9f88 -> C0x9ba9f88 [label=""];
C0x9ba9f88 -> C0x9ba9f88 [label="col_or_line"];
}
digraph "Board/Q" {
label="Board/Q (4 classes)";
node[shape="box"]
C0[label="c[0][0]=0,c[0][1]=1,c[1][0]=1,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=0,c[1][1]=1",URL="#",tooltip="initial, D, any_s"]
C1[label="c[0][0]=1,c[0][1]=1,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=1,c[1][1]=0\nc[0][0]=0,c[0][1]=0,c[1][0]=1,c[1][1]=1\nc[0][0]=0,c[0][1]=1,c[1][0]=0,c[1][1]=1",URL="#",tooltip="initial, any_s, CL"]
C2[label="c[0][0]=1,c[0][1]=0,c[1][0]=0,c[1][1]=0\nc[0][0]=0,c[0][1]=1,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=1,c[1][0]=1,c[1][1]=0\nc[0][0]=0,c[0][1]=0,c[1][0]=1,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=1,c[1][1]=1\nc[0][0]=0,c[0][1]=1,c[1][0]=1,c[1][1]=1\nc[0][0]=1,c[0][1]=1,c[1][0]=0,c[1][1]=1\nc[0][0]=0,c[0][1]=0,c[1][0]=0,c[1][1]=1",URL="#",tooltip="initial, O, any_s"]
C3[label="c[0][0]=0,c[0][1]=0,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=1,c[1][0]=1,c[1][1]=1",URL="#",tooltip="initial, any_s, W"]
C0 -> C0[label=""]
C0 -> C3[label="diagonal"]
C0 -> C1[label="col_or_line"]
C0 -> C2[label="one"]
C1 -> C1[label=""]
C1 -> C1[label="diagonal"]
C1 -> C3[label="col_or_line"]
C1 -> C0[label="col_or_line"]
C1 -> C2[label="one"]
C2 -> C2[label=""]
C2 -> C2[label="diagonal"]
C2 -> C2[label="col_or_line"]
C2 -> C0[label="one"]
C2 -> C1[label="one"]
C2 -> C3[label="one"]
C3 -> C3[label=""]
C3 -> C0[label="diagonal"]
C3 -> C1[label="col_or_line"]
C3 -> C2[label="one"]
C0x9ba8330[label="c[0][0]=0,c[0][1]=1,c[1][0]=1,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=0,c[1][1]=1\n",URL="#", tooltip="initial, D, any_s"];
C0x9ba9af8[label="c[0][0]=1,c[0][1]=1,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=1,c[1][1]=0\nc[0][0]=0,c[0][1]=0,c[1][0]=1,c[1][1]=1\nc[0][0]=0,c[0][1]=1,c[1][0]=0,c[1][1]=1\n",URL="#", tooltip="initial, CL, any_s"];
C0x9ba9c30[label="c[0][0]=1,c[0][1]=0,c[1][0]=0,c[1][1]=0\nc[0][0]=0,c[0][1]=1,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=1,c[1][0]=1,c[1][1]=0\nc[0][0]=0,c[0][1]=0,c[1][0]=1,c[1][1]=0\nc[0][0]=1,c[0][1]=0,c[1][0]=1,c[1][1]=1\nc[0][0]=0,c[0][1]=1,c[1][0]=1,c[1][1]=1\nc[0][0]=1,c[0][1]=1,c[1][0]=0,c[1][1]=1\nc[0][0]=0,c[0][1]=0,c[1][0]=0,c[1][1]=1\n",URL="#", tooltip="O, initial, any_s"];
C0x9baa2a8[label="c[0][0]=0,c[0][1]=0,c[1][0]=0,c[1][1]=0\nc[0][0]=1,c[0][1]=1,c[1][0]=1,c[1][1]=1\n",URL="#", tooltip="initial, W, any_s"];
C0x9ba8330 -> C0x9ba8330 [label=""];
C0x9ba8330 -> C0x9ba9af8 [label="col_or_line"];
C0x9ba9af8 -> C0x9ba8330 [label="col_or_line"];
C0x9ba8330 -> C0x9ba9c30 [label="one"];
C0x9ba9c30 -> C0x9ba8330 [label="one"];
C0x9ba8330 -> C0x9baa2a8 [label="diagonal"];
C0x9baa2a8 -> C0x9ba8330 [label="diagonal"];
C0x9ba9af8 -> C0x9ba9af8 [label="diagonal"];
C0x9ba9af8 -> C0x9ba9af8 [label=""];
C0x9ba9af8 -> C0x9ba9c30 [label="one"];
C0x9ba9c30 -> C0x9ba9af8 [label="one"];
C0x9ba9af8 -> C0x9baa2a8 [label="col_or_line"];
C0x9baa2a8 -> C0x9ba9af8 [label="col_or_line"];
C0x9ba9c30 -> C0x9ba9c30 [label="diagonal"];
C0x9ba9c30 -> C0x9ba9c30 [label=""];
C0x9ba9c30 -> C0x9ba9c30 [label="col_or_line"];
C0x9ba9c30 -> C0x9baa2a8 [label="one"];
C0x9baa2a8 -> C0x9ba9c30 [label="one"];
C0x9baa2a8 -> C0x9baa2a8 [label=""];
}
......@@ -30,11 +30,7 @@ file extension.
@altarica{}, @acheck{}, @mecv{} and @arc{} scripts.
@end itemize
If the @code{arc.shell.preprocessor} preference is defined then the input files
are preprocessed by the command given in the preference (@xref{arc.shell.preprocessor}). When this mechanism is used, error or warning messages are located
relatively to the output of the preprocessor; @code{# @i{filename} @i{n}}
lines (as generated by the @t{C} preprocessor) are interpreted as relocation
instructions by the @altarica{} parser.
Files can be preprocessed; @pxref{arc.shell.preprocessor}).
@end quotation
......@@ -33,19 +33,18 @@ Default value: ~/.arc_history
@item preprocessor
@anchor{arc.shell.preprocessor}
Use this setting to specify command used to preprocess @altarica{}, @mecv{} or
@acheck{} files. A @code{%s} in the specified string indicates the position of
the file to process. If no @code{%s} is found then the filename is just
concatenated with the specified command and a separating white space.
@arc{} permits to preprocess @altarica{}, @mecv{} or @acheck{} files. One can assosiate to filename extensions (except @code{.arc}, @code{.lus} and @code{.rel}) a program used as a preprocessor. To specify that files terminating with the extension @code{.ext} must be preprocessed using a specific program, set the preference @code{arc.shell.preprocessor.ext.command} to the a string that contains the name of the executable (that must accessible via the @code{PATH} environment variable). A @code{%s} in the specified string indicates the position of the file to process. If no @code{%s} is found then the filename is just concatenated with the specified command and a separating white space.
Note that the parser handles @code{#line} indications generated by certain
preprocessors.
Additional arguments can be appended to the command using the preferences @code{arc.shell.preprocessor.ext.args}. Such additional arguments are added each time the preprocessor is called.
Examples:
If ARC can not associate a preprocessor to an extension it looks for preferences for @code{arc.shell.preprocessor.default.command} and @code{arc.shell.preprocessor.default.args}. If these latters are not set the file is parsed as-is.
Note that the parser handles @code{#line} indications generated by certain preprocessors.
Examples: With the following setting, any file @code{F} with the extension @code{.php} are preprocessed with the command @code{php F 5}.
@smallexample
set arc.shell.preprocessor "php %s 5"
set arc.shell.preprocessor "m4 -s"
set arc.shell.preprocessor cpp
set arc.shell.preprocessor.php.command "php"
set arc.shell.preprocessor.php.args "5"
@end smallexample
Possible values: String
......
......@@ -90,11 +90,10 @@ line that defines the macro-function @code{FLIP(@i{i}, @i{j})}.
By default preprocessing of files is disabled; this yields to a syntax error on
line 3. To enable it we use the @ref{setcmd,,@command{set}
command}, to specify in the preference variable
@code{arc.shell.preprocessor} which preprocessor we want to use (here
@command{cpp}):
@code{arc.shell.preprocessor.default.command} which preprocessor we want to use by default (here @command{cpp}):
@smallexample
@i{arc>@t{set arc.shell.preprocessor "/usr/bin/cpp"}
@i{arc>@t{set arc.shell.preprocessor.default.command "/usr/bin/cpp"}
arc>}
@end smallexample
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment