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.
I documenti in ARCA sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.