Você está na página 1de 153

ATTOL UniTest

Reference Manual
C Language

http://www.attol.com

Copyright 1992-2000 ATTOL Testware SA. All rights reserved.


th

Version 3.4 - February 29 , 2000


Information in this document is subject to change without notice and does not represent a commitment
on the part of ATTOL Testware SA. The software described in this document is furnished under a
license agreement. The software may be used only in accordance with the terms of that license
agreement. It is against the law to copy or use the software except as specifically allowed in the
license.
ATTOL, ATTOL UniTest, ATTOL Coverage, ATTOL SystemTest, and the ATTOL logo are either
registered trademarks or trademarks of ATTOL Testware SA in France and/or other countries. All
other names are used for identification purposes only and are trademarks or registered trademarks of
their respective companies.

Visit our Web site: http://www.attol.com

Reference Manual - C Language

TABLE OF CONTENTS
1. INTRODUCTION

2. THE ATTOL LANGUAGE

2.1. Syntax
2.1.1. Lexical Elements
2.1.2. Syntax summary

5
5
6

2.2. Instructions

2.3. French VERSION

44

3. THE C ANALYZER

45

3.1. The C preprocessor


3.1.1. Grammar of the C preprocessor
3.1.2. Predefined constants
3.1.3. ATTOL pragmas

45
45
46
46

3.2. Grammar of the C analyzer

47

3.3. C Expressions

50

3.4. Lexical elements


3.4.1. Identifiers
3.4.2. Constants
3.4.3. Character strings

51
51
52
53

4. THE ATTOL TEST GENERATOR

54

4.1. Command

54

4.2. French Version

89

4.3. Return Code

90

Reference manual C Language

page 2

5. THE ATTOL REPORT GENERATOR


5.1. Command

91
91

5.2. Changing default extensions

103

5.3. French Version

104

5.4. Return Code

105

6. THE ATTOL TEST PLAN GENERATOR

106

6.1. Command

106

6.2. French Version

114

6.3. Return Code

115

7. ATTOL RUNTIME

116

8. GLOSSARY

120

9. ATTOL ERROR MESSAGES

121

9.1. Information messages

122

9.2. Warning messages

125

9.3. Errors

140

9.4. Fatal errors

146

10. INDEX

Reference manual C Language

150

page 3

ATTOL UniTest

Introduction

1. INTRODUCTION
This manual is the ATTOL Reference Manual - C language. It is recommended that you read the ATTOL
Programmers Guide - C language before reading this manual.
This manual describes the following items in the form of reference sheets :

9
9
9
9
9
9
9
9

ATTOL language instructions,


directives analyzed by the ATTOL C preprocessor, and the syntax of the C analyzer,
parameters and options for the ATTOL Test Generator,
parameters and options for the ATTOL Report Generator,
ROD file library entry points,
parameters and options for the ATTOL test plan generator,
ATTOL runtime entry points,
ATTOL error messages.

This manual is aimed at users of ATTOL.


It describes the syntax of languages recognized by ATTOL. In order to do this, it uses BNF script. This script
respects the following rules :
Syntax
{} :
| :
<> :
MO :
() :

: [] : optional (0 or 1 instance)
from 0 to n instances
or
item
keyword
comment

Reference manual C Language

page 4

ATTOL UniTest

The ATTOL language

2. THE ATTOL LANGUAGE


2.1. SYNTAX
2.1.1. Lexical Elements
The ATTOL language is composed of a series of instructions into which C code can be inserted. ATTOL
instructions and C Code follow the following rules :

9
9
9
9

each instruction begins with a keyword and ends at the end of the line,
the ampersand character ('&') can be used at the beginning of the line to extend an ATTOL instruction onto
the next line,
the length of an instruction is limited to 2000 characters,
C code included in the instructions begins with # or @.

ATTOL language instructions begin with the following keywords :


ARRAY,
BEGIN,
COMMENT, CONST,
DEFINE,
ELEMENT, ELSE, ELSE_SIMUL, END, ENVIRONMENT,
FAMILY, FORMAT,
IF, INCLUDE, INITIALISATION,
NEXT_TEST,
SERVICE, SERVICE_TYPE, SIMUL, STR, STUB
TERMINATION, TEST,
USE,
VAR

Reference manual C Language

page 5

ATTOL UniTest

The ATTOL language

Furthermore, the following keywords can be found in the body of the instructions :
BOUNDS,
CODE,
DELTA,
EV,
FROM,
IF, IN, INIT,
LOOP,
MAX, MIN,
NB_RANDOM, NB_TIMES,
PTU,
SIMUL, STEP, STUB,
TO,
WITH
These keywords may be written in upper or lower case in any ATTOL instruction.
2.1.2. Syntax summary
test_plan

::=

header BEGIN { decl_before_service } { services }

header

::=

HEADER module_name , module_ver , test_plan_ver

module_name

::=

string

module_ver

::=

string

test_plan_ver

::=

string

decl_before_service

::=

constant
environment
use
comment
format
stub_definition
initialisation
termination

constant

::=

CONST constant_name = value

constant_name

::=

identifier

value

::=

string

environment

::=

ENVIRONMENT environment_name [ ( param { , param } ) ]


attol_tests END ENVIRONMENT

environment_name

::=

identifier

Reference manual C Language

|
|
|
|
|
|
|

page 6

ATTOL UniTest

The ATTOL language

param

::=

identifier

attol_test

::=

attol_test { attol_test }

use

::=

USE environment [ ( param_value { , param_value } ) ]

param_value

::=

string

comment

::=

COMMENT string

format

::=

FORMAT type_or_variable = C_type

type_or_variable

::=

C_type
C_variable
structure_name . field_name

stub_definition

::=

DEFINE STUB stub_name [ stub_dim ] { def_of_stub } END


DEFINE

stub_dim

::=

number

def_of_stub

::=

# C_variable_decl ;
# stub_function

stub_function

::=

[C_ type ] name_of_stub ( parameter { , parameter } ) ;


[ C_type ] name_of_stub ( ) ;
[ C_type ] name_of_stub ( void ) ;

|
|

name_of_stub

::=

identifier

parameter

::=

C_type [ pass_mode ] parameter_name

pass_mode

::=

_in
_out
_inout
_no

parameter_name

::=

identifier

initialisation

::=

INITIALISATION C_code END INITIALISATION

termination

::=

TERMINATION C_code END TERMINATION

services

::=

service { service }

service

::=

{ decl_outs_service } SERVICE tests END SERVICE

decl_outs_service

::=

environment
use
comment
format
stub_definition
initialisation
termination

tests

::=

test { test }

Reference manual C Language

|
|

|
|
|

|
|
|
|
|
|

page 7

ATTOL UniTest

The ATTOL language

test

::=

{ declarations } TEST string [ LOOP number ] family elements


{ NEXT_TEST string [ LOOP number ] elements }
END TEST

declarations

::=

environment
use
comment
format

family

::=

FAMILY string {, string }

elements

:=

element { element }

element

::=

{ declarations } ELEMENT phase END ELEMENT

phase

::=

phase_elem { phase_elem }

phase_elem

::=

environment
use
comment
format
attol_test

|
|
|
|

attol_test

::=

mode C_variable , init , ev


stub

mode

::=

VAR
ARRAY
STR

|
|

init

::=

INIT = C_exp
INIT ==
INIT IN C_expression_list
INIT ( variable_C ) WITH C_expression_list
INIT FROM C_exp TO C_exp STEP C_exp
INIT FROM C_exp TO C_exp NB_TIMES number
INIT FROM C_exp TO C_exp NB_RANDOM number
[ + BOUNDS ]

|
|
|
|
|
|

ev

::=

EV = C_exp
EV ==
EV IN C_expression_list
EV ( variable_C ) IN C_expression_list
MIN = C_exp , MAX = C_exp
EV = C_exp , DELTA = C_exp [ % ]
EV => identifier

|
|
|
|
|
|

C_expression_list

::=

{ C_exp { , C_exp } }
[ C_exp { , C_exp } ]

stub

::=

STUB stub_name stub_call { , stub_call }

stub_call

::=

[ call_range => ] ( param_val { , param_val } ) [ param_val ]


[ call_range => ] ( ) [ param_val ]

call_range

::=

number

Reference manual C Language

|
|
|

page 8

ATTOL UniTest

The ATTOL language


number..number

others
param_val

::=

C_exp

string

any character string,

identifier

character string beginning with a letter and containing only


letters, numbers, dollar signs ($) or underlines (_).

number

integer expression that can be reduced by ATTOL

C_type

type declared in C,

C_variable

variable with a name respecting C syntax

C_variable_decl

declaration of a C variable respecting C syntax,

C_exp

expressing respecting C syntax (without assignment operators)

C_code:

code written in C.

Furthermore, you can introduce the following anywhere in the test plan :
x

Comments. A comment begins with two dashes ("--") and ends at the end of the line (just like comments
in Ada),

Conditional generation instructions IF / ELSE / END IF and SIMUL / ELSE_SIMUL / END SIMUL
enclosing any C or ATTOL code.

2.2. INSTRUCTIONS
This section describes each ATTOL language instruction, giving the following details :

9
9
9

its syntax,
its functionality and rules governing its usage,
examples of use.

Reference manual C Language

page 9

ATTOL UniTest

The ATTOL language

COMMENT
Syntax

COMMENT comment

Description

The COMMENT instruction allows you to add comments to the test report, by inserting the
text comment.
Its use in the test plan is optional; the parameter comment is also optional in this instruction.
The position of the COMMENT instruction in the test program defines the position in
which the comments appear in the test report.

9
9
9
9
Associated rules

if COMMENT is located in an ELEMENT block, the comments appear just before the
description of the state of the variable.
if COMMENT is located after the TEST instruction, the comments appear in the test
header, before the description of the variables,
if COMMENT is located after the SERVICE instruction, the comments appear in the
service header, before the description of the tests.
if COMMENT is located outside the SERVICE block, the comments appear in the
service header following the declaration, before the description of the tests.

The COMMENT instruction can be used anywhere in the test program.


Comment can be any text.

Example

TEST 1
FAMILY nominal
COMMENT histogram calculation for a black image
ELEMENT

Reference manual C Language

page 10

ATTOL UniTest

The ATTOL language

CONST
Syntax

CONST constant_name = value

Description

The CONST instruction defines a constant that is specific to the test plan, and that can be
used thereafter in ATTOL instructions.
This instruction is optional.

Associated rules

The CONST instruction must be located between the BEGIN instruction and the first
SERVICE block.
constant_name is a name of an identifier which conforms to C rules. It is obligatory.
value is a literal constant which conforms to C rules or a list of literal constants separated by
commas (',') and contained within brackets ('[' and ']') or braces ('{' and '}'). It is obligatory.
This instruction is equivalent to the following line in C :
##define constant_name value

Example

BEGIN
...
CONST k
= 2
CONST PI
= 3.14159
CONST ch
= "Hello !"
CONST ST_NULL = {NIL,0,""}
...
SERVICE cercle

Reference manual C Language

page 11

ATTOL UniTest

The ATTOL language

BEGIN
Syntax

BEGIN

Description

The BEGIN instruction marks the beginning of the test program.


C code generation starts after this instruction.

Associated rules

The BEGIN instruction is obligatory. It must be located before any other ATTOL language
instruction, with the exception of the HEADER instruction..
If this instruction is absent, a warning message is generated and a BEGIN instruction is
implicitly created at the appearance of the first SERVICE instruction.

Reference manual C Language

page 12

ATTOL UniTest

The ATTOL language

DEFINE STUB / END DEFINE


Syntax

DEFINE STUB stub_name [ stub_dim ]


END DEFINE

Description

The DEFINE STUB and END DEFINE instructions delimit a simulation block which
consists of stub definitions in the form of C declarations (beginning with #') of :
x

global variables,

functions.

Any global variables defined in this way replace the real global variables. Definitions of
functions must be in the form of ANSI prototypes.
Stub parameters describe both the type of item used by the calling function and the mode of
passing. The mode of passing is specified by adding the following in front of the name of the
parameter :
x

_in for input parameters,

_out for output parameters,

_inout for input/output parameters,

_no for parameters that you do not wish to test.

A return parameter is always deemed to be an output parameter.


Associated rules

Defining stubs in a test plan is optional.


stub_name is the name of a simulation block; it is obligatory.
stub_dim is the maximum number of stub call descriptions for a test scenario. This parameter
is optional. Its default value is 10.
DEFINE STUB / END DEFINE blocks must be located after the BEGIN instruction and
outside any SERVICE block.
Simulated variables and functions must conform to ANSI C standards. The mode of passing

Reference manual C Language

page 13

ATTOL UniTest

The ATTOL language


is optional. Its default value is _in.
Using the stub definitions, ATTOL generates simulation variables and functions whose
interface is identical to that of the real variables and functions. The purpose of these
simulation variables and functions is to :

9
9
Example

store the input parameters in order to test them,


assign values to the output parameters and, where appropriate, to the return value.

BEGIN
DEFINE STUB fic
#int open_file(char _in f[100]);
#int create_file(char _in f[100]);
#int read_file(int _in fd, char _out l[100]);
#int write_file(int fd, char _in l[100]);
#int close_file(int fd);
END DEFINE

See also

STUB

Reference manual C Language

page 14

ATTOL UniTest

The ATTOL language

ELEMENT / END ELEMENT


Syntax

ELEMENT
END ELEMENT

Description

The ELEMENT / END ELEMENT instructions delimit a test phase (ELEMENT block).
This block contains in particular a C call to the service under test, and instructions describing
the initializations of and checks on test variables.
It does not matter where you position the VAR, ARRAY, STR or STUB instructions with
respect to the test procedure call since the C code generator separates these instructions into
two parts :
x

The test initialiser (described by INIT) is generated with the ELEMENT instruction

The test of the expected value (described by EV) is generated with the END
ELEMENT instruction.

The following diagram illustrates how C code is generated :


ELEMENT
VAR ... ,

INIT = ... ,

EV = ...

VAR ... ,

INIT = ... ,

EV = ...

END ELEMENT

Associated rules

The ELEMENT instruction can only appear in a TEST block. It is obligatory; if absent, a
warning message is generated and it is implicitly declared at the first VAR, ARRAY, STR or
STUB instruction.
The block must end with the instruction END ELEMENT; if absent, a warning message is
generated and it is implicitly declared at the next ELEMENT instruction or at the END
TEST instruction.

Reference manual C Language

page 15

ATTOL UniTest

Example

The ATTOL language

TEST 1
FAMILY nominal
ELEMENT
VAR x1,
init = 0,
ev = init
VAR x2,
init = SIZE_IMAGE-1, ev = init
VAR y1,
init = 0,
ev = init
VAR y2,
init = SIZE_IMAGE-1, ev = init
ARRAY image, init = 0,
ev = init
VAR histo[0], init = 0, ev = SIZE_IMAGE*SIZE_IMAGE
ARRAY histo[1..SIZE_HISTO-1], init = 0, ev = 0
VAR status,
init ==,
ev = 0
#status = calcul_histo(x1,y1,x2,y2,histo);
END ELEMENT
END TEST

Reference manual C Language

page 16

ATTOL UniTest

The ATTOL language

HEADER
Syntax

HEADER module_name, module_version, test_plan_version

Description

The HEADER instruction specifies the name and version of the module under test and the
version number of the test plan.
This information is reproduced in the test report header so that the test sequence executed
can be identified.

Associated rules

The module and test plan versions can be read from the environment variables if they are
identifiers beginning with a dollar sign ($).
The three parameters of the HEADER instruction are character strings with no particular
constraints, except for versions beginning with a dollar sign ('$'); these must be followed by
an identifier.
The HEADER instruction is obligatory but its constituent fields are optional. It must be the
first instruction in the test program. If it is absent, a warning message is generated.

Example

HEADER histo, 01a, 01a


BEGIN

Reference manual C Language

page 17

ATTOL UniTest

The ATTOL language

ENVIRONMENT / END ENVIRONMENT


Syntax

ENVIRONMENT name [ ( param { , param } ) ]


END ENVIRONMENT

Description

The ENVIRONMENT instruction defines a test environment declaration, i.e. a default set
of test specifications.
The name parameter gives the environment a name which is referenced in the USE
instruction.
Every environment can have parameters. The different parameters declared can be used in
initialization and expected value expressions. These parameters are initiated by the USE
instruction.
The END ENVIRONMENT instruction marks the end of an environment declaration.

Associated rules

An environment must be defined after the BEGIN instruction.


Each environment is visible in the block in which it has been declared and in any blocks
included in this block, after its declaration.
An environment can only contain VAR, ARRAY, STR, FORMAT or STUB instructions and
conditional generation instructions. If it is empty, a warning message will be generated.
name is obligatory. It is any identifier which gives a unique environment name.
param must be an identifier.
An environment is activated by the USE instruction which defines its scope and its priority.
After generating the initializations and the tests of an ELEMENT block, ATTOL includes
visible environments in order of priority, at every END ELEMENT instruction, in order to
complete the initializations and tests.

Example

See also

ENVIRONMENT calcul_histo
VAR x1,
init = 0,
VAR x2,
init = SIZE_IMAGE-1,
VAR y1,
init = 0,
VAR y2,
init = SIZE_IMAGE-1,
ARRAY histo, init = 0,
VAR status,
init ==,
END ENVIRONMENT

ev
ev
ev
ev
ev
ev

=
=
=
=
=
=

init
init
init
init
0
0

USE

Reference manual C Language

page 18

ATTOL UniTest

The ATTOL language

FAMILY
Syntax

FAMILY family_name{ , family_name}

Description

The FAMILY instruction enables you to group tests by families or classes.


This instruction appears in a TEST block : it defines the family(-ies) to which the test
belongs.
When starting tests, you can request that just tests of a given family are executed.
The family_name parameter indicates the name of the test family. For example, the following
families can be defined : nominal, structural, robustness.
A test can belong to several families : in this case, the FAMILY instruction contains a
family_name list, separated by commas.

Associated rules

The FAMILY instruction must be located before the first ELEMENT block of the TEST
block. It must be unique in the TEST block.
family_name can be any identifier. You must have at least one family name.
The FAMILY instruction is optional. If it is omitted, a warning message is generated and the
test belongs to every family.

Example

TEST 1
FAMILY nominal
COMMENT histogram calculation on a black image
ELEMENT

Reference manual C Language

page 19

ATTOL UniTest

The ATTOL language

FORMAT
Syntax

FORMAT variable = format


= format
FORMAT type
= format
FORMAT field

Description

The FORMAT instruction allows you to change the display format of a tested item. This
item can be :

9
9
9

a variable,
a simple C type declared by typedef (in this case, the display mode will change for all
variables of this type),
a member of a structure or a C union (in this case, the display mode will change for all
the members of variables of this type).

The new format of the item is described by an optional abstract C type eventually followed
by a printing directive for variables of type integer or floating only. The format of these
printing directives is the following:
# directive [ size ]
with the following possibilities, for integers:

9
9
9
9

#h for hexadecimal display,


#b for binary display,
#u for unsigned decimal display,
#d for signed decimal display,

and for floating variables:

9
9

#f to display without an exponent,


#e to display with an exponent.

For integers, size is the number of bits to be displayed. For floating variables, size is the
number of the number of digits after the decimal point.

Reference manual C Language

page 20

ATTOL UniTest

Associated rules

The ATTOL language

The FORMAT instruction is optional. It must be located after the BEGIN instruction.
It is applicable immediately, only in the block in which it is declared.
variable follows the syntax rules of C. type is a C identifier used in typedef, struct or union
instructions. format is an abstract C type.
If the change is to be applied to array elements, you can use an abstract C type to describe
the new modified variable, field or type.
variable, type or field and format are obligatory. A format cannot be empty: its must contain
either the abstract C type, or the printing directive.
In the printing directive, the size is optional. The size must be a multiple of 8 for the
integers. The default values for this size are the following:

9
9
Example

for the integers, the number of bits of the abstract type if it is given, or if it is not, the
number of bits of the type or the variable whose printing format is modified,
for #f, 6 digits after the decimal point and for #e, 2 digits after the decimal point.

#char x;
#typedef char *pointer;
#pointer p;
#char t[10]
FORMAT
FORMAT
FORMAT
FORMAT
FORMAT

x = int
pointer = void* -- modifies p
t = int[] t is an array of integers
x = int#h8 -- display in hexa, only 8 bits
y = #b
-- display in binary without
-- modifying the type
FORMAT z = short#u -- display in unsigned decimal
FORMAT f1 = #f
FORMAT f1 = #f4
FORMAT f1 = #e4

Reference manual C Language

-- displays by example 3.670000


-- displays by example 3.6700
-- displays by example 0.36700E1

page 21

ATTOL UniTest

The ATTOL language

INCLUDE
Syntax

INCLUDE CODE file


INCLUDE PTU file

Description

The INCLUDE instruction redirects processing of the ATTOL Test Generator to the file,
then, when this is complete, returns it to the current file.
Including a file with the keyword CODE lets you include a C source file without having to
start every line with a hash character ('#').
Including a file with the keyword PTU lets you include a test plan within a test plan.

Associated rules

The name of the included file may be specified with an absolute path or a path relative to the
current directory.
If the file is not found in the current directory, all directories specified by the -incl option,
when the preprocessor is started, will be searched.
If it is still not found or if access is denied, an error will be generated.
The instruction INCLUDE CODE <file> is equivalent to the following line in C :
##include "<file>".

Example

INCLUDE CODE file1.c


INCLUDE CODE ../file2.c
INCLUDE PTU /usr/attol/test/file3.ptu

Reference manual C Language

page 22

ATTOL UniTest

The ATTOL language

INITIALISATION / END INITIALISATION


Syntax

INITIALISATION
END INITIALISATION

Description

The INITIALISATION and END INITIALISATION instructions let you provide C code,
which will be integrated into the generation as the first C instructions of the test program
(first lines of main).
In certain environments, (e.g. a different target machine), this is the means of initializing the
target machine.

Associated rules

An INITIALISATION / END INITIALISATION block must appear after the BEGIN


instruction or between two SERVICE blocks.
This block can only contain C code. This code must begin with '#' or @.
There is no limit to the number of INITIALISATION blocks. At generation, they will be
concatenated in the order in which they appeared in the test plan.

See also

TERMINATION.

Reference manual C Language

page 23

ATTOL UniTest

The ATTOL language

NEXT_TEST
Syntax

NEXT_TEST [ LOOP nb]

Description

The NEXT_TEST instruction starts a TEST block linked to the previous. It contains one
more ELEMENT blocks. It does not contain the FAMILY instruction.
For this new test, a number of iterations can be specified by the keyword LOOP.

Associated rules

The NEXT_TEST instructions can only appear in a TEST / END TEST block.
nb is an C integer expression strictly greater than 1.

Example

SERVICE CALCUL_HISTO
# int
# int
# T_HISTO

x1, x2, y1, y2 ;


status ;
histo;

TEST 1
FAMILY nominal
ELEMENT
...
END ELEMENT
NEXT_TEST LOOP 2
ELEMENT
See also

TEST

Reference manual C Language

page 24

ATTOL UniTest

The ATTOL language

STUB
Syntax

STUB [stub_name .] function [ call_range => ] ( [val_ param {, param_val } ] ) [


return_val ] {, [ call_range => ] ( [ param_val {, param_val } ] ) [ return_val ] }

Description

The STUB instruction describes all calls to a simulated function in a test scenario.
The following is described for every parameter of this function and for every expected call :

9
9
9
9

for _in parameters, the values passed to the function; these values will be stored and
then tested after execution,
for _out parameters and, where appropriate, the return value, the values returned by the
function; these values will be stored in order to be returned during execution,
for _inout parameters, both the previous two values are required,
for _no parameters, nothing is required.

call_range describes one or many calls as follows:


call_num =>
call_num .. call_num =>
others =>
where call_num is the number of the stub call (begun to 1). The key word other describes
all the calls not still described. Moreover, this key word allows to not check the sub call
number.
Associated rules

function is the name of the simulated function. It is obligatory. You must previously have
described this function in a DEFINE STUB / END DEFINE STUB block. You can specify
in which stub (stub_name) the declaration was made.
param_val is an expression describing the test values for _in parameters and the returned
values for _out parameters. For _inout parameters, param_val is expressed in the following
way :
(in_param_val , out_param_val )
return_val is an expression describing the value returned by the function if its type is not
void. Otherwise, no value is provided.
You must give values for every _in, _out and _inout parameter; otherwise, a warning
message is generated. The _no parameters are ignored.

Reference manual C Language

page 25

ATTOL UniTest

The ATTOL language


param_val and return_val are C expressions that can contain :
x

numeric (integer or floating-point), character, or character string literal values.


Strings can be delimited by single or double inverted commas,

constants, in the C sense of the word, which can be numeric, characters, or character
strings,

ATTOL constants defined by the CONST instruction,

variables belonging to the test program or the module to be tested,

C functions,

the keyword NIL to designate a null pointer,

pseudo-variables I, I1, I2 ..., J, J1, J2 ..., where In is the current index of the nth
dimension of the parameter and Jm the current number of the sub-test generated by
the test scenarios mth INIT IN, INIT FROM or LOOP; the I and I1 variables are
therefore equivalent as are J and J1; the sub-test numbers begin at 1 and are
incremented by 1 at each iteration,

a C expression with one or more of the above elements combined using any of the C
operators (+, -, *, /, %, &, |, ^, &&, ||, <<, >>) and casting, with all required levels of
parentheses, and conforming to C rules of syntax and semantics, the + operator being
allowed to concatenate character string variables,

for arrays and structures, a list of above-mentioned expressions between braces ('{'
and '}') or brackets ('[' et ']'),with, where appropriate :

) for an array element, part of an array or a structure field, its index, interval or

name followed by '=>' and by the value of the array element, common to all
elements of the array portion or structure field,

) the keyword others followed by '=>' and the default value of any array elements
or structure fields not yet mentioned.

You must describe at least one call in the STUB instruction. There can be several
descriptions, separated by commas (',').
STUB instructions can appear in ELEMENT or ENVIRONMENT blocks.

Reference manual C Language

page 26

ATTOL UniTest

Example

The ATTOL language

STUB
STUB
STUB
STUB
STUB

open_file ("file1")3
create_file ("file2")4
read_file (3,"line 1")1, (3,"line 2")1, (3,"")0
write_file (4,"line 1")1, (4,"line 2")1
close_file 1=>(3)1,2=>(4)1

Reference manual C Language

page 27

ATTOL UniTest

The ATTOL language

SERVICE / END SERVICE


Syntax

SERVICE service_name
END SERVICE

Description

The SERVICE instruction starts a SERVICE block. This block contains the description of
all the tests relating to a given service of the module to be tested.
The service_name parameter flags the tested service in the test report, and is therefore
usually the name of this service (although this is not obligatory).
The END SERVICE instruction indicates the end of the service block.

Associated rules

The SERVICE instruction must appear after the BEGIN instruction.


The service_name parameter can be any identifier. It is obligatory.

Example

BEGIN
SERVICE CALCUL_HISTO
# int
# int
# T_HISTO

x1, x2, y1, y2 ;


status ;
histo;

TEST 1
FAMILY nominal

Reference manual C Language

page 28

ATTOL UniTest

The ATTOL language

IF / ELSE / END IF
Syntax

IF condition { , condition }
...
ELSE
...
END IF

Description

The IF, ELSE and END IF instructions allow a conditional generation of the test program.
These instructions enclose instructions that may or may not be included when the test plan is
analyzed depending on the presence of one of the condition conditions in the list provided to
the ATTOL Test Generator by the -define option or in the C #define instructions.
The "condition { , condition }" list thus forms a series of conditions that is equivalent to
using an expression of logical ORs.
The IF instruction starts the conditional generation block.
The END IF instruction terminates this block.
The ELSE instruction separates this block into 2 parts, one being included when the other is
not, and vice versa.

Associated rules

This block of instructions can appear anywhere in the test program.


condition is any identifier. You must have at least one condition in an IF instruction.
This block can contain ATTOL instructions or C code.
IF and END IF instructions must appear simultaneously.
The ELSE instruction is optional.
The generating rules are as follows :

9
9

If at least one of the conditions specified in the IF instructions list of conditions appears
in the list associated with the -define option, then the first part of the block is included.
If none of the conditions specified in the IF instructions list of conditions appear in the
list associated with the -define option, then the second part of the block is included (if
ELSE is present).

The IF / ELSE / END IF block is equivalent to the following block in C :

Reference manual C Language

page 29

ATTOL UniTest

The ATTOL language


#if defined(<condition>) { || defined(<condition>) } ...
...
#else
...
#endif

Example

IF test_on_target
VAR register, init == , ev = 0
ELSE
VAR register, init = 0 , ev = 0
END IF

Reference manual C Language

page 30

ATTOL UniTest

The ATTOL language

SIMUL / ELSE_SIMUL / END SIMUL


Syntax

SIMUL
ELSE_SIMUL
END SIMUL

Description

The SIMUL, ELSE_SIMUL and END SIMUL instructions allow a conditional generation
of the test program.
These instructions enclose instructions that may or may not be included, when the test
program is analyzed by the ATTOL Test Generator, depending on the presence of the
-nosimulation option.
The SIMUL instruction starts the conditional generation block.
The END SIMUL instruction terminates this block.
The ELSE_SIMUL instruction separates this block into 2 parts, one being included when
the other is not, and vice versa.

Associated rules

This block of instructions can appear anywhere in the test program.


It can contain ATTOL instructions or C code.
The SIMUL and END SIMUL instructions must both appear or neither must appear.
The ELSE_SIMUL instruction is optional.
The generating rules are as follows :
x

if -nosimulation is not present => the first part of the block is included

if -nosimulation is present => the second part of the block, if it exists, is included
otherwise nothing happens.

For compatibility, ELSE_SIMUL can be replaced by SINON_SIMUL.

Reference manual C Language

page 31

ATTOL UniTest

Example

The ATTOL language

SIMUL
#x = 0;
ELSE_SIMUL
#x = (type_x *)
END SIMUL
...
SIMUL
VAR x , INIT =
VAR p , INIT =
ELSE_SIMUL
VAR x , INIT =
VAR p , INIT =
END SIMUL

Reference manual C Language

malloc ( sizeof(*x) );

0
NIL

, EV = 1
, EV = NONIL

0
NIL

, EV = 0
, EV = NIL

page 32

ATTOL UniTest

The ATTOL language

TERMINATION / END TERMINATION


Syntax

TERMINATION
END TERMINATION

Description

The TERMINATION and END TERMINATION instructions delimit a block of native


code which is integrated into the generation process as the last C instructions to be executed
(last lines of main).
In certain environments (e.g. a different target machine), this is the means of terminating
execution on the target machine.

Associated rules

A TERMINATION / END TERMINATION block must appear after the BEGIN


instruction and outside any SERVICE block.
This block can only contain C code. This code must begin with '#' or @.
There is no limit to the number of TERMINATION blocks.. They will be concatenated at
generation.

Example

INITIALISATION

Reference manual C Language

page 33

ATTOL UniTest

The ATTOL language

TEST / END TEST


Syntax

TEST test_name [ LOOP nb]


END TEST

Description

The TEST instruction starts a TEST block. This block describes the test case for a service.
It contains one more ELEMENT blocks specifying the test.
In the test report, the test_name parameter flags the test within the SERVICE block. Tests
are usually given numbers in ascending order.
A number of iterations can be specified for each test by the keyword LOOP.
The END TEST instruction marks the end of the TEST block.

Associated rules

The TEST and END TEST instructions can only appear in a SERVICE block.
test_name is obligatory. If it is absent, ATTOL generates an error message.
nb is a C integer expression strictly greater than 1.

Example

SERVICE CALCUL_HISTO
# int
# int
# T_HISTO

x1, x2, y1, y2 ;


status ;
histo;

TEST 1
FAMILY nominal
ELEMENT
See also

ELEMENT, SERVICE

Reference manual C Language

page 34

ATTOL UniTest

The ATTOL language

TYPE_SERVICE
Syntax

SERVICE_TYPE type { , type }

Description

The SERVICE_TYPE instruction indicates in the test report the type of service tested. You
decide the values of type. It is generally used to specify if the tested service is internal or
external.
If SERVICE_TYPE appears in a SERVICE block, it indicates the corresponding type of
service.
If it occurs outside any SERVICE block, it is, by default, applied to all the services which do
not contain a SERVICE_TYPE instruction.

Associated rules

The SERVICE_TYPE instruction is optional.


It can be located either before the first SERVICE block or before the first TEST block.
type can be any identifier.

Example

SERVICE_TYPE internal, external


SERVICE count
SERVICE_TYPE internal

Reference manual C Language

page 35

ATTOL UniTest

The ATTOL language

USE
Syntax

USE name [ ( expression { , expression } ) ]

Description

The USE instruction activates a test environment that is defined using the
ENVIRONMENT instruction.
The position of the USE instruction determines which tests are affected by the environment
used :

9
9
9
9

If USE occurs outside a SERVICE block, the instructions contained in this


environment will be applied to all subsequent ELEMENT blocks.
If USE occurs within a SERVICE block and outside a TEST block, the instructions
contained in this environment will be applied to all subsequent ELEMENT blocks of
this SERVICE block.
If USE occurs within a TEST block and outside an ELEMENT block, the instructions
contained in this environment will be applied to all subsequent ELEMENT blocks of
this TEST block.
If USE occurs within an ELEMENT block, the instructions contained in this
environment will only be applied to this block.

The fact that the USE instruction can appear at these 4 different levels gives rise to 4
priority levels, from outside a SERVICE block (the lowest priority) to inside an
ELEMENT block (the highest priority).
Within the same priority level, the last USE instruction is the one with the highest priority.
ATTOL completes the testing in accordance with these priority rules, and on the basis that
variables tested several times are included in the environment with the highest priority.
This is also true for every element of arrays described in extended mode.
If the environment it references takes parameters, the USE instruction must initialize these
parameters using C expressions.

Reference manual C Language

page 36

ATTOL UniTest

Associated rules

The ATTOL language

The USE instruction can appear after BEGIN and outside an ENVIRONMENT block, after
the definition of the environment it references.
name is the name of an environment declared by the ENVIRONMENT instruction.
expression must be an expression that conforms to C syntax and semantics.

Example

See also

ENVIRONMENT calcul_histo
VAR x1,
init = 0,
VAR x2,
init = SIZE_IMAGE-1,
VAR y1,
init = 0,
VAR y2,
init = SIZE_IMAGE-1,
ARRAY histo, init = 0,
VAR status,
init ==,
END ENVIRONMENT
USE calcul_histo

ev
ev
ev
ev
ev
ev

=
=
=
=
=
=

init
init
init
init
0
0

ENVIRONMENT.

Reference manual C Language

page 37

ATTOL UniTest

The ATTOL language

VAR / ARRAY / STR


Syntax

VAR variable , initialisation , expected_value


ARRAY variable , initialisation , expected_value
STR variable , initialisation , expected_value
VAR expression , expected_value
ARRAY expression, expected_value
STR expression, expected_value

Description

The VAR, ARRAY and STR instructions describe the behaviour of variables in the test,
i.e. they specify their initial values and the expected values at the end of the test and the
behavior of test expressions, i.e. they specify their expected values only.

Associated rules

The VAR, ARRAY and STR instructions can only appear in an ELEMENT block or an
ENVIRONMENT block.
These three instructions enable any type of C variable, simple variable, array or structured
variable to be tested. Using a VAR, ARRAY or STR instruction will change the way in
which the result of the variable test is displayed in the test report.
They enable too any expression whose type is simple.

The variable parameter


Description

variable is the name of the C variable that is to be tested. C syntax has been modified so that
arrays can be easily tested. This consists of specifying the upper and lower bounds of the
range of the test for each dimension of the array in the following way :
[ <lower_bound> .. <upper_bound> ]

Associated rules

variable can be a simple variable (integer, floating-point number, character, pointer or


character string), an element of an array or structure, part of an array, an entire array or a
complete structure.
If the variable is an array for which no test bounds have been specified, ATTOL tests all the
array elements. Similarly, if the variable is a structure of which one of the fields is an array,
ATTOL tests all elements of this field.
The variable must have been declared in C beforehand.

Reference manual C Language

page 38

ATTOL UniTest

Example

The ATTOL language

VAR x, ...
VAR y[4], ...
VAR z.field, ...
VAR p->value, ...
ARRAY y[0..100], ...
ARRAY y, ...
STR z, ...
STR *p, ...

The expression parameter


Description

expression is a C expression that is to be tested.

Associated rules

expression is a C expression, syntactically et semantically correct, whose result type is a


simple (integer, floating-point number, character, pointer, character string, ...),

Example

VAR x+y, ...


VAR sin(z), ...

The initialisation parameter


Description

initialisation specifies the initial value of the variable, and appears in one of the following
forms :
x

INIT = exp

INIT IN { exp , exp , ... }

INIT ( variable ) WITH { exp , exp , ... }

INIT FROM exp TO exp STEP exp

INIT FROM exp TO exp NB_TIMES nb

INIT FROM exp TO exp NB_RANDOM nb [+ BOUNDS]

INIT ==

where exp is a C expression that can take :

Reference manual C Language

page 39

ATTOL UniTest

The ATTOL language


x

numeric (integer or floating-point), character, or character string literal values. Strings


can be delimited by single or double inverted commas,

constants, in the C sense of the word, which can be numeric, characters, or character
strings,

ATTOL constants defined by the CONST instruction,

variables belonging to the test program or the module to be tested,

C functions,

the keyword NIL to designate a null pointer,

pseudo-variables I, I1, I2 ..., J, J1, J2 ..., where In is the current index of the nth
dimension of the parameter and Jm the current number of the sub-test generated by
the test scenarios mth INIT IN, INIT FROM or LOOP; the I and I1 variables are
therefore equivalent as are J and J1; the sub-test numbers begin at 1 and are
incremented by 1 at each iteration,

a C expression with one or more of the above elements combined using any of the C
operators (+, -, *, /, %, &, |, ^, &&, ||, <<, >>) and casting, with all required levels of
parentheses, and conforming to C rules of syntax and semantics, the + operator being
allowed to concatenate character string variables,

for arrays and structures, a list of above-mentioned expressions between braces ('{'
and '}') or brackets ('[' et ']'),with, where appropriate :

) for an array element, part of an array or a structure field, its index, interval or
name followed by '=>' and by the value of the array element, common to all
elements of the array portion or structure field,

) the keyword others followed by '=>' and the default value of any array elements or
structure fields not yet mentioned.

for INIT IN and INIT WITH only, a list of values, delimited by braces ('{' et '}') or
brackets ('[' et ']'), composed of above-defined expressions,

and where nb is an integer constant that is either literal or derived from an expression
containing C constants or ATTOL constants.

The integers contained in an expression can be written in accordance with C lexical rules or

Reference manual C Language

page 40

ATTOL UniTest

