Abstract
Maintenance of COBOL applications that still exist and work today is an open issue for many companies that have not yet undertaken the crucial decision of migrating to a modern development platform. And even those who did, most likely had to face a major challenge: understanding what those million lines of code do and what business processes they originally implemented. Automating the task of reconstructing the business logic of programs somehow is hard nonetheless: COBOL code is difficult to even get parsed - let alone applying Program Understanding techniques based on sophisticate deductions over information inferred from the code. Here we propose a system based on the translation of COBOL into a simpler and cleaner language and a type system capable of inferring types of program variables. Being COBOL a language in which variable reuse has been a widespread practice for decades, strong typing rules in the usual sense wouldn’t simply fit, therefore our system provides special flow types for tracking multiple types a variable may assume and follows the program control-flow until no more type-changes occur for variables in the typing context. Alongside it detects also a number of error-prone situations, type mismatches and data corruptions due to misalignment or misfit in variable reuse when types have incompatible in-memory representations, while still guaranteing the typing process does not halt.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Damas, L., Milner, R.: Principal type-schemes for functional programs. In: POPL, pp. 207–212 (1982)
van Deursen, A., Moonen, L.: Type inference for cobol systems. In: WCRE (Working Conference on Reverse Engeneering), pp. 220–230 (1998)
van Deursen, A., Moonen, L.: Understanding cobol systems using inferred types. In: IWPC. IEEE Computer Society (1999)
van Deursen, A., Moonen, L.: Exploring legacy systems using types. In: WCRE (Working Conference on Reverse Engeneering), pp. 32–41 (2000)
van Deursen, A., Moonen, L.: An empirical study into cobol type inferencing. Sci. Comput. Program. 40(2-3), 189–211 (2001)
Nielson, F., Nielson, H.R., Hankin, C.: Principles of Static Analysis. Springer (1999)
Holt, R.C.: WCRE 1998 most influential paper: Grokking software architecture. In: WCRE (Working Conference on Reverse Engeneering), pp. 5–14. IEEE (2008)
IBM: Cobol z/OS language reference (2009), http://publib.boulder.ibm.com/info-center/pdthelp/v1r1/index.jsp?topic=/com.ibm.debugtool.doc_7.1/eqa7rm0293.html
Kernighan, B.W., Ritchie, D.: The C Programming Language, 2nd edn. Prentice-Hall (1988)
Kuipers, T., Moonen, L.: Types and concept analysis for legacy systems. In: IWPC, pp. 221–230. IEEE Computer Society (2000)
Moonen, L.: Generating robust parsers using island grammars. In: WCRE (Working Conference on Reverse Engeneering) (2001)
Moonen, L.: Exploring software systems. In: ICSM, pp. 276–280. IEEE Computer Society (2003)
Spanò, A., Bugliesi, M., Cortesi, A.: Type-flow analysis for legacy cobol code. In: ICSOFT (2), pp. 64–75 (2011)
Stroustrup, B.: The C++ Programming Language, 3rd edn. Addison-Wesley Longman Publishing Co., Inc., Boston (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Spanò, A., Bugliesi, M., Cortesi, A. (2013). Typing Legacy COBOL Code. In: Escalona, M.J., Cordeiro, J., Shishkov, B. (eds) Software and Data Technologies. ICSOFT 2011. Communications in Computer and Information Science, vol 303. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36177-7_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-36177-7_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-36176-0
Online ISBN: 978-3-642-36177-7
eBook Packages: Computer ScienceComputer Science (R0)