Abstract
Simultaneous use of multiple programming languages (polyglot programming) assists in creating efficient, coherent, modern programs in the face of legacy code. However, manually creating bindings to low-level languages like C is tedious and error-prone. We offer relief in the formof an automated suite of analyses, designed to enhance the quality of automatically produced bindings. These analyses recover high-level array length information that is missing from C's type system. We emit annotations in the style of GObject-Introspection, which produces bindings from annotations on function signatures. We annotate each array argument as terminated by a special sentinel value, fixed-length, or of length determined by another argument. These properties help produce more idiomatic, efficient bindings. We correctly annotate at least 70% of all arrays with these length types, and our results are comparable to those produced by human annotators, but take far less time to produce.
Author supplied keywords
Cite
CITATION STYLE
Maas, A. J., Nazaré, H., & Liblit, B. (2016). Array length inference for C library bindings. In ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering (pp. 461–471). Association for Computing Machinery, Inc. https://doi.org/10.1145/2970276.2970310
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.