The ATTOL language


as follows :
x

hex_integerH for hexadecimal values; the integer must be preceded by 0 if it begins


with a letter,

binary_integerB for binary values.

INIT = exp initializes variable before the test with the value exp.
INIT IN { exp, exp, ...} declares a list of initial values. This is a condensed form of writing
that enables several tests to be contained within a single instruction.
INIT ( variable ) WITH { exp, exp, ...} declares a list of initial values which will be assigned
in correlation with those of the variable initialized by an INIT IN instruction. There must be
the same number of initial values.
INIT FROM exp TO exp allows the initial value of a numerical variable (integer or
floating-point) to vary within two bounds :
x

by successive steps (STEP),

by taking a number of values that are equidistant between the 2 bounds (NB_TIMES),

by taking a number of values at random between the 2 bounds, including, where


appropriate, the bounds (NB_RANDOM).

nb has the following constraints :


x

for NB_TIMES : nb >= 2,

for NB_RANDOM : nb >= 1,

INIT == allows the variable to be left uninitialized. You can thus control the values of
variables that are dynamically created by the service under test. The initial value displayed in
the test report is then '?'.
An initialization expression is permitted (INIT == exp). It will be included in expressions of
expected values if the INIT pseudo-variable is used.
Associated rules

INIT IN and INIT (variable) WITH are not allowed for arrays initialized in extended mode
and for structures.
INIT FROM is only allowed for numeric variables.

Reference manual C Language

page 41

ATTOL UniTest

Example

The ATTOL language

VAR x,
VAR y[4],
VAR y[5],
VAR z.field,
VAR p->value,
ARRAY y[0..100],
ARRAY y,
STR z,
STR *p,

INIT = pi/4-1, ...


INIT IN { 0, 1, 2, 3 }, ...
INIT(y[4]) WITH { 10, 11, 12, 13 }, ...
INIT FROM 0 TO 100 NB_RANDOM 3, ...
INIT ==, ...
INIT = sin(I), ...
INIT = {50=>10,others=>0}, ...
INIT = {0, "", NIL}, ...
INIT = {value=>4.9, valid=>1}, ...

The expected value parameter


Description

expected_value specifies the expected value of the variable at the end of the test, and can
appear in one of the following forms :
x

EV = exp

EV = exp , DELTA = tolerance

MIN = exp , MAX = exp

EV IN { exp , exp , ... }

EV ( variable ) IN { exp , exp , ... }

EV ==

EV =>identifier

where exp is similar to initialization expressions with the additional possibility of using :
x

the pseudo-variable INIT, which copies the initialisation expression,

the keyword NONIL, which tests if a pointer is non-null.

And where tolerance can be expressed :


x

as an absolute value, by a numerical expression in the form described above,

as a percentage of the expected value. tolerance is then written in the form exp %.

EV = exp specifies the expected value of the variable when it is known in advance. The

Reference manual C Language

page 42

ATTOL UniTest

The ATTOL language


value of variable is deemed to be correct if it is equal to exp.
EV = exp, DELTA = tolerance allows a tolerance for the expected value. The value of
variable is deemed to be correct if it lies between exp - tolerance and exp + tolerance.
MIN = exp , MAX = exp specifies a correctness interval, delimited by the two expressions.
The value of variable is deemed to be correct if it lies between the two expressions.
Characters and characters strings are treated in dictionary order.
EV IN { exp , exp , ... } specifies the values expected successively, in accordance with the
initial values, for a variable that is declared in INIT IN. It is therefore essential that the two
lists have an identical number of values.
EV ( variable ) IN is identical to EV IN, but the expected values are a function of another
variable that has previously been declared in INIT IN. As for EV IN, the two lists must have
an identical number of values.
EV == allows the value of variable not to be checked at the end of the test. Instead, this
value is read and displayed. The value of variable is always deemed to be correct.
EV => allows the expected value of variable to be assimilated, when the -learn option is
used.

Associated rules

EV with DELTA is only allowed for numeric variables.


MIN = exp , MAX = exp is only allowed for alphanumeric variables that use lexicographical
order for characters and character strings.
MIN = exp , MAX = exp is not allowed for pointers.
Only EV = and EV ==.are allowed for structured variables.

Example

VAR x,
VAR y[4],
VAR y[5],
VAR z.field,
VAR p->value,
ARRAY y[0..100],
ARRAY y,
STR z,
STR *p,

...,
...,
...,
...,
...,
...,
...,
...,
...,

EV = pi/4-1
EV IN { 0, 1, 2, 3 }
EV(y[4]) IN { 10, 11, 12, 13 }
MIN = 0, MAX = 100
EV ==
EV = cos(I)
EV = {50=>10,others=>0}
EV = {0, "", NIL}
EV = {value=>4.9, valid=>1}

) Sometime, to avoid generated code compilation warning, cast must be inserted before NIL or NONIL
keywords.

Reference manual C Language

page 43

ATTOL UniTest

The ATTOL language

2.3. FRENCH VERSION


The ATTOLLAN environment variable allows either a French or English version of ATTOL to be used. It can
have the following values :
x

FR or FA

ATTOL language in French

GB

ATTOL language in English (default value)

The two languages have identical rules of syntax and semantics. It is the keywords that are different.
FRENCH
A
AVEC
BOUCLE
BORNES
CODE
COMMENT
CONST
DANS
DE
DEBUT
DEFINIR
ELEMENT
ENTETE
ENVIRONNEMENT
FAMILLE
FIN
FORMAT
INCLURE
INCREMENT
INIT
INITIALISATION

ENGLISH
TO
WITH
LOOP
BOUNDS
CODE
COMMENT
CONST
IN (*)
FROM
BEGIN
DEFINE
ELEMENT
HEADER
ENVIRONMENT
FAMILY
END
FORMAT
INCLUDE
STEP
INIT
INITIALIZATION

FRENCH
MAX
MIN
STUB
NB_HASARD
NB_VALEUR
PTU
SERVICE
SI
SIMUL
SINON
SINON_SIMUL
STR
TAB
TERMINAISON
TEST
TEST_SUITE
TYPE_SERVICE
UTILISE
VA
VAR

ENGLISH
MAX
MIN
STUB
NB_RANDOM
NB_TIMES
PTU
SERVICE
IF
SIMUL
ELSE
ELSE_SIMUL (*)
STR
ARRAY
TERMINATION
TEST
NEXT_TEST
SERVICE_TYPE
USE
EV (*)
VAR

Keywords marked with (*) are allowed in both French and English for compatibility with previous versions.

Reference manual C Language

page 44

ATTOL UniTest

The C analyzer

3. THE C ANALYZER
The preprocessor and the test plan generator include a C analyzer that :

9
9

preprocesses, in the C sense of the word, any C code found.


analyzes the preprocessed C code.

3.1. THE C PREPROCESSOR


3.1.1. Grammar of the C preprocessor
The C preprocessor incorporated in ATTOL only analyzes those lines in the test plan which begin with two hash
characters (##) in the first column, and those lines in C files which begin with a hash character (#) in the first
column. The preprocessor respects the following rules of grammar for these lines :
directives

::=

{ directive }

directive

::=

conditional_gen
ontrol_directive

conditional_gen

::=

if_directive { elseif_directive } [ else_directive ] endif_directive

if_directive

::=

if constant_exp <eol>
fdef identifier <eol>
fndef identifier <eol>

elseif_directive

::=

elif constant_exp <eol>

else_directive

::=

else <eol>

endif_directive

::=

endif <eol>

control_directive

::=

include "string" <eol>


nclude < string > <eol>
efine identifier [ = string ] <eol>
efine identifier ( ident_list ) string <eol>
ndef identifier <eol>
ragma attol attol_command
ragma string
ther_directives

ident_list

::=

identifier { , identifier }

Reference manual C Language

|
|

|
|
|
|
|
|
|

page 45

ATTOL UniTest

The C analyzer

other_directives

ignored by ATTOL

<eol>

end of line

constant_exp

C expression described in the section C expressions with the

##
defined(<name>)
#<name>

:
:
:

concatenation of identifiers,
returns a 1 if <name> is defined,
transforms <name> into a character string.

3.1.2. Predefined constants


The C preprocessor predefines seven constants which are updated dynamically as the code is analyzed.
__DATE__
__TIME__
__FILE__
__STDC__
__LINE__
__BASE_FILE__
__INCLUDE_LEVEL__

current date in the format "mmm dd yyy",


current time in the format "hh:mm:ss",
name of the file being analyzed
1 if RESTRICTION=ANSI, otherwise not defined,
current line number in the file being analyzed.
name of the file initiating analysis,
current include level.

) If the compiler being used defines __STDC__ as 0, the default value can be replaced in the standard
definitions file by the commands :

#undef __STDC__
#define __STDC__

3.1.3. ATTOL pragmas


ATTOL pragmas modify the operation of the C analyzer, which is described in the following section. These
pragmas all begin with pragma attol and are followed by one of the following commands :
incl_std = <directory>,...

Modifies the default include directories

stop_analyse

Stops C code analysis

start_analyse

Restarts C code analysis

Reference manual C Language

page 46

following additiona

ATTOL UniTest
sizeof ( <type> ) =
sizeof <type> = <size>

The C analyzer
<size>

or Modifies the size of an integer type that is


predefined or defined by a typedef

signof ( <type> ) = signed | unsigned

Modifies the sign extension of an integer type


that is predefined or defined by a typedef

type_modifier = identifier

defines a type modifier

"<string>" = "<string>"

equates a pragma to a new command of the C


preprocessor

3.2. GRAMMAR OF THE C ANALYZER


The C analyzer only analyzes those lines which begin with a hash character (#) and which appear either before
the BEGIN instruction or after this instruction between each SERVICE block.
You can insert C source code, which will not be analyzed, by beginning the line with a @ character instead of a
#.
The grammar of the C analyzer is as follows :
declaration

::=

decl_spec [ init_decl_list ] ;
decl_list

decl_spec

::=

storage_class [ decl_spec ]
type_spec [ decl_spec ]

init_decl_list

::= declaration_with_init { , declaration_with_init }

declaration_with_init

::=

declarator[ asm ] [ attribute ] [ = initialisation ]

initialisation

not analyzed by ATTOL

asm

::=

asm ( assembler )
__asm ( assembler )
__asm__ ( assembler )

assembler

not analyzed by ATTOL

attribute

::=

attribute ( text_attribute )
__attribute ( text_attribute )
__attribute__ ( text_attribute )

text_attribute

not analyzed by ATTOL

storage_class

::=

typedef

Reference manual C Language

|
|

|
|

page 47

ATTOL UniTest

The C analyzer
extern
static
auto
register

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

type_spec

::=

type_modifier
char
short
int
long
signed
__signed
__signed__
unsigned
float
double
const
__const
__const__
volatile
__volatile
__volatile__
void
union_struct_spec
enum_spec
typedef_name

type_modifier

recorded by ATTOL due to the type_modifier pragma

typedef_name

recorded by ATTOL at each typedef

union_struct_spec

::=

union_or_struct [ identifier ] { struct_field_list }


union_or_struct identifier
union_or_struct type_name

|
|

union_or_struct

::=

union
struct

struct_field_list

::=

{ struct_fields }

struct_fields

::=

type_spec_list fields_list ;

type_spec_list

::=

{ type_spec }

fields_list

::=

field { field }

field

::=

declarator
[ declarator ] : size

size

not analyzed by ATTOL

enum_spec

::=

enum [ identifier ] { enum_list ]


enum identifier

enum_list

::=

enum_id { , enum_id }

Reference manual C Language

page 48

ATTOL UniTest

The C analyzer

enum_id

::=

identifier
identifier = enum_value

enum_value

not analyzed by ATTOL

declarator

::=

[ pointer ] direct_declarator

direct_declarator

::=

identifier
( declarator )
direct_declarator [ [ dimension ] ]
direct_declarator ( parameter_list_type )
direct_declarator ( [ identifiers_list ] )

identifiers_list

::=

identifier { , identifier }

pointer

::=

{ * type_spec_list }

parameter_list_type

::= parameters_list [ , ... ]

parameters_list

::=

param_decl { , param_decl }

param_decl

::=

decl_spec declarator
decl_spec [ abstract_decl ]

nom_de_type

::=

liste_spcif_type [ abstract_decl ]

abstract_decl

::=

pointer
[ pointer ] direct_abstract_decl

direct_abstract_decl

::=

( abstract_decl )
[direct_abstract_decl ] [ [ dimension ] ]
[direct_abstract_decl ] ( [ parameter_list_type ] )

|
|

function_body

::=

{ instructions }

instructions

not analyzed by ATTOL

decl_list

::=

decl_list2 { decl_list2 }

decl_list2

::=

type_spec_list delarators_list ;
register delarators_list ;
register type_spec_list delarators_list ;
type_spec_list register delarators_list ;
auto delarators_list ;
auto type_spec_list delarators_list ;
type_spec_list auto delarators_list ;

delarators_list

::=

declarator { , declarator }

C_code

::=

{ external_def }

external_def

::=

function_def
declaration
asm

function_def

::=

[ delc_spec ] declarator function

function

::=

[ decl_list ] function_body

Reference manual C Language

|
|
|
|

|
|
|
|
|
|

|
|

page 49

ATTOL UniTest

The C analyzer

The grammars entry point is C_code.

3.3. C EXPRESSIONS
The expressions contained in the INIT and EV instructions respect the following rules of grammar :

primary_exp

::=

identifier
constant
string
[ expression ]

|
|
|

postfixed_exp

::=

primary_exp
postfixed_exp [ expression ]
postfixed_exp [ expression .. expression ]
postfixed_exp ( [ expressions_arg_list ] )
postfixed_exp . identifier
postfixed_exp -> identifier

|
|
|
|
|

expressions_arg_list

::=

assignment_exp { , assignment_exp }

unary_exp

::=

postfixed_exp
sizeof unary_exp
sizeof ( type_name )
alignof unary_exp
__alignof unary_exp
__alignof__ unary_exp
& cast_exp
* cast_exp
+ cast_exp
- cast_exp
~ cast_exp
! cast_exp

|
|
|
|
|
|
|
|
|
|
|

cast_exp

::=

unary_exp
( type_name ) cast_exp

multiplicative_exp

::=

cast_exp
multiplicative_exp * cast_exp
multiplicative_exp / cast_exp
multiplicative_exp % cast_exp

|
|
|

additive_exp

::=

multiplicative_exp
additive_exp + multiplicative_exp
additive_exp - multiplicative_exp

|
|

shift_exp

::=

additive_exp
shift_exp << additive_exp

|
|

Reference manual C Language

page 50

ATTOL UniTest

The C analyzer
shift_exp >> additive_exp

relation_exp

::=

shift_exp
relation_exp < shift_exp
relation_exp > shift_exp
relation_exp <= shift_exp
relation_exp >= shift_exp

|
|
|
|

equality_exp

::=

relation_exp
equality_exp == relation_exp
equality_exp != relation_exp

|
|

and_exp

::=

equality_exp
and_exp & equality_exp

exclusive_or_exp

::=

and_exp
exclusive_or_exp ^ and_exp

inclusive_or_exp

::=

exclusive_or_exp
inclusive_or_exp | exclusive_or_exp

logical_and_exp

::=

inclusive_or_exp
logical_and_exp && inclusive_or_exp

logical_or_exp

::=

logical_and_exp
logical_or_exp || logical_or_exp

condition_exp

::=

logical_or_exp
logical_or_exp ? logical_or_exp : condition_exp

assignment_exp

::=

condition_exp

expression

::=

assignment_exp
expression , assignment_exp

attol_init

::=

exp_attol
condition_exp => attol_exp
condition_exp .. condition_exp => attol_exp

|
|

attol_exp

::=

assignment_exp
{ attol_init { , attol_init } }
[ attol_init { , attol_init } ]

|
|

The grammars entry point is attol_exp.

3.4. LEXICAL ELEMENTS


3.4.1. Identifiers
The following identifiers are recognized :

Reference manual C Language

page 51

ATTOL UniTest

The C analyzer

identifier

::=

nondigit { nondigit | digit }

nondigit

::=

a | b | ... | z | A | B | ... | Z | _ | $

digit

::=

0 | 1 | ... | 9

constant

::=

real_constant
integer_constant
enum_constant
character_constant

|
|
|

real_constant

::=

fraction [ exponent ] [ suffix ]


digits exponent [ suffix ]

exponent

::=

e | E [ + | - ] digits

suffix

::=

f|F|l|L

fraction

::=

[ digits ] . digits
digits .

digits

::=

digit { digit }

integer_constant

::=

decimal_constant [ suffix2 ]
octal_constant [ suffix2 ]
hexa_constant [ suffix2 ]
attol_hexa_constant
attol_binary_constant

|
|
|
|

suffix2

::=

u|U[l|L]
l|L[u|U]

decimal_constant

::=

digit_other_than_0 { digit }

digit_other_than_0

::=

1 | 2 | ... | 9

octal_constant

::=

0 octal_digit { octal_digit }

octal_digit

::=

0 | 1 | ... | 7

hexa_constant

::=

0x | 0X hexa_digit { hexa_digit }

hexa_digit

::=

0 | 1 | ... | 9 | a | b | ... | f | A | B | ... | F

attol_hexa_constant

::= digit { hexa_digit } H

attol_binary_constant

::=

3.4.2. Constants
The following constants are recognized :

Reference manual C Language

0|1{0|1}B

page 52

ATTOL UniTest

The C analyzer

enum_constant

::=

identifier

character_constant

::=

' c_char { c_char } '


L ' c_char { c_char } '

c_char

::= any ASCII character except quote (') and backslash (\)
escape_character

escape_character

::=

\' | \" | \\
\ octal_constant
\a | \b | \f | \n | \r | \t | \v
\x hexa_digit { hexa_digit }

|
|
|

string

::=

" s_char { s_char } "


L " s_char { s_char } "

s_char

::=

any ASCII character except double quotes (")and backslash (\) |


escape_character

3.4.3. Character strings


The following character strings are recognized :

Reference manual C Language

page 53

ATTOL UniTest

The ATTOL Test Generator

4. THE ATTOL TEST GENERATOR


4.1. COMMAND
attolpreproC

<test plan>
<generated file>
[ <target machine directory> ]
[ -learn ]
[ -target=<target name> ]
[ -command=<command> ]
[ -compress ]
[ -const=<constants file> ]
[ -std_define=<definitions file> ]
[ -define=<ident> [ =<value> ] { ,<ident> [ =<value> ] } ]
[ -data=<data file> ]
[ -exfamily=<family name> { ,<family name> } ]
[ -expand ]
[ -exservice=<service name> { ,<service name> } ]
[ -extest=<test name> { ,<test name> } ]
[ -family=<family name> { ,<family name> } ]
[ -fast | -nofast ]
[ -incl=<directory> { ,<directory> } ]
[ -noanalyse ]
[ -noedit ]
[ -nopath ]
[ -nosimulation ]
[ -restriction=ANSI | KR ]
[ -rename=<rename file> ]
[ -service=<service name> { ,<service name> } ]
[ -source=<source file>]
[ -strver=<string>]
[ -syscomp=DOS | OS2 | VMS | UNIX ]
[ -symbtab=<symbol table file> ]
[ -test=<test name> { ,<test name> } ]
[-version=<version> ]

or

Reference manual C Language

page 54

ATTOL UniTest

attolpreproC

The ATTOL Test Generator

@<option file>

) The options can be in any order, they can be in upper or lower case,
) Under DOS, the options may begin with a slash ('/'), and attolpreproC is replaced by atprec,
) The environment variable ATUDIR should be defined as the directory containing the ATTOL binaries,
) The environment variable ATUTGT as the directory where are located the target package from your delivery.
Example of environment variables setting under UNIX :

