arXiv:2609.37728cs.LOSep 2026

Manuscript Offprint

arXiv:2609.37728

Formal Reasoning about Performance Models

Moussa Labbadi, Rupak Majumdar, V. R. Sathiyanarayana, Sadegh Soudjani

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

MOUSSA LABBADI, Bretagne INP–ENIB, IRDL (CNRS UMR 6027), France

RUPAK MAJUMDAR, Max Planck Institute for Software Systems (MPI-SWS), Germany

V.R. SATHIYANARAYANA, Max Planck Institute for Software Systems (MPI-SWS), Germany

SADEGH SOUDJANI, University of Birmingham, United Kingdom, and MPI-SWS, Germany

Discrete-event simulation is a standard technique for modelling and analysing the performance of computer systems, networks, and services. Although simulation tools are widely used, reasoning about the correctness and performance guarantees of the models they implement remains largely ad-hoc: simulation outputs are interpreted statistically, but there is no logical foundation for deductive reasoning about their behaviour. We present a core imperative calculus that captures the essential constructs common to discrete-event simulators—asynchronous execution, continuous and discrete sampling from distributions, and time-based event scheduling through a global event queue. On top of this calculus, we develop a proof system for reasoning about almost-sure reachability and expected reaching time properties. Our main result is a sound and complete proof rule for these properties. Our framework generalizes deductive reasoning for (discrete-time) probabilistic programs to the setting of performance models, in which continuous time and continuous-probability distributions are central. We have implemented the proof rules in a tool embedded in Lean. We demonstrate the applicability of our proof rule by deriving proofs of almost sure reachability and expected time for a number of case studies, including client-server examples that go beyond analytic solutions from queueing theory as well as convergence behaviours in network routing protocols. Establishing the soundness and completeness of our proof rules requires significantly more complex arguments than in the discrete-time setting. This is due to the to the fundamentally discontinuous nature of the operational semantics, and to the measure-theoretic challenges of continuous time and probability distributions.

1 Introduction

Discrete-event simulation underlies modern performance modeling of computer systems, distributed services, and communication networks [28, 36, 56]. Simulation frameworks allow engineers to prototype performance-related algorithms, such as scheduling policies, admission control, and load-balancing strategies before service deployment. Yet, despite decades of engineering practice, reasoning about these systems' performance remains empirical: performance and stability are evaluated by repeated simulation and statistical estimation rather than by formal proofs. This empirical approach fails to provide guarantees. As systems incorporate asynchronous flows and complex real-time feedback, we increasingly need formal reasoning principles to answer questions related to stability and resilience: Does the backlog in the system clear almost surely? Is the expected response time finite? Does the system remain stable under all arrival rates? Providing a sound and complete logical framework to answer such questions has been an open challenge.

Classical program logics offer deductive methods for correctness and termination of sequential programs [5, 33, 45]. However, these frameworks reason about step-based computations without an explicit model of real time or event scheduling. In contrast, discrete-event systems feature (i) a global event queue ordered by timestamps, (ii) probabilistic and continuous delay distributions, and (iii) interleaving of asynchronous components through event posting. Simulation languages define their semantics operationally but provide no proof theory [46]. Existing probabilistic program logics handle almost-sure termination [37, 43, 47, 49], but do not account for event-driven scheduling and continuous-time events. Algebraic frameworks [4, 24] model finite-state packet-processing

Authors' Contact Information: Moussa Labbadi, Bretagne INP–ENIB, IRDL (CNRS UMR 6027), Brest, France, moussa.labbadi@enib.fr; Rupak Majumdar, Max Planck Institute for Software Systems (MPI-SWS), Kaiserslautern, Germany, rupak@mpi-sws.org; V.R. Sathiyanarayana, Max Planck Institute for Software Systems (MPI-SWS), Kaiserslautern, Germany, sramesh@mpi-sws.org; Sadegh Soudjani, University of Birmingham, United Kingdom, and MPI-SWS, Kaiserslautern, Germany, sadegh@mpi-sws.org.

Moussa Labbadi, Rupak Majumdar, V.R. Sathiyanarayana, and Sadegh Soudjani

