{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T14:15:45Z","timestamp":1784211345518,"version":"3.55.0"},"reference-count":34,"publisher":"Association for Computing Machinery (ACM)","issue":"POPL","license":[{"start":{"date-parts":[[2026,1,8]],"date-time":"2026-01-08T00:00:00Z","timestamp":1767830400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2026,1,8]]},"abstract":"<jats:p>\n                    In this work, we study the fundamental problems of counting and sampling\n                    <jats:italic toggle=\"yes\">traces<\/jats:italic>\n                    that a regular language touches. Formally, one fixes the alphabet \u03a3 and an independence relation\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\">\n                        <mml:mo>\ud835\udd40<\/mml:mo>\n                        <mml:mo>\u2286<\/mml:mo>\n                        <mml:mo>\u03a3<\/mml:mo>\n                        <mml:mo>\u00d7<\/mml:mo>\n                        <mml:mo>\u03a3<\/mml:mo>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    . The computational problems we address take as input a regular language\n                    <jats:italic toggle=\"yes\">L<\/jats:italic>\n                    over \u03a3, presented as a finite automaton with\n                    <jats:italic toggle=\"yes\">m<\/jats:italic>\n                    states, together with a natural number\n                    <jats:italic toggle=\"yes\">n<\/jats:italic>\n                    (presented in unary). For the counting problem, the output is the number of Mazurkiewicz traces (induced by \ud835\udd40) that intersect the\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\">\n                        <mml:msup>\n                          <mml:mi>n<\/mml:mi>\n                          <mml:mi>th<\/mml:mi>\n                        <\/mml:msup>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    slice\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\">\n                        <mml:msub>\n                          <mml:mi>L<\/mml:mi>\n                          <mml:mi>n<\/mml:mi>\n                        <\/mml:msub>\n                        <mml:mo>=<\/mml:mo>\n                        <mml:mi>L<\/mml:mi>\n                        <mml:mo>\u2229<\/mml:mo>\n                        <mml:msup>\n                          <mml:mo>\u03a3<\/mml:mo>\n                          <mml:mi>n<\/mml:mi>\n                        <\/mml:msup>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    , i.e., traces that have at least one linearization in\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\">\n                        <mml:msub>\n                          <mml:mi>L<\/mml:mi>\n                          <mml:mi>n<\/mml:mi>\n                        <\/mml:msub>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    . For the sampling problem, the output is a trace drawn from a distribution that is approximately uniform over all such traces. These problems are motivated by applications such as bounded model checking based on partial-order reduction, where an\n                    <jats:italic toggle=\"yes\">a priori<\/jats:italic>\n                    estimate of the size of the state space can significantly improve usability, as well as testing approaches for concurrent programs that use partial-order-aware random sampling, where uniform exploration is desirable for effective bug detection.\n                  <\/jats:p>\n                  <jats:p>\n                    We first show that the counting problem is #P-hard even when the automaton accepting the language\n                    <jats:italic toggle=\"yes\">L<\/jats:italic>\n                    is deterministic, which is in sharp contrast to the corresponding problem for counting the words of a DFA, which is solvable in polynomial time. We then show that the counting problem remains in the class #P for both NFAs and DFAs, independent of whether\n                    <jats:italic toggle=\"yes\">L<\/jats:italic>\n                    is trace-closed. Finally, our main contributions are a\n                    <jats:italic toggle=\"yes\">fully polynomial-time randomized approximation scheme<\/jats:italic>\n                    (FPRAS) that, with high probability, estimates the desired count within a specified accuracy parameter, and a\n                    <jats:italic toggle=\"yes\">fully polynomial-time almost uniform sampler<\/jats:italic>\n                    (FPAUS) that generates traces while ensuring that the distribution induced on them is approximately uniform with high probability.\n                  <\/jats:p>","DOI":"10.1145\/3776723","type":"journal-article","created":{"date-parts":[[2026,1,8]],"date-time":"2026-01-08T18:59:43Z","timestamp":1767898783000},"page":"2352-2379","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Counting and Sampling Traces in Regular Languages"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-7517-6735","authenticated-orcid":false,"given":"Alexis","family":"de Colnet","sequence":"first","affiliation":[{"name":"TU Wien, Vienna, Austria"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9423-5270","authenticated-orcid":false,"given":"Kuldeep S.","family":"Meel","sequence":"additional","affiliation":[{"name":"University of Toronto, Toronto, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7610-0660","authenticated-orcid":false,"given":"Umang","family":"Mathur","sequence":"additional","affiliation":[{"name":"National University of Singapore, Singapore, Singapore"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,1,8]]},"reference":[{"key":"e_1_3_2_2_2","doi-asserted-by":"publisher","DOI":"10.1145\/2535838.2535845"},{"key":"e_1_3_2_3_2","doi-asserted-by":"publisher","DOI":"10.1145\/3360576"},{"key":"e_1_3_2_4_2","doi-asserted-by":"publisher","DOI":"10.1145\/3632915"},{"key":"e_1_3_2_5_2","doi-asserted-by":"publisher","DOI":"10.1145\/3294052.3319704"},{"key":"e_1_3_2_6_2","doi-asserted-by":"publisher","DOI":"10.1145\/3477045"},{"key":"e_1_3_2_7_2","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(89)90051-5"},{"key":"e_1_3_2_8_2","doi-asserted-by":"publisher","DOI":"10.1137\/0213042"},{"key":"e_1_3_2_9_2","doi-asserted-by":"publisher","DOI":"10.1145\/3477132.3483540"},{"key":"e_1_3_2_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/1736020.1736040"},{"key":"e_1_3_2_11_2","unstructured":"Alexis de Colnet Kuldeep S. Meel and Manthan Mathur. 2025. Counting and Sampling Traces in Regular Languages. arXiv:2512.00314 [cs.FL]. https:\/\/arxiv.org\/abs\/2512.00314."},{"key":"e_1_3_2_12_2","doi-asserted-by":"publisher","DOI":"10.5555\/554921"},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","DOI":"10.1145\/3632873"},{"key":"e_1_3_2_14_2","doi-asserted-by":"publisher","DOI":"10.1145\/1040315"},{"key":"e_1_3_2_15_2","doi-asserted-by":"publisher","DOI":"10.1145\/2827695"},{"key":"e_1_3_2_16_2","doi-asserted-by":"publisher","DOI":"10.5555\/11534.11537"},{"key":"e_1_3_2_17_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-031-57249-4_4"},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/3498711"},{"key":"e_1_3_2_19_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-81685-8_20"},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/3618433.3616268"},{"key":"e_1_3_2_21_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-031-37709-9_17"},{"key":"e_1_3_2_22_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-031-30823-9_5"},{"key":"e_1_3_2_23_2","first-page":"279","volume-title":"Trace TheoryAdvances in Petri Nets 1986, Part II: Applications and Relationships to Other Models of Concurrency","author":"Mazurkiewicz A.","year":"1987","unstructured":"A. Mazurkiewicz. 1987. Trace Theory. In Advances in Petri Nets 1986, Part II: Applications and Relationships to Other Models of Concurrency. Springer-Verlag, New York, NY, 279\u2013324."},{"key":"e_1_3_2_24_2","doi-asserted-by":"publisher","DOI":"10.1145\/3651613"},{"key":"e_1_3_2_25_2","doi-asserted-by":"publisher","DOI":"10.4230\/LIPICS.ICDT.2025.30"},{"key":"e_1_3_2_26_2","doi-asserted-by":"publisher","DOI":"10.1145\/3725253"},{"key":"e_1_3_2_27_2","doi-asserted-by":"publisher","DOI":"10.1017\/9781108981491"},{"key":"e_1_3_2_28_2","doi-asserted-by":"publisher","DOI":"10.1145\/1250734.1250785"},{"key":"e_1_3_2_29_2","doi-asserted-by":"publisher","DOI":"10.1145\/3445814.3446748"},{"key":"e_1_3_2_30_2","doi-asserted-by":"publisher","DOI":"10.1145\/3360606"},{"key":"e_1_3_2_31_2","doi-asserted-by":"publisher","DOI":"10.1145\/3510033.3510227"},{"key":"e_1_3_2_32_2","doi-asserted-by":"crossref","unstructured":"Koushik Sen. 2007. Effective random testing of concurrent programs. In Proceedings of the 22nd IEEE\/ACM International Conference on Automated Software Engineering 323\u2013332.","DOI":"10.1145\/1321631.1321679"},{"key":"e_1_3_2_33_2","doi-asserted-by":"publisher","DOI":"10.1145\/3620665.3640389"},{"key":"e_1_3_2_34_2","doi-asserted-by":"publisher","DOI":"10.1145\/3669940.3707214"},{"key":"e_1_3_2_35_2","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(93)90252-O"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3776723","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T13:42:04Z","timestamp":1784209324000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3776723"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,1,8]]},"references-count":34,"journal-issue":{"issue":"POPL","published-print":{"date-parts":[[2026,1,8]]}},"alternative-id":["10.1145\/3776723"],"URL":"https:\/\/doi.org\/10.1145\/3776723","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,1,8]]},"assertion":[{"value":"2025-07-10","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-11-06","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-01-08","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}