Mallku Soldevila, Beta Ziliani, Bruno Silvestre, Daniel Fridlender, Fabio Mascarenhas
{"title":"解码Lua:面向开发人员和语义学家的形式语义","authors":"Mallku Soldevila, Beta Ziliani, Bruno Silvestre, Daniel Fridlender, Fabio Mascarenhas","doi":"10.1145/3133841.3133848","DOIUrl":null,"url":null,"abstract":"We provide formal semantics for a large subset of the Lua programming language, in its version 5.2. We validate our model by mechanizing it and testing it against the test suite of the reference interpreter of Lua, obtaining evidence that our model accurately represents the language. We target both a PL semanticist \"not necessarily versed in Lua\", and a Lua developer - not necessarily versed in semantic frameworks. To the former, we present the peculiarities of the language, and how we model them in a modular small-step operational semantics, using concepts from Felleisen-Hieb's reduction semantics with evaluation contexts. Moreover, we mechanize and test the model in PLT Redex, the de facto tool for reduction semantics. To the reader unfamiliar with such concepts, we provide a gentle introduction to the model. It is our hope that developers of the different Lua implementations and dialects understand the model and consider it both for testing their work and for experimenting with new language features.","PeriodicalId":117125,"journal":{"name":"Proceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages","volume":"151 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-06-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"8","resultStr":"{\"title\":\"Decoding Lua: formal semantics for the developer and the semanticist\",\"authors\":\"Mallku Soldevila, Beta Ziliani, Bruno Silvestre, Daniel Fridlender, Fabio Mascarenhas\",\"doi\":\"10.1145/3133841.3133848\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We provide formal semantics for a large subset of the Lua programming language, in its version 5.2. We validate our model by mechanizing it and testing it against the test suite of the reference interpreter of Lua, obtaining evidence that our model accurately represents the language. We target both a PL semanticist \\\"not necessarily versed in Lua\\\", and a Lua developer - not necessarily versed in semantic frameworks. To the former, we present the peculiarities of the language, and how we model them in a modular small-step operational semantics, using concepts from Felleisen-Hieb's reduction semantics with evaluation contexts. Moreover, we mechanize and test the model in PLT Redex, the de facto tool for reduction semantics. To the reader unfamiliar with such concepts, we provide a gentle introduction to the model. It is our hope that developers of the different Lua implementations and dialects understand the model and consider it both for testing their work and for experimenting with new language features.\",\"PeriodicalId\":117125,\"journal\":{\"name\":\"Proceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages\",\"volume\":\"151 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-06-07\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"8\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3133841.3133848\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3133841.3133848","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Decoding Lua: formal semantics for the developer and the semanticist
We provide formal semantics for a large subset of the Lua programming language, in its version 5.2. We validate our model by mechanizing it and testing it against the test suite of the reference interpreter of Lua, obtaining evidence that our model accurately represents the language. We target both a PL semanticist "not necessarily versed in Lua", and a Lua developer - not necessarily versed in semantic frameworks. To the former, we present the peculiarities of the language, and how we model them in a modular small-step operational semantics, using concepts from Felleisen-Hieb's reduction semantics with evaluation contexts. Moreover, we mechanize and test the model in PLT Redex, the de facto tool for reduction semantics. To the reader unfamiliar with such concepts, we provide a gentle introduction to the model. It is our hope that developers of the different Lua implementations and dialects understand the model and consider it both for testing their work and for experimenting with new language features.