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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
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
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
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
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
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
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
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)
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
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
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
Kleene, S.C.: Representation of events in nerve nets and finite automata. Autom. Stud. 34, 3–42 (1956)
Kozen, D.: Kleene algebra with tests. ACM Trans. Program. Lang. Syst. 19(3), 427–443 (1997)
Kozen, D.: Automata on guarded strings and applications. Mat. Contemp. 24, 117–139 (2003)
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
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
Lewis, D.: Causation. J. Philos. 70, 556–567 (1973)
Lewis, D.: Counterfactuals. Blackwell Publishers, Hoboken (1973)
Martin, J.C.: Introduction to Languages and the Theory of Computation, vol. 4. McGraw-Hill, New York (1991)
Møller, A.: dk.brics.automaton – finite-state automata and regular expressions for Java (2021). http://www.brics.dk/automaton/
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
Renieris, M., Reiss, S.: Fault localization with nearest neighbor queries. In: 18th International Conference on Automated Software Engineering (2003)
Shabana, H., Volkov, M.V.: Optimal synchronization of partial deterministic finite automata. CoRR abs/2002.01045 (2020). https://arxiv.org/abs/2002.01045
Zeller, A.: Why Programs Fail: A Guide to Systematic Debugging. Elsevier, Amsterdam (2009)
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
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)