Skip to main content

Parallel and Incremental Verification of Hybrid Automata with Ray and Verse

  • Conference paper
  • First Online:
Automated Technology for Verification and Analysis (ATVA 2023)

Abstract

Parallel and distributed computing holds a promise of scaling verification to hard multi-agent scenarios such as the ones involving autonomous interacting vehicles. Exploiting parallelism, however, typically requires handcrafting solutions using knowledge of verification algorithms, the available hardware, and the specific models. The Ray framework made parallel programming hardware agnostic for large-scale Python workloads in machine learning. Extending the recently developed Verse Python library for multi-agent hybrid systems, in this paper we show how Ray’s fork-join parallelization can help gain up to 6\(\times \) speedup in multi-agent hybrid model verification. We propose a parallel algorithm that addresses the key bottleneck of computing the discrete transitions and exploits concurrent construction of reachability trees, without locks, using dynamic Ray processes. We find that the performance gains of our new reachset and simulation algorithms increase with the availability of larger number of cores and the nondeterminism in the model. In one experiment with 20 agents and 399 transitions, reachability analysis using the parallel algorithm takes 35 min on a 8 core CPU, which is a 6.28\(\times \) speedup over the sequential algorithm. We also present an incremental verification algorithm that reuses previously cached computations and compare its performance.

This research was funded in part by NASA University Leadership Initiative grant (80NSSC22M0070) and a research grant from the NSF (SHF 2008883).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The observable state is defined by a sensor function; here we assume that the full state is observable.

  2. 2.

    This design decision is relatively independent. For reachability analysis, we currently uses black-box statistical approaches implemented in DryVR [10] and NeuReach [25]. If the simulator is available as a white-box model, such as differential equations, then the algorithm could use model-based reachability analysis.

  3. 3.

    Note that in this section subscripts index different hybrid automata, instead of agents within the same automaton (as we did in Sects. 3 and 3.2).