export ATUDIR=/usr/atu/v34/sun4/sunOS5/bin
export ATUTGT=/usr/atu/v34/target/csolaris

Reference manual C Language

page 55

ATTOL UniTest

The ATTOL Test Generator

<test plan>
Description

This is a mandatory parameter that specifies the name of the test plan in ATTOL language.

Characteristics

You can use any file name extension. If no file name extension is specified, the ATTOL Test
Generator adds the extension specified in the ATTOLPTU environment variable, or the
default extension .ptu.
The root of this file (name without the extension) is used for the name of the list of errors
(which has the default file name extension .lis).
If this test plan is absent or read access is denied, a fatal error is generated and the
preprocessor stops.

Example

atprec
tests\gen.ptu ...
(DOS)
attolpreproC tests/gen.ptu ...
(UNIX)
File tests\gen.ptu (DOS) or tests/gen.ptu (UNIX) is analyzed.
attolpreproC gen ...
File gen.ptu is analyzed.
attolpreproC gen.fic ...
File gen.fic is analyzed

Reference manual C Language

page 56

ATTOL UniTest

The ATTOL Test Generator

< generated file >


Description

This is a mandatory parameter that specifies the name of the C test program that is generated
from the test plan.

Characteristics

You can use any file name extension. If no file name extension is specified, the ATTOL Test
Generator adds the extension .c.
The root of this file (name without the extension) is used for the name of the include file in
the test program (file name extension .ic), the name of the symbol table file (default file
name extension .tdc) and the name of the trace file generated during the execution of the test
(default file name extension .rio).
If it is not possible to create one of the.c, .ic or .tdc files, a fatal error is generated and the
preprocessor stops.

Example

attolpreproC gen.ptu code ...


After the execution of the ATTOL Test Generator, generated
code is included in "code.c" file.

Reference manual C Language

page 57

ATTOL UniTest

The ATTOL Test Generator

<target machine directory>


Description

This is an optional parameter that specifies the directory on the target machine where the
trace file that is generated by ATTOL runtime when running the test will be stored.

Default option

If this parameter is absent, the trace file will be created in the same directory as the test
program.

Characteristics

This parameter must be within quotes (") if it contains one or more dashes '-' or slashes '/'. It
must be in a syntax that can be recognized by the target machines operating system.
If the machine on which the trace file is created is a UNIX or Domain/OS system, the
directory name must end with a slash ('/').
If the machine on which the trace file is created is a DOS, the directory name must end with
a backslash ('\)'.
If the machine on which the trace file is created is a VMS machine, the full directory path
must be given.

Example

attolpreproC gen.ptu code "/root/repertoire/" ...


Trace file is created in directory /root/directory/ on the
target machine.
atprec gen.ptu code "repertoire\" ...
Trace file is created in directory\ on the target machine.
attolpreproC gen.ptu code "dsk$test:[test.attol]" ...
Trace file is created in directory dsk$test:[test.attol] on
the target machine.

Reference manual C Language

page 58

ATTOL UniTest

The ATTOL Test Generator

-learn
Description

The -learn option enables the ATTOL Test Generator to assimilate the expected values of
variables tested with :
ev => identifier.
When this option is used, the data option is obligatory.

Characteristics

This option enables the expected values of variables tested with ev => to be assimilated. In
this case, there is no actual test and the variable is considered not to have been tested (ev
==).

Default option

By default, the learn mode is not used. Data tested with ev => must have been assimilated at
a previous execution.

Example

attolpreproC gen.ptu code -learn -data=data.ptu

Reference manual C Language

page 59

ATTOL UniTest

The ATTOL Test Generator

-target=<target name>
Description

The -target option determines the type of machine on which the tests are to be run.

Characteristics

nom cible can take any value. This value will appear in the output report.
This option lets you define the execution target you wish to use.
The part of the test code that is specific to this target machine is processed at RUNTIME.

Default option

The default target machine is the machine on which ATTOL is executed.

Example

attolpreproC gen.ptu code -target=VME335

Reference manual C Language

page 60

ATTOL UniTest

The ATTOL Test Generator

-command=<command>
Description

The files generated by ATTOL have a standard header containing in particular the command
that starts the ATTOL Test Generator.
The -command option lets you send a different command line to the ATTOL Test Generator.

Characteristics

This command line is stored in the correspondence table file, and then displayed in the test
report in place of the command used to start the ATTOL Test Generator.
This means that you can show any other type of information in the test reports.

Default option

By default, the command used to start the ATTOL Test Generator is kept in the test reports.

Example

attolpreproC gen code -command="ATTOL SOFTWARE WORKSHOP"

The command in the test report header is then :


* Command line of the tool

Reference manual C Language

: ATTOL SOFTWARE WORKSHOP *

page 61

ATTOL UniTest

The ATTOL Test Generator

-compress
Description

The -compress option tells the ATTOL Test Generator to interpret the VAR and ARRAY
instructions like STR instructions.
Arrays and structured variables tested with the VAR instruction are globally tested, which
makes the output reports more concise.

Characteristics

Choosing this option speeds up the execution of the tests slightly as global checks are
performed on every array and structured variable.
This option has the opposite effect to the -expand option.

Default option

By default, VAR and ARRAY instructions are not interpreted like STR instructions.

Example

attolpreproC gen.ptu code -compress

Reference manual C Language

page 62

ATTOL UniTest

The ATTOL Test Generator

-const=<constants file>
Description

This option lets you specify the file where you wish to generate the constants declared by the
CONST instruction in the test plan.

Characteristics

You can use any file name extension. If no extension is specified, the ATTOL Test
Generator adds the extension .c.

Default option

By default, the constants file is not generated.

Example

attolpreproC gen.ptu code -const=const ...


File const.c is generated

Reference manual C Language

page 63

ATTOL UniTest

The ATTOL Test Generator

- std_define =<definitions file>


Description

This option provides ATTOL with a file of C definitions, which describes the characteristics
of the compiler used.
This file enables ATTOL to duplicate the behaviour of the C compiler when C code
incorporated in the test plan is being analyzed.

Characteristics

This option is only included if the -noanalyse option is not present.


If the file provided cannot be found, a fatal error is generated and the ATTOL Test
Generator stops.
As a general rule, one or more generic standard definitions files are provided with ATTOL
runtimes.

Dedault option

By default, characteristics of the compiler are not included.

Example

attolpreproC gen.ptu code -std_define=csun.def

Reference manual C Language

page 64

ATTOL UniTest

The ATTOL Test Generator

-define=<ident>[=<value>]{,<ident>[=<value>]}
Description

This option specifies a list of conditions to be applied when the ATTOL Test Generator
starts.
These conditions let you :

9
9

conditionally generate the test program,


define identifiers for the C preprocessor. In this case, this option is equivalent to option
-D of the compiler.

You can either just define the conditions, (the default value is 1), or else give them a value
(-define=<ident>=<value>).
Characteristics

The identifiers specified by the -define option apply conditions to the generation of any IF /
ELSE / END IF blocks in the test plan.
If the option is present together with one of the conditions specified in the IF instruction, the
IF / ELSE block (if ELSE is present) or the ELSE / END IF block (if ELSE is not present) is
analyzed and generated. The ELSE / END IF block is eliminated.
If the option is not present or if none of the conditions specified in the IF instruction are
satisfied, the ELSE / END IF block is analyzed and generated.
Moreover, all symbols defined by this option are equivalent to the following line in C
#define <identifier> [<value> ]

Default option

By default, the ELSE / END IF blocks are analyzed and generated.

Example

attolpreproC gen.ptu code -define=state1

Reference manual C Language

page 65

ATTOL UniTest

The ATTOL Test Generator

-data=<data file>
Description

The -data option tells the ATTOL Test Generator the name of the file containing the
constants that have been or are to be assimilated.
This option is obligatory when the -learn option is present or when test plan variables are
tested by ev =>.

Characteristics

If the learn option is used and the specified file does not exist, it is created. If it exists, it is
updated. If it cannot be created or updated, an error is generated.
If the -learn option is not used, the specified file is analyzed like a file included in the test
plan. If read access is denied, an error is generated.

Default option

By default, no file is analyzed.

Example

attolpreproC gen.ptu code -data=data.ptu

Reference manual C Language

page 66

ATTOL UniTest

The ATTOL Test Generator

-exfamily=<family name>{,<family name>}


Description

This option specifies a list of families of tests that are not to be performed.

Characteristics

The ATTOL Test Generator generates the source code related to all families except those
specified.
This option and the -family option are mutually exclusive.
The names of families are separated by a comma.
If you specify an unknown family in the test plan, the ATTOL Test Generator displays a
warning message at the end of execution.

Default option

By default, all families are selected.

Example

attolpreproC gen.ptu code -exfamily=robustness


attolpreproC gen code -exfamily=robustness,nominal

Reference manual C Language

page 67

ATTOL UniTest

The ATTOL Test Generator

-expand
Description

The -expand option tells the ATTOL Test Generator to interpret the ARRAY and STR
instructions like VAR instructions.
Arrays and structured variables tested with the ARRAY and STR instructions are detailed, i.e.
tested element by element and field by field, which makes the output reports more complete.

Characteristics

Choosing this option slows down the execution of the tests slightly as checks are performed
on every element in the arrays and every field in the structured variables.
This option has the opposite effect to the -compress option.

Default option

By default, ARRAY and STR instructions are not interpreted like VAR instructions.

Example

attolpreproC gen.ptu code -expand

Reference manual C Language

page 68

ATTOL UniTest

The ATTOL Test Generator

-exservice=<service name>{,<service name>}


Description

This option specifies a list of services that are not to be executed.

Characteristics

The ATTOL Test Generator generates the source code related to all services except those
specified.
This option and the -service option are mutually exclusive.
The names of services are separated by a comma.
If you specify an unknown service in the test plan, the ATTOL Test Generator displays a
warning message at the end of execution.

Default option

By default, all services are selected.

Example

attolpreproC gen.ptu code -exservice=add_str


All services except add_str are selected
attolpreproC gen code -exservice=add_str,diff_str
All services except add_str and diff_str are selected

Reference manual C Language

page 69

ATTOL UniTest

The ATTOL Test Generator

-extest=<test name>{,<test name>}


Description

This option specifies a list of tests that are not to be performed.

Characteristics

The ATTOL Test Generator generates the source code related to all tests except those
specified.
This option and the -test option are mutually exclusive.
The names of tests are separated by a comma.
If you specify an unknown test in the test plan, the ATTOL Test Generator displays a
warning message at the end of execution.

Default option

By default, all tests are selected.

Example

attolpreproC gen.ptu code -extest=5


All tests except those with name "5" are selected
attolpreproC gen.ptu code -extest=1,5
All tests except those with name "1" or "5" are selected

Reference manual C Language

page 70

ATTOL UniTest

The ATTOL Test Generator

-family=<family name>{,<family name>}


Description

This option specifies a list of families of tests that are to be performed.

Characteristics

The ATTOL Test Generator only generates the source code related to these families.
This option and the -exfamily option are mutually exclusive.
The names of families are separated by a comma.
If you specify an unknown family in the ATTOL language file, the ATTOL Test Generator
displays a warning message at the end of execution.

Default option

By default, all families are selected.

Example

attolpreproC gen.ptu code -family=robustness


attolpreproC gen code -family=robustness, nominal

Reference manual C Language

page 71

ATTOL UniTest

The ATTOL Test Generator

-fast | -nofast
Description
Characteristics

This option optimizes test plan analysis.


The -fast option tells the ATTOL Test Generator to analyze only those tests you wish to be
generated.
This option speeds up the operation of the ATTOL Test Generator considerably when the
option for selecting tests, services or families is used.
It is thus recommended to use this option as a general rule and especially when -service,
-exservice, -family, -exfamily, -test, and -extest options are used.

Default option

The -fast option is selected by default.


If you want a full test plan analysis, this option can be deselected using the -nofast option.

Example

attolpreproC gen.ptu code -fast

Reference manual C Language

page 72

ATTOL UniTest

The ATTOL Test Generator

-incl=<directory>{,<directory>}
Description

This option provides the ATTOL Test Generator with a list of directories in which the
include files are stored.

Characteristics

Using this option enables ATTOL to :

9
9
9

establish the list of include files in the tested source file.


execute the ATTOL include instructions,
execute the C include instructions (#include).

ATTOL include files are searched for in the current directory first and then in the directories
on the list.
C include system files (#include <file>) are searched for in the default directory, as follows :
x

/usr/include in UNIX,

none in DOS.

Or in the list of directories provided to ATTOL by the pragma attol incl_std.


C include non-system files (#include "file") are searched for in the current directory first,
then in the directories on the list, and then finally in the default directory, as follows :
x

/usr/include in UNIX,

none in DOS.

or in the list of directories provided to ATTOL by the pragma attol incl_std.


Default option

By default, the only search directory for ATTOL files is the current directory

Example

attolpreproC gen.ptu code -incl=..,attol/incl

Reference manual C Language

page 73

ATTOL UniTest

The ATTOL Test Generator

-language=<language>
Description

This option determines the language in which the tests will be generated.
Attol UniTest V3.1 compatibility
Using attolprepro and attolstart launch scripts

Characteristics

language takes the value C

Default option

The default generation language is C.

Example

attolprepro gen.ptu code -language=c ...

Reference manual C Language

page 74

ATTOL UniTest

The ATTOL Test Generator

-noanalyse
Description

This option disables the C analyzer.

Characteristics

By default, lines of C code are analyzed. You can use ATTOL versions, previous to version
3.0, via this option.

Default option

By default, lines of C code will be analyzed.

Example

attolpreproC gen.ptu code -noanalyse ...


C lines are not analyzed

Reference manual C Language

page 75

ATTOL UniTest

The ATTOL Test Generator

-noedit
Description

This option limits test code generation to the initialization of variables.


This makes it possible to generate tighter code for certain special purposes, e.g. debug.

Characteristics

If the -noedit option is used, a test report can not be obtained.

Default option

By default, code is generated normally.

Example

attolpreproC gen.ptu code -noedit

Reference manual C Language

page 76

ATTOL UniTest

The ATTOL Test Generator

-nopath
Description

This option allow to do not generate complete file pathnames on the open and close
execution trace file call, and on the runtime header file include directive.

Characteristics

This option could be used in case of embedded target

Default option

By default, complete pathnames are generated.

Example

attolpreproC gen.ptu code -nopath ...

Reference manual C Language

page 77

ATTOL UniTest

The ATTOL Test Generator

-nosimulation
Description

This option determines the conditional generation of C code, related to simulation, in the
source file generated by the ATTOL Test Generator.

Characteristics

Blocks delimited by the keywords SIMUL, ELSE_SIMUL, END SIMUL may be included in
the files written in ATTOL language.
SIMUL / END SIMUL blocks may also be included.
If the option is present, the code between the keywords ELSE_SIMUL and END SIMUL (if
ELSE_SIMULis present) is analyzed and generated. The blocks SIMUL / ELSE_SIMUL and
SIMUL / END SIMUL (if ELSE_SIMUL is not present) are eliminated.

Default option

By default, the code between the keywords SIMUL and ELSE_SIMUL is analyzed and
generated. The SIMUL, END SIMUL blocks are analyzed in their entirety.

Example

attolpreproC gen.ptu code -nosimulation

Reference manual C Language

page 78

ATTOL UniTest

The ATTOL Test Generator

-restriction=ANSI | KR
Description

The -restriction option lets you modify C code analysis in the test plan according to two
criteria :

Characteristics

The possible restrictions are as follows :


ANSI

enables C code to be analyzed according to the ANSI standard,

enables C code to be analyzed according to the KERNIGHAN & RITCHIE (version


KR
2) standard.
These two choices are incompatible with one another.
Default option

By default both syntaxes are accepted.

Example

attolpreproC gen.ptu code -restriction=ANSI

Reference manual C Language

page 79

ATTOL UniTest

The ATTOL Test Generator

-rename=<rename file>
Description

This option generate an ATTOL Coverage option file to allow the renaming of the
simulated functions.

Characteristics

This option must be used only in a ATTOL UniTest - ATTOL Coverage interface

Default option

By default, this file is not generated.

Example

attolpreproC gen.ptu code -rename=coverage.opt

Reference manual C Language

page 80

ATTOL UniTest

The ATTOL Test Generator

-service=<service name>{,< service name >}


Description

This option specifies a list of services to be executed.

Characteristics

The ATTOL Test Generator only generates the source code related to these services.
This option and the -exservice option are mutually exclusive.
The names of services are separated by a comma.
If you specify an unknown service in the ATTOL language file, the ATTOL Test Generator
displays a warning message at the end of execution.

Default option

By default, all services are selected.

Example

attolpreproC gen.ptu code -service=add_str


Only service add_str is selected
attolpreproC gen code -service=add_str,diff_str
Only services add_str and diff_str are selected

Reference manual C Language

page 81

ATTOL UniTest

The ATTOL Test Generator

-source=<source file>
Description

This option tells the ATTOL Test Generator the name of the tested source file.

Characteristics

Using this option enables ATTOL to :

9
9

maintain the source_file name in the table of correspondence file so that the ATTOL
Report Generator can display this name in the header of the results obtained file,
establish the list of include files in the tested source file.

Default option

By default, the list of include files in the tested source file and the source_file name are not
displayed in the Results Obtained file.

Example

attolpreproC gen.ptu code -source="source/mod.c"

The name of the tested source file may be specified with a relative or absolute directory in a syntax recognized by
the operating system, or, in UNIX, by an environment variable.

Reference manual C Language

page 82

ATTOL UniTest

The ATTOL Test Generator

-strver=<string>
Description

This option specifies a identifying string that tells the ATTOL Test Generator to search the
source file, (if it is indicated by the source option, for its version, using the following rule :
The file version is the first word enclosed in quotes (') or double quotes (") after the
identifying string on the same line, where such a word exists,
otherwise, it is the first word after the identifying string on the same line.

Characteristics

The version is only searched for if the source file is indicated by the -source option.
If this version is found in the file, it replaces the one specified in the HEADER instruction
(second parameter).
If the two versions differ, a warning message is displayed.

Default option

By default, the version included is the one given in the HEADER instruction.

Example

attolpreproC gen code -source="mod.c" -strver=@#

Reference manual C Language

page 83

ATTOL UniTest

The ATTOL Test Generator

-syscomp=DOS | OS2 | VMS | UNIX


Description

The -syscomp option defines the operating system on which the test program generated by
ATTOL will be compiled.

Characteristics

This option is used when the test program is compiled on a different machine to the one
executing ATTOL;. e.g. generating in UNIX and then compiling and executing in DOS.
-syscomp can take the following four values :
x

UNIX for Unix machines

DOS for PCs running on DOS or Windows

OS2 for PCs running on OS2

VMS for Vax/Vms and Alpha/OpenVms machines

Default option

The default value of -syscomp is the operating system of the machine on which ATTOL is
being executed.

Example

attolpreproC gen.ptu code -syscomp=DOS

Reference manual C Language

page 84

ATTOL UniTest

The ATTOL Test Generator

-symbtab=<symbol table file>


Description

The -symbtab option tells ATTOL to generate a file containing a description of all testable
data in the analyzed test plan.

Characteristics

If the symbol table file does not have an extension, ATTOL attaches the extension .smb.
If the file cannot be created, a fatal error is generated.
This symbol table file consists of three parts :

9
9
9

a list of global variables and their type,


a list of testable functions with their parameters specified by type,
a list of structured types described field by field.

Default option

By default, a symbol table file is not generated.

Example

attolpreproC gen.ptu code -symbtab=fictab

Reference manual C Language

page 85

ATTOL UniTest

The ATTOL Test Generator

-test=<test name >{,< test name >}


Description

This option specifies a list of tests to be executed.

Characteristics

The ATTOL Test Generator only generates the source code related to these tests.
This option and the -extest option are mutually exclusive.
The names of tests are separated by a comma.
If you specify an unknown test in the ATTOL language file, the ATTOL Test Generator
displays a warning message at the end of execution.

Default option

By default, all tests are selected.

Example

attolpreproC gen.ptu code -test=5


All tests with name "5" are selected
attolpreproC gen.ptu code -test=1,5
All tests with name "1" or "5" are selected

Reference manual C Language

page 86

ATTOL UniTest

The ATTOL Test Generator

-version=<version>
Description

This option defines the version of the C compiler used.

Characteristics

version may take any value. This value will appear in the output report.

Default option

By default, the compiler version does not appear in the output report.

Example

attolpreproC gen.ptu code -version=1.0 ...

Reference manual C Language

page 87

ATTOL UniTest

The ATTOL Test Generator

@<option file>
Description

This syntax allows to pass the options to the pre-processor via a file.

Characteristics

The option file name can be write in absolute or relative format.


If the option file is not found, a fatal error is generated and the preprocessor stops.
The format of the file must respect the following rules:

9
9
9

One or more options per line.


each option must respect the same syntax as the command line version, with the
character that usually introduces the option : '-' under UNIX and '/' under DOS,
passing options via a file is incompatible with other options passed by the command
line.

Default option

By default, no file is taken into account.

Example

attolpreproC @add.opt
with the add.opt file containing:
add.ptu Tadd.c
-service=add
-test=1,2,3
-family=nominal
this is equivalent to the following command:
attolpreproC add.ptu Tadd.c -service=add -test=1,2,3
-family=nominal

Reference manual C Language

page 88

ATTOL UniTest

The ATTOL Test Generator

4.2. FRENCH VERSION


As with the ATTOL language, when the French version of the ATTOLLAN environment variable is selected,
every command option has an equivalent version in French.
FRENCH

ENGLISH

FRENCH

ENGLISH

-apprentissage

-learn

-incl

-incl

-cible

-target

-noanalyse

-noanalyse

-commande

-command

-noedit

-noedit

-compress

-compress

-nosimulation

-nosimulation

-const

-const

-nopath

-nopath

-define_std

-std_define

-restriction

-restriction

-definir

-define

-renomme

-rename

-donnees

-data

-service

-service

-exfamille

-exfamily

-source

-source

-expend

-expand

-strver

-strver

-exservice

-exservice

-syscomp

-syscomp

-extest

-extest

-test

-test

-famille

-family

-tabsymb

-symbtab

-fast

-fast

-version

-version

Reference manual C Language

page 89

ATTOL UniTest

The ATTOL Test Generator

4.3. RETURN CODE


0

end of execution with no errors

end of execution with one (or more) warning message(s)

end of execution with one (or more) error(s)

end of execution due to fatal error

end of execution due to internal error

This code helps you decide on a course of action once the ATTOL Test Generator has finished execution of the
tests. For example, if the return code in the command file shows there have been incorrect tests, you can save
certain files in order to scrutinize them later.

Reference manual C Language

page 90

ATTOL UniTest

The ATTOL Report Generator

5. THE ATTOL REPORT GENERATOR


5.1. COMMAND
attolpostpro

<root of trace file>


<test report name>
[ -cio=<coverage result file> ]
[ -compare[=strict ] ]
[ -le=fr | fa | gb ]
[ -ra [ =test | error ] ]
[ -ro | -noro ]
[ -rod | -norod ]
[ -va=eval | noeval | combined ]
[ -portrait | ]
[ -landscape ]

or
attolpostpro

@<option file>

) The options can be in any order, they can be in upper or lower case.
) Under DOS, the options may begin with a slash '/', and attolpostpro is replaced by atpostpr.
) The option:
x

@<option file>

is the same as the preprocessor option with the same name.

) The environment variable ATUDIR should be defined as the directory containing the ATTOL binaries.

Reference manual C Language

page 91

ATTOL UniTest

The ATTOL Report Generator

<root of trace file>


Description

This mandatory parameter gives the root of the trace file (file name without extension),
which is generated when the test program is run.
This root is used by the ATTOL Report Generator for both the name of the trace file (default
extension .rio) and the name of the table of correspondence file (default extension .tdc)
which is generated by the ATTOL Test Generator

Characteristics

If this parameter is omitted, ATTOL does not run and it displays an error message at the
command-line.
If the trace file or the table of correspondence file do not exist or can not be read, ATTOL
generates a fatal error and stops.

Example

attolpostpro name_file ...

Reference manual C Language

page 92

ATTOL UniTest

The ATTOL Report Generator

<test report name>


Description

This mandatory parameter gives the name of the test report, to which the ATTOL Report
Generator will output the results of the execution of the tests.

Characteristics

If this parameter is omitted, ATTOL does not run and it displays an error message at the
command-line.
If this file can not be created, ATTOL generates a fatal error and stops.
If this file already exists, it is replaced by the new file generated.
If no extension for this file is specified, one is attached by the ATTOL Report Generator.
This extension is by default .ro or the extension specified in the environment variable
ATTOLRO if this is present.

) See also -ro | -noro et -rod | -norod options


Example

attolpostpro name_file file_ro ...

Reference manual C Language

page 93

ATTOL UniTest

The ATTOL Report Generator

-cio=<coverage result file>


Description

This option allow to insert coverage result in the report file.

Characteristics

This option must be used only with ATTOL Coverage.

Example

attolpostpro nom_fic fic_ro -cio=attol.cio

Reference manual C Language

page 94

ATTOL UniTest

The ATTOL Report Generator

-compare[=strict]

Description

This option allows the results from two test runs to be compared. The trace file generated
during the first run will have the suffix .rio (.ri on a DOS), and the one generated during the
second run will have the suffix .rio2 (.ri2 on a DOS).
When making a comparison, the ATTOL Report Generator generates the test report from :

9
9
9
Characteristics

the table of correspondence file (default extension .tdc),


the trace file generated at the first run (extension .rio or .ri on a DOS),
the trace file generated at the second run (.rio2 or .ri2 on a DOS).

The same root is used for the names of the three analyzed files.

) In the case of a comparison, a variable will only be deemed CORRECT if the two

VALUES OBTAINED are the same as the expected value, or within the validity interval
for this variable.

) With the compare=strict option , the two results must also have the same value.
Example

