[ Home | What's New | Contents | Overview | Contributors | Distribution | Examples | Documentation | Manual | Publications | Mailing List Archive | Problems ] | This page was last updated by Axel Belinfante on 2006-06-30 | |
TorX Test Tool Information | ||
Prev | Next |
When active, the EXPLORER receives commands from the standard input and writes answers in return to the standard output. See section COMMANDS and ANSWERS for the available commands and answers. When a EXPLORER is used in the TORX tool it is connected to a PRIMER which has the control and initiative of all communications. When the EXPLORER is used as standalone the user plays the role of the PRIMER.
A command consist of a single line of text. The first character of a command indicates the type of the command. This first character is always in lowercase.
An answer consist of a single line of text or a multi-line of text. All single line answers start with the character of their command turned into uppercase. A multi-line answer has specific markers around the body of the answer. These markers consist of two characters at a single line, made up from the usual answer prefix character, with B and E appended, respectively. Each line of the body of a multi line answer starts with a two character prefix consisting of the usual uppercase answer prefix character, followed by the same character in lowercase. Each answer line can contain multiple fields. Arbitrary whitespace (one or more spaces or tabs) separates the fields from the (one or two character) prefix at the start of the line. The fields themselves are separated by a singe tab character. A fields cannot contain tab characters, is assumed not to start or end with spaces.
Instead of the usual answer, an error answer may occur in case of an error. Also error answers start with a two character prefix, consisting of the usual uppercase answer prefix character, followed by the character ``0''.
The following describes the syntax of the commands and answers:
arguments-upto-end-of-line nl
- interaction:
- message* command message* answer-or-error
- command:
- lowercase(name) arguments-upto-end-of-line nl
- answer-or-error:
- single-line-answer | multi-line-answer | error
- single-line-answer:
- uppercase(name) arguments-upto-end-of-line nl
- multi-line-answer:
- uppercase(name)B nl multi-line-element* uppercase(name)E nl
- multi-line-element:
- message | result-element
- result-element:
- uppercase(element-name) arguments-upto-end-of-line nl
- message:
- debug | log | warning
- debug:
- A_DEBUG text-upto-end-of-line nl
- log:
- A_LOG text-upto-end-of-line nl
- warning:
- A_WARNING text-upto-end-of-line nl
- error:
- uppercase(name)0
Boolean values are represented by the characters ``1'' and ``0'' for respectively true and false.
For the variable names, types and predicates that are used in a symbolic explorer we expect the following representation. The type as used in the field freevars ``looks like'' an identifier, i.e. it consists of upper and lowercase characters, digits and underscores. The normalised-varname as used in the fields label, preds, and freevars is constructed from the type of the ``original'' variable and a sequence number. By convention it has the form var_type$nr as show in the example at the end. The original-varname as used in the field freevars and in the predicates of the instantiate command ``looks like'' an identifier, i.e. it consists of upper and lowercase characters, digits and underscores. The predicates used in the instantiate command is a semi-colon separated list of predicates, where each of the individual predicates in the list should not contain newlines or semi-colons. One could imagine various syntaxes for the individual predicates in the list, depending on the purpose of the predicate. Possible purposes are to specify a specific value for a free variable, or to constrain the range of possible values for a free variable. The current symbolic primer(1) uses the instantiate command to specify specific values for free variables. It uses the syntax original-varname = expression for the predicates in the semi-colon separated list of predicates, as illustrated in the example at the end.
r
e event
d event ...
qA symbolic explorer additionally offers the following commands to instantiate an event, and to ask for solutions to predicates:
i event predicates
p predicatesThe command to ask whether a given event matches one of a list of events is implemented in the smile primer, but currently not used in the symbolic primer.
m event event ...Below we describe these commands in more detail.
event, solved, preds, freevars, identicalwith
Command:
rAnswer:
R event TAB solved TAB preds TAB freevars TAB identical
event, visible, solved, label, preds, freevars, identicalwith
Command:
e eventAnswer (multi-line):
EB
Ee event TAB visible TAB solved TAB label TAB preds TAB freevars TAB identical
...
EE
Command:
d event ...Answer:
D
Command:
qAnswer:
Q
The fields of the successful result contain a description of an action and corresponding resulting state:
event, visible, solved, label, preds, freevars, identicalwith
The fields of the error result contain information about the (lack of) success of finding a solution, and, if a solution was found, the solution itself:
solved, found, preds, msg, errwith
Command:
i event WS predicatesAnswer (succesfull):
I event TAB visible TAB solved TAB label TAB preds TAB freevars TAB identicalAnswer (error):
I0 solved TAB found TAB preds TAB msg TAB error
solved, found, preds, msg, errwith
Command:
p predicatesAnswer:
P solved TAB found TAB preds TAB msg TAB error
found, eventwith
Command:
m event event ...Answer (sccessfull):
M found TAB eventAnswer (error):
M0 error text upto end of line
$ smileexp cf-pe-sut-smile.cr r R 0 1 e 0 EB Ee 3 1 1 udp_in ! udp2 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_227_0 PDU Ee 2 1 1 udp_in ! udp3 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_226_0 PDU Ee 1 1 1 CFSAP_in ! cf1 ! join(var_UserTitle$1, var_ConfIdent$1) \ var_UserTitle$1 Smile_224_0 UserTitle var_ConfIdent$1 Smile_225_0 ConfIdent EE i 1 Smile_225_0 = ut_A ; Smile_224_0 = ci_one I 4 1 1 CFSAP_in ! cf1 ! join(ut_A, ci_one) Smile_225_0 = ut_A ; Smile_224_0 = ci_one 1 e 4 EB Ee 9 1 1 CFSAP_in ! cf1 ! datareq(var_DataField$1) var_DataField$1 Smile_230_0 DataField Ee 8 1 1 CFSAP_in ! cf1 ! leave Ee 7 1 1 udp_in ! udp3 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_229_0 PDU Ee 6 1 1 udp_in ! udp2 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_228_0 PDU Ee 5 0 1 i ! cf1 ! join(ut_A, ci_one) EE i 1 Smile_225_0 = ut_B ; Smile_224_0 = ci_two I 10 1 1 CFSAP_in ! cf1 ! join(ut_B, ci_two) Smile_225_0 = ut_B ; Smile_224_0 = ci_two 1 e 10 EB Ee 15 1 1 CFSAP_in ! cf1 ! datareq(var_DataField$1) var_DataField$1 Smile_233_0 DataField Ee 14 1 1 CFSAP_in ! cf1 ! leave Ee 13 1 1 udp_in ! udp3 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_232_0 PDU Ee 12 1 1 udp_in ! udp2 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_231_0 PDU Ee 11 0 1 i ! cf1 ! join(ut_B, ci_two) EE e 5 EB Ee 21 0 1 i ! udp1 ! udp_datareq(udp2, PDU_J(ut_A, ci_one)) Ee 20 0 1 i ! udp1 ! udp_datareq(udp3, PDU_J(ut_A, ci_one)) Ee 19 1 1 udp_in ! udp3 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_236_0 PDU Ee 18 1 1 udp_in ! udp2 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_235_0 PDU Ee 17 1 1 CFSAP_in ! cf1 ! datareq(var_DataField$1) var_DataField$1 Smile_234_0 DataField Ee 16 1 1 CFSAP_in ! cf1 ! leave EE e 20 EB Ee 27 0 1 i ! udp1 ! udp_datareq(udp2, PDU_J(ut_A, ci_one)) Ee 26 1 1 udp_out ! udp3 ! udp_dataind(udp1, PDU_J(ut_A, ci_one)) Ee 25 1 1 udp_in ! udp2 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_239_0 PDU Ee 24 1 1 udp_in ! udp3 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_238_0 PDU Ee 23 1 1 CFSAP_in ! cf1 ! datareq(var_DataField$1) var_DataField$1 Smile_237_0 DataField Ee 22 1 1 CFSAP_in ! cf1 ! leave EE e 21 EB Ee 33 0 1 i ! udp1 ! udp_datareq(udp3, PDU_J(ut_A, ci_one)) Ee 32 1 1 udp_out ! udp2 ! udp_dataind(udp1, PDU_J(ut_A, ci_one)) Ee 31 1 1 udp_in ! udp2 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_242_0 PDU Ee 30 1 1 udp_in ! udp3 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_241_0 PDU Ee 29 1 1 CFSAP_in ! cf1 ! datareq(var_DataField$1) var_DataField$1 Smile_240_0 DataField Ee 28 1 1 CFSAP_in ! cf1 ! leave EE e 27 EB Ee 39 1 1 udp_out ! udp2 ! udp_dataind(udp1, PDU_J(ut_A, ci_one)) Ee 38 1 1 udp_out ! udp3 ! udp_dataind(udp1, PDU_J(ut_A, ci_one)) Ee 37 1 1 udp_in ! udp3 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_245_0 PDU Ee 36 1 1 udp_in ! udp2 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_244_0 PDU Ee 35 1 1 CFSAP_in ! cf1 ! datareq(var_DataField$1) var_DataField$1 Smile_243_0 DataField Ee 34 1 1 CFSAP_in ! cf1 ! leave EE e 33 EB Ee 45 1 1 udp_out ! udp3 ! udp_dataind(udp1, PDU_J(ut_A, ci_one)) Ee 44 1 1 udp_out ! udp2 ! udp_dataind(udp1, PDU_J(ut_A, ci_one)) Ee 43 1 1 udp_in ! udp3 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_248_0 PDU Ee 42 1 1 udp_in ! udp2 ! udp_datareq(udp1, var_PDU$1) var_PDU$1 Smile_247_0 PDU Ee 41 1 1 CFSAP_in ! cf1 ! datareq(var_DataField$1) var_DataField$1 Smile_246_0 DataField Ee 40 1 1 CFSAP_in ! cf1 ! leave EE q Q
normalised-varname, original-varname, typeto tuples of
varname, type
Question: would it be wise to change the interface such that the ``identical'' fields in the output of commands that ``generate'' events are never empty, but always contains the canonical state identifier -- which is identical to the transition identifier for transitions that are the ``first'' to point to a state? In that case, the user can always use the value of the field ``identical'' as canonical state identification (instead of having to check first if it is empty, and in that case using the transition identifier).
Prev | Table of Contents | Next |
Appendix D: TorX Manual Pages: torx-adaptor(5) - a program that implements an interface to the SUT | Appendix D: TorX Manual Pages: torx-instantiator(5) - a program that implements an instantiator |