{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,19]],"date-time":"2026-06-19T07:53:48Z","timestamp":1781855628677,"version":"3.54.5"},"reference-count":47,"publisher":"Association for Computing Machinery (ACM)","issue":"POPL","license":[{"start":{"date-parts":[[2021,1,4]],"date-time":"2021-01-04T00:00:00Z","timestamp":1609718400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100000266","name":"UK Engineering and Physical Sciences Research Council","doi-asserted-by":"crossref","award":["EP\/M005852\/1"],"award-info":[{"award-number":["EP\/M005852\/1"]}],"id":[{"id":"10.13039\/501100000266","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2021,1,4]]},"abstract":"<jats:p>Nested relations, built up from atomic types via product and set types, form a rich data model. Over the last decades the nested relational calculus, NRC, has emerged as a standard language for defining transformations on nested collections. NRC is a strongly-typed functional language which allows building up transformations using tupling and projections, a singleton-former, and a map operation that lifts transformations on tuples to transformations on sets.<\/jats:p>\n                  <jats:p>In this work we describe an alternative declarative method of describing transformations in logic. A formula with distinguished inputs and outputs gives an implicit definition if one can prove that for each input there is only one output that satisfies it. Our main result shows that one can synthesize transformations from proofs that a formula provides an implicit definition, where the proof is in an intuitionistic calculus that captures a natural style of reasoning about nested collections. Our polynomial time synthesis procedure is based on an analog of Craig's interpolation lemma, starting with a provable containment between terms representing nested collections and generating an NRC expression that interpolates between them.<\/jats:p>\n                  <jats:p>We further show that NRC expressions that implement an implicit definition can be found when there is a classical proof of functionality, not just when there is an intuitionistic one. That is, whenever a formula implicitly defines a transformation, there is an NRC expression that implements it.<\/jats:p>","DOI":"10.1145\/3434295","type":"journal-article","created":{"date-parts":[[2021,1,4]],"date-time":"2021-01-04T12:34:24Z","timestamp":1609763664000},"page":"1-28","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Generating collection transformations from proofs"],"prefix":"10.1145","volume":"5","author":[{"given":"Michael","family":"Benedikt","sequence":"first","affiliation":[{"name":"University of Oxford, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"C\u00e9cilia","family":"Pradic","sequence":"additional","affiliation":[{"name":"University of Oxford, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2021,1,4]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01354881"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(86)90058-9"},{"key":"e_1_2_1_3_1","volume-title":"Answering Queries Using Views","author":"Afrati Foto","unstructured":"Foto Afrati and Rada Chirkova. 2019. Answering Queries Using Views. Morgan & Claypool Publishers."},{"key":"e_1_2_1_4_1","unstructured":"H. Andr\u00e9ka J. X. Madar\u00e1sz and I. N\u00e9meti. 2008. Definability of New Universes in Many-sorted logic. ( 2008 ). manuscript available at old.renyi.hu\/pub\/algebraic-logic\/kurzus10\/amn-defi.pdf."},{"key":"e_1_2_1_5_1","volume-title":"Julien Leblay, and Efthymia Tsamoura.","author":"Benedikt Michael","year":"2016","unstructured":"Michael Benedikt, Balden Ten Cate, Julien Leblay, and Efthymia Tsamoura. 2016. Generating plans from proofs: the interpolation-based approach to query reformulation. Morgan Claypool."},{"key":"e_1_2_1_6_1","doi-asserted-by":"crossref","unstructured":"Michael Benedikt and Christoph Koch. 2009. From XQuery to Relational Logics. ACM TODS 34 4 ( 2009 ) 25 : 1-25 : 48.","DOI":"10.1145\/1620585.1620592"},{"key":"e_1_2_1_7_1","doi-asserted-by":"crossref","unstructured":"E. W. Beth. 1953. On Padoa's Method in the Theory of Definitions. Indagationes Mathematicae 15 ( 1953 ) 330-339.","DOI":"10.1016\/S1385-7258(53)50042-3"},{"key":"e_1_2_1_8_1","doi-asserted-by":"crossref","unstructured":"Mikolaj Bojanczyk Laure Daviaud and Shankara Narayanan Krishna. 2018. Regular and First-Order List Functions. In LICS.","DOI":"10.1145\/3209108.3209163"},{"key":"e_1_2_1_9_1","doi-asserted-by":"crossref","unstructured":"Peter Buneman Shamim A. Naqvi Val Tannen and Limsoon Wong. 1995. Principles of Programming with Complex Objects and Collection Types. Theor. Comput. Sci. 149 1 ( 1995 ) 3-48.","DOI":"10.1016\/0304-3975(95)00024-Q"},{"key":"e_1_2_1_10_1","doi-asserted-by":"crossref","unstructured":"James Cheney Sam Lindley and Philip Wadler. 2014. Query shredding: eficient relational evaluation of queries over nested multisets. In SIGMOD.","DOI":"10.1145\/2588555.2612186"},{"key":"e_1_2_1_11_1","doi-asserted-by":"crossref","unstructured":"Thomas Colcombet and Christof L\u00f6ding. 2007. Transforming structures by set interpretations. Logical Methods in Computer Science 3 2 ( 2007 ).","DOI":"10.2168\/LMCS-3(2:4)2007"},{"key":"e_1_2_1_12_1","doi-asserted-by":"crossref","unstructured":"Ezra Cooper. 2009. The Script-Writer's Dream: How to Write Great SQL in Your Own Language and Be Sure It Will Succeed. In DBPL.","DOI":"10.1007\/978-3-642-03793-1_3"},{"key":"e_1_2_1_13_1","unstructured":"Coq. 2020. The Coq Proof Assistant. ( 2020 ). coq.inria.fr."},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.2307\/2963594"},{"key":"e_1_2_1_15_1","volume-title":"First-order Logic and Automated Theorem Proving","author":"Fitting Melvin","unstructured":"Melvin Fitting. 1996. First-order Logic and Automated Theorem Proving. Springer."},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1090\/pspum\/013.2\/0376348"},{"key":"e_1_2_1_17_1","volume-title":"A List of Successes That Can Change the World-Essays Dedicated to Philip Wadler on the Occasion of His 60th Birthday.","author":"Gibbons Jeremy","unstructured":"Jeremy Gibbons. 2016. Comprehending Ringads-For Phil Wadler, on the Occasion of his 60th Birthday. In A List of Successes That Can Change the World-Essays Dedicated to Philip Wadler on the Occasion of His 60th Birthday."},{"key":"e_1_2_1_18_1","doi-asserted-by":"crossref","unstructured":"Jeremy Gibbons Fritz Henglein Ralf Hinze and Nicolas Wu. 2018. Relational algebra by way of adjunctions. PACMPL 2 ICFP ( 2018 ).","DOI":"10.1145\/3236781"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.14778\/1920841.1920866"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1007\/s007780100054"},{"key":"e_1_2_1_21_1","doi-asserted-by":"crossref","unstructured":"Kry\u0161tof Hoder Laura Kov\u00e1cs and Andrei Voronkov. 2010. Interpolation and Symbol Elimination in Vampire.","DOI":"10.1007\/978-3-642-14203-1_16"},{"key":"e_1_2_1_22_1","volume-title":"Model Theory","author":"Hodges Wilfrid","unstructured":"Wilfrid Hodges. 1993. Model Theory. Cambridge University Press."},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1016\/0168-0072(90)90033-X"},{"key":"e_1_2_1_24_1","unstructured":"Qinheping Hu and Loris D'Antoni. 2017. Automatic Program Inversion Using Symbolic Transducers. In PLDI."},{"key":"e_1_2_1_25_1","volume-title":"Categorical Logic and Type Theory","author":"Jacobs Bart","unstructured":"Bart Jacobs. 2001. Categorical Logic and Type Theory. Elsevier."},{"key":"e_1_2_1_26_1","doi-asserted-by":"crossref","unstructured":"R. B. Jensen. 1972. The fine structure of the constructible hierarchy with a section by Jack Silver. Annals of Mathematical Logic 4 ( 1972 ) 229-308.","DOI":"10.1016\/0003-4843(72)90001-0"},{"key":"e_1_2_1_27_1","doi-asserted-by":"crossref","unstructured":"Christoph Koch. 2006. On the Complexity of Non-recursive XQuery and Functional Query Languages on Complex Values. ACM TODS 31 4 ( 2006 ) 1215-1256.","DOI":"10.1145\/1189769.1189771"},{"key":"e_1_2_1_28_1","unstructured":"Christoph Koch Daniel Lupei and Val Tannen. 2016. Incremental View Maintenance For Collection Programming. In PODS."},{"key":"e_1_2_1_29_1","unstructured":"Phokion G. Kolaitis. 1990. Implicit Definability on Finite Structures and Unambiguous Computations. In LICS."},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/543613.543644"},{"key":"e_1_2_1_31_1","doi-asserted-by":"crossref","unstructured":"M. Makkai. 1964. On a generalization of a theorem of E. W. Beth. Acta Mathematica Academiae Scientiarum Hungaricae 15 ( 1964 ) 227-235.","DOI":"10.1007\/BF01897040"},{"key":"e_1_2_1_32_1","doi-asserted-by":"crossref","unstructured":"K.L. McMillan. 2003. Interpolation and SAT-Based Model Checking. In CAV.","DOI":"10.1007\/978-3-540-45069-6_1"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/1142473.1142552"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.14778\/1920841.1920886"},{"key":"e_1_2_1_35_1","doi-asserted-by":"crossref","unstructured":"Andrzej Mostowski. 1949. An undecidable arithmetical statement. Fundamenta Mathematicae 36 1 ( 1949 ) 143-164.","DOI":"10.4064\/fm-36-1-143-164"},{"key":"e_1_2_1_36_1","doi-asserted-by":"crossref","unstructured":"Alan Nash Luc Segoufin and Victor Vianu. 2010. Views and queries: Determinacy and rewriting. ACM TODS 35 3 ( 2010 ).","DOI":"10.1145\/1806907.1806913"},{"key":"e_1_2_1_37_1","doi-asserted-by":"crossref","unstructured":"Martin Otto. 2000. An interpolation theorem. Bulletin of Symbolic Logic 6 4 ( 2000 ) 447-462.","DOI":"10.2307\/420966"},{"key":"e_1_2_1_38_1","doi-asserted-by":"crossref","unstructured":"Jan Paredaens and Dirk Van Gucht. 1992. Converting Nested Algebra Expressions into Flat Algebra Expressions. ACM TODS 17 1 ( 1992 ) 65-93.","DOI":"10.1145\/128765.128768"},{"key":"e_1_2_1_39_1","unstructured":"Vladimir Yu. Sazonov. 1985. Collection principle and existential quantifier. Vychislitel'nye sistemy 107 ( 1985 ) 30-39."},{"key":"e_1_2_1_40_1","doi-asserted-by":"crossref","unstructured":"Luc Segoufin and Victor Vianu. 2005. Views and queries: determinacy and rewriting. In PODS.","DOI":"10.1145\/1065167.1065174"},{"key":"e_1_2_1_41_1","volume-title":"Foster","author":"Srivastava Saurabh","year":"2011","unstructured":"Saurabh Srivastava, Sumit Gulwani, Swarat Chaudhuri, and Jefrey S. Foster. 2011. Path-Based Inductive Synthesis for Program Inversion. In PLDI."},{"key":"e_1_2_1_42_1","unstructured":"Dan Suciu. 1995. Parallel Programming Languages for Collections. Ph.D. Dissertation. Univ. Pennsylvania."},{"key":"e_1_2_1_43_1","doi-asserted-by":"crossref","unstructured":"David Toman and Grant Weddell. 2011. Fundamentals of Physical Design and Query Compilation. Morgan Claypool.","DOI":"10.1007\/978-3-031-01881-7"},{"key":"e_1_2_1_44_1","unstructured":"Alexander Ulrich. 2019. Query Flattening and the Nested Data Parallelism Paradigm. Ph.D. Dissertation. University of T\u00fcbingen Germany. https:\/\/publikationen.uni-tuebingen.de\/xmlui\/handle\/10900\/87698\/"},{"key":"e_1_2_1_45_1","first-page":"1","article-title":"Simulation of the Nested Relational Algebra by the Flat Relational Algebra, with an Application to the Complexity of Evaluating Powerset Algebra Expressions","volume":"254","author":"den Bussche Jan Van","year":"2001","unstructured":"Jan Van den Bussche. 2001. Simulation of the Nested Relational Algebra by the Flat Relational Algebra, with an Application to the Complexity of Evaluating Powerset Algebra Expressions. Theoretical Computer Science 254, 1-2 ( 2001 ), 363-377.","journal-title":"Theoretical Computer Science"},{"key":"e_1_2_1_46_1","unstructured":"Limsoon Wong. 1994. Querying Nested Collections. Ph.D. Dissertation. Univ. Pennsylvania."},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1006\/jcss.1996.0037"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3434295","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3434295","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,6,19]],"date-time":"2026-06-19T07:27:34Z","timestamp":1781854054000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3434295"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,1,4]]},"references-count":47,"journal-issue":{"issue":"POPL","published-print":{"date-parts":[[2021,1,4]]}},"alternative-id":["10.1145\/3434295"],"URL":"https:\/\/doi.org\/10.1145\/3434295","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,1,4]]},"assertion":[{"value":"2021-01-04","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}