attolpostpro name_file file_ro -ra=error -compare


attolpostpro name_file file_ro -ra=error -compare=strict

Reference manual C Language

page 95

ATTOL UniTest

The ATTOL Report Generator

-le=fr | fa | gb
Description

This option specifies the language in which the output report should be generated by the
postprocessor.

Characteristics

Option : -le=fr
The output report is generated in unaccented French.
Option : -le=fa
The output report is generated in accented French.
Option : -le=gb
The output report is generated in English.

Default option

The default option is that specified by the ATTOLLAN environment variable , or gb if this
variable is not specified.

Example

attolpostpro name_file file_ro -le=fa

Reference manual C Language

page 96

ATTOL UniTest

The ATTOL Report Generator

-ra[=test | error]
Description

This option specifies the form of the output report generated by the postprocessor.

Characteristics

-ra (default option)


For a given test, selecting this option displays ALL test variables and marks any variables
that are incorrect.
-ra=test
For a given test, selecting this option provides two types of display :

9
9

if errors are detected in the test, ALL test variables are displayed, and incorrect
variables are marked,
if no errors are detected in the test, only general information on this test is displayed.

The advantage of this option is that it provides a comprehensive display of variables for an
incorrect test, which proves useful in a complex checkout phase.
-ra=error
For a given test, selecting this option provides two types of display :

9
9

if errors are detected in the test, ONLY the incorrect test variables are displayed,
if no errors are detected in the test, only general information on this test is displayed.

Default option

The default option is -ra, which gives you a complete report of all variables, for each test.

Example

attolpostpro name_file file_ro -ra=error

Reference manual C Language

page 97

ATTOL UniTest

The ATTOL Report Generator

-ro | -noro
Description

This option enables you to request (-ro) or suppress (-noro) the generation of the test report

Characteristics

See test report name above

Default option

The default option is -noro and the result file is not generated..

Example

attolpostpro name_file file_ro -ro

Reference manual C Language

page 98

ATTOL UniTest

The ATTOL Report Generator

-rod | -norod
Description

This option enables you to request (-rod) or suppress (-norod) the generation of an
unformatted test report. This file contains the same information as the test report in a internal
format. This file is used by ATTOL Viewer

Characteristics

The same file name is used for the test report (default extension .ro) and the unformatted test
report. Only the extension is different :
x

if the ATTOLRO environment variable exists, the extension is the extension specified
by this variable followed by the letter 'd',

otherwise, the default extension .rod is used.

) In DOS implementations, the third character is replaced by the letter 'd' if ATTOLRO has
more than 2 characters.

Default option

The default option is -rod and the file is generated.

Example

attolpostpro name_file file_ro -norod

Reference manual C Language

page 99

ATTOL UniTest

The ATTOL Report Generator

-va=eval | noeval | combined


Description

This option lets you specify the way in which initial and expected values of each variable are
displayed in the test report.

Characteristics

-va=eval
The ATTOL Report Generator displays in the test report the initial and expected value of
each variable evaluated during execution.
The effect of this option is only visible for variables whose initial or expected value
expression is not reducible in the test plan.
NB
For arrays and structures in which one of the members is an array, this evaluation is
not given for the initial values. For the expected values, it is only given for incorrect
elements.
-va=noeval
For each variable. the ATTOL Report Generator displays in the test report the initial and
expected values described in the test plan.
-va=combined
This option combines the 2 previous options, i.e. for each variable, the postprocessor
displays in the test report the initial and expected values described in the test plan as well as
the initial and expected values evaluated during execution if the values found differ.

Default option

The default option is -va=eval.

Example

attolpostpro name_file file_ro -va=eval

Reference manual C Language

page 100

ATTOL UniTest

The ATTOL Report Generator

-portrait
Description

This option enables you to generate the test report with 80 colons.

Characteristics

This option is incompatible with the option -landscape.

Default option

This is the default option only on DOS.

Example

attolpostpro name_file file_ro -portrait

Reference manual C Language

page 101

ATTOL UniTest

The ATTOL Report Generator

-landscape
Description

This option enables you to generate the test report with 132 colons.

Characteristics

This option is incompatible with the option -portrait.

Default option

This is the default option only on UNIX.

Example

attolpostpro name_file file_ro -landscape

Reference manual C Language

page 102

ATTOL UniTest

The ATTOL Report Generator

5.2. CHANGING DEFAULT EXTENSIONS


The default extensions previously described may be changed by the presence of environment variables when the
preprocessor or postprocessor is started.
The following table summarizes these environment variables and the extensions they modify.
Environment variable

File

Default extension

ATTOLPTU

test plan

.ptu

ATTOLTDC

table of correspondence file

.tdc

ATTOLLIS

list of errors

.lis

ATTOLRIO

trace file

.rio

ATTOLRO

test report

.ro

ATTOLROD

unformatted test report

.rod

ATTOLDEF

standard definitions file

.def

ATTOLSMB

symbol table file

.smb

) The rule whereby a

'2' is added to the extension of the trace file when the -compare option is used still
applies if the default extension is changed by the ATTOLRIO environment variable.

) Under DOS, if the new default extension has 3 characters, the last character is replaced by a

'2' in order to

obtain the extension of the second trace file.

Reference manual C Language

page 103

ATTOL UniTest

The ATTOL Report Generator

5.3. FRENCH VERSION


As with the ATTOL language, when the French version of the ATTOLLAN environment variable is selected,
every command option has an equivalent version in French :
FRENCH

ENGLISH

-cio

-cio

-compare=strict

-compare=strict

-le

-le

-ra

-ra

-ra=erreur

-ra=error

-ra=test

-ra=test

-ro

-ro

-rod

-rod

-va=combine

-va=combined

-va=eval

-va=eval

-va=noeval

-va=noeval

-portrait

-portrait

-landscape

-landscape

Reference manual C Language

page 104

ATTOL UniTest

The ATTOL Report Generator

5.4. RETURN CODE

end of execution with no errors

end of execution with one (or more) warning message(s)

end of execution with one (or more) error(s)

end of execution due to fatal error

end of execution due to internal error

If the postprocessor detects errors in tests, a warning message is generated.


If it detects a synchronisation error between the files .tdc and .rio, a fatal error is generated.

Reference manual C Language

page 105

ATTOL UniTest

The ATTOL test plan generator

6. THE ATTOL TEST PLAN GENERATOR


6.1. COMMAND
attolstartC

<tested file>
<generated test plan>
[ -std_define=<definitions file> ]
[ -define=<ident> [ =<value> ] { ,<ident> [ =<value> ] } ]
[ -incl=<directory> { ,<directory> } ]
[ -insert ]
[ -integrate=<integrated file> { ,<integrated file> } ]
[ -restriction=ANSI | KR ]
[ -simulate=<simulated file> { ,<simulated file> } ]
[ -symbtab=<symbol table file> ]
[ -use=<file used> { ,<file used> } ]

or
attolstartC

@<option file >

) The options can be in any order, they may be in upper or lower case.
) Under DOS, the options may begin with a slash '/', and attolstartC is replaced by atstac .
) The options :
x

-std_define=<definitions file>

-define=<ident>[=<value>]{,<ident>[=<value>]}

-incl=<directory>{,<directory>}

-restriction=ANSI | KR

-symbtab=<symbol table file>

@<option file>

are identical to the ATTOL Test Generator options with the same name.

) The environment variable ATUDIR should be defined as the directory containing the ATTOL binaries.
Reference manual C Language

page 106

ATTOL UniTest

The ATTOL test plan generator

<tested file>
Description

This mandatory parameter is the name of the C source file to be tested.

Characteristics

It may be specified relatively, in relation to the current directory, or in absolute.


If this file does not have a file name extension, the extension ".c" is attached by default.
If this file does not exist or if read access is denied, the test plan generator generates a fatal
error and stops.

Generation

The test plan generator analyzes the source file to be tested in order to extract global
variables and testable functions.
Each global variable is automatically declared extern, if this has not already been done at the
beginning of the test plan. Then an environment is created to contain all these variables with
default tests. This environment has the name of the file (without the extension).
Then, for each testable function, the generator creates a SERVICE which contains :

the C declaration of the variables to use as parameters of the function.


NB : parameters passed by reference are declared according to the following rule :
x

char* <param> causes the generation of char <param>[200]

<type>* <param> causes the generation of <type> <param> passing-by-reference

It is sometimes necessary to modify this declaration if it is unsuitable for the tested


function :
<type>* <param> can entail the following declarations :

<type>* <param> passing-by-value

<type> <param> passing-by-reference

<type> <param>[10] passing-by-reference.

an environment containing the variables used as parameters,

Reference manual C Language

page 107

ATTOL UniTest

The ATTOL test plan generator

Example

a test containing :
x

a nominal FAMILY instructions,

an ELEMENT block,

a call to the function under test.

attolstartC histo.c ...

Reference manual C Language

page 108

ATTOL UniTest

The ATTOL test plan generator

<generated test plan>


Description

This mandatory parameter is the name of the test plan that is generated.

Characteristics

If this name does not have an extension, the test plan generator automatically attaches the
following extension :

9
9

the extension specified by the ATTOLPTU environment variable (or logical name) if this
variable exists,
the default extension .ptu.

This name may be specified relatively, in relation to the current directory, or in absolute.
If it is impossible to create the test plan, the test plan generator generates a fatal error and
stops.
If the test plan already exists, the previous version is saved under the name <generated test
plan>_bck and a warning message is generated.
Example

attolstartC histo.c histo.ptu

Reference manual C Language

page 109

ATTOL UniTest

The ATTOL test plan generator

-insert
Description

This option tells the test plan generator that the source file to be tested will be inserted in the
test plan via an #include directive.

Characteristics

This option ensures that all the internal functions and variables (declared static) of the file to
be tested are visible to the test plan.

Default option

If this option is not present, the file to be tested is not included in the test plan.

Generation

When this option is used, the generator includes the following directive before the BEGIN
instruction and after the includes related to the -use option :
##include <tested file>.
In this case, the global variables and functions of this file are not declared extern.

Example

attolstartC histo.c histo.ptu -insert

Reference manual C Language

page 110

ATTOL UniTest

The ATTOL test plan generator

-integrate=<integrated file>{,<integrated file>}


Description

This option gives the test plan generator a list of C source files whose objects will be
integrated into the test program after linking.

Characteristics

The elements of the list are separated by commas (',').


They may be specified relatively, in relation to the current directory, or in absolute.

Default option

If this option is not present, the symbols and types that can be exported from the tested file
are declared again in the test plan.

Generation

The test plan generator analyzes the integrated files to extract the global variables that are
visible from outside.
Each global variable is automatically declared extern, if this has not already been done at the
beginning of the test plan. Then, for each integrated file, an environment is created to contain
all these variables with default tests. This environment has the name of the integrated file
(without the extension).

Example

attolstartC histo.c histo.ptu -integrate=tree.c

Reference manual C Language

page 111

ATTOL UniTest

The ATTOL test plan generator

-simulate=<simulated file>{,<simulated file>}


Description

This option gives the test plan generator a list of C source files to simulate upon execution of
the test.

Characteristics

The elements of the list are separated by commas (',').


They may be specified relatively, in relation to the current directory, or in absolute.

Default option

If this option is not present, no simulation instructions will be generated.

Generation

The generator analyzes the files to be simulated in order to extract the global variables and
the functions that are visible from outside.
For each file, ATTOL generates a DEFINE STUB / END DEFINE block which is named
after the file and which holds the simulation of the files external global variables and
functions.

Example

attolstartC histo.c histo.ptu -simulate=tree.c

Reference manual C Language

page 112

ATTOL UniTest

The ATTOL test plan generator

-use=<file used>{,<file used>}


Description

This option gives the test plan generator a list of C header files to include in the test plan
before the BEGIN instruction.

Characteristics

The elements of the list are separated by commas (',').


The filenames may be specified by an absolute directory or a directory relative to the current
directory.
This option enables you to avoid redeclaring variables or functions that have already been
declared in a C header file of the tested application.

Default option

If this option is not present, no files are included in the test plan.

Generation

When this option is used, the generator includes the following directive before the BEGIN
instruction for each file on the list :
##include <file>
Then, for each file included, an environment is created to contain all the variables with a
default test. This environment has the name of the included file (without the extension).

Example

attolstartC histo.c histo.ptu -use=histo.h

Reference manual C Language

page 113

ATTOL UniTest

The ATTOL test plan generator

6.2. FRENCH VERSION


As with the ATTOL language, when the ATTOLLAN environment variable is set to the French version, every
command option has an equivalent version in French :
FRENCH

ENGLISH

-define_std

-std_define

-definir

-define

-incl

-incl

-insere

-insert

-integre

-integrate

-restriction

-restriction

-simule

-simulate

-tabsymb

-symbtab

-utilise

-use

Reference manual C Language

page 114

ATTOL UniTest

The ATTOL test plan generator

6.3. RETURN CODE

end of execution with no errors

end of execution with one (or more) warning message(s)

end of execution with one (or more) error(s)

