Abstract
In this paper, we describe the key principles of a dependent type system for low-level imperative languages. The major contributions of this work are (1) a sound type system that combines dependent types and mutation for variables and for heap-allocated structures in a more flexible way than before and (2) a technique for automatically inferring dependent types for local variables. We have applied these general principles to design Deputy, a dependent type system for C that allows the user to describe bounded pointers and tagged unions. Deputy has been used to annotate and check a number of real-world C programs.
Keywords
- Type System
- Dependent Type
- Type Rule
- Type Environment
- Concrete Syntax
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Chapter PDF
References
Anderson, Z.R.: Static analysis of C for hybrid type checking. Tech. Rep. EECS-2007-1, UC Berkeley (2007)
Augustsson, L.: Cayenne—a language with dependent types. In: ICFP’98 (1998)
Austin, T.M., Breach, S.E., Sohi, G.S.: Efficient detection of all pointer and array access errors. In: PLDI’94 (1994)
Carlisle, M.C.: Olden: Parallelizing Programs with Dynamic Data Structures on Distributed-Memory Machines. PhD thesis, Princeton University (June 1996)
Condit, J., et al.: Dependent types for low-level programming. Tech. Rep. EECS-2006-129, UC Berkeley (2006)
Dhurjati, D., Adve, V.: Backwards-compatible array bounds checking for C with very low overhead. In: ICSE’06 (2006)
Flanagan, C.: Hybrid type checking. In: POPL’06 (2006)
Hackett, B., et al.: Modular checking for buffer overflows in the large. In: ICSE’06 (2006)
Necula, G.C., Harren, M.: Using Dependent Types to Certify the Safety of Assembly Code. In: Hankin, C., Siveroni, I. (eds.) SAS 2005. LNCS, vol. 3672, pp. 155–170. Springer, Heidelberg (2005)
Hill, J., et al.: System architecture directions for networked sensors. In: ASPLOS’00 (2000), citeseer.nj.nec.com/382595.html
Jim, T., et al.: Cyclone: A safe dialect of C. In: USENIX Annual Technical Conference (2002)
Lee, C., Potkonjak, M., Mangione-Smith, W.H.: MediaBench: A tool for evaluating and synthesizing multimedia and communicatons systems. In: International Symposium on Microarchitecture (1997)
Nanevski, A., Morrisett, G.: Dependent type theory of stateful higher-order functions. Tech. Rep. TR-24-05, Harvard University.
Necula, G.C., et al.: CCured: Type-safe retrofitting of legacy software. TOPLAS 27(3) (2005)
Necula, G.C., et al.: CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs. In: Horspool, R.N. (ed.) CC 2002 and ETAPS 2002. LNCS, vol. 2304, Springer, Heidelberg (2002)
Ou, X., et al.: Dynamic typing with dependent types. In: IFIP Conference on Theoretical Computer Science (2004)
Siek, J.G., Taha, W.: Gradual typing for functional languages. In: Scheme and Functional Programming (2006)
SPEC: Standard Performance Evaluation Corporation Benchmarks (July 1995), http://www.spec.org/osg/cpu95/CINT95
Xi, H.: Imperative programming with dependent types. In: LICS’00 (2000)
Xi, H., Pfenning, F.: Dependent types in practical programming. In: POPL’99 (1999)
Zhou, F., et al.: SafeDrive: Safe and recoverable extensions using language-based techniques. In: OSDI’06 (2006)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Condit, J., Harren, M., Anderson, Z., Gay, D., Necula, G.C. (2007). Dependent Types for Low-Level Programming. In: De Nicola, R. (eds) Programming Languages and Systems. ESOP 2007. Lecture Notes in Computer Science, vol 4421. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71316-6_35
Download citation
DOI: https://doi.org/10.1007/978-3-540-71316-6_35
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-71314-2
Online ISBN: 978-3-540-71316-6
eBook Packages: Computer ScienceComputer Science (R0)
