Solving Parity Games in Scala

  • Antonio Di Stasio
  • Aniello Murano
  • Vincenzo Prignano
  • Loredana Sorrentino
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8997)

Abstract

Parity games are two-player games, played on directed graphs, whose nodes are labeled with priorities. Along a play, the maximal priority occurring infinitely often determines the winner. In the last two decades, a variety of algorithms and successive optimizations have been proposed. The majority of them have been implemented in PGSolver, written in OCaml, which has been elected by the community as the de facto platform to solve efficiently parity games as well as evaluate their performance in several specific cases.

PGSolver includes the Zielonka Recursive Algorithm that has been shown to perform better than the others in randomly generated games. However, even for arenas with a few thousand of nodes (especially over dense graphs), it requires minutes to solve the corresponding game.

In this paper, we deeply revisit the implementation of the recursive algorithm introducing several improvements and making use of Scala Programming Language. These choices have been proved to be very successful, gaining up to two orders of magnitude in running time.

References

  1. 1.
    Aminof, B., Mogavero, F., Murano, A.: Synthesis of hierarchical systems. Sci. Comp. Program. 83, 56–79 (2013)CrossRefGoogle Scholar
  2. 2.
    Antonik, A., Charlton, N., Huth, M.: Polynomial-time under-approximation of winning regions in parity games. ENTCS 225, 115–139 (2009)Google Scholar
  3. 3.
    Aminof, B., Kupferman, O., Murano, A.: Improved model checking of hierarchical systems. Inf. Comput. 210, 68–86 (2012)CrossRefMATHMathSciNetGoogle Scholar
  4. 4.
    Barringer, H., Havelund, K.: TraceContract: a scala DSL for trace analysis. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 57–72. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  5. 5.
    Berger, E.D., Zorn, B.G., McKinley, K.S.: Composing high-performance memory allocators. ACM SIGPLAN Not. 36, 114–124 (2001)CrossRefGoogle Scholar
  6. 6.
    Berger, E.D., Zorn, B.G., McKinley, K.S.: OOPSLA 2002: reconsidering custom memory allocation. ACM SIGPLAN Not. 48(4), 46–57 (2013)CrossRefGoogle Scholar
  7. 7.
    Berwanger, D.: Admissibility in infinite games. In: Thomas, W., Weil, P. (eds.) STACS 2007. LNCS, vol. 4393, pp. 188–199. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  8. 8.
    Chatterjee, K., Doyen, L., Henzinger, T.A., Raskin, J.-F.: Generalized mean-payoff and energy games. In: FSTTCS’10, LIPIcs 8, pp. 505–516 (2010)Google Scholar
  9. 9.
    Chatterjee, K., Henzinger, T.A., Jurdzinski, M.: Mean-payoff parity games. In: LICS’05, pp. 178–187 (2005)Google Scholar
  10. 10.
    Chatterjee, K., Jurdzinski, M., Henzinger, T.A.: Quantitative stochastic parity games. In: SODA’04, pp. 121–130 (2004)Google Scholar
  11. 11.
    Clarke, E.M., Emerson, E.A.: Design and synthesis of synchronization skeletons using branching time temporal logic. In: Kozen, D. (ed.) Logic of Programs 1981. LNCS, vol. 131, pp. 52–71. Springer, Heidelberg (1982)CrossRefGoogle Scholar
  12. 12.
    Clarke, E., Grumberg, O., Peled, D.: Model Checking. MIT Press, Cambridge (2002)Google Scholar
  13. 13.
    Emerson, E., Jutla, C.: Tree automata, \(\mu \)-calculus and determinacy. In: FOCS’91, pp. 368–377 (1991)Google Scholar
  14. 14.
    Friedmann, O.: Recursive algorithm for parity games requires exponential time. RAIRO-Theor. Inform. Appl. 45(04), 449–457 (2011)CrossRefMATHMathSciNetGoogle Scholar
  15. 15.
    Friedmann, O., Lange, M.: The pgsolver collection of parity game solvers. University of Munich (2009)Google Scholar
  16. 16.
    Friedmann, O., Lange, M.: Solving parity games in practice. In: Liu, Z., Ravn, A.P. (eds.) ATVA 2009. LNCS, vol. 5799, pp. 182–196. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  17. 17.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Pearson Education, New Jersey (1994)Google Scholar
  18. 18.
    Gay, D., Aiken, A.: Memory management with explicit regions. ACM Sigplan Not. 33, 313–323 (1998)CrossRefGoogle Scholar
  19. 19.
    Hoffmann, P., Luttenberger, M.: Solving parity games on the GPU. In: Van Hung, D., Ogawa, M. (eds.) ATVA 2013. LNCS, vol. 8172, pp. 455–459. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  20. 20.
    Hundt, R.: Loop recognition in c++/java/go/scala. In: 2011 Proceedings of Scala Days (2011)Google Scholar
  21. 21.
    Jurdzinski, M.: Deciding the winner in parity games is in up \(\cap \) co-up. Inf. Process. Lett. 68(3), 119–124 (1998)CrossRefMathSciNetGoogle Scholar
  22. 22.
    Jurdziński, M.: Small progress measures for solving parity games. In: Reichel, H., Tison, S. (eds.) STACS 2000. LNCS, vol. 1770, pp. 290–301. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  23. 23.
    Jurdzinski, M., Paterson, M., Zwick, U.: A deterministic subexponential algorithm for solving parity games. SIAM J. Comput. 38(4), 1519–1532 (2008)CrossRefMATHMathSciNetGoogle Scholar
  24. 24.
    Kozen, D.: Results on the propositional mu-calculus. TCS 27(3), 333–354 (1983)CrossRefMATHMathSciNetGoogle Scholar
  25. 25.
    Kupferman, O., Vardi, M., Wolper, P.: An automata theoretic approach to branching-time model checking. JACM 47(2), 312–360 (2000)CrossRefMATHMathSciNetGoogle Scholar
  26. 26.
    Kupferman, O., Vardi, M., Wolper, P.: Module checking. IC 164(2), 322–344 (2001)MATHMathSciNetGoogle Scholar
  27. 27.
    McNaughton, R.: Infinite games played on finite graphs. Ann. Pure Appl. Log. 65(2), 149–184 (1993)CrossRefMATHMathSciNetGoogle Scholar
  28. 28.
    Mogavero, F., Murano, A., Sorrentino, L.: On promptness in parity games. In: McMillan, K., Middeldorp, A., Voronkov, A. (eds.) LPAR-19 2013. LNCS, vol. 8312, pp. 601–618. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  29. 29.
    Odersky, M., Altherr, P., Cremet, V., Emir, B., Maneth, S., Micheloud, S., Mihaylov, N., Schinz, M., Stenman, E., Zenger, M.: An overview of the scala programming language (2004)Google Scholar
  30. 30.
    Odersky, M., Spoon, L., Venners, B.: Programming in Scala. Artima Inc, Sunnyvale (2008)Google Scholar
  31. 31.
    Queille, J., Sifakis, J.: Specification and verification of concurrent programs in CESAR. In: Dezani-Ciancaglini, M., Montanari, U. (eds.) International Symposium on Programming. LNCS, vol. 137, pp. 337–351. Springer, Heidelberg (1982)CrossRefGoogle Scholar
  32. 32.
    Schewe, S.: Solving parity games in big steps. In: Arvind, V., Prasad, S. (eds.) FSTTCS 2007. LNCS, vol. 4855, pp. 449–460. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  33. 33.
    Thomas, W.: Automata on infinite objects. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science, vol. B, pp. 133–191. MIT Press, Cambridge (1990)Google Scholar
  34. 34.
    Vöge, J., Jurdzinski, M.: A discrete strategy improvement algorithm for solving parity games. In: Emerson, E.A., Sistla, A.P. (eds.) CAV 2000. LNCS, vol. 1855, pp. 202–215. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  35. 35.
    Zielonka, W.: Infinite games on finitely coloured graphs with applications to automata on infinite trees. Theor. Comput. Sci. 200(1–2), 135–183 (1998)CrossRefMATHMathSciNetGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Antonio Di Stasio
    • 1
  • Aniello Murano
    • 1
  • Vincenzo Prignano
    • 1
  • Loredana Sorrentino
    • 1
  1. 1.Università degli Studi di Napoli Federico IINapoliItaly

Personalised recommendations