[Top] [Prev] [Next] [Index] [TOC]


Appendix B: Command Reference Pages


B.1 xsuds

NAME
xsuds, xatac, xslice, xprof, xvue, xregress - the graphical interface Toolsuite

SYNOPSIS
xsuds [ options ] [ atac-files ] [ trace-files ] [ dif-file ] [ feature-files ]
xatac [ options ] [ atac-files ] [ trace-files ] [ dif-files ]
xslice [ options ] [ atac-files ] [ trace-files ] [ dif-files ]
xprof [ options ] [ atac-files ] [ trace-files ] [ dif-files ]
xvue [ options ] [ atac-files ] [ trace-files ] [ dif-files ] [ feature-files ]
xregress [ options ] [ atac-files ] [ trace-files ] [ dif-files ]
DESCRIPTION
The common, integrated graphical user-interface for all tools in the Toolsuite is xsuds. The user may switch back and forth between various tools in the Toolsuite by selecting the appropriate entry from the ``Tool'' menu in the display. Alternatively, if one desires to use an individual tool and does not wish to move back and forth between various tools, one may invoke that tool directly. In the latter case, one does not get the ``Tool'' menu and hence one does not get the ability to move from tool to tool. For example, if one invokes xslice directly, the user is taken directly to the Slice display and the ability to move to other tools is taken away. The same holds with xatac, xprof, xvue, and xregress.

All of these tools use the data-flow files, called atac files, created by atac cc, atac CC, atacCL, atacICC etc., and the trace files produced by executions of programs compiled with atac. They also accept dif files, produced using the atacdiff command, to restrict their analysis to differences between two versions of the corresponding source files. Additionally, xsuds and xvue also accept feature files, which may have been created previously using the Vue tool. One may also specify .atac and .trace files using the ``File'' menu after the tools have been invoked. Similarly, a new feature file may be opened using the ``open'' button from the features display under Vue. Dif files, however, can only be specified on the command line when the tools are first invoked.

OPTIONS (the ``-'' sign preceding any of the options can be replaced by ``/'' on Windows)
-columns count
Adjust the width of the source window so count characters per line of source can be displayed.

-lines count
Adjust the height of the source window so count lines of source can be displayed at one time.

-nocompress
Do not compress trace files upon exit. By default, all of the tools compress the trace files specified when one exits them.

-nopoll
Do not automatically check if a trace file has been changed. By default, all of the tools monitor the specified trace files and automatically highlight the ``Update'' button when they detect a change in any of them.

-noweights
Do not prioritize and color code uncovered program elements in ATAC. This may speed up performance of ATAC when using extremely large source files.

FILES
file.atac - data-flow, or atac, file.
file.trace - coverage trace file.
file.dif - atac dif file.
file.features - Vue feature file.




B.2 atac

NAME
atac - the command line browser

SYNOPSIS
atac [ -aiIJrRTuUY ] [ other-options ]... [ trace-file ] atac-files...
atac -s [ -fghiIJKMpqQRSTUY ] [ other-options ]... [ trace-file ] atac-files...
atac -C [ -fghiIJKpqRTUY ] [ other-options ]... [ trace-file ] atac-files...
atac -v
other-options:
-c test-name
-F function
-m { bBcdefIJprRTuUY }...
-m F function
-n test-name [ -x ]
DESCRIPTION
The atac command displays test coverage information in character format by analyzing the data-flow files created by atac cc and trace files produced by executions of a program compiled with atac cc. (An enhanced view of the data is obtained using the graphical interface.) The atac command will display source code, highlighting code fragments not covered by test executions. Various coverage options may be selected with the -m flag to display unexecuted code. By default unentered functions and unexecuted blocks, decisions, c-uses, and p-uses are displayed. On UNIX, the TERM environment variable must be set to display code fragments. Output is displayed page by page.

The atac -s command will present a coverage summary for file.c corresponding to the specified file.atac. Various coverage options may be selected with the -m flag to count executed code. By default block, decision, c-use, and p-use coverages are counted.

If no trace file is specified atac assumes that no tests have been run.

