CICM 2017: Intelligent Computer Mathematics pp 239-254

# A Verified Algorithm Enumerating Event Structures

• Juliana Bowles
• Marco B. Caminati
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10383)

## Abstract

An event structure is a mathematical abstraction modeling concepts as causality, conflict and concurrency between events. While many other mathematical structures, including groups, topological spaces, rings, abound with algorithms and formulas to generate, enumerate and count particular sets of their members, no algorithm or formulas are known to generate or count all the possible event structures over a finite set of events. We present an algorithm to generate such a family, along with a functional implementation verified using Isabelle/HOL. As byproducts, we obtain a verified enumeration of all possible preorders and partial orders. While the integer sequences counting preorders and partial orders are already listed on OEIS (On-line Encyclopedia of Integer Sequences), the one counting event structures is not. We therefore used our algorithm to submit a formally verified addition, which has been successfully reviewed and is now part of the OEIS.

## Keywords

Formal methods OEIS Verified algorithm Enumeration Counting Discrete Event structures Isabelle/HOL Automated reasoning Logic

## References

1. 1.
Aho, A.V., Garey, M.R., Ullman, J.D.: The transitive reduction of a directed graph. SIAM J. Comput. 1(2), 131–137 (1972)
2. 2.
Assous, M.R., et al.: Finite labelling problem in event structures. Theor. Comput. Sci. 123(1), 9–19 (1994)
3. 3.
Baldan, P., Corradini, A., Montanari, U.: Contextual Petri nets, asymmetric event structures, and processes. Inf. Comput. 171(1), 1–49 (2001)
4. 4.
Bowles, J.K.F.: Decomposing interactions. In: Johnson, M., Vene, V. (eds.) AMAST 2006. LNCS, vol. 4019, pp. 189–203. Springer, Heidelberg (2006). doi:
5. 5.
Bowles, J.K.F., Caminati, M.B.: Mind the gap: addressing behavioural inconsistencies with formal methods. In: 2016 23rd Asia-Pacific Software Engineering Conference (APSEC). IEEE Computer Society (2016)Google Scholar
6. 6.
Bruni, R., Melgratti, H., Montanari, U.: Event structure semantics for nominal calculi. In: Baier, C., Hermanns, H. (eds.) CONCUR 2006. LNCS, vol. 4137, pp. 295–309. Springer, Heidelberg (2006). doi:
7. 7.
Butelle, F., Hivert, F., Mayero, M., Toumazet, F.: Formal proof of SCHUR conjugate function. In: Autexier, S., Calmet, J., Delahaye, D., Ion, P.D.F., Rideau, L., Rioboo, R., Sexton, A.P. (eds.) CICM 2010. LNCS, vol. 6167, pp. 158–171. Springer, Heidelberg (2010). doi:
8. 8.
Caminati, M.B., et al.: Sound auction specification and implementation. In: Proceedings of the Sixteenth ACM Conference on Economics and Computation, pp. 547–564. ACM (2015)Google Scholar
9. 9.
Costa-Gomes, M., et al.: Choice, Deferral and Consistency. Discussion Paper Series, Department of Economics 201416. Department of Economics, University of St. Andrews (2014)Google Scholar
10. 10.
Distler, A., Shah, M., Sorge, V.: Enumeration of AG-Groupoids. In: Davenport, J.H., Farmer, W.M., Urban, J., Rabe, F. (eds.) CICM 2011. LNCS, vol. 6824, pp. 1–14. Springer, Heidelberg (2011). doi:
11. 11.
Genestier, R., Giorgetti, A., Petiot, G.: Sequential generation of structured arrays and its deductive verification. In: Blanchette, J.C., Kosmatov, N. (eds.) TAP 2015. LNCS, vol. 9154, pp. 109–128. Springer, Cham (2015). doi:
12. 12.
Kammüller, F.: Mechanical analysis of finite idempotent relations. Fundamenta Informaticae 107(1), 43–65 (2011)
13. 13.
Kleitman, D.J., Rothschild, B.L.: Asymptotic enumeration of partial orders on a finite set. Trans. Am. Math. Soc. 205, 205–220 (1975)
14. 14.
Lochbihler, A.: Formalising finfuns – generating code for functions as data from Isabelle/HOL. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 310–326. Springer, Heidelberg (2009). doi:
15. 15.
Pfeiffer, G.: Counting transitive relations. J. Integer Sequences 7(2), 3 (2004)
16. 16.
Sloane, N.: The on-line Encyclopedia of integer sequences. Ann. Math. Informaticae 41, 219–234 (2013)
17. 17.
Vera-López, A., Arregi, J.: Conjugacy classes in unitriangular matrices. Linear Algebra Appl. 370, 85–124 (2003)
18. 18.
Winskel, G., Nielsen, M.: Models for concurrency. In: Abramsky, S., Gabbay, D.M., Maibaum, T.S.E. (eds.) Handbook of Logic in Computer Science: Semantic Modelling, vol. 4, pp. 1–148. Oxford University Press, Oxford (1995)Google Scholar
19. 19.
Winskel, G.: Event structures. In: Brauer, W., Reisig, W., Rozenberg, G. (eds.) ACPN 1986. LNCS, vol. 255, pp. 325–392. Springer, Heidelberg (1987). doi:
20. 20.
Winskel, G.: Events, causality and symmetry. Comput. J. 54(1), 42–57 (2011). https://doi.org/10.1093/comjnl/bxp052