java.lang.Object
dev.civl.gmc.LogEntry
- All Implemented Interfaces:
Comparable<LogEntry>
An entry in an error log. Each entry reports one error encountered during a
model checking session. The application must extend this abstract class to a
concrete class by implementing several methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intCompares this with another log entry in the natural order.abstract booleanDetermines whether this log entry is equal to the given object.Returns the configuration which will be used to replay the trace.intgetId()Retunrs the ID number of this log entry, which should be unique within the log to which it belongs.intReturns the length of the trace.Returns the file to which the trace is saved.voidprint(PrintStream out) Prints this log entry to the given stream.abstract voidprintBody(PrintStream out) Prints an explanation of the error.
-
Constructor Details
-
LogEntry
Default construtor: does nothing.
-
-
Method Details
-
printBody
Prints an explanation of the error. Make this as precise as possible, showing relevant variable values, line numbers, and other source information.- Parameters:
out- the stream to which to print
-
compareTo
Compares this with another log entry in the natural order. The order should be defined so that higher priority errors come first. Should be compatible with equals.- Specified by:
compareToin interfaceComparable<LogEntry>
-
equals
Determines whether this log entry is equal to the given object. The given object must be a log entry. Two entries may be considered equal if they represent "essentially" the same error. For example, two violations of the same assertion may be considered equal. The exact choice depends on how many errors you want to report. The log will only record one error from each equivalence class under the equivalence relation defined by this equals method. -
getConfiguration
Returns the configuration which will be used to replay the trace.- Returns:
- the configuration
-
getId
public int getId()Retunrs the ID number of this log entry, which should be unique within the log to which it belongs.- Returns:
- the ID number of this log entry
-
getTraceFile
Returns the file to which the trace is saved.- Returns:
- the file for the trace
-
getLength
public int getLength()Returns the length of the trace.- Returns:
- the length of the trace
-
print
Prints this log entry to the given stream.- Parameters:
out- stream to which to print
-