.rs
.\" Troff code generated by TPS Convert from ITU Original Files
.\"                 Not Copyright (~c) 1991 
.\"
.\" Assumes tbl, eqn, MS macros, and lots of luck.
.TA 1c 2c 3c 4c 5c 6c 7c 8c
.ds CH
.ds CF
.EQ
delim @@
.EN
.nr LL 40.5P
.nr ll 40.5P
.nr HM 3P
.nr FM 6P
.nr PO 4P
.nr PD 9p
.po 4P

.rs
\v'|.5i'
.ce 1000
ANNEX B
.ce 0
.ce 1000
(to Recommendation\ X.290, Part 2)
.EF '%	Fascicle\ VIII.5\ \(em\ Rec.\ X.290''
.OF '''Fascicle\ VIII.5\ \(em\ Rec.\ X.290	%'
.sp 9p
.RT
.ce 0
.ce 1000
\fBGuidance for protocol Recommendations* writers\fR 
.sp 1P
.RT
.ce 0
.ce 1000
\fBto facilitate conformance testing\fR 
.ce 0
.LP
B.1
	\fBIntroduction\fR 
.sp 1P
.RT
.PP
This Annex gives guidance, primarily for the specifiers of new
protocol Recommendations*, to facilitate conformance testing by ensuring 
a very clear understanding of the conformance requirements. 
.RT
.sp 2P
.LP
B.2
	\fIGuidance on scope and field of application\fR 
.sp 1P
.RT
.PP
B.2.1
Precision in the scope and field of application sections sets the tone 
for precision in the rest of the Recommendation*. The requirements stated 
in the Recommendation* should be consistent with the scope and field of 
application and \fIvice versa\fR .
.sp 9p
.RT
.PP
B.2.2
The scope should distinguish clearly between the following three
types of information included in the protocol Recommendation*:
.sp 9p
.RT
.LP
	a)
	the definition of the procedures for communication to be
followed at the time of communication;
.LP
	b)
	requirements to be met by suppliers of implementations of
the procedures;
.LP
	c)
	guidance on how to implement the procedures.
.PP
Guidance on how to implement the procedures does not constitute
additional requirements nor does it have any bearing on conformance. If such
guidance is included, the scope should make these points and indicate how
guidance can be distinguished from the requirements of the Recommendation*.
This distinction is much easier to make if guidance is separated from
requirements. The recommended method of such separation in the ISO Directives 
is to place guidance in notes and annexes. 
.PP
B.2.3
It should be clear to whom the Recommendation* applies.
.sp 9p
.RT
.PP
B.2.4
It should be clear at what time the Recommendation* applies.
.sp 9p
.RT
.PP
Protocol procedures apply between pairs of communicating parties at the 
time of communication. If there might be any ambiguity over which 
communicating parties are involved, this should be resolved in the scope.
.PP
It is best if protocol Recommendations* are written in such a way that 
the requirements are to be met by a single communicating party (the `first' 
communicating party for this purpose) for the benefit of one or more other
communicating parties (the `second' communicating parties). Then when two 
(or more) communicating parties are all expected to communicate in conformance 
with the Recommendation*, the Recommendation* is first applied to one party, 
treating it as the `first' one, and then to the other(s) in turn. This 
ensures that if the procedures are violated, it is clear which party is 
at fault. 
.RT
.PP
B.2.5
If any guidance is given about factors which are not standardized definitively, 
the scope should make it clear that any such guidance can be 
ignored without affecting conformance.
.sp 9p
.RT
.PP
B.2.6
The aspects which are excluded from the scope should be identified  clearly.
.sp 9p
.RT
.PP
Not all factors relevant to the procedures or to products which
implement them need to be standardized; indeed it is often desirable to 
leave some implementor freedom. For instance, it may be desirable to omit 
in a 
protocol Recommendation* any requirements for explicit values of timeouts, 
but to give guidance instead. 
.PP
The scope should make it clear which aspects are standardized
definitively, which are covered by guidance but not by any requirements, and
which are excluded from consideration by the Recommendation*. Any aspects 
which one might think would be covered, on the basis that they are closely 
related to aspects which are standardized, need explicit mention. 
.bp
.RT
.PP
B.2.7
All options should, if possible, be identified clearly in the
scope.
.sp 9p
.RT
.PP
Options are one of the most troublesome, but unfortunately
necessary parts of protocol Recommendations*. They fall somewhere between 
what is standardized and what is not. They will be covered in greater depth 
below. At this point, what is important is that options are not burried 
deep inside 
the Recommendation* but are declared clearly at the beginning. If the number
and detailed nature of the options makes this impractical, one should seriously 
ask whether such complexity is really necessary. Can detailed options be 
grouped together in some way (e.g.\ classes) to simplify the
Recommendation*?
.PP
B.2.8
The scope and field of application should be reviewed after
considering the rest of the Recommendation*.
.sp 9p
.RT
.PP
It is not often possible to satisfy some of the above suggestions until 
the rest of the Recommendation* has been considered. Therefore, it is 
generally necessary to return to the scope, to check that it really does 
agree with the contents of the Recommendation*. It is common to find that 
sections 
quite outside the scope have found their way in.
.sp 2P
.LP
B.3
	\fIGuidance on references\fR 
.sp 1P
.RT
.PP
B.3.1
OSI protocol Recommendations* should refer to the OSI reference
model, the relevant service Recommendations* and to any relevant
Recommendations* for protocol conventions, guidelines, or formal description
techniques.
.sp 9p
.RT
.PP
B.3.2
It should be made clear whether conformance to the protocol
Recommendation* requires conformance to any part of any other
Recommendantion*.
.sp 9p
.RT
.PP
B.3.3
It should be made clear whether each reference is to a particular version 
of the reference Recommendation* or to each successive version. 
.sp 9p
.RT
.PP
Normally, the latest version is required, but this can cause
problems as changes to the other Recommendation* might affect conformance to
this Recommendation*.
.sp 2P
.LP
B.4
	\fIGuidance on requirements and options\fR 
.sp 1P
.RT
.PP
B.4.1
The status of every requirement should be unambiguous.
.sp 9p
.RT
.PP
Since optional and conditional requirements are so common, there is a tendency 
to interpret everything which can be interpreted as optional as 
being optional.
.PP
B.4.2
It should be possible for an instance of communication to conform with 
all the mandatory dynamic conformance requirements. 
.sp 9p
.RT
.PP
B.4.3
The conditions under which conditional requirements apply should be spelt 
out clearly. 
.sp 9p
.RT
.PP
B.4.4
It should not be impossible for the implementor or supplier to
know what these conditions are.
.sp 9p
.RT
.PP
B.4.5
There should be no possibility of confusion between what is
optional dynamically and what is optional statically.
.sp 9p
.RT
.PP
There may be mandatory static conformance requirements for the
support of features whose use at the time of communication is optional.
Conversely, a message whose use is mandatory in a given context at the 
time of communication may be part of a protocol mechanism whose support 
is optional 
statically.
.PP
B.4.6
If the Recommendation* contains a `shopping list' of
options, and there are restrictions on the allowed combinations of such
options, then the restrictions should be specified clearly. These should
include identification of any mutual exclusions and any minimum and maximum
limits to the allowed range of options.
.bp
.sp 9p
.RT
.PP
B.4.7
If the Recommendation* does not give any rules for selection of
options, it should be made clear in the scope that only the total range and
individual options are standardized, but not the selection.
.sp 9p
.RT
.PP
B.4.8
Legitimizing options should be avoided.
These are options which allow alternative and incompatible
versions of the same thing to claim conformance to the same Recommendation*.
While they do not of themselves prevent an objective understanding of
conformance, they may frustrate the aims of OSI.
.sp 9p
.RT
.PP
B.4.9
There should be no options which give the implementor permission to ignore 
important requirements of the Recommendation*. Such options devalue the 
Recommendation* and the meaning of conformance to it. 
.sp 9p
.RT
.sp 1P
.LP
B.4.10\ \ If there are prohibitions in the Recommendation*, they should be
sufficiently precise to be meaningful.
.sp 9p
.RT
.PP
Many Recommendations* have sections which say in effect `do all of this 
and nothing else'. Such prohibitions may be meaningless, because every 
protocol conveys some information which is not standardized, the so\(hycalled
`user data', and every standardized product has attributes which are not
standardized, e.g.\ weight. It may be difficult to draw a clear objective
line between things the Recommendation* cannot forbid and those which the
writers of the Recommendation* want to forbid, unless the prohibitions are
stated explicitly.
.sp 2P
.LP
B.5
	\fIGuidance on protocol data units\fR 
.sp 1P
.RT
.PP
B.5.1
The permitted set of PDU types and parameter encodings should be
stated clearly.
.sp 9p
.RT
.PP
B.5.2
The permitted range of values should be stated clearly for each
parameter.
.sp 9p
.RT
.PP
B.5.3
All values, which fall outside the stated permitted range, should be stated 
explicitly to be invalid. 
.sp 9p
.RT
.PP
If not, some people will argue that such values are undefined but allowed, 
whilst other will argue that they are invalid. 
.PP
B.5.4
It should be clear whether or not undefined PDU types are allowed.
.sp 9p
.RT
.PP
It is safer if all undefined PDU types are declared to be
invalid.
.PP
B.5.5
Critical undefined values should be mentioned explicitly in the
scope as being undefined.
.sp 9p
.RT
.PP
B.5.6
There should be a defined procedure to be followed by the first
communicating party in each case of it receiving an invalid or undefined PDU
type or parameter.
.sp 9p
.RT
.PP
B.5.7
It should be possible to detect whether the defined procedure has been 
followed in such cases. If it is not, then it should be because it does 
not matter.
.sp 9p
.RT
.PP
Sometimes the procedure to be followed upon receipt of an invalid PDU is 
intentionally the same as when some valid PDUs are received in the same 
circumstances. For example, the procedure might be to do nothing until 
one 
specific type of PDU is received, everything else being ignored. In such 
cases, it probably does not matter that the error has apparently gone undetected. 
In some other cases, the intention may be that error cases should be given 
special treatment, but that the procedure has been poorly chosen with the 
result that it cannot be distinguished from the action in non\(hyerror 
cases. 
.PP
B.5.8
If, in the encoding of PDUs, there are any fields declared to be
reserved, then there should be a clear statement of what values, if any, are
allowed or disallowed in these fields.
.sp 9p
.RT
.PP
B.5.9
If inter\(hyrelated parameters can be carried on separate PDUs, then the 
set of permitted relationships between the values of these parameters 
should be precisely and clearly defined.
.bp
.sp 9p
.RT
.sp 1P
.LP
B.5.10\ \ If the parameter encoding allows for parameters to be specified 
in any order, and the PDU format places restrictions on the permitted orders, 
then these restrictions should be clearly stated. It should be recognized 
that if 
many different orders are permitted, then a large representative sample of
different orders ought to be tested. The added complexity of testing
conformance should, therefore, be adequately compensated by some advantage 
in allowing this freedom. 
.sp 9p
.RT
.sp 1P
.LP
B.5.11\ \ The order in which the bits, octets,\ etc.\ should be carried in
the underlying protocol should be stated clearly.
.sp 9p
.RT
.PP
For example, should a two octet integer travel most or least
significant octet first? It is surprising how often such simple causes of
ambiguity are overlooked.
.sp 1P
.LP
B.5.12\ \ The relationship between SDUs and PDUs should be defined clearly.
.sp 9p
.RT
.sp 2P
.LP
B.6
	\fIGuidance on state\fR 
.sp 1P
.RT
.PP
B.6.1
Protocol procedures are often defined using a finite state
approach, whether formalized or not. The specification of these states 
is often incomplete. 
.sp 9p
.RT
.PP
B.6.2
Each state should be defined clearly.
.sp 9p
.RT
.PP
B.6.3
If there are events which can only occur in a subset of the
possible states, then possible occurrence of an event should be distinguished 
from valid occurrence. 
.sp 9p
.RT
.PP
B.6.4
The required actions and state transitions should be defined for
each possible state/event pair. In particular, they should be defined for
possible but invalid state/event pairs.
.sp 9p
.RT
.sp 2P
.LP
B.7
	\fIGuidance on formal description techniques\fR 
.sp 1P
.RT
.PP
B.7.1
The following requirements apply only to those Recommendations*
which include a formal description. Precise, unambiguous Recommendations* 
can be written without the aid of a formal description technique (FDT), 
but in 
complex Recommendations* such as protocols formal descriptions are highly
recommended. It should, however, be realized that they can create problems
themselves in relation to conformance.
.sp 9p
.RT
.PP
B.7.2
It should be clear whether the formal description forms an
essential part of the Recommendation* or is provided only for guidance.
.sp 9p
.RT
.PP
It is very important to have a clear understanding of the status of the 
formal description. Ideally there should be no discrepancies between the 
text and the formal description, but because this is very difficult to 
achieve in practice it is important that the reader knows which takes precedence. 
If 
the formal description is provided only for guidance, it cannot define
conformance requirements.
.PP
B.7.3
The FDT should be well\(hydefined, stable and properly referenced.
.sp 9p
.RT
.PP
B.7.4
If the formal description defines requirements, but not all the
requirements of the Recommendation*, then it should be stated clearly that 
the text includes requirements which are not covered by the formal description 
and these additional requirements should be identified clearly. 
.sp 9p
.RT
.PP
B.7.5
If the formal description defines requirements, and it also defines an 
allowed way of implementing some aspects of the protocol, but there is 
intended to be freedom for the implementor to implement those aspects in 
some other way, then this constitutes over\(hydefinition. This is all too 
common in 
formal descriptions, and creates difficulties in relation to conformance. If
the formal description is an essential part of the Recommendation*, then 
text should be provided to qualify it, indicating where such over\(hydefinition 
exists and what the real requirements are. 
.sp 9p
.RT
.PP
The problem usually arises because the formal description
describes the internal behaviour of an idealized implementation, rather than
the observable external behaviour that is required. It is only the observable 
external behaviour which can be tested, and therefore it is only this which 
should constitute requirements for conformance purposes. It may well be 
that a different FDT should be used for defining the requirements from 
that used to 
provide guidance to implementors.
.bp
.sp 2P
.LP
B.8
	\fIMiscellaneous guidance\fR 
.sp 1P
.RT
.PP
B.8.1
Information which may appear obvious should nevertheless be
stated.
.sp 9p
.RT
.PP
If something is omitted because it is `obvious', some readers will assume 
it is required because it is `obvious', but others will assume that it 
is obmitted to provide freedom for implementors. For example, does the 
existence of a checksum imply that it has to be checked?
.ce 1000
ANNEX C
.ce 0
.ce 1000
(to Recommendation X.290, Part 2)
.sp 9p
.RT
.ce 0
.ce 1000
\fBIncomplete static conformance requirements\fR 
.sp 1P
.RT
.ce 0
.PP
C.1
As a matter of historical record, the development of protocol
Recommendations* has been undertaken in parallel with the determination 
of the meaning of conformance, and in particular with the gaining of understanding 
of the distinction between static and dynamic conformance. 
.sp 1P
.RT
.PP
C.2
Therefore, some early protocol Recommendations* will not give a
complete specification of the requirements for static conformance. Typical 
of the imcompleteness is the requirement to support a particular function 
without saying whether this applies to sending, receiving or both; or the 
absence of 
precise conditions of detection of protocol errors in received incoming
messages.
.sp 9p
.RT
.PP
C.3
Accordingly, there may be different interpretations of what a
conforming implementation is.
.sp 9p
.RT
.PP
C.4
In future Recommendations* or at the time of revision of existing
Recommendations* it will be necessary to provide a thorough specification of
static conformance requirements. This would include the specification of
conditions applicable to the implementation or non\(hyimplementation of 
everything that is neither always mandatory nor always optional. 
.sp 9p
.RT
.PP
C.5
In the short term, it is essential that, at very least, current
drafts are modified to clarify the present situation: it is not considered
acceptable that Recommendations* should be issued in a form in which
implementation requirements suffer from extensive ambiguity. Consideration 
also needs to be given to what should be done where the protocols have 
already 
reached the status of ISO International Standard or CCITT Recommendation.
.sp 9p
.RT
.PP
C.6
No other short\(hyterm solution is seen other than to accept and state 
clearly that all capabilities not covered explicitly in the static conformance 
requirements are optional; and to minimize the potential problems that 
this may cause by specifying that: 
.sp 9p
.RT
.LP
	a)
	only implementations which 
.LP
	1)
	implement everything that is explicitly specified as   mandatory; and
.LP
	2)
	 do not omit anything unless it is explicitly stated to be optional, even 
though there may be a general clause of the sort `if not 
specified, then optional';
.LP
	are to be designated as `conforming' without qualification;
.LP
	b)
	any implementation which
.LP
	1)
	implements everything that is explicitly specified as  mandatory; and
.LP
	2)
	omits things which are not explicitly stated to be
optional, perhaps because of a general clause of the sort `if not specified
then optional';
.LP
	shall be described as conforming to a subset.
.PP
C.7
Implementations which omit anything that is mandatory do not conform  at all.
.sp 9p
.RT
.PP
\fINote\fR \ \(em\ A system conforming without qualification will not
necessarily interwork with another system, nor will it necessarily work 
better than a system conforming to a subset. The `perfect' system may refuse 
from 
other systems PDUs which it would consider as incorrect or incomplete. 
Thus, it may reject or abort connections. 
.PP
Therefore, special consideration should be given to conformance with respect 
to the detection of protocol errors, especially when this detection can 
be explicitly or implicitly optional. 
.bp
.RT
.ce 1000
ANNEX D
.ce 0
.ce 1000
(to Recommendation\ X.290, Part 2)
.sp 9p
.RT
.ce 0
.ce 1000
\fBThe tree and tabular combined notation\fR 
.sp 1P
.RT
.ce 0
.LP
D.0
	\fBIntroduction\fR 
.sp 1P
.RT
.PP
In constructing an abstract test suite, a test notation is used to describe 
abstract test cases. The test notation can be an informal notation 
(without precisely defined semantics) or a formal description
technique\ (FDT). This Annex describes an informal notation called the tree
and tabular combined notation\ (TTCN).
.PP
TTCN serves the following purposes:
.RT
.LP
	a)
	to provide a common reference for assessing other test
notations and to assist in examining the problems arising in test case 
and test suite design; 
.LP
	b)
	to provide a basis for the translation of test cases into
other test notations;
.LP
	c)
	 TTCN behaviour descriptions are appropriate for specifying test cases 
and test steps. 
.PP
A test suite can be looked upon as a hierarchy ranging from the
complete test suite down to test events (see Part\ 1,\ \(sc\ 8.1). TTCN 
assumes that the basic types of test events are abstract service primitives 
(ASPs), abstract local primitives (ALPs) and timer events. 
.PP
Abstract test cases can also be expressed in terms of PDUs (by using an 
abbreviation mechanism described in \(sc\ D.5.11). 
.RT
.sp 1P
.LP
D.1
	\fIComponents of a TTCN test suite\fR 
.sp 9p
.RT
.PP
A test suite written in TTCN shall have the following four sections in 
the following order: 
.RT
.LP
	a)
	Suite overview (\(sc\ D.4)
.LP
	Information needed for the general presentation and
understanding of the test suite, such as test reference and a description of
its overall purpose.
.LP
	b)
	Declarations (\(sc\ D.5)
.LP
	The alphabet of the events to be used in the test suite
(e.g.,\ SAPS, Timers, ASPs, PDUs, ALPs and their parameters) is described. 
This section shall contain the definition of any abbreviations to be used 
later in the test suite. 
.LP
	c)
	Dynamic part (\(sc\ D.6)
.LP
	Tables containing trees of behaviour expressed mainly in
terms of the occurrence of ASPs at points of control and observation. A 
set of main behaviour descriptions is followed by a set of default behaviour 
descriptions.
.LP
	d)
	Constraints part (\(sc\ D.8)
.LP
	 This section specifies values for the ASPs, PDUs, and their parameters 
used in the Dynamic part. 
.sp 1P
.LP
D.2
	\fIThe syntax form of TTCN\fR 
.sp 9p
.RT
.PP
TTCN is provided in graphical form (TTCN\(hyGR), suitable for human readability. 
.PP
\fINote\fR \ \(em\ A machine processable form of (TTCN\(hyMP), suitable for
transmission of TTCN descriptions between machine and possibly suitable for
other automated processing is for further study.
.RT
.sp 2P
.LP
D.3
	\fIConventions\fR 
.sp 1P
.RT
.sp 1P
.LP
D.3.1
	\fITable proformas\fR 
.sp 9p
.RT
.PP
The TTCN\(hyGR notation is defined using a number of different types of 
table. The following conventions will be used in the description of 
templates for these tables:
.RT
.LP
	a)
	 Bold text (\fBlike this\fR ), or text in this font shall appear verbatim 
in each actual table; 
.LP
	b)
	Text in italics (\fIthis font\fR \|) shall not appear verbatim.
This font is used to indicate that the actual text must be substituted 
for the italicised symbol. 
.PP
Additionally, within table proformas comments may be placed in
fields not reserved for commentary, by delimiting the comments with the
symbols\ /* and\ */.
.bp
.sp 1P
.LP
D.3.2
	\fITypes of bracket\fR 
.sp 9p
.RT
.PP
The terms that will be used when referring to the various different types 
of bracket are defined in Figure\ D\(hy2/X.290 Part\ 2. 
.RT
.LP
.sp 1
.rs
.sp 7P
.ad r
\fBFigure D\(hy2/X.290, Part 2 [T1.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.sp 1
.sp 2P
.LP
D.3.3\ \ \fINaming conventions\fR 
.sp 1P
.RT
.sp 1P
.LP
D.3.3.1\ \ \fITest group and test case references\fR \v'3p'
.sp 9p
.RT
.LP
	a)
	 The reference (name) of a test group shall be of one of the forms shown 
in Figure\ D\(hy3/X.290, Part\ 2 and illustrated in Example\ D\(hy2. 
.LP
.sp 1
.rs
.sp 6P
.ad r
\fBFigure D\(hy3/X.290, Part 2 [T2.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.sp 1
	\fIExample D\(hy2\fR \ \(em\ A
transport group reference:
.sp 1P
.ce 1000
Transport/Class0/Conn\(hyEstab/
.ce 0
.sp 1P
.LP
	b)
	 The reference (name) of a test case shall be of one of the forms shown 
in Figure\ D\(hy4/X.290, Part\ 2 and illustrated in Example\ D\(hy3. 
.LP
.sp 1
.rs
.sp 6P
.ad r
\fBFigure D\(hy4/X.290, Part 2 [T3.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.bp
.LP
	\fIExample D\(hy3\fR \ \(em\ A
transport test case reference:
.LP
	Transport/Init
Transport/Class0/Conn\(hyEstab/LT\(hyInit
.LP
	c)
	The test group references, together with the test case
references define the structure of the test suite.
.sp 1P
.LP
D.3.3.2\ \ \fITest step references\fR 
.sp 9p
.RT
.LP
	a)
	 Test steps are attached at a given point in the structure of the test 
suite, as defined by the group and case references 
(see \(sc\ D.3.3.1).
.LP
	b)
	 Test steps, at their point of attachment may be grouped into \*Qlibraries\*U, 
organized in hierarchical fashion. 
.LP
	c)
	A step reference is therefore of the form:
.sp 1P
.ce 1000
\fI(PointOfAttachment)\fR \|:\fI(LibraryStructure)\fR 
.ce 0
.sp 1P
.LP
	where:
.LP
	1)
	\fI(PointOfAttachment)\fR \| is either:
.LP
	A)
	\fI(TestSuite)\fR \| or
.LP
	B)
	\fI(TestGroupReference)\fR \| as defined in \(sc\ D.3.3.1; or
.LP
	C)
	\fI(TestCaseReference)\fR \| as defined in \(sc\ D.3.3.1;
.LP
	2)
	and \fI(LibraryStructure)\fR \| is either:
.LP
	A)
	\fI(TestStep)\fR \|or
.LP
	B)
	\fI(Component)\fR\d1\u)/.\|.\|./
\fI(Component\fR\dn\u\fI)/(TestStep)\fR 
.LP
	\fIExample D\(hy4\fR \ \(em\ Transport Test Step References:
.LP
	Transport:Step\(hyA
Transport/Class0/Conn\(hyEstab/:Step\(hyB
Transport/Class0/Conn\(hyEstab/LT\(hyInit:Step\(hyC
Transport:Common\(hylib/Preambles/Step\(hyC
.PP
\fINote\ 1\fR \ \(em\ The colon (:) in the test step reference separates 
the first part which refers to a point in the already defined test suite 
structure from the second part which defines the library structure. 
.PP
\fINote\ 2\fR \ \(em\ The components allow the steps to be grouped into an
arbitrary hierarchy within libraries, which have no influence on the test 
suite structure itself. 
.RT
.sp 1P
.LP
D.4
	\fISuite overview\fR 
.sp 9p
.RT
.PP
This section shall include at least the following
information:
.RT
.LP
	a)
	references to the relevant base standards;
.LP
	b)
	a reference to the PICS and PIXIT and how they are used;
.LP
	c)
	an indication of the test method or methods to which the
test suite applies;
.LP
	d)
	 a complete index to the test suite, consisting of the test reference, 
test identifier, page number and test purpose for each test case and test 
step in the test suite. The test purposes shall be organized according 
to the structure of the test suite. 
.PP
Other information which may aid understanding of the test suite, such as 
how it has been derived, should also be included as commentary. 
.PP
This information shall be provided in the format shown in
Figure\ D\(hy5/X.290, Part\ 2.
.RT
.sp 1P
.LP
D.5
	\fIDeclarations\fR 
.sp 9p
.RT
.PP
The purpose of the declarations section is to describe the set of test 
events and all other attributes to be used in the test suite. All objects 
used in the dynamic part shall have been declared in the declaration part. 
There are two sorts of test event:
.RT
.LP
	a)
	 abstract service primitives (ASPs) which occur at the points of control 
and observation (PCOs) used by the tester\ (\(sc\ D.5.8); 
.LP
	b)
	timer events (\(sc\ D.5.10).
.bp
.PP
Other attributes are also specified:
.LP
	a)
	user defined types (\(sc\ D.5.1.3);
.LP
	b)
	user defined operators (\(sc\ D.5.3);
.bp
.LP
	c)
	test suite parameters (\(sc\ D.5.4);
.LP
	d)
	global constants (\(sc\ D.5.5);
.LP
	e)
	global variables (\(sc\ D.5.6);
.LP
	f)
	PCOs (\(sc\ D.5.7);
.LP
	g)
	ASP parameters (\(sc\ D.5.8);
.LP
	h)
	data types (including PDUs and their parameters)
(\(sc\ D.5.9);
.LP
	i)
	abbreviations (\(sc\ D.5.11).
.LP
.rs
.sp 23P
.ad r
\fBFigure D\(hy5/X.290, partie\ 2 [T4.290],p.4 (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.sp 1P
.LP
D.5.1
	\fIGeneral TTCN types\fR 
.sp 9p
.RT
.PP
TTCN supports both a number of predefined types and mechanisms that allow 
the definition of user declared types. These types may be used throughout 
the test suite and may be referenced when variables, constants, ASP parameters, 
PDU parameters, or test suite parameters are defined. 
.RT
.sp 1P
.LP
D.5.1.1\ \ \fIPredefined types\fR 
.sp 9p
.RT
.PP
A number of commonly used types are predefined for use in TTCN.
These types may be referenced even though they do not appear in a type
declaration in a test suite. All other types used in a test suite must 
be named in the User Type Declarations (according to \(sc\ D.5.1.2) and 
referenced by 
name.
.RT
.LP
	a)
	 \fBInteger Predefined Type\fR : a type with distinguished values wich 
are the positive and negative whole numbers, including zero (as a single 
distinguished value). 
.LP
	b)
	\fBBitstring Predefined Type\fR : a type whose distinguished
values are the ordered sequences of zero, one, or more bits.
.bp
.LP
	c)
	\fBOctetstring Predefined Type\fR : a type whose distinguished
values are the ordered sequences of zero, one, or more octet being an ordered 
sequence of eight bits. 
.LP
	d)
	\fBCharacter String Predefined Types\fR : types whose
distinguished
values are zero, one or more characters from some character set. The character 
string types listed in Figure\ D\(hy6/X.290, Part\ 2 may be used. They 
are defined in section two of Recommendation\ X.208). 
.LP
.sp 3
.rs
.sp 12P
.ad r
\fBFigure D\(hy6/X.290, Part 2 [T5.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.sp 3
	e)
	 \fBThe Connection Endpoint Identifier Predefined Type\fR (CEId): a type 
consisting of an unlimited number of distinguished values. 
.sp 1P
.LP
D.5.1.2\ \ \fIUser defined types\fR 
.sp 9p
.RT
.PP
Types specific to a test suit may be introduced by the TTCN user. To define 
a new type, the following information shall be provided: 
.RT
.LP
	a)
	a name for the type;
.LP
	b)
	the base type (if any);
.LP
	c)
	a definition of the type, provided in one of the following   manners:
.LP
	1)
	 by giving a precise reference to a clause, or clauses, of a standard 
which defines the type; 
.LP
	2)
	by giving an ASN\(hy1 [Recommendation\ X.208] type
reference of the form:
.sp 1P
.ce 1000
\fI(modulereference)\fR .\fI(typereference)\fR 
.ce 0
.sp 1P
.LP
	3)
	 by enumerating the set of named distinguished values comprising the type 
(see Figure 
D\(hy7/X.290, Part\ 2);
.LP
	4)
	by specifying a subset of the distinguished values of  another type.
.LP
	This may be done in a number of ways:
.LP
	A)
	by specifying a subrange of the \fIInteger\fR \|
predefined type;
.LP
	B)
	by specifying a subrange of an enumerated type;
.LP
	C)
	by restricting the length of a \fIBitString\fR \|,
\fIOctetString\fR \|, or a character string predefined type.
.PP
This information shall be provided in the format shown in
Figure\ D\(hy8/X.290, Part\ 2.
.bp
.LP
.rs
.sp 17P
.ad r
\fBFigure D\(hy7/X.290, Part 2, [T6.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.rs
.sp 12P
.ad r
\fBFigure D\(hy8/X.290, Part 2, [T7.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.sp 1P
.LP
D.5.2
	\fIValue denotation\fR 
.sp 9p
.RT
.PP
Values of the different types shall be denoted in the following
fashion:
.RT
.sp 1P
.LP
D.5.2.1\ \ \fIValues of predefined types\fR 
.sp 9p
.RT
.PP
The values of predefined types shall be denoted as
follows:
.RT
.LP
	a)
	 \fBInteger Values\fR : values of type \fIInteger\fR \| shall be denoted 
by one or more digits. The first digit shall not be zero unless the value 
is\ 0.
.LP
	b)
	\fBBitString and OctetString Values\fR : values of type
\fIBitString\fR \| and \fIOctetString\fR \| shall be denoted in one of 
the following ways: 
.LP
	1)
	by a list of bits;
.LP
	In this case, the value shall be denoted by an
arbitrary number (possibly zero) of zeros and ones, preceded by a single\ 
'\ and followed by the pair of characters\ 'B. 
.LP
	\fIExample D\(hy5\fR \ \(em\ '01101100'B
.bp
.LP
	2)
	by a list of semi\(hyoctets.
.LP
	 In this case, the value shall consist of an arbitrary number (possibly 
zero) of the characters 
.sp 1P
.ce 1000
0 1 2 3 4 5 6 7 8 9 A B C D E F
.ce 0
.sp 1P
.LP
	preceded by a single\ ' and followed by the pair of
characters\ 'H. Each character is used to denote the value of a semi\(hyoctet 
using a hexadecimal representation. 
.LP
	\fIExample D\(hy6\fR \ \(em\ 'AB0196'H
.LP
	c)
	 \fBCharacter String Values\fR : values of character string types shall 
be denoted by an arbitrary number (possibly zero) of characters from the 
character set referenced by the character string type, preceded and followed 
by\ \*U. If the character string type includes the character\ \*U, this 
character 
shall be represented by a pair of\ \*U in the denotation of any value.
.LP
	d)
	\fBConnection Endpoint Identifier Values\fR : values of the
\fICEId\fR \| type have no denotation.
.LP
	 \fINote\fR \ \(em\ None is required, since the only operation defined 
over the \fICEId\fR \| type is equality (see \(sc\ D.5.8). 
.sp 1P
.LP
D.5.2.2\ \ \fIValues of user defined types\fR 
.sp 9p
.RT
.PP
Values of the user defined types shall be denoted as
follows:
.RT
.LP
	a)
	The denotation of values of the types introduced by
reference to the section, or sections, of a Recommendation* shall specify 
how the distinguished values of that type are to be denoted in the test 
suite, in the comments associated with the type definition. 
.LP
	b)
	a value of a referenced ASN\(hy1 type shall be denoted using
ASN\(hy1 either by
.LP
	1)
	a reference of the form:
.sp 1P
.ce 1000
\fI(modulereference)\fR .\fI(valuereference)\fR \| or
.ce 0
.sp 1P
.LP
	2)
	specifying an ASN\(hy1 value of the given type.
.LP
	 \fINote\fR \ \(em\ The ASN\(hy1 modular method has extensions that allow 
the value to be partially specified\ (\(sc\ D.8.3). 
.LP
	c)
	a value of an enumerated type shall be denoted by its name.
.LP
	d)
	 a value of a type obtained by subsetting another type shall have the 
same denotation as the values of the type which was subset. 
.sp 1P
.LP
D.5.3
	\fIOperators\fR 
.sp 9p
.RT
.PP
Operators specific to a test suite may be introduced by the TTCN
user. To define a new operation, the following information shall be
provided:
.RT
.LP
	a)
	a name for the operation;
.LP
	b)
	the signature of the operation, comprising:
.LP
	1)
	a list of input types;
.LP
	2)
	a name for each input component;
.LP
	3)
	the type of the result;
.LP
	c)
	a description of the operation.
.PP
This shall be provided in the format shown in Figure\ D\(hy9/X.290,
Part\ 2.
.LP
\-v'1P'
.rs
.sp 13P
.ad r
\fBFigure D\(hy9/X.290, partie 2 [T8.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.bp
.PP
The definitions of two string operations are given in
Figures\ D\(hy10/X.290, Part\ 2 and\ D\(hy11/X.290, Part\ 2.
.LP
.sp 2
.rs
.sp 17P
.ad r
\fBFigure D\(hy10/X.290, partie 2 [T9.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.sp 5
.rs
.sp 14P
.ad r
\fBFigure D\(hy11/X.290, partie 2 [T10.290], p. (traiter
comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.PP
.sp 2
\fINote\fR \ \(em\ An operation may be compared to a function in an ordinary 
programming language. However, the arguments to the operation are not altered 
as a result of any call of the operation\ \(em\ there are no side effects. 
.bp
.sp 1P
.LP
D.5.4
	\fITest suite parameters\fR 
.sp 9p
.RT
.PP
The purpose of this section is to declare constants derived from
the PICS or PIXIT which globally parameterize the test suite. These constants 
are referred to as test suite parameters. 
.PP
\fINote\fR \ \(em\ In most real cases of testing Test Suite Parameters 
will be bound to a value when the PICS/PIXIT processing occurs. 
.PP
The following information relating to each test suite parameter shall be 
provided in this section: 
.RT
.LP
	a)
	its name;
.LP
	b)
	its type.
.PP
This information shall be provided in the format shown in
Figure\ D\(hy12/X.290, Part\ 2.
.LP
.rs
.sp 17P
.ad r
\fBFigure D\(hy12/X.290, Part 2 [T11.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.sp 1P
.LP
D.5.5
	\fIGlobal constants\fR 
.sp 9p
.RT
.PP
The purpose of this section is to declare a set of names for values not 
derived from the PICS or PIXIT that will be constant throughout the test 
suite.
.PP
The following information relating to each global constant shall be
provided in this section:
.RT
.LP
	a)
	its name;
.LP
	b)
	its type;
.LP
	c)
	its value.
.PP
This information shall be provided in the format shown in
Figure\ D\(hy13/X.290, Part\ 2.
.sp 1P
.LP
D.5.6
	\fIGlobal variables\fR 
.sp 9p
.RT
.PP
A test suite may make use of a set of variables that are global to both 
the dynamic part and constraints part together. Typically, these variables 
will be used to reference values of PDU or ASP constraint fields, or 
components, from the dynamic part. Variables as in a conventional programming 
language (e.g.\ as counters). 
.PP
All global variables to be used in a test suite shall be declared. The 
following information shall be provided for each variable 
declaration:
.RT
.LP
	a)
	its name;
.LP
	b)
	its type.
.PP
This information shall be provided in the format shown in
Figure\ D\(hy14/X.290, Part\ 2.
.bp
.LP
.rs
.sp 17P
.ad r
\fBFigure D\(hy13/X.290, partie 2 [T12.290], p.12 (traiter comme tableau
MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.rs
.sp 17P
.LP
\fBFigure D\(hy14/X.290, partie 2 [T13.290], p.13 (traiter comme tableau
.sp 2
.sp 1P
.RT
.PP
Initially, all variables are unbound.
.PP
Variables may become bound (or be rebound) in the following
contexts:
.RT
.LP
	a)
	when the variable appears on the left\(hyhand side of an
assignment statements\ (D.6.7.1);
.LP
	b)
	when the unbound variable appears in a Boolean
expressions\ (\(sc\ D.6.7.1);
.LP
	c)
	when the variable appears in a constraints
reference\ (\(sc\ D.8).
.bp
.sp 1P
.LP
D.5.7
	\fIPCO declarations\fR 
.sp 9p
.RT
.PP
This section lists the set of points of control and observation
(PCOs) to be used in the test suite and explains where in the testing
environment these PCOs exist.
.PP
\fINote\fR \ \(em\ The test method chosen determines the PCOs required 
to define the test suite. 
.PP
The following information shall be provided for each PCO used in the test 
suite: 
.RT
.LP
	a)
	its name:
.LP
	the name will be used in the Behaviour Section to specify
where particular events occur;
.LP
	b)
	 an explanation of which type of tester is placed at the PCO and what 
role that tester plays. 
.PP
This information shall be provided in the format shown in
Figure\ D\(hy15/X.290, Part\ 2.
.LP
.sp 1
.rs
.sp 17P
.ad r
\fBFigure D\(hy15/X.290, Part 2 [T14.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.PP
.sp 1
\fIExample D\(hy7\fR \ \(em\ An example PCO declaration is shown in
Example\ D\(hy8.
.PP
\fIExample D\(hy8\fR \ \(em\ PCO Declarations.
.RT
.LP
.sp 1
.LP
.rs
.sp 10P
.ad r
\fBExemple D\(hy8 [T15.290], p.15 (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.bp
.PP
Points of control and observation are usually just SAPs, but
in general can be any appropriate points at which the test events can be
controlled and observed. However, it is possible to define a PCO to correspond 
to a set of SAPs, provided all the SAPs comprising the PCO are: 
.LP
	a)
	at the same location (i.e.,\ in the lower test or in the
upper tester);
.LP
	b)
	SAPs of the same service.
.PP
When a PCO corresponds to several SAPs the calling address (when initiating) 
or called address (when receiving) is used to identify the 
individual SAP.
.PP
\fIExample D\(hy9\fR \ \(em\ A typical example in which one PCO corresponds to
several SAPs could be an Internet lower tester which uses one PCO representing 
all the \fIsubnetwork points of attachment\fR \| for sending several Internet 
PDUs 
over different routes. Alternatively the same example may be written with
several PCOs.
.PP
It is also possible to consider having a single SAP correspond to
several PCOs. In this case there would be one PCO per connection.
.PP
\fINote\fR \ \(em\ This makes it easier to identify each test event with the
appropriate connection.
.PP
Finally it should be noted that a PCO may not be related to a SAP at all. 
For instance, this could be the case when a layer is composed of sublayers 
(e.g.,\ in the Application layer, or in the lower layers, where a subnetwork 
point of attachment is not a SAP).
.RT
.sp 1P
.LP
D.5.8
	\fIASP declarations\fR 
.sp 9p
.RT
.PP
This section lists the set of ASPs which may occur at the PCOs
listed in \(sc\ D.5.7.
.PP
Normally, the declared information can be found in the appropriate
service definition. However, declaring it explicitly allows the addition of
commentary specific to testing and to a particular test suite, as well as
providing for cases where no explicit OSI* service definition
exists\ (e.g.\ X.25).
.PP
The following information shall be supplied for each ASP:
.RT
.LP
	a)
	its name;
.LP
	 if an abbreviated name is used, then the full name (as given in any appropriate 
service specification) shall follow in parentheses; 
.LP
	b)
	the PCO or PCOs at which it may occur;
.LP
	all such PCOs shall have been declared in the PCO
declarations section of the test suite;
.LP
	c)
	 whether or not a connection endpoint identifier is used to distinguish 
different instances of the ASP; 
.LP
	If it is stated that a connection endpoint identifier is used
(see\ c), above), a parameter named ceid, of type \fICEId\fR \| is available 
without further declaration, 
.LP
	 upon receipt of an ASP which uses this parameter, the value of ceid shall 
become instantiated to the connection endpoint at which the ASP was received. 
This value is then available for use in the test case. 
.LP
	\fIExample D\(hy10\fR \ \(em\ Using a CEId:
.LP
	PCO? AN\(hyASP [ceid=3]
.LP
	d)
	a list of the parameters associated with the ASP;
.LP
	the following information shall be supplied for each
parameter:
.LP
	1)
	its name;
.LP
	 if an abbreviated name is used, then the full name (as given in any appropriate 
service specification) shall follow in parentheses; 
.LP
	2)
	its type.
.PP
ASP declarations have only one level of parameter.
However, these parameters may be of an arbitrarily complex type (e.g.\ 
a complex ASN\(hy1\ type). 
.PP
This information shall be provided in the format shown
in Figure\ D\(hy16/X.290, Part\ 2.
.RT
.PP
\fIExample D\(hy11\fR \ \(em\ Figure D\(hy17/X.290, Part\ 2, shows an example 
from the Transport Service (Recommendation\ X.214). This could be part 
of the 
alphabet of ASPs used to describe the behaviour of an abstract upper tester 
in a DS test suite for the Class\ 0 Transport. CDA, CGA and QOS are user 
defined 
types. (See protocols, Recomendation\ X.224.)
.bp
.LP
.rs
.sp 21P
.ad r
\fBFigure D\(hy16/X.290, partie 2 [T16.290], p.16 (traiter comme tableau
MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.sp 6
.rs
.sp 17P
.ad r
\fBFigure D\(hy17/X.290, partie 2 [T17.290], p.17 (traiter comme tableau
MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.bp
.sp 1P
.LP
D.5.8.1\ \ \fIALP declarations\fR 
.sp 9p
.RT
.PP
ALPs are declared using a proforma similar to the ASP proforma. The following 
information shall be supplied for each ALP: 
.RT
.LP
	a)
	its name;
.LP
	b)
	the PCO or PCOs at which it may occur;
.LP
	c)
	a functional description of the ALP;
.LP
	d)
	a list of the parameters associated with the ALP;
.LP
	The following information shall be supplied for each
parameter:
.LP
	1)
	its name;
.LP
	 if an abbreviated name is used, then the full name (as given in any appropriate 
service specification) shall follow in parentheses; 
.LP
	2)
	its type.
.PP
This information shall be provided in the format shown in
Figure\ D\(hy18/X.290, Part\ 2.
.LP
.sp 3
.rs
.sp 21P
.ad r
\fBFigure D\(hy18/X.290, partie 2 [T18.290], p.18 (traiter comme tableau
MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.sp 1P
.LP
.sp 4
D.5.9
	\fIData type declarations\fR 
.sp 9p
.RT
.PP
The purpose of this section is to declare the data types which are used 
in the test suite. These types will be used mainly in ASP parameter 
declarations.
.PP
The most common data type declarations are PDU declarations. Other
data type declarations may include ASN\(hy1 type declarations, if
appropriate.
.bp
.RT
.sp 1P
.LP
D.5.9.1\ \ \fIPDU declarations\fR 
.sp 9p
.RT
.PP
The declaration of PDUs is similar to that of ASPs. The following information 
shall be supplied for each PDU: 
.RT
.LP
	a)
	its name;
.LP
	 if an abbreviated name is used, the full name (as given in any appropriate 
protocol specification) shall follow in parentheses; 
.LP
	b)
	a list of the parameters or, more generally fields
associated with the PDU.
.LP
	\fINote\fR \ \(em\ In order to be able to describe tests which
exercise PDU encoding, it may be necessary to include fields (such as length
indicators, for example) into the PDU description, even though they may 
not be considered to be PDU parameters in the protocol specification. 
.LP
	The following information shall be supplied for each
parameter:
.LP
	1)
	its name;
.LP
	if an abbreviated name is used, the full name (as
given in any appropriate protocol specification) shall follow in parentheses;
.LP
	2)
	its type.
.PP
This information shall be provided in the format shown in
Figure\ D\(hy19/X.290, Part\ 2.
.LP
.sp 2
.rs
.sp 21P
.ad r
\fBFigure D\(hy19/X.290, Part 2 [T19.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.PP
Where more appropriate, a precise reference to an ASN\(hy1 type
description of a PDU can be used, instead of supplying all of the above
information. In this case, the information shall be provided in the format 
show in Figure\ D\(hy20/X.290, Part\ 2. 
.bp
.LP
.rs
.sp 17P
.ad r
\fBFigure D\(hy20/X.290, Part 2 [T20.290], p.  \fR 
.sp 1P
.RT
.ad b
.RT
.PP
.sp 2
\fIExample D\(hy12\fR \ \(em\ Figure D\(hy21/X.290, Part\ 2 shows an example
ASN\(hy1\ PDU type definition from FTAM (ISO\ 8571).
.LP
.sp 2
.rs
.sp 10P
.ad r
\fBFigure D\(hy21/X.290, partie 2 [T21.290], p.21 (traiter comme tableau
MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.sp 2
.sp 1P
.LP
D.5.10\ \ \fITimers\fR 
.sp 9p
.RT
.PP
A test suite may make use of several types of timers. These types are used 
to distinguish the length of time the timers take to expire. A test 
case may make use of any number of instances of the same type of timer.
.PP
The following information shall be provided for each type of
timer:
.RT
.LP
	a)
	the timer type name;
.LP
	b)
	 the duration of the timer, which may be specified as a value or a range 
of values. 
.PP
This information shall be provided in the format shown in
Figure\ D\(hy22/X.290, Part\ 2.
.bp
.LP
.rs
.sp 17P
.ad r
\fBFigure D\(hy22/X.290, partie 2 [T22.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.PP
\fIExample D\(hy13\fR \ \(em\ Figure D\(hy23/X.290, Part\ 2 shows an example 
timer declaration. 
.LP
.rs
.sp 12P
.ad r
\fBFigure D\(hy23/X.290, Part 2 [T23.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.sp 1P
.LP
D.5.11\ \ \fIAbbreviations\fR 
.sp 9p
.RT
.PP
This section defines any abbreviations that are to be used in the rest 
of the test suite. Abbreviations are used as a macro facility, performing 
simple textual substitution operations. They may be used throughout a test 
suite.
.PP
An abbreviation may replace any piece of text within any single table box. 
The test case writer shall ensure that the resulting expansion follows 
the syntax of TTCN. 
.PP
An abbreviation definition shall provide the following
information.
.RT
.LP
	a)
	an abbreviation identifier, or token;
.LP
	b)
	 its expansion, to be substituted for every occurence of the identifier 
throughout the test suite. 
.PP
This information shall be provided in the format shown in
Figure\ D\(hy24/X.290, Part\ 2.
.bp
.LP
.rs
.sp 17P
.ad r
\fBFigure D\(hy24/X.290, Part 2 [T24.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.PP
.sp 2
\fIExample D\(hy14\fR \ \(em\ Figure D\(hy25/X.290, Part\ 2 shows an example
abbreviation declaration from a Transport (Recommendation\ X.224) test suite.
.PP
\fINote\fR \ \(em\ The\ ~ operator is defined in \(sc\ D.6.8.
.RT
.LP
.sp 1
.rs
.sp 13P
.ad r
\fBFigure D\(hy25/X.290, Part 2 [T25.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.sp 1
.sp 1P
.LP
D.6
	\fIDynamic part\fR 
.sp 9p
.RT
.PP
The Dynamic Part contains the main body of the test suite\ \(em\ the
test case and/or test step behaviour descriptions.
.bp
.RT
.sp 1P
.LP
D.6.1
	\fIDynamic behaviour description\fR 
.sp 9p
.RT
.PP
The following information shall be supplied for the behaviour
description of each test case, test step or set of related test
steps:
.RT
.LP
	a)
	 a reference; the reference gives a name to the test case or step behaviour 
description. A test case reference shall conform to the 
requirements of \(sc\ D.3.3.1. A test step reference shall conform to the
requirements of \(sc\ D.3.3.2;
.LP
	b)
	an identifier; a reference reflects the structure of the
test suite and the purpose of the test case or test step, and so may be 
quite lengthy. It is sometimes desireable to have a short name for a test 
case or 
test step. The identifier serves this purpose and may be used interchangeably 
with a reference. The test identifier shall be unique within a particular 
test suite; 
.LP
	c)
	 a statement of purpose; this shall be an informal statement of purpose 
of the test case or test step or steps; 
.LP
	d)
	Defaults Reference; this shall be reference to a default
behaviour description, if any, which applies to this behaviour
specification\ (\(sc\ D.6.17);
.LP
	e)
	a behaviour description; this section shall describe the
behaviour of the tester or
testers in terms of test events (and their parameters) in the tree notation
described in \(sc\ D.6.2.
.PP
This information shall be provided in the format shown in
Figure\ D\(hy26/X.290, Part\ 2.
.LP
.sp 5
.rs
.sp 27P
.ad r
\fBFigure D\(hy26/X.290, partie 2 [T26.290], p. (traiter comme tableau MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.LP
.bp
.sp 1P
.LP
D.6.2
	\fIThe\fR 
\fItree notation\fR 
.sp 9p
.RT
.PP
The tree notation is used to provide the behaviour descriptions for a test 
suite. The behaviour descriptions are enumerations of possible 
observable sequences of test events.
.PP
\fIExample D\(hy15\fR \ \(em\ Suppose that the following sequences of events 
could occur during a test whose purpose was simply to establish a connection 
exchange some data, an close the connection: 
.RT
.LP
	a)
	CONreq, CONcnf, DATreq, DATind, DISreq
.LP
	b)
	CONreq, CONcnf, DATreq, DATind, DISind
.LP
	c)
	CONreq, CONcnf, DATreq, DISind
.LP
	d)
	CONreq, CONcnf, DISind
.LP
	e)
	CONreq, DISind
.PP
Progress can be thwarted at any time by the underlying
service\(hyprovider. The tree notation simply factors out common initial 
sequences of the complete set. Using the tree notation, this would be written: 
.LP
	\(ua
.LP
	A
	Progression of Time \(ra
.LP
	l
	\fBEXAMPLE\(hyTREE\fR 
.LP
	t
	CONreq
.LP
	e
	C
CONcnf
.LP
	r
	CC
DATreq
.LP
	n
	CCD
DATind
.LP
	a
	CCDD
DISreq
.LP
	t
	CCDD
DISind
.LP
	i
	CCD
DISind
.LP
	v
	CC
DISind
.LP
	e
	C
DISind
.LP
	s
.LP
	\(da
.PP
Events at a same level of indentation represent the possible
alternative events which may occur at that time. Alternative events shall be
given in the order in which the tester shall attempt to complete them.
.sp 1P
.LP
D.6.3
	\fITest events\fR 
.sp 9p
.RT
.PP
The names of events to be initiated by a tester shall be prefixed by an 
exclamation mark\ (!). Similarly, those which it is possible for a tester 
to accept shall be prefixed by a question mark\ (?). 
.PP
\fIExample D\(hy16\fR \ \(em\ Using this convention, the Example Tree could be
represented as follows:
.RT
.LP
	\fBEXAMPLE\(hyTREE\fR 
.LP
	!CONreq
.LP
	!C
?CONcnf
.LP
	!CC
!DATreq
.LP
	!CCD
?DATind
.LP
	!CCD?
!DISreq
.LP
	!CCD?
?DISind
.LP
	!CCD
?DISind
.LP
	!CC
?DISind
.LP
	!C
?DISind
.PP
Such names (composed of\ ! or\ ? followed by an event name) shall be prefixed 
by one of the PCO names appearing in the PCO list of the tree in which 
the event appears, unless the test suite only uses one PCO, in which case 
the PCO prefix may be omitted. The PCO name is used to indicate the PCO 
at which 
the test event may occur.
.bp
.PP
In cases where behaviour cannot be specified in terms of TTCN events (e.g.\ 
by virtue of the test method being used) then behaviour descriptions 
shall be given in natural language instead.
.PP
\fIExample D\(hy17\fR \ \(em\ Test Step from Generic Test Suite.
.RT
.LP
	\fBPARTIAL\(hyTREE\fR 
.LP
	?N\(hyDATAind[UserData\*\|uDR]
.LP
	?
!N\(hyDATAreq[UserData\*\|uDC]
.LP
	?!N
+POSTAMBLE
.LP
	\fBPOSTAMBLE\fR 
.LP
	/* close all open network connections\ */
.sp 1P
.LP
D.6.3.1\ \ \fI?OTHERWISE\fR 
.sp 9p
.RT
.PP
The predefined pseudo\(hyevent \fI(PCO)\fR \fB?OTHERWISE\fR may be used to
denote any ASP or ALP event which the tester may receive at the PCO.
.PP
\fIExample D\(hy18\fR \ \(em\ Assume that events A, B and\ C may be received 
at a 
given PCO:
.RT
.LP
	?A [X=1]
.LP
	?B
.LP
	?OTHERWISE
.LP
	\ 
some behaviour .\|.\|.\|
.LP
	? TIMEOUT
.sp 1P
.LP
	\fIis the same as\fR 
.sp 9p
.RT
.LP
	?A
.LP
	?B
.LP
	?A
.LP
	\ 
some behaviour .\|.\|.\|
.LP
	?B
.LP
	\ 
some behaviour .\|.\|.\|
.LP
	?C
.LP
	\ 
some behaviour .\|.\|.\|
.LP
	?TIMEOUT
.PP
When using ?OTHERWISE the following points should be noted:
.LP
	a)
	 ?OTHERWISE is always expanded with all possible events that may be received 
at the PCO since, even if an event is present at the same 
level, a Boolean expression or synchronisation requirement may prevent this
event occuring;
.LP
	b)
	if a tree makes use of multiple PCOs then a PCO shall be
stated on the ?OTHERWISE statement;
.LP
	c)
	?OTHERWISE need not be the last among a set of
alternatives;
.LP
	d)
	?OTHERWISE may have a Boolean expression and/or an
assignment associated with it; 
.PP
\fIExample D\(hy19\fR \ \(em\ Illustration of a qualified ?OTHERWISE
.LP
	\fBMAIN\(hyTREE (X)\fR 
.LP
	?A
	pass
.LP
	?B[X=2]
	fail\d1\u
.LP
	?OTHERWISE[X=2]
	fail\d1\u
.LP
	?C
	fail\d1\u
.LP
	?OTHERWISE
	pass
.LP
	\fIif the tree is invoked with X=2 then\fR :
.LP
	A
	=>
	pass
.LP
	B
	=>
	fail\d1\u
.LP
	any other event => fail\d1\u
.LP
	\fIif the tree in invoked with X \(!= 2 then\fR :
.LP
	A
	=>
	pass
.LP
	C
	=>
	fail\d1\u
.LP
	any other event => pass
.bp
.LP
	e)
	 ?OTHERWISE does not prevent the use of default. The defaults are appended 
to the set of alternatives and will be examined in order. This 
means that ?OTHERWISE will invalidate some defaults but not necessarily all.
.LP
	\fIExample D\(hy20\fR \ \(em\ Use of ?OTHERWISE in both the main and
default tree:
.LP
	\fBMAIN\(hyTREE\fR 
.LP
	PCO1? A
.LP
	PCO2? B
.LP
	PCO1? OTHERWISE
.LP
	\fBDEFAULT\(hyTREE\fR 
.LP
	PCO2
.LP
	?OTHERWISE
	fail\d1\u
.LP
	PCO1? C
	fail
.LP
	PCO1
?TIMEOUT
	pass
.LP
	The first and third events of the default are not
invalidated by the ?OTHERWISE in the main tree.
.sp 1P
.LP
D.6.4
	\fITree names\fR 
.sp 9p
.RT
.PP
A behaviour description shall contain at least one behaviour tree. Each 
behaviour tree shall be prefixed by a tree name which is unique within 
a behaviour description (see \(sc\ D.6.5). 
.PP
\fINote\fR \ \(em\ Many of the examples show tree names in bold text. This is
for typographical clarity only and has no other significance.
.RT
.sp 1P
.LP
D.6.4.1\ \ \fIFormal PCOs\fR 
.sp 9p
.RT
.PP
Where a test suite involves the prescription of behaviour at more than 
PCO, a tree name shall be followed by a list of the (formal) PCO names 
used in the tree enclosed in brackets. Where a test suite only prescribes
behaviour at one PCO, then this PCO list may be omitted.
.PP
\fIExample D\(hy21\fR \ \(em\ A tree involing the PCOs\ L and\ U might 
be named: 
\fBTREE\(hyNAME[L,U]\fR .
.RT
.sp 1P
.LP
D.6.4.2\ \ \fIFormal parameters\fR 
.sp 9p
.RT
.PP
If a test step makes use of input parameters then after the PCO
list (if any), a list of formal parameters to the tree may appear. These 
shall be enclosed in parentheses. TTCN does not support output parameters. 
.PP
\fIExample D\(hy22\fR \ \(em\ \fBTREE\(hyNAME[L,U](X,Y)\fR 
.RT
.sp 1P
.LP
D.6.5
	\fITree attachment\fR 
.sp 9p
.RT
.PP
Trees may be attached to other trees by substituting the name of
the tree to be attached, prefixed by a\ +, for an event name. The name of the
attached tree shall be of the form:
.RT
.LP
	a)
	\fI<TreeReference>\fR , \|or
.LP
	b)
	\fI<TreeReference>\fR \|[\fI<ActualPCOs>\fR ], \|or,
.LP
	c)
	\fI<TreeReference>\fR \|(\fI<ActualParameters>\fR \|), \|or,
.LP
	d)
	\fI<TreeReference>\fR [\fI<ActualPCOs>\fR \|](\fI<ActualParameters>\fR \|)
.PP
When a tree is attached to another tree, all the actuals are
substituted for the formals using simple textual replacement. So an attached
tree is analogous to a macro.
.sp 1P
.LP
D.6.5.1\ \ \fIScope of attachment\fR 
.sp 9p
.RT
.PP
Behaviour descriptions may contain more than one tree. However,
only the first tree in the behaviour description is accessible from outside 
the behaviour description. Any subsequent trees are considered to the test 
steps local to the behaviour description, and thus not externally accessible. 
Test cases, of course, are not attachable. 
.PP
Thus the \fI<TreeReference>\fR \| shall be one of the forms:
.RT
.LP
	a)
	\fI<TreeName>\fR 
.LP
	 In this case \fI<TreeName>\fR \| shall be the name of one of the trees 
in the current behaviour description. 
.bp
.LP
	b)
	\fI<TestStepReference>/<TreeName>\fR 
.LP
	In this case, \fI<TreeName>\fR \| shall be the name of the
\fIfirst\fR \| tree in the behaviour description of the test step referred 
to by the test step reference. 
.LP
	As usual, the equivalent \fI<TestStepIdentifier>\fR \| may be
substituted for the \fI<test step reference>\fR .
.PP
\fIExample D\(hy23\fR \ \(em\ The following pair of trees:
.LP
	\fBMAIN\(hyTREE [L,U]\fR and
\fBSUB\(hyTREE[X]\fR 
.LP
	L!CONreq
X?CONind
.LP
	L!CON
+ SUB\(hyTREE[U]
.sp 1P
.LP
	\fIis equivalent to\fR :
.sp 9p
.RT
.LP
	\fBCOMPOUND\(hyTREE [L,U]\fR 
.LP
	L!CONreq
.LP
	L!CON
U?CONind
.PP
Since tree attachment is really only a shorthand, variables are
used in attached trees with the value they have at the point when the tree 
is attached, and may subsequently be used in assignment and/or Boolean 
expressions in the attached tree. 
.PP
Attached trees may have parameters. Actuals are substituted for
formals when the tree is attached.
.PP
\fIExample D\(hy24\fR \ \(em\ The following pair of trees.
.RT
.LP
	\fBMAIN\(hyTREE\fR \ \ \ and
\fBSUB\(hyTREE (X,Y)\fR 
.LP
	(M:=\ 1)
(X:=\ Y)
.LP
	\ \ + SubTree(M,2)
.LP
	\ \ \ \ (M:=\ 3)
.sp 1P
.LP
	\fIis equivalent to\fR 
.sp 9p
.RT
.LP
	\fBCOMPOUND\(hyTREE\fR 
.LP
	(M:=\ 1)
.LP
	\ \ (M:=\ 2)
.LP
	\ \ \ \ (M:=\ 3)
.sp 1P
.LP
D.6.6
	\fILabels and GOTO\fR 
.sp 9p
.RT
.PP
A set of alternative events may be labelled by placing a lable in the lable 
column of the \fIfirst\fR \| event of the alternatives. 
.PP
If a set of alternatives is labelled it is permitted to go to that set 
from any point in the tree. This is accomplished by placing\ \(ra or the 
keyword 
GOTO followed by the name of a label that is defined in the same tree,
immediately after an event. Should the event occur, the test proceeds with 
the set of alternatives referred to by the label. 
.PP
\fIExample D\(hy25\fR \ \(em\ Figure D\(hy27/X.290, Part\ 2 illustrates 
the use of the GOTO. 
.PP
Events, not necessarily the first of a set of alternative events, may also 
have a label for the specification of synchronization\ (\(sc\ D.6.11) 
requirements. Such labels shall not be used as the object of a GOTO.
.PP
In the case where a first event needs to be labelled for both GOTO and 
for a synchronization requirement then a common label shall be used. 
.RT
.sp 1P
.LP
D.6.7
	\fIExpressions\fR 
.sp 9p
.RT
.PP
The terms of an expression may be:
.RT
.LP
	a)
	constants (including test suite parameters);
.LP
	b)
	bound variables;
.LP
	c)
	 parameter values of the associated event (if any) referenced by the parameter 
name given in the event declaration; 
.LP
	d)
	references to encoded PDU field values in ASP parameters.
These references take the form:
.LP
	<\fIASP Parameter\fR >.<\fIFieldName\fR >
.bp
.LP
.rs
.sp 22P
.ad r
\fBFigure D\(hy27/X.290, partie 2 [T27.290], p.27 (traiter comme tableau
MEP)\fR 
.sp 1P
.RT
.ad b
.RT
.sp 1P
.LP
D.6.7.1\ \ \fIAssignment clauses\fR 
.sp 9p
.RT
.PP
Any event may be followed by a series of assignments. The effect
of the assignment clause is to bind the global variable to the value of the
expression if, and only if, the event occurs.
.PP
The assignments occur in the order in which they appear in the
assignment clause. The expression shall contain no unbound variables.
.RT
.sp 1P
.LP
D.6.7.2\ \ \fIBoolean expressions\fR 
.sp 9p
.RT
.PP
An event may be qualified. This qualification is achieved by
placing a bracketed Boolean expression after the event. This qualification
shall be taken to mean the combination of the event occurring and the Boolean 
expression being satisfied. 
.PP
If both a Boolean expression and an assignment clause are associated with 
the same event, the Boolean expression shall appear first. 
.PP
The terms used in a Boolean expression can be any of the
following:
.RT
.LP
	a)
	constants (including test suite parameters);
.LP
	b)
	variables;
.LP
	if any unbound variables appear in a Boolean expression,
then the event occurs only if values exist for the unbound variables which
satisfy the Boolean expression. If the event does occur, all unbound variables 
become bound to any values consistent with their type and which satisfy 
the 
Boolean expression;
.LP
	c)
	 parameter values of the associated ASP (if any) referenced by the parameter 
name given in the ASP declaration; 
.LP
	d)
	references to a PDU encoding in the Constraints
part\ (\(sc\ D.8). This encoding may be qualified by writing:
.LP
	<\fIPDUReference\fR >[<\fIBoolean Expression\fR >\|]
.LP
	 where the terms of the Boolean Expression may be references to fields 
of the referrenced PDU; 
.LP
	e)
	 references to encoded PDU field values in ASP parameters in the Constraints 
Part. These references take the form: 
.LP
	<\fIASPParameter\fR >.<\fIFieldName\fR >
.bp
.sp 1P
.LP
D.6.7.3\ \ \fIAssignment clauses and Boolean expressions with events\fR 
.sp 9p
.RT
.PP
It is allowed to associate an event with either an assignment, or a Boolean 
expression or both. However, only the following combinations may be 
used:
.RT
.LP
	a)
	\fI<Event>\fR \|The event is not qualified.
.LP
	b)
	\fI<Event>\fR (\fI<Assignment>\fR ) The assignment is executed
only if the event occurs.
.LP
	c)
	\fI<Event>\fR [\fI<Boolean Expression>\fR ] The event may occur
only if the boolean expression holds.
.LP
	d)
	\fI<Event>\fR [\fI<Boolean Expression>\fR ](\fI<Assignment>\fR ) The
assignment is executed if, and only if, both
.LP
	1)
	the event occurs, and
.LP
	2)
	the Boolean expression holds.
.LP
	Since all variables ocurring in the Boolean expression become
bound, they may be used in the expression which is part of the
assignment.
.PP
Boolean expressions may be broken down into an uninterrupted set of Boolean 
expressions. This facility may be useful when used in conjunction 
with abbreviations\ (\(sc\ D.5.11). Similarly, assignments may be broken 
down into an uninterruped set of assignments. 
.PP
Example D\(hy26\ \(em\ PCO? CR[X=1][Y\ <\ 3] \fIis equivalent to\fR \| PCO?
CR[(X=1)AND(Y\ <\ 3)]
.RT
.sp 1P
.LP
D.6.7.4\ \ \fIAssignment clauses and Boolean expressions without events\fR 
.sp 9p
.RT
.PP
It is permitted to use assignment clauses and Boolean expressions by themselves, 
without any associated event. 
.PP
Only the following compositions are allowed:
.RT
.LP
	a)
	(\fI<Assignment>\fR ) The assignment is executed only if the
event occurs.
.LP
	b)
	[\fI<Boolean Expression>\fR ] The event may occur only if the
Boolean expression holds.
.LP
	c)
	[\fI<Boolean Expression>\fR ](\fI<Assignment>\fR ) the assignment
is executed only if the Boolean expression holds.
.LP
.rs
.sp 24P
.ad r
BLANC
.ad b
.RT
.LP
\fBMONTAGE:\ \ \fR \(sc D.6.8 sur le reste de cette page
.sp 1P
.RT
.LP
.bp
