ACATS 4.1 User's Guide
Title Page
Contents   Index   References   Previous   Next 

6.2.1 Event Trace File Reference

An event trace file is a CSV (Comma Separated Value) file of event records. See 6.5, “CSV File Reference” for the general rules for constructing a CSV file.
An event trace file record contains the following comma-separated fields on a single line:
Event
One of UNKN (Unknown), CSTART (Compilation_Start), CEND (Compilation_End), CERR (Compile_Error), CWARN (Compile_Warning), BSTART (Binder_Start), BEND (Binder_End), BERR (Binder_Error), BWARN (Binder_Warning), EXSTART (Execution_Start), EXEND (Execution_End), EXFAIL (Execution_Failure), EXNA (Execution_Not_Applicable), EXSACT (Execution_Special_Action), EVENT (see below). These values are case-insensitive. "EVENT" is treated as specifying a comment; it usually appears in column headers.
Timestamp
The timestamp, double quoted, in the format specified by Ada.Calendar.Formatting.Image.
Name
The double quoted name of the source file, main subprogram, or test. For Compilation events, this is the simple name of the source file. For Binder events, this is the name of the main subprogram. For Execution events, this is the name of the test as passed to Report.Test.
Line
For Compilation_Start, the first line of the current compilation unit. (Usually 1, unless there are multiple compilation units in a single file.) For Compile_Error or Compile_Warning, the line number where that error or warning is reported. (This is critical to the correct operation of the grading tool.) Otherwise, it is not used and can be omitted other than the comma separator.
Position
For Compile_Error or Compile_Warning, the position within the line that on which the error is reported. An implementation does not have to provide a meaningful Position for errors (use the -No_Position option on the Grading Tool - see 6.1.4 if this is true for your implementation). Otherwise, it is not used and can be omitted other than the comma separator.
Message
The double quoted message (make sure to replace any double quotes, as they are not allowed in double quoted strings). For Compile and Binder Errors and Warnings, this is the message emitted by the appropriate tool. For Execution events, this is the message passed to Report. For End events, this is an implementation-defined result of the operation (OK, with Errors, Passed, Failed, and so on). If there is no appropriate message, nothing need be written for this field (as it is last, there is no trailing comma).
The order of the event records in the event trace file is unimportant to the Grading Tool; it will sort the records appropiately before grading. (The order of the timestamps in the records does matter; running before compiling and the like indicate a test processing problem.)
The record types used by the Ada implementation of this file can be found in Trace.A.
There is an example of writing an event trace file in the file Report.A, in procedure Put_Event_Trace. Most of the code involves limiting the length of, and removing any double quotes from, the (quoted) message string. Note that Put_Event_Trace writes column headers into a new file, so that headers exist if the file is loaded into a spreadsheet or database. This is recommended for any tool that creates an event trace.
The Grading Tool treats any record that starts with EVENT as a comment; this skips any headers and allows event trace files to be concatenated together for combined processing.

For the purposes of an event trace, a "compile" is the part of an Ada implementation that processes Ada source code and provides diagnostics to diagnose Ada errors (specifically syntax errors, resolution errors, and violations of Legality Rules). This does not need to be a single phase or program; it could be several cooperating programs. Moreover, the "compile" events only need to include parts of the implementation that are involved in diagnosing errors. Code generation and optimization are part of a conventional compiler that can be omitted from the "compile" as defined for an event trace. (A failure in one of these phases not included in "compile" would probably cause a test to be graded as crashed or with a failed bind.)
Similarly, a "bind" is the part of an Ada implementation that creates an Ada partition and enforces post-compilation rules not enforced by the compile stage. (The compiler is allowed to enforce post-compilation rules y the Ada Standard.) This also does need not be a single program, and it only needs to include phases that enforce Ada errors. For instance, a system linker need not be included in the event trace for the "bind" operation.

Not all of the information in an event trace is currently used by the Grading Tool. We included additional information (like warnings) in part because future versions of the ACATS tools might need them and changing the format in the future could be very disruptive. In addition, it's possible that this compiler-independent event format could be useful to other future ACATS tools or even third-party tools having nothing to do with the ACATS. As such, we included all of the information that seemed potentially useful.
Here is part of an event trace for Chapter 5 C-Tests:
Event,"Timestamp","Name","Line","Position","Message"
CSTART,"2016-05-16 23:16:41.05","C51004A.ADA", 1, 1,""
CEND,"2016-05-16 23:16:41.13","C51004A.ADA",,,"OK"
BSTART,"2016-05-16 23:16:41.14","C51004A",,,""
BEND,"2016-05-16 23:16:41.27","C51004A",,,"OK"
EXSTART,"2016-05-16 23:16:41.33","C51004A",,,"CHECK THAT LABELS, LOOP IDENTIFIERS, AND BLOCK"
EXEND,"2016-05-16 23:16:41.33","C51004A",,,"Passed"
CSTART,"2016-05-16 23:16:41.38","C52005A.ADA", 1, 1,""
CEND,"2016-05-16 23:16:41.44","C52005A.ADA",,,"OK"
BSTART,"2016-05-16 23:16:41.45","C52005A",,,""
BEND,"2016-05-16 23:16:41.56","C52005A",,,"OK"
EXSTART,"2016-05-16 23:16:41.64","C52005A",,,"CHECK THAT CONSTRAINT_ERROR EXCEPTION IS RAISED"
EXEND,"2016-05-16 23:16:41.64","C52005A",,,"Passed"
CSTART,"2016-05-16 23:16:41.70","C52005B.ADA", 1, 1,""
CEND,"2016-05-16 23:16:41.77","C52005B.ADA",,,"OK"
BSTART,"2016-05-16 23:16:41.78","C52005B",,,""
BEND,"2016-05-16 23:16:41.89","C52005B",,,"OK"
EXSTART,"2016-05-16 23:16:41.95","C52005B",,,"CHECK THAT CONSTRAINT_ERROR EXCEPTION IS RAISED"
EXEND,"2016-05-16 23:16:41.95","C52005B",,,"Passed"
CSTART,"2016-05-16 23:17:06.36","C55B07B.DEP", 1, 1,""
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 45, 14,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 47, 39,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 51, 27,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 52, 27,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 57, 32,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 58, 32,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 58, 52,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 83, 21,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 83, 21,"Only discrete types may b
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 99, 18,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.41","C55B07B.DEP", 107, 18,"Identifier is not defined"
CERR,"2016-05-16 23:17:06.42","C55B07B.DEP", 109, 26,"Identifier is not defined"
CEND,"2016-05-16 23:17:06.42","C55B07B.DEP",,,"Aborted by semantic errors"
BSTART,"2016-05-16 23:17:06.44","C55B07B",,,""
BERR,"2016-05-16 23:17:06.44","C55B07B",,,"Main program file not found"
BEND,"2016-05-16 23:17:06.44","C55B07B",,,"Aborted by errors"

Contents   Index   References   Previous   Next