Hostname: page-component-848d4c4894-pftt2 Total loading time: 0 Render date: 2024-05-17T00:17:22.034Z Has data issue: false hasContentIssue false

Runtime verification and validation of functional reactive systems

Part of: ICFP2017

Published online by Cambridge University Press:  26 August 2020

IVAN PEREZ
Affiliation:
National Institute of Aerospace, Hampton, VA, 23666, USA (e-mail: ivan.perez@nianet.org)
HENRIK NILSSON
Affiliation:
School of Computer Science, University of Nottingham, Nottingham, NG8 1BB, UK (e-mail:henrik.nilsson@nottingham.ac.uk)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Many types of interactive applications, including reactive systems implemented in hardware, interactive physics simulations and games, raise particular challenges when it comes to testing and debugging. Reasons include de facto lack of reproducibility and difficulties of automatically generating suitable test data. This paper demonstrates that certain variants of functional reactive programming (FRP) implemented in pure functional languages can mitigate such difficulties by offering referential transparency at the level of whole programs. This opens up for a multi-pronged approach for assisting with testing and debugging that works across platforms, including assertions based on temporal logic, recording and replaying of runs (also from deployed code), and automated random testing using QuickCheck. When combined with extensible forms of FRP that allow for constrained side effects, it allows us to not only validate software simulations but to analyse the effect of faults in reactive systems, confirm the efficacy of fault tolerance mechanisms and perform software- and hardware-in-the-loop testing. The approach has been validated on non-trivial systems implemented in several existing FRP implementations, by means of careful debugging using a tool that allows the test or simulation under scrutiny to be controlled, moving along the execution time line, and pin-pointing of violations of assertions on personal computers as well as external devices.

Type
Research Article
Copyright
© The Author(s), 2020. Published by Cambridge University Press

References

