Dependent Types for Program Understanding

Weakly-typed languages such as Cobol often force programmers to represent distinct data abstractions using the same low-level physical type. In this paper, we describe a technique to recover implicitly-defined data abstractions from programs using type inference. We present a novel system of dependent types which we call guarded types, a path-sensitive algorithm for inferring guarded types for Cobol programs, and a semantic characterization of correct guarded typings. The results of our inference technique can be used to enhance program understanding for legacy applications, and to enable a number of type-based program transformations.

[1]  Martin C. Rinard,et al.  Role-based exploration of object-oriented programs , 2002, ICSE '02.

[2]  Arie van Deursen,et al.  Understanding COBOL systems using inferred types , 1999, Proceedings Seventh International Workshop on Program Comprehension.

[3]  Arie van Deursen,et al.  Identifying objects using cluster and concept analysis , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[4]  Frank Pfenning,et al.  Dependent types in practical programming , 1999, POPL '99.

[5]  Frank Tip,et al.  Aggregate structure identification and its application to program analysis , 1999, POPL '99.

[6]  Aniello Cimitile,et al.  Recovering a Conceptual Data Model from COBOL Code , 1996, SEKE.

[7]  Fritz Henglein,et al.  AnnoDomini: from type theory to Year 2000 conversion tool , 1999, POPL '99.

[8]  Robert O'Callahan,et al.  Lackwit: A Program Understanding Tool Based on Type Inference , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[9]  Daniel Jackson,et al.  Alloy: a lightweight object modelling notation , 2002, TSEM.

[10]  William G. Griswold,et al.  Dynamically discovering likely program invariants to support program evolution , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[11]  Ivar Jacobson,et al.  The Unified Modeling Language Reference Manual, Second Edition , 2005 .

[12]  Ivar Jacobson,et al.  The unified modeling language reference manual , 2010 .