Skip to main content

A Language-Based Causal Model for Safety

  • Conference paper
  • First Online:
Theoretical Aspects of Software Engineering (TASE 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13299))

Included in the following conference series:

  • 907 Accesses

Abstract

Inspired by the seminal works on causal analysis by Halpern and Pearl, in this paper we introduce a causal model based on counterfactuals, adapted to finite automata models and with safety properties defined by regular expressions. The latter encode undesired execution traces. We devise a framework that computes actual causes, or minimal traces that lead to states enabling hazardous behaviours. Furthermore, our framework exploits counterfactual information and identifies modalites to steer causal executions towards alternative safe ones. This can provide systems engineers with valuable data for actual debugging and fixing erroneous behaviours. Our framework employs standard algorithms from automata theory, thus paving the way to further generalizations from finite automata to richer structures like probabilistic or KAT automata.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Anderson, C.J., et al.: NetKAT: semantic foundations for networks. In: The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2014, San Diego, CA, USA, 20–21 January 2014, pp. 113–126 (2014). https://doi.org/10.1145/2535838.2535862

  2. Arbach, Y., Karcher, D.S., Peters, K., Nestmann, U.: Dynamic causality in event structures. Logical Methods Comput. Sci. 14(1) (2018). https://doi.org/10.23638/LMCS-14(1:17)2018

  3. Bollig, B., Katoen, J.-P., Kern, C., Leucker, M., Neider, D., Piegdon, D.R.: libalf: the automata learning framework. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 360–364. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14295-6_32

    Chapter  Google Scholar 

  4. Caltais, G., Guetlein, S.L., Leue, S.: Causality for general LTL-definable Properties. In: Finkbeiner, B., Kleinberg, S. (eds.) Proceedings 3rd Workshop on formal reasoning about Causation, Responsibility, and Explanations in Science and Technology, CREST@ETAPS 018, Thessaloniki, Greece, 21 April 2018. EPTCS, vol. 286, pp. 1–15 (2018). https://doi.org/10.4204/EPTCS.286.1

  5. Caltais, G., Mousavi, M.R., Singh, H.: Causal reasoning for safety in Hennessy Milner logic. Fund. Inform. 173, 217–251 (2020). https://doi.org/10.3233/FI-2020-1922

    Article  MathSciNet  MATH  Google Scholar 

  6. Foster, N., Kozen, D., Milano, M., Silva, A., Thompson, L.: A coalgebraic decision procedure for NetKAT. In: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, 15–17 January 2015, pp. 343–355 (2015). https://doi.org/10.1145/2676726.2677011

  7. Groce, A., Chaki, S., Kroening, D., Strichman, O.: Error explanation with distance metrics. Int. J. Softw. Tools Technol. Transf. (STTT) 8(3), 229–247 (2006)

    Article  Google Scholar 

  8. Groce, A., Visser, W.: What went wrong: explaining counterexamples. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, pp. 121–136. Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-44829-2_8

    Chapter  Google Scholar 

  9. Halpern, J.Y.: A modification of the Halpern-Pearl definition of causality. In: Yang, Q., Wooldridge, M.J. (eds.) Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2015, Buenos Aires, Argentina, 25–31 July 2015, pp. 3022–3033. AAAI Press (2015). http://ijcai.org/Abstract/15/427

  10. Halpern, J.Y., Pearl, J.: Causes and explanations: a structural-model approach: part 1: causes. In: Breese, J.S., Koller, D. (eds.) UAI 2001: Proceedings of the 17th Conference in Uncertainty in Artificial Intelligence, University of Washington, Seattle, Washington, USA, 2–5 August 2001, pp. 194–202. Morgan Kaufmann (2001). https://dslpitt.org/uai/displayArticleDetails.jsp?mmnu=1&smnu=2&article_id=100&proceeding_id=17

  11. Kleene, S.C.: Representation of events in nerve nets and finite automata. Autom. Stud. 34, 3–42 (1956)

    MathSciNet  Google Scholar 

  12. Kozen, D.: Kleene algebra with tests. ACM Trans. Program. Lang. Syst. 19(3), 427–443 (1997)

    Article  Google Scholar 

  13. Kozen, D.: Automata on guarded strings and applications. Mat. Contemp. 24, 117–139 (2003)

    MathSciNet  MATH  Google Scholar 

  14. Ladkin, P., Loer, K.: Analysing aviation accidents using WB-analysis - an application of multimodal reasoning. In: AAAI Spring Symposium. AAAI (1998). https://www.aaai.org/Papers/Symposia/Spring/1998/SS-98-04/SS98-04-031.pdf

  15. Leitner-Fischer, F., Leue, S.: Causality checking for complex system models. In: Giacobazzi, R., Berdine, J., Mastroeni, I. (eds.) VMCAI 2013. LNCS, vol. 7737, pp. 248–267. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-35873-9_16

    Chapter  MATH  Google Scholar 

  16. Lewis, D.: Causation. J. Philos. 70, 556–567 (1973)

    Article  Google Scholar 

  17. Lewis, D.: Counterfactuals. Blackwell Publishers, Hoboken (1973)

    MATH  Google Scholar 

  18. Martin, J.C.: Introduction to Languages and the Theory of Computation, vol. 4. McGraw-Hill, New York (1991)

    Google Scholar 

  19. Møller, A.: dk.brics.automaton – finite-state automata and regular expressions for Java (2021). http://www.brics.dk/automaton/

  20. Nielsen, M., Plotkin, G.D., Winskel, G.: Petri nets, event structures and domains, part I. Theor. Comput. Sci. 13, 85–108 (1981). https://doi.org/10.1016/0304-3975(81)90112-2

    Article  MATH  Google Scholar 

  21. Renieris, M., Reiss, S.: Fault localization with nearest neighbor queries. In: 18th International Conference on Automated Software Engineering (2003)

    Google Scholar 

  22. Shabana, H., Volkov, M.V.: Optimal synchronization of partial deterministic finite automata. CoRR abs/2002.01045 (2020). https://arxiv.org/abs/2002.01045

  23. Zeller, A.: Why Programs Fail: A Guide to Systematic Debugging. Elsevier, Amsterdam (2009)

    Google Scholar 

Download references

Acknowledgments

The work of Georgiana Caltais and Hünkar Can Tunç was supported by the DFG project “CRENKAT”, no. 398056821.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Georgiana Caltais .

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

Bonsangue, M., Caltais, G., Feng, H., Tunç, H.C. (2022). A Language-Based Causal Model for Safety. In: Aït-Ameur, Y., Crăciun, F. (eds) Theoretical Aspects of Software Engineering. TASE 2022. Lecture Notes in Computer Science, vol 13299. Springer, Cham. https://doi.org/10.1007/978-3-031-10363-6_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-10363-6_20

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-10362-9

  • Online ISBN: 978-3-031-10363-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics