110 likes | 222 Views
December 17, 2007. JAM Translator Extreme. J ulian Schmitz A ndy Chang M ichael Krusel. Structure. Contents of the JAM package >. < Package Hierarchy. Design and Implementation. Analyzer : finds dependencies of inputted class CCPrinter : creates and writes the .cc files
E N D
December 17, 2007 JAM Translator Extreme Julian Schmitz Andy Chang Michael Krusel
Structure Contents of the JAM package > < Package Hierarchy
Design and Implementation • Analyzer: finds dependencies of inputted class • CCPrinter: creates and writes the .cc files • ClassInfo: stores necessary info about a class • ConfigPath: handles source and output paths • FieldInfo: stores necessary info about a field • FileUtils: manages file copying and searching • Finder: finds types and overloaded methods • HPrinter: creates and writes the .h files
Design and Implementation • Mainer: creates and writes Main.cc • MethodInfo: stores needed info for a method • ParamInfo: stores needed info for a parameter • Reprinter: adjusts spacing for .cc files • Runner: entry point for the translator • Transformer: transform ASTs to <>Info objects • Unparser: translates nodes into strings • ValueInfo: stores needed info for a field’s value
Execution • Runner receives an input • Runner calls ConfigPath • Runner calls Analyzer • Runner calls Mainer • Runner calls HPrinter • Runner calls CCPrinter • CCPrinter calls Unparser • Unparser calls Finder • CCPrinter calls Reprinter
Testing • Eclipse and GDB debugger • System.out.println() debugging • Manual testing with test package • Test.java and Rest.java from Professor Grimm • No automated testing for lack of time
Easy, Hard, Surprising • Using xtcvistors was easy • Making tabs was hard • Finding types was hard • C++ compiling and running was surprising