OPTIONS (the ``-'' sign preceding any of the options can be replaced by ``/'' on Windows)
-a Display all unexecuted code even if not covered by a weaker measure. All measures are considered equal except that function entry is weaker than all others; all are weaker than decision except c-use and p-use; and all are weaker than c-use and p-use. By default, only code whose components are covered by a weaker measure are displayed. (For example, an unexecuted block is not displayed if the function containing that block was never entered.)
-c test-name
Present a comparison of coverage with that of named test cases. Code is considered covered only if it is not also covered by the named test cases. Wild cards may be used in the test case name. On UNIX, wild cards are the same as those used for file names by sh (*, ?, and [...]). Quote marks may be needed to prevent the shell from expanding the test name as file names. Multiple test-cases may also be specified by repeating the -c option.
-C Present execution counts.
-D Generate debugging output.
-f Present coverage summary on a per function basis (implies -s).
-F function
Present coverage for C subroutine named function. Wild cards may be used in the function name (see -c option). Multiple functions may also be specified by repeating the -F option.
-g Present coverage summary on a per source file basis (implies -s).
-h Suppress column headings (used with -s, and -C).
-K Include test cost in coverage summary (implies -s and -p).
-i
Ignore time stamps on source files and .atac files. By default, atac issues an error if source files have been modified since execution of a test represented in the .trace file.
-I Include code ATAC considers unreachable. By default, this code is not counted nor highlighted in displays.
-J Include code embedded in a preprocessor macro expansion. By default, this code is not counted nor highlighted in displays.
-m{bBcdefIJprRTuUY}...
Specifies the coverage measures to be used:
b Block - code fragments not containing control flow branching or function calls.
B Basic Block - code fragments not containing control flow branching.
c C-use - (computational use) pairs of blocks for which the first block contains an assignment to a variable and the second block contains a use of that variable in a computation.
d Decision - pairs of blocks for which the first block ends at a control flow branch and the second block is a target of one of these branches.
e Function entry - covered when the function is entered at least once.
f Function call - individual function calls.
Ffunction
Named function call - function calls matching function. Wild cards may be used in the function name (see -c option). Multiple test cases may also be specified by repeating the -mF option.
I Infeasible code - code ATAC considers unreachable.
J Macro internals - code embedded in a preprocessor macro expansion.
p P-use - (predicate use) triples of blocks for which the first block contains an assignment to a variable, the second block ends at a control flow branch based on a predicate containing that variable, and the third block is a target of one of these branches.
r Return - explicit or implicit function return or call to _exit, _longjmp, abort, exit, longjmp, siglongjmp, if available.
R Not reached - code marked with /*NOTREACHED*/.
T Not tested - code marked with /*NOTTESTED:reason*/.
u All-uses - sum of p-use and c-use.
U Not instrumented - uninstrumented code (not normally present).
Y Performance critical - code marked with /*TIMECRITICAL*/.
-M Present a minimal cost set of test cases that achieves the same coverage, for the specified coverage measure, as all cases together (implies -s and -p).
-n test-name
Present coverage for named test cases only. (See also -x option.) Wild cards may be used in the function name (see -c option). Multiple test cases may also be specified by repeating the -n option.
-p Present coverage summary on a per test case basis (implies -s).
-q Present cumulative coverage per test case (implies -s and -p).
-Q Sort test cases in order of increasing cost per additional coverage. Present cumulative coverage per test case. Include test cost in coverage summary. Same as -qSK (implies -s and -p).
-r Reverse the display criteria; display only covered code.
-R Include code marked with /*NOTREACHED*/. By default, this code is not counted nor highlighted in displays.
-s Present coverage summary.
-S Sort test cases in order of decreasing additional coverage per unit cost (implies -s and -p).
-t Present coverage summary on a per test case basis - non zero only.
-T Include code marked with /*NOTTESTED:reason*/. By default, this code is not counted nor highlighted in displays.
-u Use underscoring instead of other standout mode for source code highlighting.
-U Include uninstrumented code. In unusual situations some code may not be instrumented. By default, this code is not counted nor highlighted in displays.
-v Display Toolsuite release number.
-x Exclude test cases specified by -c and -n options. Include all unspecified test cases.
-Y Exclude code marked /*TIMECRITICAL*/. This code is not instrumented so that instrumentation will not interfere with performance. By default, this code is counted as not covered and highlighted in displays.
EXAMPLE
The following commands display coverage for src1.c and src2.c linked with other.o and run with data for test input:


compile src1.c and src2.c with atac - save the executable as testprog
testprog < data
atac -s -f src1.atac src2.atac testprog.trace
atac src1.atac src2.atac testprog.trace
FILES
file.atac - data-flow file.
file.trace - coverage trace.


B.3 atac cc (UNIX platform only)

NAME
atac cc - compile C and C++ code for the Toolsuite

SYNOPSIS
atac cc [ options ]... files...

DESCRIPTION
The atac cc command is the compiler/source code instrumenter for the Toolsuite. The atac cc command compiles and links C/C++ programs creating a data-flow file (file.atac for each file.c) and object files or an executable program. The atac and xsuds commands display information by analyzing the data-flow files with the trace file produced by test executions of the program.

The arguments to atac cc are exactly the same as arguments to the standard C or C++ compiler (e.g. cc). The appropriate compiler may be substituted for cc on the command line. Source files are assumed to be C code if they have a .c extension, otherwise, C++. Preprocessing is done with cc -E and compilation and linking are done with cc, where cc is specified on the command line. These options can be modified by setting parameters in a .ini file as described below.

Object files created with atac cc may be linked with object files and libraries created by other means, using atac cc or atac ld. When the program compiled by atac cc is tested, a coverage trace is output to a.out.trace where a.out is the name of the executable file created by atac cc (i.e. the argument to the -o option, or, by default, literally a.out).

ENVIRONMENT VARIABLES
The following environment variables may be set at link-time or run-time to modify the run- time placement of the trace file, test case names, etc. Run-time settings will override link- time settings.

Some of these variables are set to yes or no. For these variables, off, false, f, n, and 0 are equivalent to no; on, true, t, y, and non-zero numbers are equivalent to yes. Upper and lower case are not distinguished.

ATAC_BLOCKONLY
When a test is run, ATAC records data for a number of types of coverage. For very large programs it may be necessary to restrict run-time recording to reduce the execution time and disk space. If ATAC_BLOCKONLY is set to yes at run-time, ATAC will only record data for block coverage and weaker coverage types. Zero is displayed for other coverage types. Tests run with this option set can be identified in the atactm -L listing by the B flag.

ATAC_COMPRESS
In order to save disk space, atac instruments the program under test to compress the trace file after each test execution. The ATAC_COMPRESS variable may be used to suppress compression completely or to compress periodically. If ATAC_COMPRESS is set to no, when the program is executed, trace file compression is suppressed. If ATAC_COMPRESS is set to an integer n, the trace file will be compressed after approximately every n test executions. A trace file can be explicitly compressed using atactm, regardless of whether or not ATAC_COMPRESS is set.

ATAC_COST
By default, each test case is assigned a cost of 100. If ATAC_COST is set to an integer n, each test case will be assigned cost n. In any case, the cost may be reassigned after the test is run using the atactm command.

ATAC_DIR
By default, trace data is written to a file in the current directory. If ATAC_DIR is set it is the path name of the directory in which trace data is written. However, if ATAC_TRACE is set to a fully qualified path name, ATAC_DIR is not used.

ATAC_NOTRACE
If ATAC_NOTRACE is set, no trace file is created. This option may be useful when it is necessary to run an instrumented program without creating a trace file.

ATAC_SIGNAL
Normally, a test case consists of a complete execution of a program. In some situations, a single program execution may represent multiple test cases. The program can indicate the start of a new test case by calling atac_restart(). This requires that the code be modified to include this call, and that the call be removed when ATAC is not used. ATAC_SIGNAL provides an alternate way of indicating the start of a test case. If ATAC_SIGNAL is set to a UNIX signal name or number, ATAC will start a new test case each time the specified signal is received by the program under test. The signal name must be a standard UNIX signal name (e.g. SIGINT). The SIG prefix is not required and upper and lower case are not distinguished. The signal number may be any valid signal number for your system.

ATAC_TEST
Each program execution results in named test information being appended to the trace file. The default test name is the base name of the trace file. A numeric suffix is appended to each test name in order to make it unique (e.g., wordcount.1, wordcount.2, wordcount.3). If ATAC_TEST is set, its value is used as the test name. The test name must be less than 1024 characters long, composed of alpha-numeric characters, comma, period, at-sign, and underscore, and must not begin with a digit. Other characters in the test name are replaced by question mark, except that slash is replaced by colon and hyphen is replaced by the pound sign.

ATAC_TEST_FILE
If ATAC_TEST is not set and ATAC_TEST_FILE is the name of a readable file, the contents of the first line of that file are used as the test name. This facility is useful when it is not possible to vary the value of the ATAC_TEST variable at run-time. In this case the ATAC_TEST_FILE variable may be set at link-time to the name of a file that may be modified at run-time to contain the test name.

ATAC_TMP
While a test is running, ATAC stores coverage data in a temporary file in the /usr/tmp directory. If ATAC_TMP is set, it is the path of a directory in which the temporary files will be written. The temporary file is written in append mode. On some systems, appending to a file on a networked file system is very slow. For this reason, it is recommended that temporary files be written to a directory on a local disk. Normally, temporary files are removed when test execution completes (See ATAC_COMPRESS above).

ATAC_TRACE
By default, trace data is written to a file named prog.trace where prog is the name of the program executable. If ATAC_TRACE is set, it is the name of the file to which the trace data will be written. If the name does not end with the .trace suffix, the suffix is appended.

ATAC_UMASK
When a trace file is created, it is given the same read/write permissions as the directory in which it is created. This is important when multiple processes of different owners will be writing to the same trace file, so that the write permissions on the trace file are not restricted to processes with the same owner as the process that first created the trace file. If it is necessary to further restrict access to the trace file, the ATAC_UMASK variable may be set. Bits set in the ATAC_UMASK variable will be cleared from the file creation mask.

COMPILER .INI FILES
If $HOME/.atac/cc.ini or `ataclib`/init/cc.ini is a readable file, where cc is the compiler specified on the command line, it may contain parameters that will modify the compilation process. (The latter is read only if the former is not readable.)

Parameters are specified one per line with parameter name followed by an equal sign followed by the quoted value with no spaces around the equal sign.

The following parameters may be present:

