Skip to main content
QUICK REVIEW

[Paper Review] Model-Based Trace-Checking

Yvonne Howard, Stefan Grüner|arXiv (Cornell University)|Nov 11, 2011
Software Testing and Debugging TechniquesComputer Science21 references11 citations
TL;DR

This paper proposes model-based trace-checking, where program traces are validated against formal models using standard model-checkers like Spin and Pro-B. By instrumenting a J2EE Travel Agent system with trace beans to log execution traces, the authors demonstrate that these traces can be converted into input for formal verification tools, proving the approach feasible across multiple formal notations and highlighting its potential for automated, scalable debugging in complex systems.

ABSTRACT

Trace analysis can be a useful way to discover problems in a program under test. Rather than writing a special purpose trace analysis tool, this paper proposes that traces can usefully be analysed by checking them against a formal model using a standard model-checker or else an animator for executable specifications. These techniques are illustrated using a Travel Agent case study implemented in J2EE. We added trace beans to this code that write trace information to a database. The traces are then extracted and converted into a form suitable for analysis by Spin, a popular model-checker, and Pro-B, a model-checker and animator for the B notation. This illustrates the technique, and also the fact that such a system can have a variety of models, in different notations, that capture different features. These experiments have demonstrated that model-based trace-checking is feasible. Future work is focussed on scaling up the approach to larger systems by increasing the level of automation.

Motivation & Objective

  • To explore the feasibility of using formal model-checkers to analyze program traces instead of custom trace analysis tools.
  • To evaluate whether traces from real-world systems can be effectively translated into inputs for formal verification tools.
  • To demonstrate the interoperability of different formal notations (e.g., B notation and Promela) in analyzing the same system traces.
  • To assess the practicality of integrating trace collection with formal verification in a production-like software environment.
  • To lay the foundation for scaling model-based trace-checking to larger, industrial-scale systems through increased automation.

Proposed method

  • Instrumenting a J2EE-based Travel Agent application with trace beans that log execution events to a database.
  • Extracting and transforming the logged traces into a format compatible with model-checkers such as Spin (for Promela) and Pro-B (for B notation).
  • Using Spin to perform formal trace checking by modeling system behavior and verifying trace compliance.
  • Employing Pro-B as both a model-checker and animator to validate traces against executable B specifications.
  • Supporting multiple formal models in different notations to capture diverse system properties and behaviors.
  • Applying standard formal verification techniques to real execution traces, enabling automated detection of behavioral anomalies.

Experimental results

Research questions

  • RQ1Can program traces from a real-world J2EE application be effectively validated using formal model-checkers?
  • RQ2To what extent can existing model-checking tools like Spin and Pro-B be adapted to analyze runtime traces instead of system models?
  • RQ3How do different formal notations (e.g., B and Promela) compare in their ability to express and verify the same trace behavior?
  • RQ4What are the practical challenges in integrating trace collection with formal verification in a production software stack?
  • RQ5Can the trace-checking pipeline be automated and scaled to larger, more complex systems?

Key findings

  • Model-based trace-checking is feasible for real-world systems, as demonstrated by successful validation of traces from a J2EE Travel Agent application.
  • The approach supports multiple formal notations, enabling complementary analysis of different system properties using tools like Spin and Pro-B.
  • Trace beans effectively capture runtime behavior and enable deterministic, repeatable analysis through formal verification.
  • The integration of trace logging with formal tools reduces the need for custom trace analysis logic, simplifying debugging and verification.
  • The method enables early detection of behavioral inconsistencies by comparing actual execution traces against formal models.
  • The experiments show that existing model-checking tools can be effectively repurposed for trace validation, opening pathways for automation and scalability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.