TraceContract is an API for trace analysis, implemented in the Scala programming language. We argue that for certain forms of trace analysis the best weapon is a high level programming language augmented with constructs for temporal reasoning. A trace is a sequence of events, which may for example be generated by a running program, instrumented appropriately to generate events. The API supports writing properties in a notation that combines an advanced form of data parameterized state machines with temporal logic. The implementation utilizes Scala’s support for defining internal Domain Specific Languages (DSLs). Furthermore Scala’s combination of object-oriented and functional programming features, including partial functions and pattern matching, makes it an ideal host language for such an API.
© [2011]. California Institute of Technology. ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged. Any commercial use must be negotiated with the Office of Technology Transfer at the California Institute of Technology. The technical data in this document is controlled under the U.S. Export Regulations, release to foreign persons may require an export authorization.