behaviors in communication networks, but lack support for continuous sampling and event-driven dynamics. Consequently, there is currently no sound and complete proof system for reasoning about performance and termination properties of probabilistic discrete-event systems.

We address this gap by introducing DES, a core calculus that abstracts the key mechanisms shared by discrete-event simulators. DES systems consist of finite sets of procedures; each may perform sequential computation, make discrete probabilistic choices, sample from (continuous) probability distributions, and schedule future procedure calls asynchronously. Their execution is driven by a global event scheduler that dequeues the earliest event in time order and executes its procedure body. Our language captures the essence of simulation engines in a minimal, mathematically precise form suitable for reasoning.

We study almost-sure reachability (is a target reached with probability one?) and expected reaching time for DES systems. These are fundamental questions in performance analysis. We show sound and complete proof rules for these properties. The rule for almost-sure reachability requires drift and variant functions, similar to discrete-time, countable state models. The rule for expected reaching time requires a supermartingale function that dominates the hitting time.

While sound and complete proof rules have been studied for discrete-time probabilistic programs, reasoning about DES introduces new mathematical challenges. When we allow sampling over time and other continuous distributions, the state space is uncountable and can have uncountably many successors. Thus, our semantics involve the theory of Markov processes over general topological spaces. Existing techniques related to proving stability of Markov processes assume that the process is continuous (weak Feller) [44, 51]. Unfortunately, this assumption does not hold for DES systems! The trajectory of a DES system for two close states may be very different, e.g., because the code makes a conditional decision or because one handler is executed before the other.

Dealing with uncountable state and non-continuous dynamics makes our proof very difficult. Our proof of completeness requires new and subtle topological arguments based on petite sets and their properties [51, 62], as well as topological arguments (Egorov's theorem) that connects pointwise convergence of measurable functions with uniform convergence.

We have formalized DES and our proof rules in Leonides. Leonides embeds DES in Lean [18]. Given a DES system, together with drift and variant candidates, Leonides provides custom tactics to discharge proof obligations arising out of our proof rules. We have used Leonides to prove several variations of client–server systems with feedback, timeouts, and retries, a canonical performance model used in service-level analysis [28, 31, 38]. Expressed in DES, this model becomes an infinite-state probabilistic system with scheduled events representing arrivals, completions, and timeouts. The almost-sure reachability property we prove consists in proving that some queues in the system empty out almost surely from any configuration; this corresponds to checking that the system is stable and backlogs are cleared and is a critical performance property in request-response systems. The expected reaching time shows the expected time for backlogs to clear. Our proof rules are able to show this property, even when the underlying model does not fall into an analytically tractable subclass of queueing systems.

As a larger case study, we prove a routing protocol from networking [21] that shows a surprising time synchronization among distributed nodes. Synchronization occurs even in the presence of jitter—which was added to ensure that nodes do not synchronize! [21] explored this phenomenon using network simulations and simulations of a simple discrete Markov model. We show the first formal proof that synchronization occurs almost surely in the protocol. These examples demonstrate that DES and Leonides captures many fundamental models in performance evaluation, including those going beyond analytical closed-form solutions from queueing theory, as well as real protocols for which deductive verification was not possible before.

In summary, we make the following contributions:

(1) Core calculus for discrete-event simulation. We formalize DES, a minimal imperative language capturing asynchronous concurrency, probabilistic choice, sampling from continuous distributions, continuous-time evolution, and time-based event scheduling. We define operational semantics for DES that model interaction between probabilistic execution and the global event scheduler, and show that these semantics produce Markov processes.

(2) Proof system. We present the first sound and complete proof rule for reasoning about almost-sure reachability and expected reaching time for DES systems.

(3) Tool and case studies. We develop Leonides, a mechanized proof environment for DES embedded in Lean. Leonides formalizes the semantics of DES, mechanizes the soundness of our proof system, and provides tactics for proving almost-sure reachability and expected reaching-time properties. We demonstrate its effectiveness on a number of performance models for server systems and network routing protocols.

Our results establish a bridge between formal program verification and performance modeling. By providing a sound and complete logical foundation for discrete-event systems, we move beyond simulation-based validation toward provable performance guarantees and open the way for formal reasoning tools for system performance.

References (73)