Refactoring translate.py to subclass DafnyTranslator.