References

  1. Althoff, M.: An introduction to CORA 2015. In: Proceedings of the Workshop on Applied Verification for Continuous and Hybrid Systems (2015)

    Google Scholar 

  2. Bak, S., Duggirala, P.S.: HyLAA: a tool for computing simulation-equivalent reachability for linear systems. In: Proceedings of the 20th International Conference on Hybrid Systems: Computation and Control, pp. 173–178. ACM (2017)

    Google Scholar 

  3. Bogomolov, S., Forets, M., Frehse, G., Potomkin, K., Schilling, C.: JuliaReach: a toolbox for set-based reachability. In: Proceedings of the 22nd ACM International Conference on Hybrid Systems: Computation and Control, pp. 39–44 (2019)

    Google Scholar 

  4. Chen, X., Ábrahám, E., Sankaranarayanan, S.: Flow*: an analyzer for non-linear hybrid systems. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 258–263. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39799-8_18

    Chapter  Google Scholar 

  5. Chong, N., et al.: Code-level model checking in the software development workflow. In: Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering: Software Engineering in Practice, ICSE-SEIP 2020, pp. 11–20. Association for Computing Machinery, New York (2020). https://doi.org/10.1145/3377813.3381347

  6. Chudnov, A., et al.: Continuous formal verification of Amazon s2n. In: Chockler, H., Weissenbacher, G. (eds.) CAV 2018. LNCS, vol. 10982, pp. 430–446. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-96142-2_26

    Chapter  Google Scholar 

  7. Devonport, A., Khaled, M., Arcak, M., Zamani, M.: PIRK: scalable interval reachability analysis for high-dimensional nonlinear systems. In: Lahiri, S.K., Wang, C. (eds.) CAV 2020. LNCS, vol. 12224, pp. 556–568. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-53288-8_27

    Chapter  Google Scholar 

  8. Duggirala, P.S., Mitra, S., Viswanathan, M., Potok, M.: C2E2: a verification tool for stateflow models. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 68–82. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46681-0_5

    Chapter  Google Scholar 

  9. Fan, C., Qi, B., Mitra, S., Viswanathan, M.: DryVR: data-driven verification and compositional reasoning for automotive systems. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017, Part I. LNCS, vol. 10426, pp. 441–461. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63387-9_22

    Chapter  MATH  Google Scholar 

  10. Fan, C., Qi, B., Mitra, S., Viswanathan, M.: DryVR: data-driven verification and compositional reasoning for automotive systems. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10426, pp. 441–461. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63387-9_22

    Chapter  MATH  Google Scholar 

  11. Frehse, G., et al.: SpaceEx: scalable verification of hybrid systems. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 379–395. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22110-1_30

    Chapter  Google Scholar 

  12. Gurung, A., Ray, R., Bartocci, E., Bogomolov, S., Grosu, R.: Parallel reachability analysis of hybrid systems in XSpeed. Int. J. Softw. Tools Technol. Transf. 21(4), 401–423 (2018). https://doi.org/10.1007/s10009-018-0485-6

    Article  Google Scholar 

  13. Hoffmann, G.M., Tomlin, C.J., Montemerlo, M., Thrun, S.: Autonomous automobile trajectory tracking for off-road driving: controller design, experimental validation and racing. In: 2007 American Control Conference, pp. 2296–2301 (2007)

    Google Scholar 

  14. Ivanov, R., Weimer, J., Alur, R., Pappas, G.J., Lee, I.: Verisig: verifying safety properties of hybrid systems with neural network controllers. In: Proceedings of the 22nd ACM International Conference on Hybrid Systems: Computation and Control, pp. 169–178 (2019)

    Google Scholar 

  15. Kaynar, D.K., Lynch, N., Segala, R., Vaandrager, F.: The Theory of Timed I/O Automata. Synthesis Lectures on Computer Science. Morgan Claypool (2005). Also available as Technical Report MIT-LCS-TR-917

    Google Scholar 

  16. Khaled, M., Zamani, M.: PFaces: an acceleration ecosystem for symbolic control. In: Proceedings of the 22nd ACM International Conference on Hybrid Systems: Computation and Control, HSCC 2019, pp. 252–257. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3302504.3311798

  17. Kong, S., Gao, S., Chen, W., Clarke, E.: dReach: \(\delta \)-reachability analysis for hybrid systems. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 200–205. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46681-0_15

    Chapter  Google Scholar 

  18. Li, Y., Zhu, H., Braught, K., Shen, K., Mitra, S.: Verse: a python library for reasoning about multi-agent hybrid system scenarios. In: Enea, C., Lal, A. (eds.) CAV 2023. LNCS, vol. 13964, pp. 351–364. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-37706-8_18

    Chapter  Google Scholar 

  19. Liang, E., et al.: RLlib: abstractions for distributed reinforcement learning. In: International Conference on Machine Learning, pp. 3053–3062. PMLR (2018)

    Google Scholar 

  20. Mitra, S.: Verifying Cyber-Physical Systems: A Path to Safe Autonomy. MIT Press, Cambridge (2021)

    Google Scholar 

  21. Moritz, P., et al.: Ray: a distributed framework for emerging \(\{\)AI\(\}\) applications. In: 13th \(\{\)USENIX\(\}\) Symposium on Operating Systems Design and Implementation (\(\{\)OSDI\(\}\) 2018), pp. 561–577 (2018)

    Google Scholar 

  22. O’Hearn, P.W.: Continuous reasoning: scaling the impact of formal methods. In: Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, pp. 13–25. Association for Computing Machinery, New York (2018). https://doi.org/10.1145/3209108.3209109

  23. Platzer, A.: Differential logic for reasoning about hybrid systems. In: Bemporad, A., Bicchi, A., Buttazzo, G. (eds.) HSCC 2007. LNCS, vol. 4416, pp. 746–749. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-71493-4_75

    Chapter  MATH  Google Scholar 

  24. Sadowski, C., Aftandilian, E., Eagle, A., Miller-Cushon, L., Jaspan, C.: Lessons from building static analysis tools at google. Commun. ACM 61(4), 58–66 (2018)

    Article  Google Scholar 

  25. Sun, D., Mitra, S.: NeuReach: learning reachability functions from simulations. In: Fisman, D., Rosu, G. (eds.) TACAS 2022, Part I. LNCS, vol. 13243, pp. 322–337. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99524-9_17

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Haoqing Zhu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Zhu, H., Li, Y., Shen, K., Mitra, S. (2023). Parallel and Incremental Verification of Hybrid Automata with Ray and Verse. In: André, É., Sun, J. (eds) Automated Technology for Verification and Analysis. ATVA 2023. Lecture Notes in Computer Science, vol 14215. Springer, Cham. https://doi.org/10.1007/978-3-031-45329-8_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-45329-8_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-45328-1

  • Online ISBN: 978-3-031-45329-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics