Two programs.
One answer.
Parity translates COBOL to Java, runs both on the same inputs, and revises the Java until every line of output matches.
Start
Whole folders
Open a folder to list every COBOL file in the Explorer, then press Convert all. Each file is translated and checked as its own program, one after another. COPY statements are filled in from copybooks in the same folder. A file NAME.in beside NAME.cob is used as its test input. Programs that use CALL are skipped.
Use your own code
Create a new file and paste your COBOL program over the starter code, or open a .cob file from your computer (you can also drag one onto the window). Add test inputs if the program reads input, then press Ctrl+Enter. Ctrl+S saves the file.
How it works
- The COBOL program runs first. Its output is the answer key.
- A model writes Java for the same program.
- Both outputs are compared line by line.
- If they differ, the model sees the difference and tries again.
A match means identical output on the inputs you supply, with the original COBOL program's output as the answer key. That is differential testing, not a formal proof.
What the program reads from standard input. Leave empty if it reads nothing. More inputs make a stronger check.