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>
This commit is contained in:
Bill
2026-02-03 20:03:53 -07:00
parent 5c45338615
commit fec7284a8f
6 changed files with 1585 additions and 501 deletions

View File

@@ -417,33 +417,21 @@ When user proceeds despite warning:
## File Structure for Sprint 1
The SemAnno language is built incrementally across the sprint:
```
languages/
── SemAnno/
│ └── models/
│ └── SemAnno.structure.mps # Update with new concepts
├── WhetstoneCore/ # NEW: Core AST language
│ ├── models/
│ │ ├── WhetstoneCore.structure.mps
│ │ ├── WhetstoneCore.editor.mps
│ │ ├── WhetstoneCore.constraints.mps
│ │ └── WhetstoneCore.typesystem.mps
│ └── WhetstoneCore.mpl
├── PythonProjection/ # NEW: Python view
│ ├── models/
│ │ ├── PythonProjection.editor.mps
│ │ └── PythonProjection.textGen.mps
│ └── PythonProjection.mpl
├── CppProjection/ # NEW: C++ view
│ ├── models/
│ │ ├── CppProjection.editor.mps
│ │ └── CppProjection.textGen.mps
│ └── CppProjection.mpl
└── TreeSitterImport/ # NEW: Import from source
── SemAnno/
├── models/
│ ├── TreeSitterImport.behavior.mps
── TreeSitterImport.plugin.mps
└── TreeSitterImport.mpl
│ ├── SemAnno.structure.mps # Core AST + annotation concepts
── SemAnno.editor.mps # Python & C++ projections
│ ├── SemAnno.behavior.mps # Concept methods & helpers
│ ├── SemAnno.typesystem.mps # Type rules & inference
│ ├── SemAnno.textGen.mps # Python & C++ code generators
│ └── SemAnno.constraints.mps # Validation constraints
├── tests/
│ └── SemAnno.tests.mps # Language feature tests
└── SemAnno.mpl
```
---
@@ -487,30 +475,38 @@ languages/
## Implementation Order
1. **Week 1-2: Core AST Nodes**
- Define WhetstoneCore language structure
- Implement basic editors for each node type
Build SemAnno incrementally, testing each phase before moving forward:
1. **Week 1-2: Core AST Structure**
- Add core concepts to SemAnno.structure.mps (Module, Function, Variable, Statement, Expression, Type nodes)
- Create basic editors in SemAnno.editor.mps for each node type
- Manual AST creation works in MPS
- Test: Create a simple function with statements and expressions
2. **Week 3-4: Python Projection**
- Python-syntax editor for AST nodes
- Python text generator
- Manual round-trip: type Python-like → see generated .py
2. **Week 3-4: Python Projection & Generator**
- Extend SemAnno.editor.mps with Python-syntax projections
- Implement Python generator in SemAnno.textGen.mps
- Manual round-trip: type Python-like code → see generated .py file
- Test: Generate valid, runnable Python code
3. **Week 5-6: C++ Projection**
- C++ syntax editor for AST nodes
- C++ text generator with deref strategy translation
- Deref strategy annotations affect generated code
3. **Week 5-6: C++ Projection & Generator**
- Extend SemAnno.editor.mps with C++ syntax projections
- Implement C++ generator in SemAnno.textGen.mps
- Add deref strategy translation to generator
- Test: Generate valid, compilable C++ code for each deref strategy
4. **Week 7-8: Tree-sitter Import**
- Integrate tree-sitter-python
- Integrate tree-sitter-cpp
- Parse source files → populate AST
- Add import behavior to SemAnno.behavior.mps
- Integrate tree-sitter-python for Python parsing
- Integrate tree-sitter-cpp for C++ parsing
- Test: Parse Python/C++ files → populate SemAnno AST
5. **Week 9-10: Warning System**
- OptimizationLock annotation
- Warning UI in editor
- Provenance tracking
5. **Week 9-10: Warning System & Annotations**
- Add OptimizationLock and DerefStrategy annotations to SemAnno.structure.mps
- Implement warning logic in SemAnno.behavior.mps
- Add warning UI to SemAnno.editor.mps
- Implement provenance tracking
- Test: Locked nodes show warnings, allow edits with provenance updates
---