Skip to main content

Modeling and Verification of Real-Time Systems with the Event Calculus and s(CASP)

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2022)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 13165))

Included in the following conference series:

Abstract

Modeling a cyber-physical system’s requirement specifications makes it possible to verify its properties w.r.t. the expected behavior. Standard modeling approaches based on automata theory model these systems at the system architecture level, as they have to explicitly encode the notion of states and define explicit transitions between these states. Event Calculus encoding using Answer Set Programming (ASP) allows for elegant and succinct modeling of these dynamic systems at the requirements specification level, thanks to the near-zero semantics gap between the system’s requirement specifications and the Event Calculus encoding. In this work we propose a framework that uses the EARS notation to describe the system requirements, and an Event Calculus reasoner based on s(CASP), a goal-directed Constraint Answer Set Programming reasoner over the rationals/reals, to directly model these requirements. We evaluate our proposal by (i) modeling the well-known Train-Gate-Controller system, a railroad crossing problem, using the EARS notation and Event Calculus, (ii) translating the specifications into s(CASP), and (iii) checking safety and liveness of the system.

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 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.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.

    We have made some minor (and inconsequential) changes to the Train-Gate-Controller system to simplify the illustration.

  2. 2.

    We treat and as derived fluents. They can also be modeled as trajectories.

References

  1. Alur, R.: Principles of Cyber-Physical Systems. MIT Press, Cambridge (2015)

    Google Scholar 

  2. Alur, R., Dill, D.L.: A theory of timed automata. Theor. Comput. Sci. 126(2), 183–235 (1994)

    Article  MathSciNet  Google Scholar 

  3. Arias, J., Carro, M., Salazar, E., Marple, K., Gupta, G.: Constraint answer set programming without grounding. In: Theory and Practice of Logic Programming, vol. 18, no. 3–4, pp. 337–354 (2018). https://doi.org/10.1017/S1471068418000285

  4. Arias, J., Chen, Z., Carro, M., Gupta, G.: Modeling and reasoning in event calculus using goal-directed constraint answer set programming. In: Gabbrielli, M. (ed.) LOPSTR 2019. LNCS, vol. 12042, pp. 139–155. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45260-5_9

    Chapter  Google Scholar 

  5. Arias, J., Carro, M., Chen, Z., Gupta, G.: Modeling and reasoning in event calculus using goal-directed constraint answer set programming. In: Theory and Practice of Logic Programming, pp. 1–30 (2021). https://doi.org/10.1017/S1471068421000156

  6. Bansal, A.: Towards next generation logic programming systems. Ph.D. thesis, Department of Computer Science, University of Texas at Dallas (2007)

    Google Scholar 

  7. Behrmann, G., David, A., Larsen, K.G.: A tutorial on Uppaal. In: Bernardo, M., Corradini, F. (eds.) SFM-RT 2004. LNCS, vol. 3185, pp. 200–236. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30080-9_7

    Chapter  Google Scholar 

  8. Gebser, M., et al.: Potassco: the Potsdam answer set solving collection. AI Commun. 24(2), 107–124 (2011). https://doi.org/10.3233/AIC-2011-0491

    Article  MathSciNet  MATH  Google Scholar 

  9. Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: 5th International Conference on Logic Programming, pp. 1070–1080 (1988). http://www.cse.unsw.edu.au/~cs4415/2010/resources/stable.pdf

  10. Gupta, G., Pontelli, E.: A constraint-based approach for specification and verification of real-time systems. In: Proceedings Real-Time Systems Symposium, pp. 230–239. IEEE (1997)

    Google Scholar 

  11. Hall, B., et al.: Knowledge-assisted reasoning of model-augmented system requirements with event calculus and goal-directed answer set programming. In: Hojjat, H., Kafle, B. (eds.) Proceedings of the 8th Workshop on Horn Clauses for Verification and Synthesis, Virtual, Volume 344 of EPTCS, 28 March 2021, pp. 79–90 (2021). https://doi.org/10.4204/EPTCS.344.6

  12. Lee, J., Palla, R.: System f2lp – computing answer sets of first-order formulas. In: Erdem, E., Lin, F., Schaub, T. (eds.) LPNMR 2009. LNCS (LNAI), vol. 5753, pp. 515–521. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04238-6_51

    Chapter  Google Scholar 

  13. Mavin, A., Wilkinson, P.: Big EARS (the return of “easy approach to requirements engineering”). In: 2010 18th IEEE International Requirements Engineering Conference, pp. 277–282. IEEE (2010). https://doi.org/10.1109/RE.2010.39

  14. Mavin, A., et al.: Easy approach to requirements syntax (EARS). In: 2009 17th IEEE International Requirements Engineering Conference, pp. 317–322. IEEE (2009). https://doi.org/10.1109/RE.2009.9

  15. Mueller, E.T.: Commonsense Reasoning: An Event Calculus Based Approach. Morgan Kaufmann, Waltham (2014)

    Google Scholar 

  16. Saeedloei, N., Gupta, G.: A logic-based modeling and verification of CPS. SIGBED Rev. 8(2), 31–34 (2011). https://doi.org/10.1145/2000367.2000374

    Article  Google Scholar 

  17. Saeedloei, N., Gupta, G.: Timed definite clause \(\omega \)-grammars. In: Hermenegildo, M.V., Schaub, T. (eds.) Technical Communications of the 26th International Conference on Logic Programming, ICLP 2010, Volume 7 of LIPIcs, Edinburgh, Scotland, UK, 16–19 July 2010, pp. 212–221 (2010)

    Google Scholar 

  18. Shanahan, M.: The event calculus explained. In: Wooldridge, M.J., Veloso, M. (eds.) Artificial Intelligence Today. LNCS (LNAI), vol. 1600, pp. 409–430. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48317-9_17

    Chapter  Google Scholar 

Download references

Acknowledgement

We are grateful to Brendan Hall, Jan Fiedor, and Kevin Driscoll of Honeywell Aerospace for discussions. Authors gratefully acknowledge support from NSF grants IIS 1718945, IIS 1910131, IIP 1916206, from Amazon Corp and US DoD, and MICINN projects RTI2018-095390-B-C33 InEDGEMobility (MCIU/AEI/FEDER, UE). Views expressed are authors’ own and not of the funding agencies. We also dedicate this work to the memory of first author’s father, Late Prof. Sitaramaiah Varanasi, who was passionate about Number Theory and ever so curious about Theoretical Computer Science.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sarat Chandra Varanasi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Varanasi, S.C., Arias, J., Salazar, E., Li, F., Basu, K., Gupta, G. (2022). Modeling and Verification of Real-Time Systems with the Event Calculus and s(CASP). In: Cheney, J., Perri, S. (eds) Practical Aspects of Declarative Languages. PADL 2022. Lecture Notes in Computer Science(), vol 13165. Springer, Cham. https://doi.org/10.1007/978-3-030-94479-7_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-94479-7_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-94478-0

  • Online ISBN: 978-3-030-94479-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics