NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Clock Difference Diagrams

Kim G. Larsen, Carsten Weise, Yi Wang, Justin Pearson

Abstract

We sketch a BDD-like structure for representing unions of simple convex polyhedra, describing the legal values of a set of clocks given bounds on the values of clocks and clock differences.

Introduction

In the formal verification of real-time systems, timed automata serve as a foundational model. These state machines utilize clocks to track time, and verification requires representing and manipulating sets of possible clock values. Historically, two primary data structures have been used: Difference Bound Matrices (DBMs) and Binary Decision Diagrams (BDDs). While DBMs are efficient for representing "zones" (convex sets of clock constraints), they struggle with non-convex unions of these zones, often referred to as "federations."

Binary Decision Diagrams excel at representing complex discrete logic through sub-graph sharing but are not natively designed for continuous real-valued variables. Clock Difference Diagrams (CDDs) are introduced to bridge this gap, combining the logic-sharing capabilities of BDDs with the continuous-time handling of DBMs.

The Clock Difference Diagram Structure

A CDD is a directed acyclic graph (DAG) designed to represent federations of clock zones. The structure consists of:

  • Inner Nodes: Each node represents a specific clock constraint, such as an individual clock value ($x$) or the difference between two clocks ($x - y$).
  • Edges: Outgoing edges from a node are labeled with disjoint intervals (e.g., $[1, 3)$ or $[5, \infty)$), partitioning the continuous space.
  • Terminal Nodes: These represent the boolean results TRUE (often denoted as 1) or FALSE.

To ensure computational efficiency and a canonical representation, CDDs adhere to several structural rules: orderedness (constraints follow a fixed linear order), disjointness (intervals on edges from the same node do not overlap), and sharing (identical sub-graphs are merged).

Examples of Clock Difference Diagrams representing various clock zones and their corresponding graph structures.

Operations and Normalization

CDDs support standard set operations like union and intersection through recursive algorithms. Furthermore, they facilitate specific timed automata operations such as clock resets and calculating future reachable values (time passage).

A critical feature of CDDs is the ability to achieve a Normal Form. While a federation can have multiple CDD representations, it can be reduced to a unique, canonical form. This process involves translating paths into DBMs, narrowing them to their tightest possible constraints (canonical DBM form), and then reconstructing the CDD. This uniqueness is vital for efficient identity checking between complex clock sets.

Key Insights: Constraint Propagation

A significant advancement in CDD logic is the use of local transformations for constraint propagation. By "pushing" constraints throughout the graph, the structure can prune impossible paths early. For instance, if a high-level node establishes $x < 5$, lower-level nodes can use this bound to simplify their own intervals or immediately identify a path as FALSE. This mechanism allows for efficient inclusion testing ($A \subseteq B$) without requiring full normalization.

Conclusion

Clock Difference Diagrams provide a robust framework for handling the non-convex clock federations encountered in real-time system verification. By integrating the strengths of BDDs and DBMs, CDDs offer a path toward more scalable verification tools. Future work involves optimizing the normalization process and conducting empirical benchmarks against existing DBM-based libraries to quantify the performance gains in practical scenarios.

Summary updated

BibTeX
@inproceedings{larsen1998clock,
  author = {Kim G. Larsen and Carsten Weise and Yi Wang and Justin Pearson},
  title = {{Clock Difference Diagrams}},
  booktitle = {BRICS},
  year = {1998},
  doi = {10.7146/brics.v5i46.19491},
}
Figure