M2toM3

M2toM3

A simple Modula-2 to Modula-3 translator by Peter Klein <pk@i3.informatik.rwth-aachen.de> which covers most of the syntactic differences between those languages. No context sensitive analysis is done, so WITH statements, local modules, enumeration type literals and variant RECORDs have to be dealt with by hand. Part of the Sun Modula 2 library is emulated by the Modula 3 library.

Version 1.01.

ftp://martha.informatik.rwth-aachen.de/pub/Modula3.
References in periodicals archive ?
Due to a compiler bug in Gcc, we were unable to perform the standard optimizations on m2tom3, which explains its unusually large number of other loads.
1994] postcard Graphical mail reader m2tom3 Converts Modula-2 Code to Modula-3 m3cg M3 v.
Static Alias Pairs as a Percent of All Possible Pairs Intraprocedural Interprocedural Program T-TBAA TF-TBAA TFM-TBAA T-TBAA TF-TBAA TFM-TBAA format 31 27 27 11 8 8 dformat 24 16 16 19 11 11 write- 24 13 13 11 4 4 pickle k-tree 29 17 17 15 10 10 slisp 45 33 33 23 16 16 dom 39 25 25 9 7 7 postcard 39 15 15 6 1 1 m2tom3 41 23 23 3 1 1 m3cg 32 5 5 5 1 1 trestle 23 11 11 8 3 3
Percent of original running time A B C Format 98 97 97 Dformat 99 99 99 Write-Pickle 98 98 98 K-Tree 98 98 98 Slisp 92 92 92 M2toM3 96 97 97 M3CG 95 94 94 A = T-TBAA B = TF-TBAA C = TFM-TBAA Note: Table made from a bar graph.
Percent of original heap references Redundant Redundant after originally RLE and TFM-TBAA format 8 5 dformat 5 1 write-pickle 14 5 ktree 34 21 slisp 56 16 m2tom3 32 4 m3cg 22 3 Note: Table made from a bar graph.
Percentage of total invocations (A, B) format (26, 0) dformat (65, 0) write-pickle (9, 1) slisp (94, 0) dom (128, 6) k-tree (2, 5) postcard (88, 32) m2tom3 (494, 16) m3cg (155, 56) trestle (8, 12) A = Resolved B = Unresolved Note: Table made from a bar graph.
Percent of original running time Base+Inlining Minv Minv+RLE Minv+RLE+Inlining Format 97% 96% 95% 92% Dformat 95% 89% 88% 78% Write-Pickle 91% 94% 94% 73% K-Tree 83% 99% 97% 79% Slisp 93% 99% 91% 102% M2toM3 99% 91% 89% 89% M3CG 81% 100% 96% 78%
Simulated execution time using open- and closed-world assumptions Percent of original running time RLE RLE Open Format 97 97 Dformat 99 99 Write-Pickle 98 98 K-Tree 98 98 M2toM3 97 97 Slisp 92 92 M3CG 94 94 Note: Table made from a bar graph.