-
Notifications
You must be signed in to change notification settings - Fork 1
/
design-doc.txt
2 lines (1 loc) · 1.44 KB
/
design-doc.txt
1
The GoAL system was designed for the purpose of mapping features of the target language (Go) to relational data models, such as those employed by relational databases. An event-driven system was designed for processing the various features of the language, while a dynamic configuration language was designed to provide convenient operations for data extraction. An Abstract Syntax Tree (AST) was chosen as the language representation mapping, encoding a syntactic representation of the source-code under analysis. This representation was chosen because it preserves much of the directly observable features of the actual source-code, while providing a data representation that reflects the language's interpretation. Importantly, AST's can be effectively annotated with semantic information about the source-code elements which they represent. For Go, AST semantic annotation was achieved by using the go/tools suite of packages, specifically the go/types tool. Through this tool, type annotation was included for applicable nodes, enhancing the usability of the AST greatly for many simple semantic tasks. Additionally, by design, the system maximizes the usage of core introspective features of the target language. Firstly, the static introspective facilities of Go were used for parsing the Go source code and building the AST, as well as implementing the event-driven system used to process it. Secondly, the dynamic introspective facilities of Go were used to both