| [ 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-01-26 | |
| TorX Test Tool Information | ||
| Prev | Next | |
The first section, which starts with the keyword %description on a single line, contains a non-formal description of the test purpose, its author, goal, date of writing, etc.
The second section, which starts with the keyword %declare on a single line, contains declarations of the actions that are used in the test purpose. An action declaration has the form
action aid "text-string" ;This defines an action identifier aid, together with a ``verbose'' string representation text-string of it. The ``verbose'' string representation is used unless the -a option of jararaca is used. If the -a option is used, the strings may be left empty
set sid {This defines the action identifiers aid1, aid2, etc. with their string representations text-string1 and text-string2 as belonging to the set named sid. The action identifiers and the set names can be used in the third and fourth sections, which contain the regular expressions.action aid1 "text-string1" ,};
action aid2 "text-string2" ,
...
The third section, which starts with the keyword %define on a single line, contains named regular expressions, as
eid = regular-expression ;This makes that a named regular-expression can be used as sub-expression in the regular expressions that follow it (in the third section and in the fourth section), by referring to its name eid.
The fourth (and last) section, which starts with the keyword %objective on a single line, contains the regular expression for which the automaton should be build, and which should be explored.
Atomic regular expressions are:
Regular expressions can be built recursively using the following operators, where e, e1, and e2 are regular expressions:
%description
Testpurpose 1-9
d.d. 12 december 2001
author: Rene de Vries
Goal: Test purposes for requirement 1-9 of conference protocol
%declare
set LU {
action o_PduJoin_P1 "udp_out!UDP2!UDP_DATAIND(UDP1,PDU_J(UT_A,CI_ONE))",
action o_PduJoin_P2 "udp_out!UDP3!UDP_DATAIND(UDP1,PDU_J(UT_A,CI_ONE))",
action o_PduAnswer_P1_C1 "udp_out!UDP2!UDP_DATAIND(UDP1,PDU_A(UT_A,CI_ONE))",
action o_PduAnswer_P1_C2 "udp_out!UDP2!UDP_DATAIND(UDP1,PDU_A(UT_A,CI_TWO))",
action o_PduAnswer_P2_C1 "udp_out!UDP3!UDP_DATAIND(UDP1,PDU_A(UT_A,CI_ONE))",
action o_PduAnswer_P2_C2 "udp_out!UDP3!UDP_DATAIND(UDP1,PDU_A(UT_A,CI_TWO))",
action o_PduData_P1 "udp_out!UDP2!UDP_DATAIND(UDP1,PDU_D(L_1,M1))",
action o_PduData_P2 "udp_out!UDP3!UDP_DATAIND(UDP1,PDU_D(L_1,M1))",
action o_PduLeave_P1_C1 "udp_out!UDP2!UDP_DATAIND(UDP1,PDU_L(UT_A,CI_ONE))",
action o_PduLeave_P1_C2 "udp_out!UDP2!UDP_DATAIND(UDP1,PDU_L(UT_A,CI_TWO))",
action o_PduLeave_P2_C1 "udp_out!UDP3!UDP_DATAIND(UDP1,PDU_L(UT_A,CI_ONE))",
action o_PduLeave_P2_C2 "udp_out!UDP3!UDP_DATAIND(UDP1,PDU_L(UT_A,CI_TWO))",
action o_SpDataInd "cfsap_out!CF1!DATAIND(UT_A,M1)"
};
setLI{
action i_PduJoin_C1 "udp_in!UDP2!UDP_DATAREQ(UDP1,PDU_J(UT_A,CI_ONE))",
action i_PduJoin_C2 "udp_in!UDP2!UDP_DATAREQ(UDP1,PDU_J(UT_A,CI_TWO))",
action i_PduAnswer_P1_C1 "udp_in!UDP2!UDP_DATAREQ(UDP1,PDU_A(UT_A,CI_ONE))",
action i_PduAnswer_P1_C2 "udp_in!UDP2!UDP_DATAREQ(UDP1,PDU_A(UT_A,CI_TWO))",
action i_PduAnswer_P2_C1 "udp_in!UDP3!UDP_DATAREQ(UDP1,PDU_A(UT_A,CI_ONE))",
action i_PduAnswer_P2_C2 "udp_in!UDP2!UDP_DATAREQ(UDP1,PDU_A(UT_A,CI_TWO))",
action i_PduData_P1 "udp_in!UDP2!UDP_DATAREQ(UDP1,PDU_D(L_1,M1))",
action i_PduData_P2 "udp_in!UDP3!UDP_DATAREQ(UDP1,PDU_D(L_1,M1))",
action i_PduLeave "udp_in!UDP2!UDP_DATAREQ(UDP1,PDU_L(UT_A,CI_ONE))",
action i_SpJoin_C1 "cfsap_in!CF1!JOIN(UT_A,CI_ONE)",
action i_SpDataReq "cfsap_in!CF1!DATAREQ(M1)",
action i_SpLeave "cfsap_in!CF1!LEAVE"
};
action delta "Delta";
%define
/* general strategies */
LUD = LU|delta;
eager = LU*.delta;
/* rewriting/combinations */
i_PduData = i_PduData_P1 | i_PduData_P2;
SpJoinC1 = i_SpJoin_C1.LUD*;
JoinedConf = SpJoinC1.i_PduAnswer_P1_C1.i_PduAnswer_P2_C1;
o_PduJoin = o_PduJoin_P1 | o_PduJoin_P2;
o_PduAnswer_P1 = o_PduAnswer_P1_C1 | o_PduAnswer_P1_C2;
o_PduAnswer_P2 = o_PduAnswer_P2_C1 | o_PduAnswer_P2_C2;
o_PduAnswer = o_PduAnswer_P1 | o_PduAnswer_P2;
/* modeled requirements as test purpose */
/* we assume 2 potential conference partners */
Req1 = i_SpJoin_C1.(LUD*>o_PduJoin)[2];
Req2 = i_SpJoin_C1.LUD*.i_PduJoin_C1.LUD*>o_PduAnswer;
Req3 = i_SpJoin_C1.LUD*.i_PduJoin_C2.eager;
Req4 = SpJoinC1.i_PduAnswer_P1_C1.i_PduAnswer_P2_C2.
i_SpDataReq.i_PduData_P1.eager;
Req5 = JoinedConf.i_SpDataReq.eager;
Req6 = JoinedConf.i_PduData_P1.i_PduData_P2.eager;
Req7 = JoinedConf.i_SpLeave.i_SpJoin_C1.eager.i_SpDataReq.eager;
Req8 = JoinedConf.i_PduLeave.i_SpDataReq.eager;
Req9 = SpJoinC1.i_PduData_P1.eager;
%objective
Req1/* */
/* Req2 */
/* Req3 */
/* Req4 */
/* Req5 */
/* Req6 */
/* Req7 */
/* Req8 */
/* Req9 */
/*LUD */
%objective TPand TPFLAG could then be used to define TP, for example to something like
-DTP=Req1to select the first requirement.
#!/bin/sh tpfile=confprot.tp tmptpfile=/tmp/torx$$.tp cfg=explorer-primer-config.txt cpp -C -E -P $TPFLAG $tpfile > $tmptpfile primer -f $cfg "$@" jararaca $tmptpfile rm -f $tmptpfile
Because the TorX explorer-primer interface ``works'' on standard input and standard output, it is not possible to read the regular expression from standard input and run the TorX explorer-primer interface or write the dot file to standard output and run the TorX explorer-primer interface.
| Prev | Table of Contents | Next |
| Appendix D: TorX Manual Pages: pui(1) - simple primer user interface |
|
Appendix D: TorX Manual Pages: jararacy(1) - animate jararaca trace using lefty |