LANGUAGE='C/C++/ld'
By default, source files are assumed to be C code if they have a .c extension, otherwise, C++. If LANGUAGE is ``C'', all source files are treated as C. If LANGUAGE is ``C++'', all source files are treated as C++. If LANGUAGE is ``ld'', only linking is performed.

FULLPATH='compile-command'
By default, the compiler given by cc is used for all compilation, linking, and preprocessing (except when LANGUAGE='ld', in which case cc is used for compiling the environment file). If FULLPATH is set and cc does not begin with /, all compilation, linking and preprocessing is done with the value assigned.

LOCAL_CPP='preprocess-command'
By default preprocessing is done with cc -E where cc is given on the command line or by the FULLPATH parameter. When LOCAL_CPP is specified, its value is the command to use for preprocessing.

C_COMPILE='compile-command'
By default the environment file is compiled with cc given on the command line or by the FULLPATH parameter. If C_COMPILE is set, its value is used as the compile command for the environment file.

C_LIB='libraries'
The value of the CLIB parameter is appended to the link line.

INCLUDE='system-include-list'
The value of the INCLUDE parameter is a space separated list of include path prefixes where each path prefix is preceded by -S or -J. Source files beginning with any prefix on the list are assumed to be system files and are not instrumented. Source files beginning with a prefix preceded by -J on the list are assumed to be C include files included into C++. The appropriate extern ``C'' code is inserted before compilation. For example:

INCLUDE='-J/usr/include -S/'

means that any source file starting with / is treated as a system file and any source file starting with /usr/include is treated as a C include file.

EXAMPLE
The following commands display coverage for src1.c and src2.c linked with other.o and run with data for test input:

atac cc -o testprog src1.c src2.c other.o
testprog < data
atac -s -f src1.atac src2.atac testprog.trace
atac src1.atac src2.atac testprog.trace
FILES
file.atac - data-flow file.
file.trace - coverage trace.


B.4 ataclib

NAME
ataclib - locate installation of Toolsuite library

SYNOPSIS
ataclib

DESCRIPTION
The ataclib command prints the name of the directory where the runtime library is installed.


B.5 atactm

NAME
atactm - Toolsuite trace manager

SYNOPSIS
atactm [ -o new.trace ] trace-file
atactm -c cost -n test-name [ -x ] [ -o new.trace ] trace-file
atactm -d -n test-name [ -x ] [ -o new.trace ] trace-file
atactm -e -n test-name [ -x ] -o new.trace [ trace-file ]
atactm -{lL} [ -n test-name [ -x ] ] trace-file
atactm -r new-test-name [ -n test-name [ -x ] ] [ -o new.trace ] trace-file

DESCRIPTION
The atactm command manages trace files created by execution of a program compiled with atac cc. A trace file contains coverage information for each test case executed by a program. The atactm command can list, rename, extract, or assign cost to selected test cases. The options -c, -d, -e, -l, -L, and -r select the operation to be performed and are mutually exclusive. If any of these options except -l and -L are specified the trace file is compressed. If no option is specified, the only effect is to compress the trace file. The original trace file is over-written unless the -o option is specified.

OPTIONS (the ``-'' sign preceding any of the options can be replaced by ``/'' on Windows)
-c cost
Assign cost to test cases specified with -n test-name. Test case cost is used by atac -M.
-d Delete test cases specified with -n test-name.
-D Generate debugging output.
-e Extract test cases specified with -n test-name.
-I List test case names. If output is to a terminal, names are formatted into columns. If -n test-name is specified, only selected test cases are listed.
-L List test cases with time stamp, duration, ATAC release, cost, attributes, and test name. Attributes are described below. If a test has not been compressed, the name of the temporary trace file is also listed. If -n test-name is specified, only selected test cases are listed.
-n test-name
Select test cases matching test-name (See also -x.) Wild cards may be used in test-name. On UNIX, wild cards are the same as those used for file names by sh (*, ?, and [...]). Quote marks may be needed to prevent the shell from expanding the test name as file names. Multiple test cases may also be specified by repeating the -n option.
-r new-test-name
Rename test cases specified with -n test-name. If -n test-name is omitted, all test cases are renamed. Test case names are composed of alphanumeric characters and underscore. A numeric suffix is appended to distinguish test cases with the same name.
-x Include only test cases not selected by -n options.

The attributes displayed with the -L option are each a single positional character with the following fields. The default value in each field is a dash.
count forked blockonly busy missing corrupt uncompressed error end start
The possible values are:
count f
Execution counts are not available due to abnormal termination.
forked F (UNIX only)
Process called fork in uninstrumented code. Test contains data for parent and child processes.
blockonly B
Only block coverage data is available for this test.
busy i
Some coverage may have been lost in a signal handler routine due to interruption of user level code.
missing m
Uncompressed data for this test is missing. (Named temporary trace file has been deleted or is not accessible.)
corrupt c
Temporary trace file for this test has been corrupted. Coverage data may be missing.
corrupt v
This test was created by a program compiled with an obsolete version of ATAC. Coverage from this test is ignored.
uncompressed u
This test has not been compressed.
uncompressed r
This test has not been compressed and is apparently still running.
error M
Process ran out of memory during this test.
error O/V
Process has linked one or more object files compiled with an obsolete version of ATAC. Coverage in those files is ignored.
error S
ATAC runtime routine encountered errors during this test.
error T
Process could not open temporary trace file during this test.
end/start C
Test ended/started by calling atac_restart().
end/start O/N (UNIX only)
Test ended/started by calling fork in instrumented code.
end/start R (UNIX only)
Test ended/started by receiving the signal indicated in the ATAC_SIGNAL environment variable in instrumented code.

