Automatically deriving control-flow graph generators from operational semantics
We develop the first theory of control-flow graphs from first principles, and use it to create an algorithm for automatically synthesizing many variants of control-flow graph generators from a language’s operational semantics. Our approach first introduces a new algorithm for converting a large clas...
Gespeichert in:
| Veröffentlicht in: | Proceedings of ACM on programming languages Jg. 6; H. ICFP; S. 742 - 771 |
|---|---|
| Hauptverfasser: | , , |
| Format: | Journal Article |
| Sprache: | Englisch |
| Veröffentlicht: |
29.08.2022
|
| ISSN: | 2475-1421, 2475-1421 |
| Online-Zugang: | Volltext |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| Abstract | We develop the first theory of control-flow graphs from first principles, and use it to create an algorithm for automatically synthesizing many variants of control-flow graph generators from a language’s operational semantics. Our approach first introduces a new algorithm for converting a large class of small-step operational semantics to an abstract machine. It next uses a technique called ”abstract rewriting” to automatically abstract the semantics of a language, which is used both to directly generate a CFG from a program (”interpreted mode”) and to generate standalone code, similar to a human-written CFG generator, for any program in a language. We show how the choice of two abstraction and projection parameters allow our approach to synthesize several families of CFG-generators useful for different kinds of tools. We prove the correspondence between the generated graphs and the original semantics. We provide and prove an algorithm for automatically proving the termination of interpreted-mode generators. In addition to our theoretical results, we have implemented this algorithm in a tool called Mandate, and show that it produces human-readable code on two medium-size languages with 60−80 rules, featuring nearly all intraprocedural control constructs common in modern languages. We then show these CFG-generators were sufficient to build two static analyses atop them. Our work is a promising step towards the grand vision of being able to synthesize all desired tools from the semantics of a programming language. |
|---|---|
| AbstractList | We develop the first theory of control-flow graphs from first principles, and use it to create an algorithm for automatically synthesizing many variants of control-flow graph generators from a language’s operational semantics. Our approach first introduces a new algorithm for converting a large class of small-step operational semantics to an abstract machine. It next uses a technique called ”abstract rewriting” to automatically abstract the semantics of a language, which is used both to directly generate a CFG from a program (”interpreted mode”) and to generate standalone code, similar to a human-written CFG generator, for any program in a language. We show how the choice of two abstraction and projection parameters allow our approach to synthesize several families of CFG-generators useful for different kinds of tools. We prove the correspondence between the generated graphs and the original semantics. We provide and prove an algorithm for automatically proving the termination of interpreted-mode generators. In addition to our theoretical results, we have implemented this algorithm in a tool called Mandate, and show that it produces human-readable code on two medium-size languages with 60−80 rules, featuring nearly all intraprocedural control constructs common in modern languages. We then show these CFG-generators were sufficient to build two static analyses atop them. Our work is a promising step towards the grand vision of being able to synthesize all desired tools from the semantics of a programming language. |
| Author | Koppel, James Kearl, Jackson Solar-Lezama, Armando |
| Author_xml | – sequence: 1 givenname: James orcidid: 0000-0002-3948-6904 surname: Koppel fullname: Koppel, James organization: Massachusetts Institute of Technology, USA – sequence: 2 givenname: Jackson orcidid: 0000-0003-0325-1836 surname: Kearl fullname: Kearl, Jackson organization: Massachusetts Institute of Technology, USA – sequence: 3 givenname: Armando orcidid: 0000-0001-7604-8252 surname: Solar-Lezama fullname: Solar-Lezama, Armando organization: Massachusetts Institute of Technology, USA |
| BookMark | eNpNkL1OwzAYRS1UJEqpeAVvTAF__knssaqAIlXqAnNkx3YIcuzIDqC-PVR0YLrnLmc412gRU3QI3QK5B-DigQne1FxeoCXljaiAU1j84yu0LuWDEAKKccnUEh02n3Ma9Tx0OoQjti4PX0PscZfinFOofEjfuM96ese9iy7rOeWCfU4jTtPpDinqgIsbdfyVlBt06XUobn3eFXp7enzd7qr94fllu9lXHaVkrjg3jVCUguqEA2FJbcARY3VjLVVGSCkJsxI8b4iohfHaSkkVNwK8Y41lK3T35-1yKiU73055GHU-tkDaU4r2nIL9ANFZUuc |
| Cites_doi | 10.1145/2103621.2103691 10.1145/1411204.1411206 10.1145/888251.888254 10.1016/S0747-7171(87)80022-6 10.1145/3110288 10.1145/199448.199536 10.1016/j.jcss.2009.10.004 10.1016/j.jlamp.2016.10.001 10.1145/2661088.2661098 10.1145/1988783.1988785 10.1016/S1571-0661(05)80692-9 10.1145/2814270.2814308 10.1145/2737924.2737979 10.1016/j.jlap.2010.03.012 10.1007/978-3-030-17184-1_8 10.1023/A:1014408032446 10.1145/3276492 10.1145/158511.158703 10.1145/2692915.2628143 10.1145/3290357 10.7146/brics.v11i20.21845 10.21236/ADA087640 10.1145/24039.24041 10.1145/2970276.2970298 10.1145/3236800 10.1145/155090.155113 10.1145/3110256 10.1145/3135932.3135941 10.1007/978-3-540-69166-2_23 10.1145/2676726.2676982 10.1007/978-3-642-54833-8_15 10.1145/2187671.2187672 10.1145/2813885.2737991 10.1017/S0960129500001559 10.1145/2837614.2837632 10.1145/2491956.2491979 10.1145/1596550.1596592 10.1145/2500365.2500604 10.1016/0743-1066(92)90030-7 10.1016/j.tcs.2012.02.023 10.1145/3192366.3192398 10.1007/3-540-10843-2_10 |
| ContentType | Journal Article |
| DBID | AAYXX CITATION |
| DOI | 10.1145/3547648 |
| DatabaseName | CrossRef |
| DatabaseTitle | CrossRef |
| DatabaseTitleList | CrossRef |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Computer Science |
| EISSN | 2475-1421 |
| EndPage | 771 |
| ExternalDocumentID | 10_1145_3547648 |
| GroupedDBID | AAKMM AAYFX AAYXX ACM AEFXT AEJOY AIKLT AKRVB ALMA_UNASSIGNED_HOLDINGS CITATION GUFHI LHSKQ M~E OK1 ROL |
| ID | FETCH-LOGICAL-c220t-44b7592219c5e15d06b1e0bda7dd29b588803d81f470565bfad88294b51fe37d3 |
| ISICitedReferencesCount | 1 |
| ISICitedReferencesURI | http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=000851562000028&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| ISSN | 2475-1421 |
| IngestDate | Sat Nov 29 07:50:56 EST 2025 |
| IsDoiOpenAccess | false |
| IsOpenAccess | true |
| IsPeerReviewed | true |
| IsScholarly | true |
| Issue | ICFP |
| Language | English |
| LinkModel | OpenURL |
| MergedId | FETCHMERGED-LOGICAL-c220t-44b7592219c5e15d06b1e0bda7dd29b588803d81f470565bfad88294b51fe37d3 |
| ORCID | 0000-0001-7604-8252 0000-0003-0325-1836 0000-0002-3948-6904 |
| OpenAccessLink | https://dl.acm.org/doi/pdf/10.1145/3547648 |
| PageCount | 30 |
| ParticipantIDs | crossref_primary_10_1145_3547648 |
| PublicationCentury | 2000 |
| PublicationDate | 2022-08-29 |
| PublicationDateYYYYMMDD | 2022-08-29 |
| PublicationDate_xml | – month: 08 year: 2022 text: 2022-08-29 day: 29 |
| PublicationDecade | 2020 |
| PublicationTitle | Proceedings of ACM on programming languages |
| PublicationYear | 2022 |
| References | Horn David Van (e_1_2_1_62_1) 2010 e_1_2_1_41_1 e_1_2_1_45_1 Bert Didier (e_1_2_1_5_1) 1995 e_1_2_1_22_1 e_1_2_1_43_1 e_1_2_1_64_1 e_1_2_1_28_1 e_1_2_1_26_1 e_1_2_1_47_1 Appel Andrew W. (e_1_2_1_3_1) Păsăreanu Corina S (e_1_2_1_51_1) 2005 Huizing Cornelis (e_1_2_1_31_1) e_1_2_1_54_1 e_1_2_1_8_1 Cimini Matteo (e_1_2_1_12_1) 2017 e_1_2_1_56_1 e_1_2_1_35_1 e_1_2_1_50_1 e_1_2_1_10_1 Danvy Olivier (e_1_2_1_20_1) 2004 e_1_2_1_33_1 e_1_2_1_52_1 e_1_2_1_2_1 e_1_2_1_16_1 e_1_2_1_39_1 Lakin Matthew R (e_1_2_1_40_1) 2007 e_1_2_1_14_1 e_1_2_1_37_1 e_1_2_1_58_1 e_1_2_1_18_1 e_1_2_1_42_1 e_1_2_1_65_1 Felleisen Matthias (e_1_2_1_24_1) 2009 Bert Didier (e_1_2_1_6_1) 1993 e_1_2_1_23_1 e_1_2_1_46_1 e_1_2_1_61_1 e_1_2_1_21_1 e_1_2_1_44_1 e_1_2_1_63_1 e_1_2_1_27_1 e_1_2_1_25_1 e_1_2_1_29_1 Codish Michael (e_1_2_1_15_1) 1991 Nystrom Nathaniel (e_1_2_1_49_1) 2003 e_1_2_1_30_1 e_1_2_1_55_1 e_1_2_1_13_1 e_1_2_1_34_1 e_1_2_1_1_1 Nielson Flemming (e_1_2_1_48_1) e_1_2_1_11_1 e_1_2_1_32_1 e_1_2_1_53_1 e_1_2_1_17_1 e_1_2_1_38_1 Baader Franz (e_1_2_1_4_1) e_1_2_1_36_1 Schmidt David A (e_1_2_1_57_1) 1996 e_1_2_1_59_1 e_1_2_1_9_1 e_1_2_1_19_1 |
| References_xml | – ident: e_1_2_1_38_1 doi: 10.1145/2103621.2103691 – volume-title: Abstracting Abstract Machines. In 15th ACM SIGPLAN International Conference on Functional Programming, ICFP’10 year: 2010 ident: e_1_2_1_62_1 – ident: e_1_2_1_17_1 doi: 10.1145/1411204.1411206 – ident: e_1_2_1_2_1 doi: 10.1145/888251.888254 – ident: e_1_2_1_23_1 doi: 10.1016/S0747-7171(87)80022-6 – ident: e_1_2_1_53_1 doi: 10.1145/3110288 – ident: e_1_2_1_34_1 doi: 10.1145/199448.199536 – ident: e_1_2_1_43_1 – ident: e_1_2_1_18_1 doi: 10.1016/j.jcss.2009.10.004 – ident: e_1_2_1_55_1 doi: 10.1016/j.jlamp.2016.10.001 – ident: e_1_2_1_27_1 doi: 10.1145/2661088.2661098 – ident: e_1_2_1_58_1 doi: 10.1145/1988783.1988785 – volume-title: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017 year: 2017 ident: e_1_2_1_12_1 – ident: e_1_2_1_33_1 doi: 10.1016/S1571-0661(05)80692-9 – volume-title: Symposium on Trends in Functional Programming. year: 2007 ident: e_1_2_1_40_1 – ident: e_1_2_1_22_1 doi: 10.1145/2814270.2814308 – ident: e_1_2_1_30_1 doi: 10.1145/2737924.2737979 – volume-title: Abstract Rewriting. In International Workshop on Static Analysis. 178–192 year: 1993 ident: e_1_2_1_6_1 – volume-title: Concrete Model Checking with Abstract Matching and Refinement. In International Conference on Computer Aided Verification. 52–66 year: 2005 ident: e_1_2_1_51_1 – ident: e_1_2_1_56_1 doi: 10.1016/j.jlap.2010.03.012 – ident: e_1_2_1_63_1 doi: 10.1007/978-3-030-17184-1_8 – ident: e_1_2_1_65_1 doi: 10.1023/A:1014408032446 – ident: e_1_2_1_39_1 doi: 10.1145/3276492 – ident: e_1_2_1_14_1 doi: 10.1145/158511.158703 – ident: e_1_2_1_47_1 doi: 10.1145/2692915.2628143 – ident: e_1_2_1_8_1 doi: 10.1145/3290357 – volume-title: Modern Compiler Implementation in ML ident: e_1_2_1_3_1 – ident: e_1_2_1_13_1 – volume-title: Refocusing in Reduction Semantics. BRICS Report Series, 11, 26 year: 2004 ident: e_1_2_1_20_1 – ident: e_1_2_1_1_1 doi: 10.7146/brics.v11i20.21845 – ident: e_1_2_1_32_1 doi: 10.21236/ADA087640 – ident: e_1_2_1_25_1 doi: 10.1145/24039.24041 – ident: e_1_2_1_10_1 – ident: e_1_2_1_61_1 doi: 10.1145/2970276.2970298 – volume-title: Principles of Program Analysis ident: e_1_2_1_48_1 – ident: e_1_2_1_64_1 doi: 10.1145/3236800 – ident: e_1_2_1_26_1 doi: 10.1145/155090.155113 – ident: e_1_2_1_21_1 doi: 10.1145/3110256 – volume-title: Polyglot: An Extensible Compiler Framework for Java. In International Conference on Compiler Construction. 138–152 year: 2003 ident: e_1_2_1_49_1 – ident: e_1_2_1_42_1 doi: 10.1145/3135932.3135941 – volume-title: Term Rewriting and All That ident: e_1_2_1_4_1 – ident: e_1_2_1_37_1 – volume-title: Robert Bruce Findler, and Matthew Flatt year: 2009 ident: e_1_2_1_24_1 – ident: e_1_2_1_45_1 doi: 10.1007/978-3-540-69166-2_23 – ident: e_1_2_1_9_1 doi: 10.1145/2676726.2676982 – ident: e_1_2_1_54_1 doi: 10.1007/978-3-642-54833-8_15 – volume-title: Proceedings of the 1995 International Symposium year: 1995 ident: e_1_2_1_5_1 – volume-title: Proceedings of the Eigth International Conference year: 1991 ident: e_1_2_1_15_1 – ident: e_1_2_1_44_1 doi: 10.1145/2187671.2187672 – ident: e_1_2_1_50_1 doi: 10.1145/2813885.2737991 – ident: e_1_2_1_29_1 doi: 10.1017/S0960129500001559 – ident: e_1_2_1_11_1 doi: 10.1145/2837614.2837632 – ident: e_1_2_1_59_1 doi: 10.1145/2491956.2491979 – ident: e_1_2_1_46_1 doi: 10.1145/1596550.1596592 – ident: e_1_2_1_28_1 doi: 10.1145/2500365.2500604 – ident: e_1_2_1_41_1 – ident: e_1_2_1_16_1 doi: 10.1016/0743-1066(92)90030-7 – ident: e_1_2_1_19_1 doi: 10.1016/j.tcs.2012.02.023 – ident: e_1_2_1_52_1 doi: 10.1145/3192366.3192398 – ident: e_1_2_1_35_1 doi: 10.1007/3-540-10843-2_10 – volume-title: Abstract Interpretation of Small-Step Semantics. In LOMAPS Workshop on Analysis and Verification of Multiple-Agent Languages. 76–99 year: 1996 ident: e_1_2_1_57_1 – volume-title: Concurrency, Compositionality, and Correctness ident: e_1_2_1_31_1 – ident: e_1_2_1_36_1 |
| SSID | ssj0001934839 |
| Score | 2.1998448 |
| Snippet | We develop the first theory of control-flow graphs from first principles, and use it to create an algorithm for automatically synthesizing many variants of... |
| SourceID | crossref |
| SourceType | Index Database |
| StartPage | 742 |
| Title | Automatically deriving control-flow graph generators from operational semantics |
| Volume | 6 |
| WOSCitedRecordID | wos000851562000028&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| journalDatabaseRights | – providerCode: PRVHPJ databaseName: ROAD: Directory of Open Access Scholarly Resources customDbUrl: eissn: 2475-1421 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0001934839 issn: 2475-1421 databaseCode: M~E dateStart: 20170101 isFulltext: true titleUrlDefault: https://road.issn.org providerName: ISSN International Centre |
| link | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV3Pb9MwFLbKxoELMAYaYyAfdpsMSWzX9rGqmIbEth6GtFsVx46E1CZR25XBgeP-bp5_JM3GJNhhlyiy4jjx-_Ts9_y-9xA61JqVrFAl0QWnhIGhTCQdMmJYQnVhKaOy8MUmxNmZvLxUk8HgpuXCrGeiquT1tWoeVdTQBsJ21NkHiLt7KTTAPQgdriB2uP6X4EdXq9rnYc1ns59HBoZcB2Ktj0kn5az-ceTTVLvqydafsi8Dy6Ru7KL1DS7tHOa8DYWPu9dJt9r5AJDR-NSdNcQQr7kbpXV_bo6I6qYJgQA-Hnej3_NFbPUc_87R4yxt8tX-yufB4es4Dabu-ybArE0CpaNVYRkTnKQscKA_2nvaog4e9qD2ZXw86alUEbJvxdVZhIItfyt-5nJkUA5oC5k7b6fWvrPkdYGIgZbNp7HjE7SdCa5caODp756vTlEmfVG67uMD_9r1_RT79jY2vR3KxUv0PJoWeBQgsYMGtnqFXrRlO3DU4rvo_BZCcIsQ3EcI9gjBG4RghxDcQwjuEPIafTv-fDE-IbGuBimyLFkRxjT8ZAZrVcFtyk0y1KlNtMmFMZnSXIJOp0amJROwPea6zA3YYYppnpaWCkPfoK2qruwewqKQwhrNc5WlLNXUpW_kmmalVAZUvX6LcDsp0yakT5nemfP9fz_yDj3boOsAba0WV_Y9elqsV9-Xiw9eVn8AUyZl-A |
| linkProvider | ISSN International Centre |
| openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Automatically+deriving+control-flow+graph+generators+from+operational+semantics&rft.jtitle=Proceedings+of+ACM+on+programming+languages&rft.au=Koppel%2C+James&rft.au=Kearl%2C+Jackson&rft.au=Solar-Lezama%2C+Armando&rft.date=2022-08-29&rft.issn=2475-1421&rft.eissn=2475-1421&rft.volume=6&rft.issue=ICFP&rft.spage=742&rft.epage=771&rft_id=info:doi/10.1145%2F3547648&rft.externalDBID=n%2Fa&rft.externalDocID=10_1145_3547648 |
| thumbnail_l | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=2475-1421&client=summon |
| thumbnail_m | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=2475-1421&client=summon |
| thumbnail_s | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=2475-1421&client=summon |