We present and analyse an architectural migration in the Overture tool, a tool for which the primary internal data structure is an Abstract Syntax Tree (AST). The migration was from a high-cohesion AST with functionality encapsulated in its nodes to an extensible, low-cohesion AST with functionality implemented in visitors. This was motivated by the need for a high degree of extensibility in the tool's core functionality. We describe the migration process and both architectures in detail. We also present a comparative analysis between both architectures, including the trade-offs made between extensibility and performance. Finally, we generalise these results to other tool migrations that have hierarchical data structures at their core.
展开▼