end of execution due to fatal error

end of execution due to internal error

Reference manual C Language

page 115

ATTOL UniTest

ATTOL runtime

7. ATTOL RUNTIME
ATTOL runtimes are provided in the form of source code so that they can be easily customized for different test
environments.
The customizable part of the standard runtime is as follows :
/*====================================================*/
/*
Start of the customizable part
*/
/*====================================================*/
/* Flag for ANSI compilation */
/* Must be consistent with the one defined in the include file */
/* Cement out the line for K&R compilation */
#define ANSI_C
#ifdef ANSI_C
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <sys/times.h>
/*
Time format :
D0 : milliseconds,
D1 : microseconds,
D2 : cycles,
D3 : clock ticks
*/
#define time_format "D0 "
#define APPEL_MUET "appel du muet"
#ifndef user_open
#define user_open 0
#else
extern void user_open (
#ifdef ANSI_C
void
#endif
);

Reference manual C Language

page 116

ATTOL UniTest

ATTOL runtime

#endif
#ifndef user_close
#define user_close 0
#else
extern void user_close (
#ifdef ANSI_C
void
#endif
);
#endif
/*
priv_clock function shall return -1 if time measurement is not
available on target.
*/
#ifdef ANSI_C
static int priv_clock(void)
#else
static int priv_clock()
#endif
{
int time = 0;
struct tms buffer;
times(&buffer);
time = (int)buffer.tms_utime;
/* conversion ( 1/60 s --> ms ) */
time = ( time * 100 ) / 6 ;
return (time);
}
typedef FILE * priv_file;
static priv_file resultatrio = (priv_file)NULL;
#ifdef ANSI_C
static priv_file priv_open(char * nom)
#else
static priv_file priv_open(nom)
char * nom;
#endif
{
return(fopen(nom, "w"));
}
#ifdef ANSI_C
void priv_close(priv_file fic)
#else
void priv_close(fic)
priv_file fic;
#endif
{
fclose(fic);
}
#ifdef ANSI_C

Reference manual C Language

page 117

ATTOL UniTest

ATTOL runtime

void priv_writeln(priv_file fic, char * str)


#else
void priv_writeln(fic, str)
priv_file fic;
char * str;
#endif
{
fprintf(fic, "%s\n", str);
}
#ifdef ANSI_C
void priv_exit(void)
#else
void priv_exit()
#endif
{
exit(0);
}
/*
priv_date function shall return an empty string if time
measurement is not available on target.
*/
#ifdef ANSI_C
void priv_date(char * res)
#else
void priv_date(res)
char * res;
#endif
{
char * x;
long int temps;
time(&temps);
x = (char *)ctime(&temps);
while (((*x) != '\0') && ((*x) != '\n')) (*res++) = (*x++);
*res = '\0';
}
/*====================================================*/
/*
End of the customizable part
*/
/*====================================================*/

The procedures and constants can be changed in the following way :

time_format describes the unit of time available on the target machine :


x

"D0 " for time expressed in milliseconds,

"D1 " for time expressed in microseconds,

"D2 " for time expressed in number of cycles,

"D3 " for time expressed in clock ticks.

Reference manual C Language

page 118

ATTOL UniTest

9
9

ATTOL runtime

The optional procedures user_open and user_close allow additional user actions that are specific to opening
and closing the trace file. They are called before opening and after closing the communication link with the
host machine.
The priv_clock procedure calculates the duration of each test run. It is called before and after the test
procedure call.
If a means of measuring time is not available on the target machine, this procedure returns the value -1.
On target machines possessing a very precise means of measuring time, the procedure call generates an
offset of constant time. It can be estimated by a test without using a test procedure. The value measured will
be equal to this offset.

9
9
9
9
9

priv_file is a pointer to the input/output descriptions. The addressed type can be customized.
The priv_open and priv_close procedures manage the opening and closing of the communication link
between the target machine and the host machine. priv_open returns a 0 if everything was OK.
The priv_writeln procedure writes a character string followed by '\n' to the communication link with the
host machine.
The priv_exit procedure is the last procedure called.
The priv_date procedure returns the date and time of the execution of the test program in the form of a
character string.
If this information is not available on the target machine, the procedure must return an empty string (""). In
this case, the date and time of the generation of the test program are displayed in the test report.

) In the same file, the TAILLE_CH constant must be increased if char strings used in the test plan are longer
than 1000.

Reference manual C Language

page 119

ATTOL UniTest

Glossary

8. GLOSSARY
ATTOL TEST PLAN GENERATOR
The ATTOL test plan Generator is one of the components of ATTOL.
It automatically generates a test plan from a source file in the native language.
ATTOL LANGUAGE
The ATTOL LANGUAGE is a test description language. It enables you to structure FAMILIES, SERVICE
BLOCKS, TEST BLOCKS and LMENT BLOCKS, and describe the state of variables before and after each
test.
ATTOL REPORT GENERATOR
The ATTOL REPORT GENERATOR is one of the components of ATTOL. It compares the TRACE FILE
with the TABLE OF CORRESPONDENCE FILE and generates a TEST REPORT which contains a diagnostic for
each test.
ATTOL RUNTIME
ATTOL RUNTIME is a component of ATTOL. It is a library of C functions which are linked to the test
program and which enable the TRACE FILE to be generated when the tests are executed.
ATTOL TEST GENERATOR
The ATTOL TEST GENERATOR is a component of ATTOL. It analyzes a TEST PLAN written in ATTOL
language, and generates a test program in C and a TABLE OF CORRESPONDENCE FILE.
ELEMENT BLOCK
Concept related to the ATTOL language. An ELEMENT BLOCK delimits a test phase.
ENVIRONMENT BLOCK
Concept related to the ATTOL language. An ENVIRONMENT BLOCK delimits a set of default tests.
FAMILY
A FAMILY of tests qualifies tests with the same purpose on different services. For example : a family of
robustness tests or a family of nominal tests.

Reference manual C Language

page 120

ATTOL UniTest

ATTOL error messages

SERVICE
A SERVICE is a function or a procedure. An external SERVICE is visible from outside the module tested.
An internal SERVICE is not visible from outside the module tested (static procedures and functions in C).
a SERVICE belongs to the code to be tested, and should not be confused with the ATTOL concept of a
SERVICE BLOCK.

SERVICE BLOCK
Concept related to the ATTOL language. A SERVICE BLOCK contains all tests related to a given service. It
may contain one or more TEST BLOCKS.
TABLE OF CORRESPONDENCE FILE
This file contains the list of the expected variable states at the end of the test runs. It is generated by the
ATTOL PRPROCESSOR and is identified by the extension ".tdc".
TEST BLOCK
Concept related to the ATTOL language. A TEST BLOCK delimits a test case. It may contain one or more
LMENT BLOCKS.

TRACE FILE
This file is generated by ATTOL RUNTIME and contains the results obtained from execution of the tests.
It is provided on input to the ATTOL REPORT GENERATOR and is identified by extensions ".rio" or
".rio2" (".ri2" in DOS).
TEST REPORT
This file contains the final diagnostic for tests executed with ATTOL.
This file is generated by the ATTOL REPORT GENERATOR and is identified by the extension ".ro".

9. ATTOL ERROR MESSAGES


ATTOL error messages are displayed on standard error output during the analysis phases of the test plan
generator, the preprocessor and the postprocessor. They can also be found in a errors list (default extension .lis),
which is generated in the analysis phase of the preprocessor.
They are in the following form :
%ATTOL-<type>-<code>, [<file>/ligne <number>] <message>
where :

Reference manual C Language

page 121

ATTOL UniTest

ATTOL error messages

<type> is a letter representing the type of error message generated,

<code> is a 9 letter word giving an error code,

<file> is the name of the file being analyzed, ,

<number> is the file line number in which the error has been detected,

<message> is a brief explanation of the error.

The four types of error messages generated by ATTOL are as follows :

fatal errors are mainly related to problems detected by the operating system (impossible to open file, disk
full etc.),
Ongoing analysis is stopped and no files are created.
A message with the prefix ATTOL-F- or ATTOL-S- is generated.

user errors are errors detected in analyzed files. There are a variety of causes (syntax error etc).
Ongoing analysis is not stopped but no files, apart from the ".lis" file, are created.
A message with the prefix ATTOL-E- is generated.

warning messages are recoverable errors detected during file analysis.


File(s) are created as a result of analysis, along with the ".lis" file, but ATTOL does not guarantee the results.
A message with the prefix ATTOL-W-.is generated.

information messages inform you about the progress of ongoing analysis. This information often concerns
recovery of analysis after a warning message.
These messages have the prefix ATTOL-I-.

9.1. INFORMATION MESSAGES


ATTOL-I-CMPSTRINCSTU

The option COMPARE=STRICT doesn't concern the test statement


STUB

If the results of a STUB statement are right, they arent be recorded in the results file and the
COMPARE=STRICT option wont detect some difference between two execution.

Reference manual C Language

page 122

ATTOL UniTest
ATTOL-I-CMPSTRINCTAB

ATTOL error messages


The option COMPARE=STRICT doesn't concern the test statement
TAB

If the results of a TAB statement are right, they arent be recorded in the results file and the
"COMPARE=STRICT" option wont detect some difference between two execution
Use VAR.
ATTOL-I-CONNECTINT

Connection with the license server interrupted - trying to reconnect

ATTOL makes 3 attempts to reconnect before finally giving up.


ATTOL-I-DEBEXECUT

Starting <tool> ATTOL <version>

ATTOL advises you that the analysis phase of the ATTOL Test Generator, postprocessor or generator is
starting.
ATTOL-I-EXPERRONE

Expression <expression> incorrect

The preprocessor gives the incorrect expression detected during analysis of the syntax or semantics of a
VAR, ARRAY or STR. instruction.
ATTOL-I-FICRENAME

The file 'file_generated' has been renamed as 'file_generated' _bck :


<file>

The ATTOL test plan generator advises that it has just saved a previous test plan in order to generate a
new one.
ATTOL-I-FINEXECUT

End of execution of ATTOL

ATTOL informs you that the analysis phase of the preprocessor, the postprocessor or the generator has
finished.
ATTOL-I-JETONDISP

Token available ...

ATTOL informs you that a token has become available.


ATTOL-I-LANSWITCH

Incorrect value for ATTOLLAN environment variable:

Change the ATTOLAN value to delete this message.


ATTOL-I-LIGNERRON

Error in line : <line>

The preprocessor specifies the incorrect line.


ATTOL-I-MAL_PLACE

The keyword <keyword> is in the wrong position, ignored

The preprocessor informs you that a keyword will not be included because it is in the wrong position.
ATTOL-I-MATCHLINE

Corresponds to line <number>

Reference manual C Language

page 123

ATTOL UniTest

ATTOL error messages

In the case of an error in an #else or #elif directive, ATTOL indicates the line of the #if, #ifdef or #ifndef
directive that corresponds to the incorrect directive.
ATTOL-I-MAXUSERSR

No token available; please wait ... !

ATTOL informs you that no tokens are available at the moment. As soon as a token is free, the execution
will be able to start.
ATTOL-I-NOGENERAT

Test plan <file> has not been generated

The ATTOL test plan generator advises that it did not generate the test plan because an error occurred
during generation.
ATTOL-I-OPERENAME

Service renamed as <new name>

The preprocessor informs you that a service has been renamed as a result of duplicated names for the
tested service.
ATTOL-I-OPERXVIDE

The service <service> does not contain any tests to be executed

The preprocessor informs you that a service does not contain a VAR, ARRAY or STR.
ATTOL-I-POSIT_ERR

Error <position of the error>

The preprocessor gives the position of a detected error.


ATTOL-I-RECONNEOK

Connection reestablished with the license server

It has been possible to reestablish connection with the license server.

Reference manual C Language

page 124

ATTOL UniTest
ATTOL-I-USAGE_CMD

ATTOL error messages


<usage>

The ATTOL Test Generator, postprocessor or generator command is incorrect. This information message
gives a reminder of its usage.
Verify the command.

9.2. WARNING MESSAGES


ATTOL-W-AFFECTATI

Assignments are not allowed in ATTOL expressions

Assignment operators (=, +=, -= ...) are not allowed in initial and expected value expressions in the test
plan.
ATTOL-W-ARGPUNCTU

The <directive> argument begins with a punctuation mark

An #ifdef or #ifndef directive argument is not an identifier.


Verify the directive.
ATTOL-W-ARGTOMACR

Macro <macro> does not take arguments

ATTOL has detected a C macro which is not being used in accordance with its definition.
ATTOL-W-ARRINDENV

Invalid array index with environment overloaded

The preprocessor doesnt recognizean aray index, the environment overloaded is impossible.
ATTOL-W-BADPARDEF

The list of parameters of the `#define' directive is incorrect: <list>

ATTOL has detected a syntax error in the definition of a macro.


Verify the definition.
ATTOL-W-BLENVVIDE

ENVIRONMENT block <environment> empty

The preprocessor has just analyzed an ENVIRONMENT block which does not contain a VAR, ARRAY
or STR.
ATTOL-W-BLOC_ABST

The block <block> is absent

ATTOL detects the absence of a TEST, ELEMENT or FAMILY block.


ATTOL-W-CARDOUFLO

There are two identical (f or l) characters in the floating-point constant


<constant>

A literal floating-point constant is using the f or l character twice, indicating that it is a simple or double
floating-point.
ATTOL-W-CARDOUINT

There are two identical (u or l) characters in the integer constant


<constant>

Reference manual C Language

page 125

ATTOL UniTest

ATTOL error messages

A literal integer constant is using the u or l character twice, indicating that it is an unsigned or long
integer.
ATTOL-W-CARNONNUM

Non-numerical character in a non-hexadecimal number <number>

ATTOL has detected an octal or decimal numerical number (beginning with a number) which contains a
character which is not a number.
Verify this number.
ATTOL-W-CARNUMERI

The numerical constant contains numbers which are greater than the
base: <constant>

ATTOL has detected an octal or hexadecimal number which contains a character greater than 7 (octal) or
f (hexadecimal).
Verify this number.
ATTOL-W-CARTRIINT

There are three 'l' characters in the integer constant <constant>

ATTOL has detected an integer constant with three 'l's, when only one or two are allowed to describe long
integers.
ATTOL-W-CHAINUTIL

Superfluous character <character> in the program

ATTOL has detected a superfluous '\' character in a line of C code.


Verify this line.
ATTOL-W-CHAMPINCO

Field <field> is unknown

In a C expression, ATTOL has detected some structure fields selected (by '.' or by '->'), which have not
formerly been declared.
Verify the field and the structure declaration.
ATTOL-W-CONSTRUCT

Construction not allowed

A C type construction does not respect C syntax (e.g.: unsigned float).


Verify the declaration.
ATTOL-W-CSTBASE16

The constant should not be given on a base of 16

ATTOL has found a hexadecimal constant (beginning with 0x or ending in H) containing a full stop (.).
ATTOL-W-CSTCARVID

The character constant is empty

ATTOL has found the following character constant: ''. This lexical element is not allowed in C.

Reference manual C Language

page 126

ATTOL UniTest
ATTOL-W-CSTINCORR

ATTOL error messages


Constant <constant> incorrect

ATTOL has found two non-consecutive '.'s in a numerical constant.


Verify this constant.
ATTOL-W-CSTNUMERI

Numerical constant with no number

ATTOL has found a numerical constant without a number (beginning for example with 0x).
Verify this constant.
ATTOL-W-DIESELINE

Incorrect `#line' line: <line>

ATTOL has found that the syntax of the #line directive is incorrect.
Verify it.
ATTOL-W-DIVISZERO

Divide-by-zero in <expression>

ATTOL has detected a divide-by-zero in a C expression.


Verify it.
ATTOL-W-ELIFAELSE

<directive> after an else

The C preprocessor included in ATTOL has found an else or elif directive after an else directive.
Verify the interleaving of compilation directives.
ATTOL-W-ELMT_VIDE

Element not containing any variables to be edited

The preprocessor has just analyzed an ELEMENT block which does not contain a VAR, ARRAY or STR.
ATTOL-W-EMPTYEXPR

The expression <directive> is empty

The ATTOL C preprocessor is analyzing an if directive with no expression.


Verify this directive.
ATTOL-W-ENTETEERR

HEADER must be the first keyword

Verify the test program.


ATTOL-W-ENTOUTRAN

Integer constant <constant> too big

ATTOL has found an integer constant which exceeds the limits defined for the constant. By default,
ATTOL expects integers to be coded in 8 bits (char), 16 bits (short) or 32 bits (int and long). These
values can be modified by the ATTOL sizeof pragma.
Verify the constant and, where appropriate, the value of the ATTOL sizeof pragmas.

Reference manual C Language

page 127

ATTOL UniTest
ATTOL-W-ERDEFINED

ATTOL error messages


The directive 'defined' must be followed by an identifier or (identifier)

ATTOL has detected, in a compilation directive, the keyword defined not followed by an identifier, as per
the norm.
Verify the directive.
ATTOL-W-ERINCLUDE

A file name must follow an #include directive

An #include compilation directive is not followed by a file name.


Verify the directive.
ATTOL-W-ERRAFTEND

Error at the end of expression <expression>

ATTOL has detected a syntax error at the end of the expression in the error message.
Verify the end of the expression and the preceding words, since a syntax error can show up after several
words.
ATTOL-W-ERREXPOSA

The exponent of the floating-point constant has no number

ATTOL is analyzing a floating-point constant with an exponent (character e or E) which is not followed
by a number.
Verify the floating-point constant.
ATTOL-W-ERRINLINE

Error in line <line>

ATTOL tells you in which line a previous error has been detected.
ATTOL-W-EXPERRONE

Expression <expression> is incorrect

ATTOL has found an error in the designated expression.


ATTOL-W-FAMI_INEX

The selected family <family> does not exist in the program

One of the selected families in the command does not exist in the test plan.
Verify the command.
ATTOL-W-FICINCONN

Preprocessor error: no file

ATTOL indicates an error in the C preprocessor which is working on an unknown file.


ATTOL-W-FORMENTET

Field version(s) absent in the keyword HEADER <HEADER


parameters>

The last 2 parameters of the keyword HEADER do not conform to the rules of syntax.
Verify the test program.

Reference manual C Language

page 128

ATTOL UniTest
ATTOL-W-FUNCT_DEF

ATTOL error messages


The definition of function <function> is incorrect

ATTOL has detected that the description of a function to be simulated within a DEFINE STUB / END
DEFINE block is inconsistent
Verify the definition.
ATTOL-W-IDENREDEF

Warning: <identifier> redefined

The C analyzer has found an identifier, (type or variable), that has already been defined.
ATTOL-W-IDENTINCO

The identifier <identifier> is unknown

A VAR, ARRAY or STR instruction contains an identifier that is unknown to the C analyzer.
Verify the identifier.
ATTOL-W-IDENTINCO
ATTOL-W-IDENTIINC
ATTOL-W-IMPOUVFIC

Impossible to open file <file name>

The preprocessor can not find an include file.


ATTOL-W-INC_NVIDE

INCLUDE with empty name in file: <file name>

The preprocessor has detected an include instruction in the native language which does not have a file
name.
Verify the named file.
ATTOL-W-INCLIGRIO

Line <number> of RIO file inconsistent

The postprocessor has detected a discrepancy in the .rio file.


Verify the test program.
ATTOL-W-INCLIGTDC

Line <line> of TDC file inconsistent

The postprocessor has detected a discrepancy in the TDC file.


Verify the test program.
ATTOL-W-INCLTYPER

<directory> is not a directory