EXAMPLE
The following command lists test cases in prog.trace

atactm -l prog.trace
The output looks like this:
prog.1 prog.2 prog.3
FILES
file.trace - trace file.


B.6 atacdiff

NAME
atacdiff - Create .dif file for Toolsuite browsers

SYNOPSIS
atacdiff source-file alternate-version-of-source-file

DESCRIPTION
The atacdiff command creates a file with the .dif extension that encodes the differences between two versions of a source file. This file may be supplied to the atac or xsuds browser along with the corresponding .atac files to restrict the browser to source code that has been modified or to identify test cases that may be affected by the source code modification. The order of the two source files on the command line does not matter except that the .dif file shares the base file name of the first of the source files.

To browse coverage on source code that has been modified, test cases must be run on the modified code after it is instrumented with atac. To identify test cases that may be affected by a source code modification, test cases must be run on the original code after it is instrumented with atac.

EXAMPLE
The following commands display coverage for code in src.c that has been modified from src.c.old:

compile src.c with atac and save the executable as testprog
testprog < data
atacdiff src.c src.c.old
atac -s -f src.atac src.dif testprog.trace
The following commands run three test cases on code in src.c and then list the test cases that execute code that has been modified in src.c.new. These test cases should be re-run to verify the results after the modification.

compile src.c with atac and save the executable as testprog
testprog < data1
testprog < data2
testprog < data3
atacdiff src.c src.c.new
atac -t src.atac src.dif testprog.trace
FILES
file.dif - difference file.
file.trace - coverage trace.


B.7 atacid (UNIX platform only)

NAME
atacid - identify atac instrumented object files and executables

SYNOPSIS
atacid file ... | grep ATAC

DESCRIPTION
The atacid command searches files of any type for a compiled-in string and prints the contents of the string. When piped into grep ATAC, the output indicates whether a file was compiled or linked with atac and what default runtime values were used.

If file is -, the standard input is used.

EXAMPLE
The following commands compile the wordcount tutorial program with atac and use atacid to identify the instrumented files.

atac cc -c wc.c
atac cc -c main.c
atac cc -g wc.o main.o
atacid wc.c main.c wordcount.trace
The output is:
wc.o:wc.c instrumented by ATAC release 1.0
main.o:main.c instrumented by ATAC release 1.0
wordcount:ATAC var ATACUMASK=
wordcount:ATAC var ATACTRACE=wordcount
wordcount:ATAC var ATACTMP=
wordcount:ATAC var ATACTESTFILE=
wordcount:ATAC var ATACTEST=
wordcount:ATAC var ATACSIGNAL=
wordcount:ATAC var ATACNOTRACE=
wordcount:ATAC var ATACDIR=
wordcount:ATAC var ATACCOST=
wordcount:ATAC var ATACCOMPRESS=yes
wordcount:ATAC var ATACBLOCKONLY=
wordcount:ATAC linked env vars:
wordcount:wc.c instrumented by ATAC release 1.0
wordcount:main.c instrumented by ATAC release 1.0
wordcount:ATAC runtime (release 1.0)
wordcount:ATAC runtime unbuffered IO

B.8 atac_env_create (UNIX platform only)

NAME
atac_env_create - create atac_env.o for linking ATAC instrumented object files

SYNOPSIS
atac_env_create env-var=value ...

DESCRIPTION
The atac_env_create command creates a file named atac_env.o containing default environment values for the ATAC run-time. This file is linked with object files compiled with atac and the ATAC runtime routine, `ataclib`/atac_rt.o

Normally, files compiled with atac may be linked with atac cc or atac ld. In this case, atac_env.o is not needed. However, if files compiled with atac are to be linked by calling the linker explicitly, atac_env.o is needed.

The atacid command may be used to determine which default values have been compiled into the atac_env.o or executable file.

EXAMPLE
The following commands may be used to create the instrumented wordcount as in the tutorial, using atac cc for the compiles but not for the link. The default trace name is set to wc.trace. By default, the trace file will not be compressed.
atac cc -c wc.c
atac cc -c main.c
atac_env_create ATAC_TRACE=wc.trace ATAC_COMPRESS=no
ld -o wordcount wc.o main.o atac_env.o `ataclib`/atac_rt.o /lib/crt0.o -lc

B.9 atacCL (Windows platform only)

