Abstract
Designing Cyber-Physical Systems (CPS) with strict timing requirements often involves complex formal modeling using Timed Automata (TA). However, manual construction is error-prone and requires deep expertise in managing clock variables and temporal logic. This paper presents ATAC (Automated Timed Automata Construction), a tool that bridges the semantic gap by translating structured natural language descriptions into formal TA models and TCTL queries. By automating clock allocation and reduction, ATAC allows designers to focus on high-level requirements while ensuring rigorous verification in tools like UPPAAL.
Introduction
The design of modern Cyber-Physical Systems (CPS) is increasingly fraught with complexity, particularly when safety-critical timing constraints are involved. Engineers frequently turn to Timed Automata (TA) to model these systems, but the manual construction of such models is a double-edged sword. It demands significant formal methods expertise and is highly susceptible to human error.
One of the primary challenges in TA design is the management of "clocks"—continuous variables that track the passage of time. Deciding when to instantiate a clock, where to place resets, and how to minimize the total number of clocks to prevent "state space explosion" during verification is a tedious and error-prone process. Furthermore, translating requirements into Timed Computation Tree Logic (TCTL) queries is often unintuitive for non-specialists. ATAC addresses this "semantic gap" by providing a compiler-like framework that transforms structured natural language into formal models.
The ATAC Framework
ATAC functions as a bridge between high-level system descriptions and formal verification environments. The tool's architecture relies on several key technical components:
Structured Natural Language (SNL) Grammars
The core of ATAC is its use of two formal grammars. The first, $\phi_{TA}$, is used for system behavior descriptions (e.g., "Train can send Appr and go from Safe to Appr"). The second, $\phi_{spec}$, handles the formalization of verification requirements. By restricting the input to a well-defined subset of English, the tool ensures that descriptions are both human-readable and machine-parsable.
Automated Clock Management
A standout feature of ATAC is its ability to infer clocks implicitly from text. Instead of requiring the user to manually define and reset clocks, the tool identifies timing constraints within the SNL. For instance, if a requirement mentions "the time spent after entering Appr," ATAC automatically allocates a clock and ensures it resets on every transition into the "Appr" state. To maintain verification efficiency, the tool incorporates a clock reduction algorithm that identifies opportunities for multiple constraints to share a single clock without altering system semantics.
Verification Integration
ATAC maps natural language phrases directly to formal logic operators. For example, the phrase "shall always" is automatically translated to the A[] (Always Globally) operator in TCTL. The tool's final output consists of an XML file for the TA model and a .q file for the queries, both of which are fully compatible with UPPAAL, the industry standard for TA verification.
Case Study: The Train-Gate Model
To evaluate the tool, the authors utilized the classic Train-Gate benchmark. This model represents a coordination problem where multiple trains must safely navigate a single-track crossing controlled by a gate. It involves complex synchronization, strict timing bounds, and critical safety properties.
As shown in the figure above, ATAC successfully generates the functional "skeleton" of the model (Figures 1a and 1c). While the tool handles the primary timing and state transitions, it is designed to work alongside human designers. For highly complex logic—such as the C-like data structures used for train queuing—the designer can manually refine the automated output (Figures 1b and 1d) to reach the final, verified model.
Key Insights and Results
The evaluation of ATAC yielded several important insights:
- The Skeleton Approach: By positioning itself as an assistance tool, ATAC removes the "plumbing" of formal modeling (clocks and resets), allowing designers to focus on the core logic.
- Optimization: The clock reduction algorithm proved effective, producing models that are as efficient as those hand-optimized by experts.
- Verification Readiness: The generated TCTL queries were valid and executable in UPPAAL, confirming the semantic accuracy of the natural language mapping.
- Liveness Shorthand: The tool introduces a clever shorthand for bounded liveness ("Location L shall hold within every N"), which automatically generates hidden observer clocks to verify system progress.
Limitations and Future Work
Despite its strengths, ATAC has limitations. The input language, while "natural," is strictly structured and does not support arbitrary conversational English. Additionally, advanced UPPAAL features like non-deterministic integer selection or complex C-style functions still require manual intervention. Future development may focus on expanding the grammar or integrating graphical interfaces to manage the descriptions of extremely large systems.
Conclusion
ATAC represents a significant step toward democratizing formal verification for CPS. By automating the most tedious aspects of Timed Automata construction, it reduces the barrier to entry for engineers and minimizes the likelihood of modeling errors, ultimately leading to safer and more reliable system designs.
Summary updated