<directory> given in the directory list of the -incl option has not been recognized as a directory.
Verify the preprocessor command.
ATTOL-W-INCTDCRIO

Line <line> inconsistent with the TDC file

The postprocessor has detected a discrepancy between the .rio file and the .tdc file.
Verify the test program.

Reference manual C Language

page 129

ATTOL UniTest
ATTOL-W-INCL_INVA

ATTOL error messages


Directory <directory> is invalid

<directory> given in the directory list of the -incl option does not exist.
Verify the preprocessor command.
ATTOL-W-INDICEINC

The index (indices) in expression <expression> exceed the limits of the


array

The current VAR, ARRAY or STR instruction relates to an array of which a dimension given by [inf..sup]
exceeds the normal interval used.
Verify the instruction and the C declaration of its constituent variable and types.
ATTOL-W-INDICEVAL

Array element <row> has been initialized several times

In a list initializing or testing an array, the value of a row is provided several times (by "row => value").
Verify the list.
ATTOL-W-INDTABDIF

Indices of the same array are used differently: <array>

In an "element" block, after inclusion of the required environments, the preprocessor has detected an array
variable that has been tested at least twice and whose bounds are used differently.
ATTOL-W-INVALIEND

End of line incorrect after the <directive> argument

The ATTOL C preprocessor is analyzing an ifdef or ifndef directive which is not followed by an identifier.
Verify the directive.
ATTOL-W-INVAMACRO

Macro name incorrect: <macro>

The macro name given is not an identifier.


Verify it.
ATTOL-W-INVAOMISE

INIT and EV values must be omitted simultaneously

In the current STR instruction, one of the fields has either its initial or its expected value omitted, but not
both.
ATTOL-W-INVCHASTR

Selection of a field from a variable which is neither a structure nor a


union.

In a VAR, ARRAY or STR instruction, the tested variable contains a field selection (by '.' or '->') when
neither a structure nor a union precedes the selection.
Verify the tested variable and the declarations of the variable and its constituent fields.

Reference manual C Language

page 130

ATTOL UniTest
ATTOL-W-INVCSTCAR

ATTOL error messages


Character constant incorrect: <character>

ATTOL has detected an incorrect character constant in the current VAR, ARRAY or STR instruction.
Verify it.
ATTOL-W-INVDEFINE

Impossible to define the directive `defined' as a macro

'defined' is a keyword for the C preprocessor. It is therefore not possible to define a macro with this name.
ATTOL-W-INVFINNUM

End of number incorrect: <number>

In the current VAR, ARRAY or STR instruction, ATTOL has detected an integer or floating-point
constant which ends incorrectly.
Verify it.
ATTOL-W-LANDPORT

The PORTRAIT and LANDSCAPE options are incompatible

Choose one or the other.


ATTOL-W-LANGANDEF

ATTOL language not defined

The ATTOLLAN environment variable has not been defined.


Its default value is "FR".
ATTOL-W-LANGATINC

ATTOL language unknown: <value>

The ATTOLLAN environment variable has been defined with an unknown value.
The recognized values are "FR", "FA" and "GB".
Its default value is "FR".
ATTOL-W-LIGNTRAIT

Include line not processed :<line>

The include file has not been found in the current directory.
ATTOL-W-LONLONINT

ANSI C does not allow integer constants of type double long

The -restriction=ansi option is selected and ATTOL has found a declaration of type double long, which is
not normally allowed in ANSI C.
ATTOL-W-MAL_PLACE

The keyword <keyword> is in the wrong position, not included

The preprocessor has detected a keyword which will not be included because it is in the wrong position.
ATTOL-W-MALFOROPT

Incorrect option: <option>

The ATTOL C preprocessor has found an error in the syntax of the -define option of the preprocessor or
test plan generator.
Verify the command.
ATTOL-W-MISMNUVER

Different source versions found by STRVER and by HEADER

Reference manual C Language

page 131

ATTOL UniTest

ATTOL error messages

The source program version found by STRVER is different to the third parameter of the HEADER
instruction.
ATTOL-W-MODIFDEFI

The type modifier <modifier> is already defined

The ATTOL type_modifier pragma being analyzed defines a type modifier that has already been defined.
Verify it.
ATTOL-W-MOTCLEABS

<keyword> keyword absent

The rules of syntax of the test program are not respected..


ATTOL-W-MOTCLEOBS

Obsolete <keyword>keyword

The preprocessor has detected an obsolete keyword.


ATTOL-W-MOTDOUBLE

<keyword> keyword appears several times

The same keyword appears several times in the test program.


ATTOL-W-MULCARCST

The character constant <constant> has several characters

ATTOL has detected a lexical error in a character constant (delimited by '''), in which several digits have
been found.
Verify the constant.
ATTOL-W-NBARGMACR

Incorrect number of arguments for macro <macro>

The ATTOL C preprocessor has found a macro which has a different number of parameters to the number
of arguments declared in the macros definition.
Verify the macro and its definition.
ATTOL-W-NOANSISTD

The text after <directive> does not conform to ANSI standards

The ATTOL C preprocessor is analyzing a directive with a parameter that does not conform to ANSI C
syntax.
Verify the directive.
ATTOL-W-NOARGUMEN

There is no argument after <directive>

The ATTOL C preprocessor is analyzing a test directive (if, ifdef, etc.) that does not have an argument,
which is obligatory.
Verify the directive.

Reference manual C Language

page 132

ATTOL UniTest
ATTOL-W-NOARTOMAC

ATTOL error messages


No parameter has been passed to macro <macro>

The ATTOL C preprocessor has found a macro without any parameters, which contradicts its definition.
Verify the macro and its definition.
ATTOL-W-NOCONDITI

<directive> directive is not part of a condition

The ATTOL C preprocessor has found an else or elif directive with no previous test directive (if, ifdef,
etc.).
Verify the position of this directive.
ATTOL-W-NOFITBYTE

The character, octal or hexadecimal character does not fit into an


octet.

ATTOL is analyzing a VAR, ARRAY or STR instruction in which a variable of type character is
initialized or tested with a value which exceeds the size of the variable.
Verify the value or the size of the variable, where appropriate redefine with an ATTOL sizeof pragma.
ATTOL-W-NOHEXDIGI

x is used without being followed by hexadecimal numbers

ATTOL has found a hexadecimal constant beginning with 0x, but not containing any hexadecimal
number.
Verify the constant.
ATTOL-W-NOMFAMVID

The family name is empty

The test family being analyzed has not been specified after the FAMILY keyword.
ATTOL-W-NOMOPEDBL

<service> service appears several times in the program

The same service appears several times in the test program.


The last one will be renamed.
ATTOL-W-NOMPARINC

The parameter name is unknown

In the DEFINE STUB / END DEFINE block, the prototypes of functions that are to be simulated must be
described with the parameters type and name, as ATTOL uses these names to generate the global
variables that store or assign values to parameters.
Generation is impossible if these names are omitted. Verify the description of the function.
ATTOL-W-NOMTSTDBL

<test> test appears several times in the same service

The same test name appears several times in a service.


The last test will be renamed.

Reference manual C Language

page 133

ATTOL UniTest
ATTOL-W-NOMVARDBL

ATTOL error messages


<variable> variable intersects (completely or partially) a variable that
has already been edited in the same test

A variable appears twice in an element block, or an array appears twice with an intersection that is not
empty.
ATTOL-W-NUMVERABS

Version number not found in source: <source name>

STRVERs search for the source program version has been unsuccessful.
Verify the parameter of the STRVER option in the command or identifying string in the program source
file.
ATTOL-W-NONFONCTI

<identifier> is not a function

In the current VAR, ARRAY or STR instruction, an expression of type function call (in the form identifier
()) has been found, where the identifier is not a function.
Verify the expression.
ATTOL-W-NONPOINTE

<identifier> is not a pointer

In the current VAR, ARRAY or STR instruction, an expression that points to a field (in the form
identifcateur->champ) has been found, where the identifier is not a pointer.
Verify the expression.
ATTOL-W-NONTABLEA

<identifier> is not an array

In the current VAR, ARRAY or STR instruction, an expression of type array element (in the form
identifier [...]) has been found, where the identifier is neither an array nor a pointer.
Verify the expression.
ATTOL-W-NOPOSTRUC

Structure or union not pointed to

The current VAR, ARRAY or STR instruction relates to a variable of which one of the fields is pointed to
by ->, and yet the previous field is not a pointer.
Verify the declaration of the variable and of its type.
ATTOL-W-NUMCHAINC

The <field> field number is not correct for the current structure

The current VAR, ARRAY or STR instruction has a list of initial or test values in which one or more rows
of fields have been set. ATTOL has detected that one of these rows is outside the limit specified in the
declaration of the tested structure (rows begin at 0 and are incremented by 1 for each field).
Verify the list or the declaration of the structure.

Reference manual C Language

page 134

ATTOL UniTest
ATTOL-W-NUVER_DBL

ATTOL error messages


Version number already found : <version>

A source program version number has already been provided by STRVER.


Verify the parameter of the STRVER option in the command or identifying string in the source program
file.
ATTOL-W-OMIVALTAB

Values for an array erroneously omitted: <array>. Use 'autres'

In the current VAR, ARRAY or STR instruction, an array has been initialized or tested with a list of
values which has less numbers than the number of array elements.
Verify the size of the array. Where possible, you can use the keyword autres in the list in order to make
up the missing elements.
ATTOL-W-OPER_INEX

The <service> service does not exist in the program

Verify the command.


ATTOL-W-OPER_VIDE

The <service> service does not contain any tests

Verify the test program.


ATTOL-W-OPERARITH

The <operator> operation can only be performed on numerical data


types (integers or floating point numbers

ATTOL has found an operator reserved for numerical data types (*, /, etc..) being used for other types in
an expression.
Verify the expression.
ATTOL-W-OPERENTIE

The <operator> operation can only be performed on integer types

ATTOL has found an operator reserved for integer types (<<, >>, etc.) being used for other types in an
expression.
Verify the expression.
ATTOL-W-OPERMACRO

The `#' operator must be followed by the name of a macro argument

The ATTOL C preprocessor is analyzing a directive in which the # operator (to transform an argument
into a character string) is used. This operator should be followed by an identifier for an argument, which is
not the case.
Verify the expression.
ATTOL-W-OPERSCALA

The <operator> operation can only be performed on scalar types


(integers, floating point numbers, enumerated types, pointers)

ATTOL has found an operator reserved for scalar types (+, -, etc.) being used for other types in an
expression.
Verify the expression.

Reference manual C Language

page 135

ATTOL UniTest
ATTOL-W-OPINCOMPA

ATTOL error messages


Options <options> are incompatible

The designated options should not be used together.


Verify the command.
ATTOL-W-OPTCETANA

The <option> option is only allowed with the ANALYSE option and the
C.language

The option described is not allowed if the C analyzer has not been activated.
Verify the command.
ATTOL-W-OPTCMDIMP

The <option> option is only allowed with languages C and C++

The designated option should only be used with C or C++.


Verify the command language.
ATTOL-W-PARASTART

The parameter name in `#define' begins with a number: <parameter>

One of the parameters of the macro being analyzed is not an identifier.


Verify the macro.
ATTOL-W-POINOINIT

<pointer> pointer not initialized; use 'INIT =='

The pointer named has been initialized with the keyword NONIL. This is interpreted as 'INIT =='.
ATTOL-W-POINSTRUC

Structure or union pointed to

The current VAR, ARRAY or STR instruction relates to a variable of which one of the fields is pointed to
by '.' when the previous field is a pointer.
Verify the declaration of the variable and the declaration of its types.
ATTOL-W-POSTDECRE

Post-decrementation is not allowed in ATTOL expressions

The operator is not allowed in expressions of initial or test values as it modifies the variable during the
test.
ATTOL-W-POSTINCRE

Post-incrementation is not allowed in ATTOL expressions

The operator ++ is not allowed in expressions of initial or test values as it modifies the variable during the
test.
ATTOL-W-PRAGMAINC

ATTOL pragma unknown: <pragma>

The #pragma attol directive being analyzed by the ATTOL C preprocessor has found an unknown
command.
Verify the directive.

Reference manual C Language

page 136

ATTOL UniTest
ATTOL-W-REDEFSTRU

ATTOL error messages


Structure or union type redefined: <identifier>

The C analyzer has found a struct <name> or union <name> declaration where <name> has already been
given in a previous declaration.
Verify this or the previous declaration.
ATTOL-W-REDEFSYMB

Symbol redefined: <symbol>

The C analyzer has found the declaration of a symbol (variable, type or function) that has already been
declared.
Verify this or the previous declarations.
ATTOL-W-SEQOUTRAN

Sequence of characters too large

The current VAR, ARRAY or STR instruction contains a character string or a character with the value of
one of the characters given in octal ( by \ooo). This value exceeds the maximum allowed for a character.
Verify the expression.
ATTOL-W-SEQUEINCO

Sequence <text> unknown

The current VAR, ARRAY or STR instruction contains a character string or a character with the value of a
character given by \x, where x does not correspond to any character.
Verify the expression.
ATTOL-W-SOUSEXPRE

The expressions "exp1, exp2, etc." are not allowed in ATTOL


expressions

Sequences of C expressions are not allowed in ATTOL expressions of initial and test values.
Verify the instruction being analyzed.
ATTOL-W-STARTDIGI

The <directive> argument begins with a number

The ATTOL C preprocessor is analyzing a test directive (if, ifdef, etc.) with an argument beginning with a
number. This is not allowed in ANSI C.
Verify the directive.
ATTOL-W-STXMETAIN

Unknown keyword <keyword>

The preprocessor has found an unknown keyword, which it ignores.


ATTOL-W-STXVALEXP

Parameter of <keyword> keyword not found

The preprocessor has found an incomplete keyword. This error does not obstruct analysis of the rest of the
test program.

Reference manual C Language

page 137

ATTOL UniTest
ATTOL-W-SYNTAXERR

ATTOL error messages


Syntax error: <expression>

The C analyzer has found a syntax error in the designated expression .


Verify the expression.
ATTOL-W-TABEXPINC

Expression <expression> is not correct for arrays

In the expression of initial or test values of the current VAR, ARRAY or STR instruction, ATTOL has
found a list containing an identifier followed by => for an array. The only identifier allowed in this case
is autres; the items on the list can only be referenced by numbers.
Verify the instruction.
ATTOL-W-TEST_ERRO

End of execution of ATTOL report generator - incorrect tests

The postprocessor has just finished its analysis and generated the .ro file. It indicates that there are some
incorrect tests.
ATTOL-W-TEST_INEX

The <test> test selected does not exist in the program

Verify the command and the test program.


ATTOL-W-TEST_VIDE

The <test> test does not have any variables to be edited

Verify the test program.


ATTOL-W-TOLOCSTCA

The character constant <constant> is too long

The designated character constant has more than 1 or 2 characters between quotes.
Verify it.
ATTOL-W-TOMANYARG

Too many arguments have been passed to macro <macro>

The ATTOL C preprocessor is analyzing a macro call in which the number of arguments exceeds the
number of parameters declared.
Verify the macro call and the declaration of the macro.
ATTOL-W-TROPFINSI

An END IF keyword is not associated with an IF keyword

The test plan has more END IFs than IFs.


ATTOL-W-TYPDEFSEU

The `typedef 'keyword is on its own

The C analyzer has found a typedef keyword without a declaration of type.


ATTOL-W-TYPELISTE

The type is undetermined: all the items on a list must be of the same
type: <list>

The type of the designated list can not be determined as it contains items of different types.
Verify the list.

Reference manual C Language

page 138

ATTOL UniTest
ATTOL-W-TYPESDIFF

ATTOL error messages


The types in the list are different

The type of the list can not be determined as it contains items of different types.
Verify the list.
ATTOL-W-TYPMODINC

Type modifier <modifier> is incorrect

The ATTOL C preprocessor is analyzing an ATTOL pragma of type type_modifier which is syntactically
incorrect.
Verify the ATTOL pragma.
ATTOL-W-UNBAENDIF

The #endif directive does not correspond to any #if directive

The ATTOL C preprocessor is analyzing an #endif directive with no preceding test directive.
Verify this and the previous directives.
ATTOL-W-UNDEFININ

<identifier> is not defined

The ATTOL C preprocessor is analyzing an #undef directive for an identifier that has not been defined.
Verify this directive.
ATTOL-W-UNTERCOMM

Comments not terminated

C lexical analysis ends when comments are not terminated.


Verify the C code incorporated into the test plan.
ATTOL-W-UNTERCOND

Condition <condition> is not terminated

Analysis of incorporated C code ends when one or more test directives (if, ifndef, etc.) are not terminated
by an endif directive.
Verify these directives.
ATTOL-W-UNTERSTRI

A character or character string constant is not terminated

C lexical analysis ends when a character or character string is not terminated.


Verify the C code incorporated into the test plan.
ATTOL-W-UNTPARDEF

