4 ms·
I've done something like this using syntax-directed translation. One can proceed by changing the transformation granularity. First, you have naive direct transl
by stcredzero 7y ago
I've done something like this using syntax-directed translation. One can proceed by changing the transformation granularity. First, you have naive direct transliterations plus scaffolding libraries which result in non-idiomatic target language code. (In the article's case, this would be non-idiomatic machine produced Java) It runs and passes some of the tests.
Next step is to fix the bugs, and get all the tests to run.
The last step, to get to "clean" involves going through the code base, looking for project-specific idioms, then hand-tuning the syntax matching engine with rules that output idiomatic target language code. This might also involve refactorings to make the scaffolding libraries more idiomatic as well.
Since one is coding on the transformation engine, instead of directly on the application itself, production changes and maintenance can proceed, and no code freeze is needed.