NAME
atacCL - automatic test analysis for C programs - compiler for Microsoft Windows using Microsoft Visual C++

SYNOPSIS
atacCL [ options ] ... files ...

DESCRIPTION
The compiler/source code instrumenter for ATAC, when used with the Microsoft compiler is atacCL. It compiles and links C and C++ programs creating a data-flow file (file.atac for each file.c or file.cpp) and object files or an executable program. ATAC and the graphical user interface of the Toolsuite display test coverage information by analyzing the data-flow files with the trace file produced by test executions of the program. The arguments to atacCL are exactly the same as arguments to the Microsoft Visual C++ compiler with two exceptions. The arguments specifying optimization and precompiled header files are ignored. atacCL supports 32-bit applications using the WIN32 interface only; 16-bit applications will not work. Source files are assumed to be C code if they have a .c extension and C++ code if they have a .cpp extension.

Preprocessing is done with cl -E and compilation and linking are done with cl, where cl is specified on the command line. These steps can be modified by parameters in the registry or environment as described below. Object files created with atacCL may be linked with object files and libraries created without this instrumenter by using atacCL. Object files created with atacCL may be successfully linked with cl or link by appending dllatac_rt.lib to the command line. The dllatac_rt.lib file resides in the directory path name printed by the ataclib command.

RUN-TIME PARAMETERS
When the program compiled by atacCL is tested, a coverage trace is output to atac.trace by default. The user may modify certain parameters at run-time either from the environment or the registry. Registry values should not be modified directly but rather by using the xconfig interactive configuration tool. If environment variable or registry key ATAC_TRACE has a value at run-time, it is used as the trace file name. If environment variable or registry key ATAC_DIR has a value at run-time, it is used as the directory for the trace file; otherwise the current directory is used. If the trace file already exists it is appended to.

Normally the trace is compressed at the end of execution to save file space. If environment variable ATAC__COMPRESS has a value of 0 at run-time, trace compression is suppressed. Otherwise, if ATAC_COMPRESS has a value of n, other than 0, trace compression occurs approximately once every n executions. A trace may be explicitly compressed using atactm. If environment variable ATAC_TMP has a value at run-time, it is used as the directory for temporary trace files. By default temporary trace files are placed in /usr/ tmp.

If environment variable ATAC_TEST has a value it is used as the test case name. The default test case name is derived from the name of the trace file. A numeric suffix is appended to each test case name to make it unique.

atacCL parses C and C++ code as extended by Microsoft.

If environment variable ATAC_BLOCKONLY has a value at run-time of yes, only block coverage data is written to the trace file. This will result in faster execution and smaller trace files, however, decision, c-use, and p-use data will not be available.

If environment variable ATAC_COST has a numeric value at run-time it will be assigned as the execution cost of the test case. By default, each test case has a cost of 100. Test case costs are used by atac to compute a minimal test set (atac -M) or a cost effective ordering (atac -S).

COMPILE-TIME
The registry entry in HKEY_LOCAL_MACHINE\SOFTWARE\Cleanscape\xSuds\1.0 supports two parameters that may be used to tune the action of atacCL.

DEFINE=list of preprocessor definitions for C code

The DEFINE parameter contains a semicolon-separated list of preprocessor definitions. For example, DEFINE=-DWIN32=1;-DX86=TRUE;-DFPUBUG=FALSE is a legal parameter format.

DEFINEPP=list of preprocessor definitions for C++ code

The DEFINEPP parameter contains a semicolon separated list of preprocessor definitions as in the previous example.

EXAMPLE
The following commands display coverage for src1.c and src2.c linked with other.o and run with data for test input:
atacCL src1.c src2.c other.obj /link /out:testprog.exe
set ATAC_TRACE=testprog 
testprog < data 
atac /s /f src1.atac src2.atac testprog.trace
atac src1.atac src2.atac testprog.trace
FILES
file.atac - data-flow file.
file.trace - coverage trace.
dllatac_rt.lib - the atac run-time library, which resides in the directory pathname printed by the ataclib command.


B.10 atacICC (Windows platform only)

NAME
atacICC - automatic test analysis for C programs - compiler for Microsoft Windows using IBM VisualAge

SYNOPSIS
atacICC [ options ]... files...

DESCRIPTION
The compiler/source code instrumenter for ATAC, when used with the IBM compiler is atacICC . It compiles and links C and C++ programs creating a data-flow file (file.atac for each file.c or file.cpp) and object files or an executable program. ATAC and the graphical user interface of the Toolsuite display test coverage information by analyzing the data-flow files with the trace file produced by test executions of the program. The arguments to atacICC are exactly the same as arguments to the IBM VisualAge development system with two exceptions. The arguments specifying optimization and precompiled header files are ignored. atacICC supports 32-bit applications using the WIN32 interface only; 16-bit applications will not work. Source files are assumed to be C code if they have a .c extension and C++ code if they have a .cpp extension.

