Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
162 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Keeping Behavioral Programs Alive: Specifying and Executing Liveness Requirements (2404.01858v1)

Published 2 Apr 2024 in cs.SE

Abstract: One of the benefits of using executable specifications such as Behavioral Programming (BP) is the ability to align the system implementation with its requirements. This is facilitated in BP by a protocol that allows independent implementation modules that specify what the system may, must, and must not do. By that, each module can enforce a single system requirement, including negative specifications such as "don't do X after Y." The existing BP protocol, however, allows only the enforcement of safety requirements and does not support the execution of liveness properties such as "do X at least three times." To model liveness requirements in BP directly and independently, we propose idioms for tagging states with "must-finish," indicating that tasks are yet to be completed. We show that this idiom allows a direct specification of known requirements patterns from the literature. We also offer semantics and two execution mechanisms, one based on a translation to B\"uchi automata and the other based on a Markov decision process (MDP). The latter approach offers the possibility of utilizing deep reinforcement learning (DRL) algorithms, which bear the potential to handle large software systems effectively. This paper presents a qualitative and quantitative assessment of the proposed approach using a proof-of-concept tool. A formal analysis of the MDP-based execution mechanism is given in an appendix.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (48)
  1. M. Delahaye, N. Kosmatov, and J. Signoles, “Common specification language for static and dynamic analysis of C programs,” in Proceedings of the 28th Annual ACM Symposium on Applied Computing.   Coimbra, Portugal: Association for Computing Machinery, 2013, pp. 1230–1235.
  2. E. B. Johnsen, R. Hähnle, J. Schäfer, R. Schlatte, and M. Steffen, “ABS: A core language for abstract behavioral specification,” in International Symposium on Formal Methods for Components and Objects.   Berlin, Heidelberg: Springer Berlin Heidelberg, 2010, pp. 142–164, backup Publisher: Springer.
  3. U. Kastens, “Executable specifications for language implementation,” in Programming Language Implementation and Logic Programming, ser. Lecture Notes in Computer Science, vol. 714, 2005.
  4. P. J. Schubert, L. Vitkin, and F. Winters, “Executable specs: What makes one, and how are they used?” SAE Technical Paper, 2006.
  5. A. Elyasaf, A. Marron, A. Sturm, and G. Weiss, “A Context-Based Behavioral Language for IoT.” in MODELS Workshops, 2018, pp. 485–494.
  6. M. Bar-Sinai, A. Elyasaf, A. Sadon, and G. Weiss, “A scenario based on-board software and testing environment for satellites,” in The 59th Israel Annual Conference on Aerospace Sciences (IACAS), 2019, 2019.
  7. G. Katz, A. Marron, A. Sadon, and G. Weiss, “On-the-fly construction of composite events in scenario-based modeling using constraint solvers,” arXiv preprint arXiv:1909.00408, 2019.
  8. M. Bar-Sinai, A. Elyasaf, G. Weiss, and Y. Weiss, “Provengo: A Tool Suite for Scenario Driven Model-Based Testing,” Aug. 2023, arXiv:2308.15938 [cs]. [Online]. Available: http://arxiv.org/abs/2308.15938
  9. D. Harel, A. Marron, and G. Weiss, “Programming coordinated behavior in java,” in European Conference on Object-Oriented Programming.   Maribor, Slovenia: Springer, 2010, pp. 250–274.
  10. A. Elyasaf, “Context-Oriented Behavioral Programming,” Information and Software Technology, vol. 133, p. 106504, May 2021, publisher: Elsevier BV. [Online]. Available: http://www.sciencedirect.com/science/article/pii/S095058492030094X
  11. M. B. Dwyer, G. S. Avrunin, and J. C. Corbett, “Patterns in property specifications for finite-state verification,” in Proceedings of the 21st international conference on Software engineering.   Los Angeles California USA: ACM, May 1999, pp. 411–420. [Online]. Available: https://dl.acm.org/doi/10.1145/302405.302672
  12. D. Harel, A. Marron, and G. Weiss, “Behavioral programming,” Communications of the ACM, vol. 55, no. 7, pp. 90–100, 2012.
  13. N. Leveson and J. Stolzy, “Safety Analysis Using Petri Nets,” IEEE Transactions on Software Engineering, vol. SE-13, no. 3, pp. 386–397, 1987.
  14. A. Elyasaf, T. Yaacov, and G. Weiss, “What Petri Nets Oblige us to Say: Comparing Approaches for Behavior Composition,” IEEE Transactions on Software Engineering, vol. 49, no. 04, pp. 2303–2317, Apr. 2023, place: Los Alamitos, CA, USA Publisher: IEEE Computer Society.
  15. B. Liu, M. Ghazel, and A. Toguyéni, “OF-PENDA: A Software Tool for Fault Diagnosis of Discrete Event Systems Modeled by Labeled Petri Nets,” in ADECS 2014, Proceedings of the 1st International Workshop on Petri Nets for Adaptive Discrete-Event Control Systems, co-located with 35th International Conference on Application and Theory of Petri Nets and Concurrency (Petri Nets 2014), Tunis, Tunisia, June 24, 2014, ser. CEUR Workshop Proceedings, M. Khalgui and Z. Li, Eds., vol. 1161.   CEUR-WS.org, 2014, pp. 20–35. [Online]. Available: http://ceur-ws.org/Vol-1161/11610020.pdf
  16. M. Ghazel and B. Liu, “A customizable railway benchmark to deal with fault diagnosis issues in DES,” in 2016 13th International Workshop on Discrete Event Systems (WODES), Xi’an China, 2016, pp. 177–182.
  17. A. Mazzeo, N. Mazzocca, S. Russo, and V. Vittorini, “A Systematic Approach to the Petri Net Based Specification of Concurrent Systems,” in Safety-Critical Real-Time Systems.   Boston, MA: Springer US, 1997, pp. 3–20. [Online]. Available: https://doi.org/10.1007/978-1-4757-6463-5_1
  18. T. Yaacov, “BPpy: Behavioral programming in Python,” SoftwareX, vol. 24, p. 101556, Dec. 2023. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S2352711023002522
  19. L. Lamport, “Proving the correctness of multiprocess programs,” IEEE transactions on software engineering, vol. SE-3, no. 2, pp. 125–143, 1977.
  20. R. M. Keller, “Formal verification of parallel programs,” Communications of the ACM, vol. 19, no. 7, pp. 371–384, 1976.
  21. D. Harel, R. Lampert, A. Marron, and G. Weiss, “Model-checking behavioral programs,” in Proceedings of the ninth ACM international conference on Embedded software.   New York, NY, USA: Association for Computing Machinery, 2011, pp. 279–288.
  22. M. Bar-Sinai, “Extending Behavioral Programming for Model-Driven Engineering,” PhD Thesis, PhD Thesis, Ben-Gurion University of the Negev, Israel, 2020.
  23. D. Harel, G. Katz, A. Marron, and G. Weiss, “Non-intrusive Repair of Safety and Liveness Violations in Reactive Programs,” in Transactions on Computational Collective Intelligence XVI, ser. Lecture Notes in Computer Science, R. Kowalczyk and N. T. Nguyen, Eds.   Berlin, Heidelberg: Springer, 2014, pp. 1–33. [Online]. Available: https://doi.org/10.1007/978-3-662-44871-7_1
  24. M. Chapman, H. Chockler, P. Kesseli, D. Kroening, O. Strichman, and M. Tautschnig, “Learning the Language of Error,” in Proceedings of ATVA 2015: Automated Technology for Verification and Analysis, ser. Lecture Notes in Computer Science.   Springer, Oct. 2015, vol. 9364, pp. 114–130.
  25. A. Groce, S. Chaki, D. Kroening, and O. Strichman, “Error explanation with distance metrics,” International Journal on Software Tools for Technology Transfer, vol. 8, no. 3, pp. 229–247, Jun. 2006. [Online]. Available: https://doi.org/10.1007/s10009-005-0202-0
  26. I. Beer, S. Ben-David, H. Chockler, A. Orni, and R. Trefler, “Explaining counterexamples using causality,” Formal Methods in System Design, vol. 40, no. 1, pp. 20–40, Feb. 2012. [Online]. Available: https://doi.org/10.1007/s10703-011-0132-2
  27. F. Copty, A. Irron, O. Weissberg, N. Kropp, and G. Kamhi, “Efficient debugging in a formal verification environment,” International Journal on Software Tools for Technology Transfer (STTT), vol. 4, no. 3, pp. 335–348, May 2003. [Online]. Available: http://link.springer.com/10.1007/s10009-002-0097-y
  28. D. Harel, G. Katz, A. Marron, A. Sadon, and G. Weiss, “Executing Scenario-Based Specification with Dynamic Generation of Rich Events,” in International Conference on Model-Driven Engineering and Software Development.   Springer, 2019, pp. 246–274.
  29. Z. Manna and A. Pnueli, “A hierarchy of temporal properties (invited paper, 1989),” in Proceedings of the ninth annual ACM symposium on Principles of distributed computing.   Quebec City Quebec Canada: ACM, Aug. 1990, pp. 377–410. [Online]. Available: https://dl.acm.org/doi/10.1145/93385.93442
  30. E. Renault, A. Duret-Lutz, F. Kordon, and D. Poitrenaud, “Three SCC-Based Emptiness Checks for Generalized Büchi Automata,” in Logic for Programming, Artificial Intelligence, and Reasoning, K. McMillan, A. Middeldorp, and A. Voronkov, Eds.   Berlin, Heidelberg: Springer Berlin Heidelberg, 2013, pp. 668–682.
  31. A. Duret-Lutz, A. Lewkowicz, A. Fauchille, T. Michaud, E. Renault, and L. Xu, “Spot 2.0—a framework for LTL and-automata manipulation,” in Automated Technology for Verification and Analysis: 14th International Symposium, ATVA 2016, Chiba, Japan, October 17-20, 2016, Proceedings.   Cham: Springer International Publishing, 2016, pp. 122–129, backup Publisher: Springer.
  32. C. J. Watkins and P. Dayan, “Q-learning,” Machine learning, vol. 8, no. 3-4, pp. 279–292, 1992.
  33. V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, and others, “Human-level control through deep reinforcement learning,” nature, vol. 518, no. 7540, pp. 529–533, 2015.
  34. S. Huang and S. Ontañón, “A Closer Look at Invalid Action Masking in Policy Gradient Algorithms,” The International FLAIRS Conference Proceedings, vol. 35, May 2022, arXiv:2006.14171 [cs, stat]. [Online]. Available: http://arxiv.org/abs/2006.14171
  35. A. Hill, A. Raffin, M. Ernestus, A. Gleave, A. Kanervisto, R. Traore, P. Dhariwal, C. Hesse, O. Klimov, A. Nichol, M. Plappert, A. Radford, J. Schulman, S. Sidor, and Y. Wu, “Stable Baselines,” 2018. [Online]. Available: https://github.com/hill-a/stable-baselines
  36. G. Kant, A. Laarman, J. Meijer, J. van de Pol, S. Blom, and T. van Dijk, “LTSmin: High-Performance Language-Independent Model Checking,” in Tools and Algorithms for the Construction and Analysis of Systems, C. Baier and C. Tinelli, Eds.   Berlin, Heidelberg: Springer Berlin Heidelberg, 2015, pp. 692–707.
  37. L. Vinkhuijzen and A. Laarman, “Symbolic Model Checking with Sentential Decision Diagrams,” in Dependable Software Engineering. Theories, Tools, and Applications, J. Pang and L. Zhang, Eds.   Cham: Springer International Publishing, 2020, pp. 124–142.
  38. J. Taylor and I. Parberry, “Procedural generation of sokoban levels,” in Proceedings of the International North American Conference on Intelligent Games and Simulation, 2011, pp. 5–12.
  39. T. Babiak, T. Badie, A. Duret-Lutz, M. Křetínský, and J. Strejček, “Compositional Approach to Suspension and Other Improvements to LTL Translation,” in Model Checking Software, E. Bartocci and C. R. Ramakrishnan, Eds.   Berlin, Heidelberg: Springer Berlin Heidelberg, 2013, pp. 81–98.
  40. I. Chadès, G. Chapron, M.-J. Cros, F. Garcia, and R. Sabbadin, “MDPtoolbox: a multi-platform toolbox to solve stochastic dynamic programming problems,” Ecography, vol. 37, no. 9, pp. 916–920, 2014, publisher: Wiley Online Library.
  41. N. D’ippolito, V. Braberman, N. Piterman, and S. Uchitel, “Synthesizing nonanomalous event-based controllers for liveness goals,” ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 22, no. 1, pp. 1–36, 2013, publisher: ACM New York, NY, USA.
  42. M. Uzam and M. Zhou, “An improved iterative synthesis method for liveness enforcing supervisors of flexible manufacturing systems,” International Journal of Production Research, vol. 44, no. 10, pp. 1987–2030, 2006, publisher: Taylor & Francis.
  43. D. Harel, H. Kugler, R. Marelly, and A. Pnueli, “Smart play-out of behavioral requirements,” in International Conference on Formal Methods in Computer-Aided Design.   Portland, OR, USA: Springer, Berlin, Heidelberg, 2002, pp. 378–398, backup Publisher: Springer.
  44. N. Eitan and D. Harel, “Adaptive behavioral programming,” in 2011 IEEE 23rd International Conference on Tools with Artificial Intelligence.   Boca Raton, Florida, USA: IEEE, Nov. 2011, pp. 685–692.
  45. O. M. Weinstock, “Online search in behavioral programming models,” in Proceedings of the ACM Student Research Competition at MODELS, vol. 1503.   Ottawa, Canada: CEUR-WS.org, 2015, pp. 58–63.
  46. A. Elyasaf, A. Sadon, G. Weiss, and T. Yaacov, “Using Behavioural Programming with Solver, Context, and Deep Reinforcement Learning for Playing a Simplified RoboCup-Type Game,” in 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion (MODELS-C).   IEEE, 2019, pp. 243–251.
  47. R. Alur, S. Bansal, O. Bastani, and K. Jothimurugan, “A Framework for Transforming Specifications in Reinforcement Learning,” in Principles of Systems Design: Essays Dedicated to Thomas A. Henzinger on the Occasion of His 60th Birthday.   Cham: Springer Nature Switzerland, 2022, pp. 604–624. [Online]. Available: https://doi.org/10.1007/978-3-031-22337-2_29
  48. A. Camacho, R. Toro Icarte, T. Q. Klassen, R. Valenzano, and S. A. McIlraith, “LTL and Beyond: Formal Languages for Reward Function Specification in Reinforcement Learning,” in Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19.   California, United States: International Joint Conferences on Artificial Intelligence Organization, Jul. 2019, pp. 6065–6073. [Online]. Available: https://doi.org/10.24963/ijcai.2019/840

Summary

We haven't generated a summary for this paper yet.

X Twitter Logo Streamline Icon: https://streamlinehq.com