Recognition: unknown
Towards Formal Verification of Hybrid Synchronous Programs with Refinement Types
Pith reviewed 2026-05-08 16:58 UTC · model grok-4.3
The pith
Refinement types extended with hybrid semantics enable sound verification of synchronous programs with continuous dynamics.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
We formalize the operational semantics of initial value problems and zero-crossing detection in a synchronous programming language, extend its refinement type system to support verification of these hybrid features, and prove that the extended type system is sound with respect to the semantics.
What carries the argument
The refinement type system extended to handle hybrid behaviors, which uses the formalized operational semantics to ensure that typed programs satisfy their safety specifications during both discrete and continuous phases.
If this is right
- Hybrid programs can be both executed and verified in the same language without needing separate abstract models.
- Safety properties involving continuous dynamics, such as avoiding certain thresholds, can be statically checked.
- The soundness proof provides a rigorous guarantee that verified programs will not violate their specifications.
- This approach applies to a wider variety of cyber-physical system controllers that include differential equations.
Where Pith is reading between the lines
- Integrating this verification into compilers could allow automatic checking of control code for robots and aircraft.
- The method might extend to other hybrid features like mode switches or stochastic elements in future developments.
- Comparing this semantics to standard hybrid automata could reveal equivalences or differences in expressiveness.
Load-bearing premise
The operational semantics for initial value problems and zero-crossing detection provide an accurate model of real-world continuous physical behavior that the type system can rely on for soundness.
What would settle it
A counterexample program that satisfies the refinement types but produces an execution trace violating a specified safety property during continuous evolution, or a mismatch between the formalized zero-crossing detection and actual numerical solvers in a test case.
Figures
read the original abstract
Cyber-physical systems (CPS) such as autonomous cars, aircraft, and robots are often also safety-critical; thus it is imperative that they operate as intended with a high degree of certainty. Formal verification has been employed to verify the software controlling these systems, but due to their complexity, is usually performed on an abstract model rather than the executable code. Synchronous programming languages extended with differential equations promise both rigorous modeling and sufficient expressiveness to implement executable controller code, and recent developments have introduced formal verification of strictly discrete-time programs. Extending these verification techniques to hybrid systems enables precise modeling of the environment for a wider variety of programs to be both verified and executed. We formalize the operational semantics of initial value problems and zero-crossing detection expressed in a synchronous programming language, extend its type system for verification thereof, and prove its soundness.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript formalizes the operational semantics of initial value problems (IVPs) and zero-crossing detection within a synchronous programming language for hybrid systems. It extends the language's type system with refinement types to support verification of safety properties and includes a proof of soundness for the resulting verification framework.
Significance. If the soundness proof is complete and the chosen hybrid semantics are faithful, the work would be significant for enabling direct formal verification of executable controller code in cyber-physical systems rather than relying solely on separate abstract models. This approach could improve precision and reduce modeling gaps in safety-critical domains such as autonomous vehicles and robotics, while the use of refinement types offers a practical mechanism for expressing and checking continuous-discrete properties.
major comments (1)
- [Abstract / soundness proof] Abstract and soundness section: the claim of a soundness proof is central, yet the provided description does not detail the lemmas, induction strategy, or explicit treatment of edge cases in the hybrid semantics (e.g., non-unique IVP solutions or chattering zero-crossings). Without these, gaps in the proof cannot be ruled out and the central claim remains difficult to verify.
minor comments (1)
- [Introduction / semantics section] The weakest assumption noted (modeling fidelity of IVPs and zero-crossings) is an external-validity concern rather than an internal inconsistency; if the paper intends to address it, a brief discussion of the chosen mathematical semantics versus real-world approximations would strengthen the presentation.
Simulated Author's Rebuttal
We thank the referee for their careful reading of the manuscript and for highlighting the need for greater clarity in the presentation of the soundness proof. We address the major comment below.
read point-by-point responses
-
Referee: [Abstract / soundness proof] Abstract and soundness section: the claim of a soundness proof is central, yet the provided description does not detail the lemmas, induction strategy, or explicit treatment of edge cases in the hybrid semantics (e.g., non-unique IVP solutions or chattering zero-crossings). Without these, gaps in the proof cannot be ruled out and the central claim remains difficult to verify.
Authors: We agree that the abstract is high-level by design and that the soundness section would benefit from additional exposition to facilitate verification of the proof. We will revise the manuscript to include an explicit outline of the lemmas, the induction strategy (by induction over derivation length in the operational semantics), and dedicated discussion of the cited edge cases. In particular, we will state the Lipschitz conditions under which IVP uniqueness holds in our semantics and add a lemma establishing that the zero-crossing detection rule precludes chattering. These additions will be placed in the soundness section without altering the underlying formalization. revision: yes
Circularity Check
No significant circularity in formal semantics and soundness proof
full rationale
The paper defines operational semantics for initial value problems and zero-crossings, extends a refinement type system, and proves soundness. This follows the standard structure of formal methods work: semantics are introduced as a mathematical model, the type system is defined relative to it, and soundness is established by induction or similar proof techniques. No load-bearing step reduces by construction to a fitted parameter, self-citation chain, or renamed input; the derivation is self-contained against the external mathematical semantics of hybrid systems rather than being tautological.
Axiom & Free-Parameter Ledger
axioms (2)
- standard math Operational semantics of initial value problems for differential equations
- domain assumption Zero-crossing detection semantics in synchronous languages
Reference graph
Works this paper leans on
-
[1]
In: Grossman, R.L., Nerode, A., Ravn, A.P., Rischel, H
Alur, R., Courcoubetis, C., Henzinger, T.A., Ho, P.: Hybrid automata: An al- gorithmic approach to the specification and verification of hybrid systems. In: Grossman, R.L., Nerode, A., Ravn, A.P., Rischel, H. (eds.) Hybrid Systems. Lec- ture Notes in Computer Science, vol. 736, pp. 209–229. Springer (1993).https: //doi.org/10.1007/3-540-57318-6_30
-
[2]
Bartocci, E., Deshmukh, J., Donzé, A., Fainekos, G., Maler, O., Ničković, D., Sankaranarayanan, S.: Specification-based monitoring of cyber-physical systems: a survey on theory, tools and applications. In: Lectures on Runtime Verification: Introductory and Advanced Topics, pp. 135–175. Springer (2018).https://doi. org/10.1007/978-3-319-75632-5_5
-
[3]
Benveniste, A., Bourke, T., Caillaud, B., Pouzet, M.: Non-standard semantics of hybridsystemsmodelers.JournalofComputerandSystemSciences78(3),877–910 (2012).https://doi.org/10.1016/j.jcss.2011.08.009
-
[4]
Benveniste, A., Bourke, T., Caillaud, B., Pouzet, M.: Non-standard semantics of hybridsystemsmodelers.JournalofComputerandSystemSciences78(3),877–910 (2012)
2012
-
[5]
In: Proceedings of the ninth ACM international conference on Embedded software - EMSOFT ’11
Benveniste, A., Bourke, T., Caillaud, B., Pouzet, M.: A hybrid synchronous lan- guage with hierarchical automata: static typing and translation to synchronous code. In: Proceedings of the ninth ACM international conference on Embedded software - EMSOFT ’11. p. 137. ACM Press, Taipei, Taiwan (2011).https: //doi.org/10.1145/2038642.2038664
-
[6]
Proceedings of the IEEE 91(1), 64–83 (2003).https://doi.org/10.1109/JPROC.2002.805826
Benveniste, A., Caspi, P., Edwards, S.A., Halbwachs, N., Le Guernic, P., De Si- mone, R.: The synchronous languages twelve years later. Proceedings of the IEEE 91(1), 64–83 (2003).https://doi.org/10.1109/JPROC.2002.805826
-
[7]
In: Ritter, G
Berry, G.: Real time programming: Special purpose or general purpose languages. In: Ritter, G. (ed.) Information Processing ’89: Proceedings of the IFIP 11th World Computer Congress. pp. 11–17. Elsevier Science Publishers B.V. (North-Holland) (1989)
1989
-
[8]
Science of Computer Programming19(2), 87–152 (1992).https://doi.org/10.1016/0167-6423(92)90005-V
Berry, G., Gonthier, G.: The Esterel synchronous programming language: De- sign, semantics, implementation. Science of Computer Programming19(2), 87–152 (1992).https://doi.org/10.1016/0167-6423(92)90005-V
-
[9]
Bourke,T.,Pouzet,M.:Zélus:AsynchronouslanguagewithODEs.In:Proceedings of the 16th international conference on Hybrid systems: computation and control. pp. 113–118 (2013).https://doi.org/10.1145/2461328.2461348
-
[10]
In: Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Caspi, P., Pilaud, D., Halbwachs, N., Plaice, J.A.: Lustre: a declarative language for real-time programming. In: Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages. pp. 178–188 (1987).https: //doi.org/10.1145/41625.41641
-
[11]
Springer (1991).https://doi.org/ 10.1007/978-1-4757-3922-0
Cellier, F.E.: Continuous System Modeling. Springer (1991).https://doi.org/ 10.1007/978-1-4757-3922-0
-
[12]
Chen, J., de Mendonça, J.L.V., Ayele, B.S., Bekele, B.N., Jalili, S., Sharma, P., Wohlfeil, N., Zhang, Y., Jeannin, J.B.: Synchronous Programming with Refinement Types8(ICFP), 268:938–268:972 (Aug 2024).https://doi.org/10.1145/3674657
-
[13]
In: 2017 International Symposium on Theoretical Aspects of Software Engineering (TASE)
Colaço, J.L., Pagano, B., Pouzet, M.: Scade 6: A formal language for embedded critical software development (invited paper). In: 2017 International Symposium on Theoretical Aspects of Software Engineering (TASE). pp. 1–11. IEEE (2017). https://doi.org/10.1109/TASE.2017.8285623 22 Dane et al
-
[14]
In: International Conference on Automated Deduction
Fulton, N., Mitsch, S., Quesel, J.D., Völp, M., Platzer, A.: Keymaera X: An ax- iomatic tactical theorem prover for hybrid systems. In: International Conference on Automated Deduction. pp. 527–538. Springer (2015).https://doi.org/10.1007/ 978-3-319-21401-6_36
2015
-
[15]
In: Proceedings 11th Annual IEEESymposiumonLogicinComputerScience(LICS).pp.278–292.IEEE(1996)
Henzinger, T.A.: The theory of hybrid automata. In: Proceedings 11th Annual IEEESymposiumonLogicinComputerScience(LICS).pp.278–292.IEEE(1996). https://doi.org/10.1109/LICS.1996.561342
-
[16]
Jhala, R., Vazou, N.: Refinement types: A tutorial. Found. Trends Program. Lang. 6(3–4), 159–317 (Oct 2021).https://doi.org/10.1561/2500000032
-
[17]
Leibniz Transactions on Embedded Systems8(2), 04–1 (2022)
Kamburjan, E., Mitsch, S., Hähnle, R.: A hybrid programming language for formal modeling and verification of hybrid systems. Leibniz Transactions on Embedded Systems8(2), 04–1 (2022)
2022
-
[18]
Pattern Recog- nition153, 110500 (2024).https://doi.org/https://doi.org/10.1016/j
Konečný, M., Taha, W., Bartha, F., Duracz, J., Duracz, A., Ames, A.: Enclosing the behavior of a hybrid automaton up to and beyond a Zeno point. Nonlinear Analysis: Hybrid Systems20, 1–20 (May 2016).https://doi.org/10.1016/j. nahs.2015.10.004
work page doi:10.1016/j 2016
-
[19]
Proceedings of the IEEE79(9), 1321–1336 (Sep 1991)
Le Guernic, P., Gautier, T., Le Borgne, M., Le Maire, C.: Programming real-time applications with SIGNAL. Proceedings of the IEEE79(9), 1321–1336 (Sep 1991). https://doi.org/10.1109/5.97301
-
[20]
In: Hybrid Sys- tems: Computation and Control (HSCC 2005)
Lee, E.A., Zheng, H.: Operational semantics of hybrid systems. In: Hybrid Sys- tems: Computation and Control (HSCC 2005). Lecture Notes in Computer Science, vol. 3414, pp. 25–53 (2005).https://doi.org/10.1007/978-3-540-31954-2_2
-
[21]
Lin, S., Manerkar, Y.A., Lohstroh, M., Polgreen, E., Yu, S.J., Jerad, C., Lee, E.A., Seshia, S.A.: Towards building verifiable CPS using lingua franca. ACM Trans- actions on Embedded Computing Systems22(5s), 155:1–155:24 (2023).https: //doi.org/10.1145/3609134
-
[22]
Loos, S.M., Platzer, A., Nistor, L.: Adaptive Cruise Control: Hybrid, Distributed, and Now Formally Verified. In: Butler, M., Schulte, W. (eds.) FM 2011: For- mal Methods, vol. 6664, pp. 42–56. Springer Berlin Heidelberg, Berlin, Heidel- berg (2011).https://doi.org/10.1007/978-3-642-21437-0_6, series Title: Lec- ture Notes in Computer Science
-
[23]
Marin, M., Ölveczky, P.C., Reja, M., Rukhaia, M., Bae, K., Dundua, B.: Semantics and formal analysis of Lingua Franca CPS specifications in rewriting logic. Tech. rep., University of Oslo / collaborators (technical report) (2024)
2024
-
[24]
Journal of Functional Programming18(5-6), 865–911 (2008).https: //doi.org/10.1017/S0956796808006953
Nanevski, A., Morrisett, G., Birkedal, L.: Hoare type theory, polymorphism and separation. Journal of Functional Programming18(5-6), 865–911 (2008).https: //doi.org/10.1017/S0956796808006953
-
[25]
Journal of Automated Reasoning41(2), 143–189 (2008).https://doi.org/10.1007/ s10817-008-9103-8
Platzer, A.: Differential dynamic logic for hybrid systems. Journal of Automated Reasoning41(2), 143–189 (2008).https://doi.org/10.1007/ s10817-008-9103-8
2008
-
[26]
Springer International Publishing, Cham (2018).https://doi.org/10.1007/978-3-319-63588-0
Platzer, A.: Logical Foundations of Cyber-Physical Systems. Springer International Publishing, Cham (2018).https://doi.org/10.1007/978-3-319-63588-0
-
[27]
A Complete Uniform Substitution Calculus for Differential Dynamic Logic
Platzer, A.: A Complete Uniform Substitution Calculus for Differential Dynamic Logic. Journal of Automated Reasoning59(2), 219–265 (Aug 2017).https://doi. org/10.1007/s10817-016-9385-1
-
[28]
Prajna, S., Jadbabaie, A.: Safety Verification of Hybrid Systems Using Barrier Certificates. pp. 477–492. Lecture Notes in Computer Science, Springer, Berlin, Heidelberg (2004).https://doi.org/10.1007/978-3-540-24743-2_32
-
[29]
Rondon, P.M., Kawaguci, M., Jhala, R.: Liquid types. In: Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementa- tion. pp. 159–169 (2008).https://doi.org/10.1145/1375581.1375602 Towards Formal Verification of Hybrid Synchronous Programs 23
-
[30]
In: Proceedings of the 2014 ACM SIGPLAN Symposium on Haskell
Vazou, N., Seidel, E.L., Jhala, R.: Liquid Haskell: Experience with refinement types in the real world. In: Proceedings of the 2014 ACM SIGPLAN Symposium on Haskell. pp. 39–51 (2014).https://doi.org/10.1145/2633357.2633366
-
[31]
In: Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs
White, L., Titolo, L., Slagel, J.T., Muñoz, C.: A temporal differential dynamic logic formal embedding. In: Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs. p. 162–176. CPP 2024, Association for Computing Machinery, New York, NY, USA (2024).https://doi.org/10. 1145/3636501.3636943
-
[32]
Information and Computation115(1), 38–94 (1994).https://doi.org/10.1006/inco.1994
Wright, A.K., Felleisen, M.: A syntactic approach to type soundness. Information and Computation115(1), 38–94 (1994).https://doi.org/10.1006/inco.1994. 1093 24 Dane et al. A Case Distinction We have identified the following 7 cases forx < a: Afis strictly negative in a ball left ofa. Formally:ℓ < aand∃η >0,∀x∈ [a−η, a), f(x)<0. Examples:(x−a) 2k+1,−|x−a| ...
-
[33]
there exists an indexjwhose guard triggers attr (first upward zero-crossing),
-
[34]
decreasing sawtooth
and the reset branch steps in the discrete fragment under the post-flow store S;σ,[x7→ρ(t r)(x) ::nil], producing a rewritten reset expressionde ′ r,j, and the equation residuale ′ is obtained by replacing the initial value with the post-reset state and the reset branch tode′ r,j, wherev r,j is emitted. (1) Safety of the finite continuous trajectory.T-DER...
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.