Preprocessing is done with icc -EP and compilation and linking are done with icc, where icc is specified on the command line. These steps can be modified by parameters in the registry or environment as described below. Object files created with atacICC may be linked with object files and libraries created without this instrumenter by using atacICC. Object files created with atacICC may be successfully linked with icc or link by appending dllatac_rt.lib to the command line. The dllatac_rt.lib files resides in the directory path name printed by the ataclib command.

RUN-TIME PARAMETERS
When the program compiled by atacICC is tested, a coverage trace is output to atac.trace by default. The user may modify certain parameters at run-time either from the environment or the registry. Registry values should not be modified directly but rather by using the xconfig interactive configuration tool. If environment variable or registry key ATAC_TRACE has a value at run-time, it is used as the trace file name. If environment variable or registry key ATAC_DIR has a value at run-time, it is used as the directory for the trace file; otherwise the current directory is used. If the trace file already exists it is appended to.

Normally the trace is compressed at the end of execution to save file space. If environment variable ATAC_COMPRESS has a value of 0 at run-time, trace compression is suppressed. Otherwise if ATAC_COMPRESS has a value of n, other than 0, trace compression occurs approximately once every n executions. A trace may be explicitly compressed using atactm. If environment variable ATAC_TMP has a value at run-time, it is used as the directory for temporary trace files. By default temporary trace files are placed in /usr/ tmp.

If environment variable ATAC_TEST has a value it is used as the test case name. The default test case name is derived from the name of the trace file. A numeric suffix is appended to each test case name to make it unique.

atacICC parses C and C++ code as extended by Microsoft and IBM.

If environment variable ATAC_BLOCKONLY has a value at run-time of yes, only block coverage data is written to the trace file. This will result in faster execution and smaller trace files, however, decision, c-use, and p-use data will not be available.

If environment variable ATAC_COST has a numeric value at run-time it will be assigned as the execution cost of the test case. By default, each test case has a cost of 100. Test case costs are used by atac to compute a minimal test set (atac -M) or a cost effective ordering (atac -S).

COMPILE-TIME PARAMETERS
The registry entry in HKEYLOCALMACHINE\SOFTWARE\Cleanscape\xSuds\1.0 supports two parameters that may be used to tune the action of atacICC.

DEFINE=list of preprocessor definitions for C code

The DEFINE parameter contains a semicolon-separated list of preprocessor definitions. For example, DEFINE=-DWIN32=1;-DX86=TRUE;-DFPUBUG=FALSE is a legal parameter format.

DEFINEPP=list of preprocessor definitions for C++ code

The DEFINEPP parameter contains a semicolon separated list of preprocessor definitions as in the previous example.

EXAMPLE
The following commands display coverage for src1.c and src2.c linked with other.o and run with data for test input:
atacICC src1.c src2.c other.obj /link /out:testprog.exe
set ATAC_TRACE=testprog 
testprog < data 
atac /s /f src1.atac src2.atac testprog.trace
atac src1.atac src2.atac testprog.trace
FILES
file.atac - data-flow file.
file.trace - coverage trace.
dllatac_rt.lib - the atac run-time library, which resides in the directory pathname printed by the ataclib command.


B.11 prformat (Windows platform only)

NAME
prformat - convert underline notation from atac -u to rtf format

SYNOPSIS
prformat

DESCRIPTION
The prformat command converts underline output from the atac -u to rich text format suitable for printing from Wordpad or Word.

EXAMPLE
The output of:
  atac -u -v is:
xSuds release 1.2 Copyright (c) 1989, 1998 Cleanscape. All rights reserved.

LICENSED MATERIAL PROPERTY OF CLEANSCAPE

On filtering through the prformat command it becomes

{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}

{\f1\froman\fchar set2 Symbol;}{\f2\fmodern\fprq1 Courier New;}

{\f3\froman Times New Roman;}{\f4oman Times New Roman;}}

{\colortbl\red0\green0\blue0;}

\deflang1033\pardxSud\plain\f2\fs20 s release 1.2 Copyright (c) 1989, 1998 Cleanscape. All rights reserved.

\par \plain\f2\fs20

\par \plain\f2\fs20 LICENSED MATERIAL PROPERTY OF CLEANSCAPE

\par \plain\f2\fs20 \par }


B.12 xconfig (Windows platform only)

NAME
xconfig - Toolsuite configuration utility for Windows

SYNOPSIS
xconfig

DESCRIPTION
The xconfig command is a graphical user interface application that lets the user manage registry variables in the registry key. xconfig uses four controls, Apply, Cancel, Close, and Find Compiler to manage the settings.

Apply
Updates any variables the user has changed in the dialog.

Cancel
Exits xconfig without applying any changes to the registry.

Close
Exits xconfig and prompts the user to save changes, if any, in the registry.

