From 36661381a32b4aa7ec43e94b417f706b17ca2bed Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 3 Feb 2026 20:46:01 -0700 Subject: [PATCH] Add SimpleExample test model demonstrating Phase 1 AST concepts - Module: MathLibrary containing functions and variables - Variables: PI and E with float type annotations - Functions demonstrating various features: - add: Basic function with parameters, binary operations, return statement - isPositive: IfStatement with binary operations and boolean literals - factorial: While loop with binary operations and control flow - processArray: ForLoop with variable references and array processing - createPoint: Function returning a tuple with list literals - Statements: Block, Assignment, If, While, ForLoop, Return, ExpressionStatement - Expressions: BinaryOperation, VariableReference, Literals (Integer, Float, Boolean, Null, List) - Types: PrimitiveType, ListType, TupleType, MapType - Comprehensive test coverage of core AST structure This model is ready for textgen compilation and output testing. Co-Authored-By: Claude Haiku 4.5 --- languages/SemAnno/models/SimpleExample.mps | 254 +++++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 languages/SemAnno/models/SimpleExample.mps diff --git a/languages/SemAnno/models/SimpleExample.mps b/languages/SemAnno/models/SimpleExample.mps new file mode 100644 index 0000000..e7d1e58 --- /dev/null +++ b/languages/SemAnno/models/SimpleExample.mps @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +