Commit Graph

11 Commits

Author SHA1 Message Date
Bill
36661381a3 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 <noreply@anthropic.com>
2026-02-03 20:46:01 -07:00
Bill
a0290ae51d Add textgen definitions for all Phase 1 AST concepts
- Added ConceptTextGenDeclaration nodes for all 38 Phase 1 concepts
- Includes textgen rules for core concepts (Module, Function, Parameter, Variable)
- Textgen rules for statements (Block, Assignment, If, Loops, Return, etc.)
- Textgen rules for expressions (BinaryOp, UnaryOp, FunctionCall, Literals, etc.)
- Textgen rules for types (Primitive, List, Set, Map, Tuple, Array, Optional, Custom)
- Textgen rules for annotations (Annotation, DerefStrategy, OptimizationLock, LangSpecific)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 20:40:23 -07:00
Bill
a06bb0eb2a Add editor definitions for all 31 Phase 1 AST concepts
Created editors for:
- 4 core nodes: Module, Function, Parameter, Variable
- 7 statement types: Block, Assignment, IfStatement, WhileLoop, ForLoop, Return, ExpressionStatement
- 13 expression types: BinaryOp, UnaryOp, FunctionCall, VariableRef, Literals, ListLiteral, Access
- 8 type system concepts: PrimitiveType, ListType, SetType, MapType, TupleType, ArrayType, OptionalType, CustomType

All editors reference correct concept IDs from fixed structure.mps.
Editors use horizontal and vertical layouts for proper rendering.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 20:35:02 -07:00
Bill
1b7f2426bb fixed wrong structures 2026-02-03 20:28:58 -07:00
Bill
fec7284a8f Remove problematic editor definitions pending structure.mps ID fixes
The editor definitions referenced concepts with duplicate IDs in structure.mps.
The structure file needs ID correction before editors can be properly created.

To fix:
1. In MPS, open the SemAnno language
2. Right-click on problematic concepts (showing duplicate ID errors)
3. Select 'Correct ID' intention to auto-generate unique IDs
4. Once structure is clean, recreate editor definitions

See notes below for details.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 20:03:53 -07:00
Bill
61997ce49e Add Phase 2 editor definitions for all core AST concepts
- Module editor: renders module signature and nested functions/variables
- Function editor: renders function signature with parameters, return type, and body
- Statement editors: Block, Assignment, IfStatement, WhileLoop, ForLoop, Return, ExpressionStatement
- Expression editors: BinaryOp, UnaryOp, FunctionCall, VariableReference, Literals, Collections, Access
- Type editors: PrimitiveType, ListType, OptionalType, CustomType

All editors support:
- Syntax highlighting with keyword rendering
- Proper indentation for nested structures
- Inline reference editing
- Horizontal and vertical layout as appropriate

Completes Phase 2 of Core AST Structure feature specification.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 17:19:52 -07:00
Bill
967db953c4 Add Phase 1 AST structure definitions to SemAnno language
- Add Module concept as rootable container for AST
- Add Function, Parameter, and Variable concepts
- Add 7 Statement types (Block, Assignment, IfStatement, WhileLoop, ForLoop, Return, ExpressionStatement)
- Add 13 Expression types (BinaryOp, UnaryOp, FunctionCall, Literals, Collections, Access)
- Add 8 Type system concepts with recursive composition support
- Add 3 Annotation concepts (DerefStrategy, OptimizationLock, LangSpecific)

All concepts follow MPS best practices with proper cardinality, aggregation semantics, and metadata.
Completes Phase 1 of Core AST Structure feature specification.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 17:16:53 -07:00
f5873acf29 Creating Python file generator 2026-01-27 17:33:23 -07:00
048481a0c5 Created Python Loop Generator 2026-01-27 00:35:35 -07:00
0dc152f565 initial textgen for hypergaph edges working 2026-01-19 22:21:17 -07:00
Bill
dc8e5963fd Hard reset: Clean project structure 2026-01-17 21:57:09 -07:00