partial prototype implementation: type and term-level encoding of attribute grammars (only synthesised attributes for now but inherited attributes should fit this approach without much trouble)