Extending Type Inference to Variational Programs Public Deposited

http://ir.library.oregonstate.edu/concern/articles/kk91fn42h

This is an author's peer-reviewed final manuscript, as accepted by the publisher. The published article is copyrighted by the Association for Computing Machinery and can be found at:  http://toplas.acm.org/.

Descriptions

Attribute NameValues
Creator
Abstract or Summary
  • Through the use of conditional compilation and related tools, many software projects can be used to generate a huge number of related programs. The problem of typing such variational software is difficult. The brute-force strategy of generating all variants and typing each one individually is (1) usually infeasible for efficiency reasons and (2) produces results that do not map well to the underlying variational program. Recent research has focused mainly on efficiency and addressed only the problem of type checking. In this work we tackle the more general problem of variational type inference and introduce variational types to represent the result of typing a variational program. We introduce the variational lambda calculus (VLC) as a formal foundation for research on typing variational programs. We define a type system for VLC in which VLC expressions are mapped to correspondingly variational types. We show that the type system is correct by proving that the typing of expressions is preserved over the process of variation elimination, which eventually results in a plain lambda calculus expression and its corresponding type. We identify a set of equivalence rules for variational types and prove that the type unification problem modulo these equivalence rules is unitary and decidable; we also present a sound and complete unification algorithm. Based on the unification algorithm, the variational type inference algorithm is an extension of algorithm W. We show that it is sound and complete and computes principal types. We also consider the extension of VLC with sum types, a necessary feature for supporting variational data types, and demonstrate that the previous theoretical results also hold under this extension. Finally, we characterize the complexity of variational type inference and demonstrate the efficiency gains over the brute-force strategy.
Resource Type
DOI
Date Available
Date Issued
Citation
  • Chen, S., Erwig, M., & Walkingshaw, E. (2014). Extending type inference to variational programs. ACM Transactions on Programming Languages and Systems, 36(1), 1. doi:10.1145/2518190
Series
Keyword
Rights Statement
Funding Statement (additional comments about funding)
Publisher
Peer Reviewed
Language
Replaces
Additional Information
  • description.provenance : Submitted by Erin Clark (erin.clark@oregonstate.edu) on 2014-07-11T18:54:57Z No. of bitstreams: 1 ErwigMartinEECSExtendingTypeInference.pdf: 577447 bytes, checksum: 28c5676c5ca0574724f965ce11f19bd0 (MD5)
  • description.provenance : Made available in DSpace on 2014-07-11T18:55:07Z (GMT). No. of bitstreams: 1 ErwigMartinEECSExtendingTypeInference.pdf: 577447 bytes, checksum: 28c5676c5ca0574724f965ce11f19bd0 (MD5) Previous issue date: 2014-03
  • description.provenance : Approved for entry into archive by Erin Clark(erin.clark@oregonstate.edu) on 2014-07-11T18:55:07Z (GMT) No. of bitstreams: 1 ErwigMartinEECSExtendingTypeInference.pdf: 577447 bytes, checksum: 28c5676c5ca0574724f965ce11f19bd0 (MD5)

Relationships

In Administrative Set:
Last modified: 07/26/2017

Downloadable Content

Download PDF
Citations:

EndNote | Zotero | Mendeley

Items