Skip to Main Content
Deterministic replay debugging is a technique aimed at finding and debugging software failures occurring in field operation that are usually hard to reproduce. With deterministic replay debugging a software run is recorded, so that it can be reproduced deterministically in a debugger. While deterministic replay debugging is capable of reproducing a failure, in practice, especially in the case of a long-running application, it is still hard for the developer to locate the exact position of the failure in the trace log. Based on our previous work on deterministic replay debugging, we propose an approach to use behavior specifications in the form of test cases to search a recorded trace log. We first present a formal approach for the specification of test cases for PLC applications based on hybrid automata. Then we present a method for searching a recorded program trace for occurrences of the test scenario. That way, we can not only identify regions where a specification violation occurred, but also the corresponding regions in the trace where the test case passed, which can then be further used for comparison. We present the theoretical background of our approach, an implementation of the trace search algorithm, and an example application.