The list of parameters of the `#define' directive is not terminated

The ATTOL C preprocessor is analyzing a macro which has no final parenthesis.


Verify the macro.

Reference manual C Language

page 139

ATTOL UniTest

ATTOL error messages

9.3. ERRORS
ATTOL-E-AUTOSTRUCT

Only INIT=, INIT==, EV=, and EV== keywords are allowed for
structures

A VAR, ARRAY or STR instruction relating to a variable declared as a structure is using a prohibited
form of initial or expected value.
Modify this instruction.
NB: one or more fields of a structure can be omitted in the test. This enables prohibited forms to be used for a particular field.

ATTOL-E-CHARINVAL

Invalid <character>character

The character shown is incorrect.


ATTOL-E-DEFMULTIP

<keyword> value already defined

The keyword indicated (INIT, EV, MIN, MAX or DELTA) and its associated value have already been
defined at least once in the VAR, ARRAY or STR instruction.
Verify the instruction.
ATTOL-E-DELMINMAX

DELTA, MIN and MAX used for the same variable <variable>

The keywords DELTA, MIN and MAX cannot all be used in a VAR or ARRAY instruction.
The following combinations are allowed:
x EV
x MIN and MAX,
x EV and DELTA.
ATTOL-E-DIVBYZERO

Divide-by-zero

ATTOL has found during analysis that an expression in a VAR, ARRAY or STR instruction contains a
divide-by-zero.
Verify the expression.
ATTOL-E-DUPENVNAM

The environment <environment name) already exists

The environment being analyzed has the same name as a previous environment.
Verify its name.
ATTOL-E-DUPLCONST

Constant <constant> already defined

The constant being analyzed has the same name as a previous constant.
Verify its name.

Reference manual C Language

page 140

ATTOL UniTest
ATTOL-E-EGALABSEN

ATTOL error messages


'=' absent for <keyword>

During analysis of a VAR, ARRAY or STR instruction related to the current variable, ATTOL has
detected the absence of '=' (or '==' or 'IN' or 'FROM' in certain cases) after the designated keyword (INIT,
EV, MIN, MAX or DELTA).
ATTOL-E-ELEMLISTE

Incomplete list of values <list>

The list given for an initial value (init) or an expected value (va) of an array or structured variable is
incomplete, because the size of the array or the number of fields of the structured variable is greater than
the number of items on the list.
Verify the declaration of the initialized or tested variable and complete the list accordingly.
ATTOL-E-ENTETEERR

HEADER must be the first keyword

Verify the test program.


ATTOL-E-ENVPARAME

Parameters of environment <environment_name> are incorrect

One or more parameters used in the current environment are not identifiers.
ATTOL-E-ENV_INCON

Environment <environment name> unknown

The USE instruction being analyzed refers to an environment which has not been declared.
Verify the name of this environment.
ATTOL-E-FICINCINC

<file> file cannot be found

The file of the current INCLUDE instruction cannot be found.


Verify the name of the file, its presence or the directory list specified by the -incl option of the
preprocessor.
ATTOL-E-FINEXECUT

End of execution: user error(s)

The preprocessor has just finished its analysis during which it detected one or more errors.
ATTOL-E-FMTINCOMP

Base incompatible with type <type>

The report format in the .ro file should not be specified for non-integer type variables, because it is
implicit.
ATTOL-E-FOR_CONST

Constant <constant> declared after SERVICE

The current constant is in the wrong place in the test plan.


Put it before the first service.

Reference manual C Language

page 141

ATTOL UniTest
ATTOL-E-FORWCONST

ATTOL error messages


Constant <constant> declared after SERVICE

The current constant is in the wrong place in the test plan.


Put it before the first service.
ATTOL-E-INCTDCRIO

Line <line> inconsistent with the TDC file

The postprocessor detects a discrepancy between the .rio file and the .tdc file due to a malfunctioning of
the test program.
Verify the test program and the service tested.
ATTOL-E-INITABSEN

Initial value absent for <variable>

The VAR, ARRAY or STR instruction being analyzed does not have the mandatory INIT keyword.
NB : You can deliberately specify a non-initialization via the expression "INIT ==".
ATTOL-E-INTSUPEUN

<expression> must be an integer and greater than or equal to 1


(NB_RANDOM) or 2 (NB_TIMES)

The 3rd expression of INIT FROM TO NB_TIMES or NB_RANDOM must be an integer expression
which can be reduced and of which the value is greater than or equal to 1 in the case of NB_RANDOM or
2 in the case of NB_TIMES.
ATTOL-E-INVMOTCLE

<keyword> keyword unknown

An unknown keyword has been detected during analysis of the test program file.
Verify the test plan.
ATTOL-E-LINETOLON

Instruction is too long

An instruction must not be more than 1000 characters long (after continuation lines have been
concatenated.)
ATTOL-E-LISTEINIT

Incorrect list of initial values: <list>

The current VAR or ARRAY instruction contains a list, related to the keyword INIT IN, which is
syntactically incorrect.
The syntax must be as follows: [<el1>, <el2>, ... <eln>].
ATTOL-E-LISTEINVA

Incorrect list of INIT or EV values <list>

The current VAR, ARRAY or STR instruction contains a list of initial or test values which is syntactically
incorrect.
Verify the list.

Reference manual C Language

page 142

ATTOL UniTest
ATTOL-E-LISTEVAIN

ATTOL error messages


Incorrect list of EV IN values <list>

The current VAR or ARRAY instruction contains a list, related to the keyword EV IN, which is
syntactically incorrect.
This syntax must be as follows: [<el1>, <el2>, ... <eln>].
ATTOL-E-LISTEINVA

Incorrect list of INIT or EV values <list>

The current VAR or ARRAY instruction contains a list, related to the keyword EV IN, which has a
different number of items to the list related to the keyword INIT IN, to which it refers.
ATTOL-E-MINMAXDEL

MIN, MAX or DELTA unexpected for

The expressions MIN, MAX and DELTA are forbidden for this type of value.
ATTOL-E-MOTCLEABS

<keyword> keyword absent

The test plan syntax has not been respected.


ATTOL-E-NBINITDYN

There are too many INIT IN and INIT FROM in the current test

The number is limited to 8 per test (7 if LOOP is used).


ATTOL-E-NBPARADIF

Number of parameters different to that of environment <environment>

The number of parameters initiated by the current USE instruction must be the same as the number of
parameters of the environment used.
ATTOL-E-NBVAINOVE

Too many EV IN in the current test

The number is limited to 64 per test.


ATTOL-E-NBVALINCO

Too many INIT or EV values: <list>

The current VAR, ARRAY or STR instruction contains a list of initial or test values, for a structured
variable, which has more items than there are fields in the structure.
Verify this list and the declaration of the structure.
ATTOL-E-NOMVARINC

Incorrect variable name <variable>

ATTOL has detected an anomaly during analysis of a variable name contained in a VAR, ARRAY or STR
instruction.
Verify the variable.
ATTOL-E-OVERFLOW

Integer expression overflow

During analysis of an expression in a VAR or ARRAY instruction, ATTOL has detected overflow during
an operation on integers or floating-point numbers.
Verify the expression.

Reference manual C Language

page 143

ATTOL UniTest
ATTOL-E-PARAMENVI

ATTOL error messages


Parameter <parameter> is not an identifier

Parameters used in environments must be identifiers.


ATTOL-E-POINOINIT

A pointer in INIT IN can not be initialized with NONIL

Use 'INIT ==' to prevent a variable being initialized.


ATTOL-E-PLUSBOUND

+BOUNDS expected at the end of INIT FROM

The last expression of the current VAR or ARRAY instruction is using the keyword BOUNDS
incorrectly.
ATTOL-E-PROCIMBRI

It is not allowed to interleave procedures in C

The ATTOL C analyzer has detected a procedure interleaved with another.


Verify the declaration.
ATTOL-E-PROG_VIDE

THE TEST PROGRAM <name of program> DOES NOT CONTAIN


ANY SERVICES

The preprocessor has not found any services in the test plan file.
Verify the file.
ATTOL-E-PROGXVIDE

THE TEST PROGRAM <name of program> DOES NOT CONTAIN


ANY TESTS TO BE EXECUTED

The preprocessor has not found any tests to be executed in the test plan.
This problem is due either to an incorrect selection when ATTOL was started or the absence of tests in the
services selected.
Verify the command.
ATTOL-E-SLICEREQ

Wrong or missing slice expresion

Verify the existence and the validity of all the Stub line slice expressions.
ATTOL-E-STIMDOMAT

INCREMENT, NB_TIMES or NB_RANDOM expected after INIT


FROM .. TO

The current VAR or ARRAY instruction is using the INIT FROM ..TO instruction with a syntax error in
the keyword that follows.
ATTOL-E-STXERRTYP

Type not found <incorrect line>

It has not been possible to determine the type of the variable tested in the current VAR, ARRAY or STR
instruction during analysis of C code.
Verify the variable and its C declaration.

Reference manual C Language

page 144

ATTOL UniTest
ATTOL-E-STXVALEXP

ATTOL error messages


Parameter of keyword <keyword> not found

The designated keyword needs one or more parameters which are not present.
Verify the syntax of the keyword.
ATTOL-E-STX_ERRRA

Expected result not found <incorrect line>

The current VAR, ARRAY or STR instruction has an incomplete "INIT", "EV", "MIN", "MAX" or
"DELTA" expression.
Complete it.
ATTOL-E-STXERRRIO

Syntax error in .RIO or .TDC file

The postprocessor has detected an error in the syntax of the .rio or .tdc file due to a malfunctioning of the
test program.
Verify the test program and the service tested.
ATTOL-E-SYNTAXERR

<Keyword> expected

The syntax of the test program has not been respected.


Verify the presence of the designated keyword.
ATTOL-E-TOATTENDU

TO is expected after INIT FROM

The current VAR or ARRAY instruction is using the INIT FROM .. TO initialization with a syntax error
in the second keyword.
ATTOL-E-TROPSINON

The keyword ELSE is not related to an IF keyword

The syntax of the IF / ELSE. / END IF block is incorrect.


ATTOL-E-TYPEIFROM

Given its initialization, <variable> should be an integer or a


floating-point number

INIT FROM .. TO is only allowed for variables of numerical data type.


ATTOL-E-TYPBOUCLE

The LOOP index should be an integer

Verify the expression used in TEST ... LOOP.


ATTOL-E-UTILISERR

USE incorrectly positioned

The keyword USE is incorrectly positioned.


Verify its constraints of use.
ATTOL-E-UTIPARAME

Parameters of the USE instruction <environment> incorrect

The parameters of the current USE instruction are incorrect.


Verify them.

Reference manual C Language

page 145

ATTOL UniTest
ATTOL-E-VALABSIMP

ATTOL error messages


Conversion to absolute value impossible

Using DELTA in a VAR or ARRAY instruction with an expression that cannot be reduced means that a
conversion to an absolute value is generated, which can prove impossible in certain cases.
Simplify this expression.
ATTOL-E-VALBOUCER

The LOOP index should be greater than or equal to 1

Verify the expression used in TEST ... LOOP.


ATTOL-E-VA_MINMAX

EV, MIN and MAX present for the same variable <variable>

The keywords EV, MIN and MAX cannot all be used in a VAR or ARRAY instruction.
The following combinations are allowed:
x EV
x

MIN and MAX,

EV and DELTA.

ATTOL-E-VAINIT_IN

Discrepancy between EV IN and INIT IN of variable <variable>

The current VAR or ARRAY instruction contains a list related to the keyword EV IN which has a
different number of items to the list related to the keyword INIT IN, to which it refers.

9.4. FATAL ERRORS


ATTOL-F-AUCUNMETA

No keyword found

The preprocessor has not found any keywords in the test plan.
Verify the file.
ATTOL-F-CMDERREUR

Command incorrect : <error>

The start-up command for one of the ATTOL tools contains an error.
ATTOL-F-CMDFATALE

Bad command line

Verify the command line.


ATTOL-F-CONNECIMP

Impossible to connect with the license server

Verify if the license server is running correctly (command OPXWLO


ATTOL-F-CONNECPER

Connection with the license server interrupted

Verify if the license server is running correctly (command OPXWLO


ATTOL-F-ERRERRNO

OPVWDW).
OPVWDW).

Access error to file: <file> : <message>

Reference manual C Language

page 146

ATTOL UniTest

ATTOL error messages

File <file> cannot be accessed (for read, write or create purposes, depending on the file concerned).
<message> is the system message returned upon access error.
Verify access rights to the file and the directory.
ATTOL-F-ERRFATALE

Execution stopped: fatal user error

The preprocessor has detected an error which prohibits any further analysis.
ATTOL-F-EXE_ABORT

PROGRAM EXECUTION ABORTED - CONSULT THE RESULTS


FILE

The .rio file has aborted because the program being tested has crashed.
ATTOL identifies the test that caused the execution to abort in the .ro file.
Verify the service in question.
ATTOL-F-FICRIOVID

File <file name> is empty (problems with execution)

The .rio file is empty due to problems executing the test program.
Verify the service tested.
ATTOL-F-FLEXLMINI

Initialization error regarding the license server (error code <code>)

Verify if the license server is running correctly (command OPXWLO


ATTOL-F-IMPECRFIC

OPVWDW).

Disk space full

ATTOL can not generate results files due to a write error.


Verify the amount of disk space left
ATTOL-F-IMPFERFIC

Impossible to close file <file name>

ATTOL can not close one of its results files.


Verify the amount of disk space left
ATTOL-F-IMPFICREN

Impossible to rename file 'fichier_gnr' as 'fichier_gnr'_bck:


<file>

The ATTOL test plan generator wants to save the old generated file under the same name with the file
name extension _bck. An error occurred during the save operation, bringing a halt to all processing.
Verify the access rights to this file and the directory in which it is stored.
ATTOL-F-IMPOUVFIC

Impossible to open file <file name>

ATTOL cannot open a results file or a file that is to be analyzed.


Verify the user access rights.

Reference manual C Language

page 147

ATTOL UniTest
ATTOL-F-IMPRESFIC

ATTOL error messages


Impossible to return to the start of (reset) file <file name>

ATTOL cannot reset the file.


Verify the amount of disk space left
ATTOL-F-INCTDCRIO

Discrepancy between .RIO and .TDC files

The postprocessor has detected a discrepancy between the .rio and .tdc files due to a malfunctioning of the
test program.
Verify the test program and the service tested.
ATTOL-F-JETONINCO

Type of token requested unknown

The current licenses do not understand generation in the language specified.


ATTOL-F-LANGINCON

Language <language> unknown

The language specified in the command is not recognized.


Verify the command.
ATTOL-F-LETYINCON

Value <value> unknown for option LE

Verify the postprocessor command.


ATTOL-F-LICENSE

Unauthorized usage

It is not allowed to use ATTOL in the language specified in the command, on the start-up date and on the
development machine.
Verify the command or the license agreement for ATTOL.
ATTOL-F-LICENCIMP

Request for license impossible (error code <code>)

Verify if the license server is running correctly (command OPXWLO


ATTOL-F-NONIMPLEM

OPVWDW).

Language <language> not implemented

The language specified in the command has not been implemented yet.
Verify the command.
ATTOL-F-OVER_PROD

Number of combinations allowed has been exceeded : <number of


combinations>

The number of multiple initializations (INIT IN and INIT FROM) in an ELEMENT block in the test
program gives rise to too many tests.
Reduce the number in the test program.
ATTOL-F-RATYINCON

Value <value> unknown for option RA

Verify the postprocessor command.

Reference manual C Language

page 148

ATTOL UniTest
ATTOL-F-STXERRRIO

ATTOL error messages


Syntax error in .RIO or .TDC file <incorrect line>

The postprocessor has detected a syntax error in the .rio or .tdc file due to a malfunctioning of the test
program.
Verify the test program and the service tested.
ATTOL-F-STXERRTDC

Syntax error in file .TDC <incorrect line>

The postprocessor has detected a syntax error in the .tdc file.


Verify the test program.
ATTOL-F-SUFFROORI

There is an obligatory suffix for this file (.RO ou .RIO) <file>

The suffix of the file named is incorrect.


Verify your command file.
ATTOL-F-TDCINCOHE

TDC file inconsistent

The postprocessor has detected that the .tdc file is inconsistent.


Verify the test program.
ATTOL-F-VATYINCON

Value <value> unknown for option EV

Verify the postprocessor command.


ATTOL-S-ALLOCMEMO

Execution stopped: memory overflow

ATTOL cannot allocate additional dynamic memory because of the machines lack of capacity.
ATTOL-S-NBRECURSI

There are too many recursive macros or "#include"s

ATTOL has detected either a recursive C macro (#define), or a recursive C include directive (#include).
Verify the line in C.

Reference manual C Language

page 149

ATTOL UniTest

Index

10. INDEX

-- @ -@<file> ........................................................................... 91, 106

-- _ -__BASE_FILE__..................................................................... 46
__DATE__ .............................................................................. 46
__FILE__................................................................................. 46
__INCLUDE_LEVEL__.......................................................... 46
__LINE__ ................................................................................ 46
__STDC__............................................................................... 46
__TIME__ ............................................................................... 46

-- A -ARRAY ..................................................................................... 8
ATTOL pragma
<string>=<string>
47
incl_std
46
signof
47
sizeof
47
start_analyse
46
stop_analyse
46
type_modifier
47
ATTOL pseudo-variables
I, I1, I2, ...
25, 39
INIT
39
J, J1, J2, ...
25, 39
NIL
25, 39
NONIL
42
ATTOL pseudo-variables
INIT
42
ATTOL runtime....................................................................... 58
ATTOL Runtime.................................................................... 116
ATTOLDEF........................................................................... 103
ATTOLLAN ................................................ 44, 89, 96, 104, 114

Reference manual C Language

ATTOLLIS............................................................................. 103
ATTOLPTU............................................................. 56, 103, 109
ATTOLRIO............................................................................ 103
ATTOLRO................................................................. 93, 99, 103
ATTOLROD.......................................................................... 103
ATTOLSMB.......................................................................... 103
ATTOLTDC .......................................................................... 103

-- B -BEGIN................................................................................. 6, 12

-- C -Comment ................................................................................... 9
COMMENT......................................................................... 7, 10
-compare................................................................................ 103
CONST.................................................................... 6, 11, 25, 39

-- D --data......................................................................................... 59
Default include directories....................................................... 46
-define.............................................................................. 29, 106
DEFINE STUB .......................................................................... 7
DELTA .......................................................................... 8, 42, 43

-- E -ELEMENT................................................................................. 8
ELSE ................................................................................. 29, 65
ELSE_SIMUL ................................................................... 31, 78
END DEFINE ...................................................................... 7, 13
END ELEMENT ................................................................. 8, 15
END ENVIRONMENT ....................................................... 6, 18
END IF .............................................................................. 29, 65
END INITIALISATION....................................................... 7, 23

page 150

ATTOL UniTest
END SERVICE ................................................................... 7, 28
END SIMUL...................................................................... 31, 78
END TERMINATION......................................................... 7, 33
END TEST .......................................................................... 8, 34
ENVIRONMENT ...................................................................... 6
EV (variable) IN .................................................................. 8, 42
EV = .................................................................................... 8, 42
EV == ............................................................................ 8, 42, 43
EV => ............................................................................ 8, 42, 59
EV IN................................................................................... 8, 42
-exfamily.................................................................................. 72
-exservice................................................................................. 72
-extest ...................................................................................... 72

-- F --family ..................................................................................... 72
FAMILY .................................................................................... 8
FORMAT................................................................................... 7
20
#b
20
#d
20
#e
20
#f
20
#h
20
#u

Index

-- J -J, J1, J2, ... ......................................................................... 25, 39

-- L --learn............................................................................ 42, 59, 66


LOOP....................................................................... 8, 25, 34, 39

-- M -MAX.............................................................................. 8, 42, 43
MIN ............................................................................... 8, 42, 43

-- N -NEXT_TEST ............................................................................. 8
NIL .................................................................................... 25, 39
-noanalyse................................................................................ 64
NONIL..................................................................................... 42
-nosimulation........................................................................... 31

-- P --- H -HEADER............................................................................. 6, 83

-- I -I, I1, I2, ... .......................................................................... 25, 39


IF ............................................................................................. 65
-incl.................................................................................. 22, 106
Include directories ................................................................... 22
INIT ................................................................................... 39, 42
INIT (variable) WITH ................................................... 8, 39, 41
INIT = .................................................................................. 8, 39
INIT ==................................................................................ 8, 39
INIT FROM .. TO .. NB_RANDOM ....................... 8, 25, 39, 41
INIT FROM .. TO .. NB_TIMES............................. 8, 25, 39, 41
INIT FROM .. TO .. STEP....................................... 8, 25, 39, 41
INIT IN .............................................................................. 25, 39
INIT IN ................................................................................ 8, 39
INITIALISATION...................................................................... 7

-portrait.................................................................................. 101
priv_clock.............................................................................. 119
priv_close .............................................................................. 119
priv_date................................................................................ 119
priv_exit................................................................................. 119
priv_file ................................................................................. 119
priv_open............................................................................... 119
priv_writeln ........................................................................... 119

-- R --ra=error................................................................................... 97
-ra=test.................................................................................... 97
Rpertoire d'excution sur la cible........................................... 77
-restriction ....................................................................... 80, 106
-restriction ............................................................................... 46

-- S --service .................................................................................... 72

Reference manual C Language

page 151

ATTOL UniTest
SERVICE .................................................................................. 7
SIMUL..................................................................................... 78
-source ..................................................................................... 83
-std_define ............................................................................. 106
STR............................................................................................ 8
STUB................................................................................... 8, 25
-symbtab ................................................................................ 106

-- T -TERMINATION........................................................................ 7
-test .......................................................................................... 72
TEST ......................................................................................... 8
time_format ........................................................................... 118
Trace file.................................................................................. 58

Reference manual C Language

Index

-- U -Unformatted test report............................................................ 99


-use ........................................................................................ 110
USE ........................................................................................... 7
user_close .............................................................................. 119
user_open............................................................................... 119

-- V --va=combined....................................................................... 100
-va=noeval ............................................................................ 100
VAR........................................................................................... 8

page 152

Você também pode gostar