Find Compiler
Searches in well-known places for either the Microsoft Visual C++ or the IBM VisualAge compilers. If either of these is installed in an unusual directory, xconfig might not locate it. The user must then manually enter the root directory by completing a dialog that allow the user to browse for the compiler. For example, if the path to the IBM icc command is C:\IBMCPPW\BIN\icc.exe then the root directory is C:IBMCPPW. The first time the user executes it after Toolsuite installation, xconfig will automatically search for each supported compiler.

REGISTRY VARIABLES
The following variables are settable from xconfig. Although there are other variables defined in the registry, these are installation options and should not be changed by the user.

DEFINE
Extra default definitions not provided by the cl.exe or icc.exe command processor for C code. The DEFINE variable contains a semicolon-separated list of preprocessor definitions. For example, DEFINE=-DWIN32=1;-DX86=TRUE;-DFPUBUG=FALSE is a legal format. Default empty.

DEFINEPP
Same as DEFINE only for C++. Default empty.

NO_INSTRUMENT
Semicolon separated list of pathname prefixes for turning off instrumentation of header files. All header files containing any of the listed prefixes in their pathnames are not instrumented. The matches are by string and are case sensitive. For example, NO_INSTRUMENT=C:;D: is a legal format. Default: drive containing compilers.

ATAC_TMP
Directory for the temporary files used by the Toolsuite. May be overridden in the environment. This variable should always be set. Default %SystemRoot%\TEMP for Windows 95 and %SystemDrive%\TEMP for Windows NT.

ATAC_COMPRESS
Controls compression of the trace file. If ATAC_COMPRESS has a value of 0, trace compression is suppressed. If ATAC_COMPRESS has a value of n, other than 0, trace compression occurs approximately once every n tests executed. A trace may be explicitly compressed using atactm. Default 1.

ATAC_COST
Default test cost for minimization. If ATAC_COST has a numeric value it will be assigned as the execution cost of the test case. Test case costs are used by atac to compute a minimal test set (atac -M) or a cost effective ordering (atac -S). Default 100.

ATAC_DIR
Directory for the trace file. If ATAC_DIR has a value, it is used as the directory for the trace file; otherwise the current directory is used. Default empty.

ATAC_SIGNAL
Not supported in this release. Default empty.

ATAC_TEST
Current test name. If ATAC_TEST has a value it is used as the test case name. The default test case name is derived from the name of the trace file. A numeric suffix is appended to each test case name to make it unique. Default empty.

ATAC_TRACE
Trace file name. When the program compiled by atacCL or atacICC is tested, a coverage trace is output to atac.trace. If ATAC_TRACE has a value, it is used as the trace file name. If the trace file already exists it is appended to. Default empty.

ATAC_CL
Root of the Microsoft Visual C++ directory subtree. ATAC_CL is set automatically by xconfig at installation or through the Find Compiler control on the xconfig dialog.

ATAC_ICC
Root of the IBM VisualAge directory subtree. ATAC_ICC is set automatically by xconfig at installation or through the Find Compiler control on the xconfig dialog.

BUGS
ATAC_SIGNAL should be implemented using Windows-style notification.


B.13 xfind

NAME
xfind - Toolsuite static analysis tool

SYNOPSIS
xfind [ options ] [ seed-file ] [code-files ...]

DESCRIPTION
Find is a language independent static analysis tool that performs transitive pattern recognition. It uses simple lexical analysis rather than a full parse to determine relationships among the elements of a language. Its intended use is to assist in identifying pieces of code that are related to one another in a thematic way.

Find uses seed files containing standard and/or customized templates to identify components with the designated patterns. It has been described as a (UNIX-like) super grep.

The principle application of Find is to analyze and delineate date-sensitive code. A default seed file is provided which includes the most frequent formats for encoding dates such as mmddyy. The tool applies the patterns in the seed file(s) to match all possible words except those included in a stop list. The stop list is user definable and typically includes keywords of the language being analyzed.

OPTIONS (the ``-'' sign preceding any of the options can be replaced by ``/'' on Windows)
-columns count
Adjust the width of the source window so count characters per line of source can be displayed.

-lines count
Adjust the height of the source window so count lines of source can be displayed at one time.

FILES
file.sd - Find seed or pattern file.
file.xfd - Find state file.
file.dif - atac dif file.


B.14 xdiff

NAME
xdiff - Toolsuite diff command

SYNOPSIS
xdiff [ filename1 ] [ filename2 ]

DESCRIPTION
The xdiff command displays two files side by side with line by line differences highlighted in color. A green background is used for lines that are changed, a blue background for lines that are added, and a red background for lines that are deleted. Customized bit-mapped scroll bars summarize the differences between the two files. The scrolling can be either synchronized or independent. In the synchronized mode, when one file is scrolled up or down, the other file scrolls to ensure that changes are displayed side by side in the two text windows. In the non-synchronized mode, only the file in the text window under the mouse is scrolled while the other file remains unmoved. xdiff also reports the number of changes, additions, and deletions that have to be made to bring two files into agreement.





[Top] [Prev] [Next] [Index] [TOC]