Abstract
Source code is bimodal: It combines a formal, algorithmic channel and a natural language channel of identiiers and comments. In this work, we model the bimodality of code with name lows, an assignment low graph augmented to track identiier names. Conceptual types are logically distinct types that do not always coincide with program types. Passwords and URLs are example conceptual types that can share the program type string. Our tool, RefiNym, is an unsupervised method that mines a lattice of conceptual types from name lows and reiies them into distinct nominal types. For string, RefiNym inds and splits conceptual types originally merged into a single type, reducing the number of same-type variables per scope from 8.7 to 2.2 while eliminating 21.9% of scopes that have more than one same-type variable in scope. This makes the code more self-documenting and frees the type system to prevent a developer from inadvertently assigning data across conceptual types.
Author supplied keywords
Cite
CITATION STYLE
Dash, S. K., Allamanis, M., & Barr, E. T. (2018). RefiNym: Using names to refine types. In ESEC/FSE 2018 - Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (pp. 107–117). Association for Computing Machinery, Inc. https://doi.org/10.1145/3236024.3236042
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.