Mauricio Cassola, Agustín Talagorria, Alberto Pardo, Marcos Viera
{"title":"A Gradual Type System for Elixir","authors":"Mauricio Cassola, Agustín Talagorria, Alberto Pardo, Marcos Viera","doi":"10.1145/3427081.3427084","DOIUrl":null,"url":null,"abstract":"Elixir is a functional programming language with dynamic typing. In this paper we propose a type system that makes it possible to perform static type-checking on a significant fragment of Elixir. An important feature of the type system we introduce is that it does not require any syntactic change to the language. Type information is provided by means of function signatures which are declared in terms of Elixir typespec directives. The proposed type system is based on subtyping and is backward compatible, as it allows the presence of untyped code fragments. We have implemented a prototype of the type-checker in Elixir itself.","PeriodicalId":350427,"journal":{"name":"Proceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity","volume":"62 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-10-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3427081.3427084","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9
Abstract
Elixir is a functional programming language with dynamic typing. In this paper we propose a type system that makes it possible to perform static type-checking on a significant fragment of Elixir. An important feature of the type system we introduce is that it does not require any syntactic change to the language. Type information is provided by means of function signatures which are declared in terms of Elixir typespec directives. The proposed type system is based on subtyping and is backward compatible, as it allows the presence of untyped code fragments. We have implemented a prototype of the type-checker in Elixir itself.