Avižienis, A. (1967) Design of fault-tolerant computers. In Proceedings of the November 14-16, 1967, Fall Joint Computer Conference, AFIPS 1967 (Fall). New York, NY: ACM, pp. 733–743.CrossRefGoogle Scholar
Avižienis, A. (1976) Fault-tolerant systems. IEEE Trans. Comput. 25(12), 13041312.CrossRefGoogle Scholar
Bärenz, M. & Perez, I. (2018) Rhine: Frp with type-level clocks. In Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell, Haskell 2018. New York, NY: Association for Computing Machinery, pp. 145157.CrossRefGoogle Scholar
Carmack, J. (1998) John Carmack archive -.plan. Available at: http://fd.fabiensanglard.net/doom3/pdfs/johnc-plan_1998.pdfGoogle Scholar
Claessen, K. & Hughes, J. (2000) Quickcheck: A lightweight tool for random testing of haskell programs. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming, ICFP 2000. New York, NY: ACM, pp. 268279.CrossRefGoogle Scholar
Clarke, E. M. & Emerson, E. A. (1982) Design and synthesis of synchronization skeletons using branching time temporal logic. In Logics of Programs, Kozen, D. (ed). Berlin, Heidelberg: Springer Berlin Heidelberg.Google Scholar
Cornelis, F., Georges, A., Christiaens, M., Ronsse, M., Ghesquiere, T. & De Bosschere, K. (2003) A taxonomy of execution replay systems. In Proceedings of International Conference on Advances in Infrastructure for Electronic Business, Education, Science, Medicine, and Mobile Technologies on the Internet.Google Scholar
Courtney, A. & Elliott, C. (2001) Genuinely functional user interfaces. In In Proceedings of the 2001 Haskell Workshop, 4169.Google Scholar
Courtney, A., Nilsson, H. & Peterson, J. (2003) The Yampa arcade. In Proceedings of the 2003 ACM SIGPLAN Workshop on Haskell, Haskell 2003. New York, NY: ACM, pp. 718.CrossRefGoogle Scholar
Elliott, C. & Hudak, P. (1997) Functional reactive animation. In International Conference on Functional Programming, pp. 163173.CrossRefGoogle Scholar
Emerson, E. A. (1990) Handbook of Theoretical Computer Science (Vol. b). Cambridge, MA: MIT.Google Scholar
Giannakopoulou, D. & Havelund, K. (2001) Automata-based verification of temporal properties on running programs. In Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001), pp. 412416.CrossRefGoogle Scholar
Gray, J. (1986) Why do computers stop and what can be done about it? In Symposium on Reliability in Distributed Software and Database Systems, pp. 312.Google Scholar
Gregory, J. (2014) Game Engine Architecture. 2nd edn. Natick, MA: A. K. Peters.Google Scholar
Havelund, K. & Rosu, G. (2001) Monitoring programs using rewriting. In Proceedings of the 16th Annual International Conference on Automated Software Engineering, ASE 2001. IEEE, pp. 135143.CrossRefGoogle Scholar
Hughes, J. (2000) Generalising monads to arrows. Sci. Comput. Program. 37(1), 67111.CrossRefGoogle Scholar
Hughes, J., Norell, U. & Sautret, J. (2010) Using temporal relations to specify and test an instant messaging server. In The 5th Workshop on Automation of Software Test, AST 2010, May 3–4, 2010, Cape Town, South Africa, pp. 95102.CrossRefGoogle Scholar
Jeffrey, A. (2012) LTL types FRP: Linear-time temporal logic propositions as types, proofs as functional reactive programs. In Proceedings of the Sixth Workshop on Programming Languages Meets Program Verification, PLPV 2012. New York, NY: ACM, pp. 4960.CrossRefGoogle Scholar
Jeffrey, A. (2014) Functional reactive types. In Proceedings of the Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), CSL-LICS 2014. New York, NY: ACM, pp. 54:1–54:9.CrossRefGoogle Scholar
Jeltsch, W. (2012) Towards a common categorical semantics for linear-time temporal logic and functional reactive programming. Electron. Notes Theor. Comput. Sci. 286(Sept.), 229242.CrossRefGoogle Scholar
Jeltsch, W. (2013) Temporal logic with “until”, functional reactive programming with processes, and concrete process categories. In Proceedings of the 7th Workshop on Programming Languages Meets Program Verification, PLPV 2013. New York, NY: ACM, pp. 6978.CrossRefGoogle Scholar
Lewis, C., Whitehead, J. & Wardrip-Fruin, N. (2010) What went wrong: A taxonomy of video game bugs. In Proceedings of the Fifth International Conference on the Foundations of Digital Games, FDG 2010. New York, NY: ACM, pp. 108115.CrossRefGoogle Scholar
Nejati, S., Gurfinkel, A. & Chechik, M. (2005) Stuttering abstraction for model checking. In Third IEEE International Conference on Software Engineering and Formal Methods, SEFM 2005. IEEE, pp. 311320.CrossRefGoogle Scholar
Nilsson, H. & Courtney, A. (2003) Yampa. Available at: https://github.com/ivanperez-keera/YampaGoogle Scholar
Nilsson, H., Courtney, A. & Peterson, J. (2002) Functional reactive programming, continued. In Proceedings of the 2002 ACM SIGPLAN workshop on Haskell. ACM, pp. 5164.CrossRefGoogle Scholar
Paterson, R. (2001) A new notation for arrows. ACM Sigplan Not. 36(10), 229240.CrossRefGoogle Scholar
Perez, I. (2017a) Back to the Future: Time Travel in FRP. In Proceedings of the 10th ACM SIGPLAN International Haskell Symposium, Haskell 2017. New York, NY: ACM.CrossRefGoogle Scholar
Perez, I. (2017b) Dunai-test. Available at: http://hackage.haskell.org/package/dunai-testGoogle Scholar
Perez, I. (2018a) Extensible and robust functional reactive programming. Ph.D. thesis, School of Computer Science, University of Nottingham.Google Scholar
Perez, I. (2018b) Fault tolerant functional reactive programming (functional pearl). Proc. ACM Program. Lang. 2(ICFP), 96:196:30.CrossRefGoogle Scholar
Perez, I. & Bärenz, M. (2016) Dunai. Available at: https://github.com/ivanperez-keera/dunaiGoogle Scholar
Perez, I. & Goodloe, A. E. (2020) Fault-tolerant functional reactive programming (extended version). J. Funct. Program. 30, e12.CrossRefGoogle Scholar
Perez, I. & Nilsson, H. (2015) Bridging the gui gap with reactive values and relations. In Proceedings of the 2015 ACM SIGPLAN Symposium on Haskell, Haskell 2015. New York, NY: ACM, pp. 4758.CrossRefGoogle Scholar
Perez, I. & Nilsson, H. (2017) Testing and debugging functional reactive programming. Proc. ACM Program. Lang. 1(ICFP), 2:12:27.CrossRefGoogle Scholar
Perez, I., Bärenz, M. & Nilsson, H. (2016) Functional reactive programming, refactored. In Proceedings of the 9th International Symposium on Haskell, Haskell 2016. New York, NY: ACM, pp. 3344.CrossRefGoogle Scholar
Perez, I., Goodloe, A. & Edmonson, W. (2019) Fault-tolerant swarms. In IEEE International Conference on Space Mission Challenges for Information Technology (SMC-IT).CrossRefGoogle Scholar
Pnueli, A. (1977) The temporal logic of programs. In 18th Annual Symposium on Foundations of Computer Science. IEEE, pp. 4657.CrossRefGoogle Scholar
Prior, A. N. (1967) Past, present and future, vol. 154. Oxford University.CrossRefGoogle Scholar
Ronsse, M., De Bosschere, K. & De Kergommeaux, J. C. (2000) Execution replay and debugging. arxiv preprint cs/0011006.Google Scholar
Sculthorpe, N. (2011) Towards safe and efficient functional reactive programming. Ph.D. thesis, University of Nottingham.Google Scholar
Tan, L., Sokolsky, O. & Lee, I. (2004) Specification-based testing with linear temporal logic. In Proceedings of the 2004 IEEE International Conference on Information Reuse and Integration, IRI 2004. IEEE, pp. 493498.Google Scholar
van der Ploeg, A. (2013) Monadic functional reactive programming. In Proceedings of the 2013 ACM SIGPLAN symposium on Haskell. ACM, pp. 117128.CrossRefGoogle Scholar
Wan, Z. & Hudak, P. (2000) Functional Reactive Programming from first principles. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 242252.CrossRefGoogle Scholar
Whittaker, J. A. (2000) What is software testing? and Why is it so hard? IEEE Softw. 17(1), 7079.CrossRefGoogle Scholar
Winitzki, S. (2014) Temporal logic and functional reactive programming. Available at: https://github.com/winitzki/talks/tree/master/frpGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.