Commit Graph

69 Commits

Author SHA1 Message Date
Bill
9f2373f335 Sprint 2 Step 29: AST ↔ File synchronization 2026-02-06 23:19:58 -07:00
Bill
d499a930da Sprint 2 Step 28: File operations via RPC 2026-02-06 23:12:59 -07:00
Bill
06227401ef Sprint 2 Step 27: File operations via Emacs 2026-02-06 23:07:48 -07:00
Bill
78efb99f63 Sprint 2 Step 26: Orchestrator ↔ Emacs RPC 2026-02-06 22:43:07 -07:00
Bill
767c4557f5 Sprint 2 Step 25: AST ↔ Elisp projection 2026-02-06 22:27:19 -07:00
Bill
5f0c74dec2 Sprint 2 Step 24: Orchestrator spawns Emacs 2026-02-06 22:15:46 -07:00
Bill
00a5c8430d Sprint 2 Step 23: Emacs integration 2026-02-06 21:55:58 -07:00
Bill
dfa40b7802 Sprint 2 Step 22: Undo/Redo UI 2026-02-06 21:48:25 -07:00
Bill
3b80ff4250 Sprint 2 Step 21: Undo/Redo journal 2026-02-06 21:45:02 -07:00
Bill
b0b917eed1 Sprint 2 Step 20: Mutation via UI 2026-02-06 21:37:45 -07:00
Bill
91e52e28d2 Sprint 2 Step 19: Connect ImGui to orchestrator 2026-02-06 21:30:12 -07:00
Bill
db9990620b Sprint 2 Step 18: AST mutation via RPC 2026-02-06 21:02:01 -07:00
Bill
44634bf4fe Sprint 2 Step 17: JSON-RPC server 2026-02-06 20:44:07 -07:00
Bill
dfb8409dd9 Sprint 2 Step 16: Orchestrator process 2026-02-06 20:22:37 -07:00
Bill
d46aec55ee Sprint 2 Step 15: Projection toggle 2026-02-06 20:14:51 -07:00
Bill
41ab6c3022 Sprint 2 Step 14: AST → text viewport 2026-02-06 20:10:59 -07:00
Bill
37e504b448 Sprint 2 Step 13: Text viewport 2026-02-06 20:07:25 -07:00
Bill
6e74281096 Sprint 2 Step 12: Dear ImGui shell scaffolding 2026-02-06 20:04:12 -07:00
Bill
f094c14ea7 Sprint 2 Step 11: Python generator - Annotation output 2026-02-06 19:56:57 -07:00
Bill
8746e0f43f Sprint 2 Step 10: Python generator - Remaining concepts 2026-02-06 19:42:57 -07:00
Bill
5f581d7142 Sprint 2 Step 9: Python generator - Statements and expressions 2026-02-06 19:39:24 -07:00
Bill
95c56f35cb Sprint 2 Step 8: Python generator base with Module/Function support 2026-02-06 19:35:48 -07:00
Bill
8ca6eccd56 Sprint 2 Step 7: Schema validation 2026-02-06 19:31:38 -07:00
Bill
665c96b648 Sprint 2 Step 6: JSON deserialization and round-trip verification
fromJson(json) reconstructs heap-allocated AST from JSON. createNode factory
handles all 33 concepts. deleteTree for cleanup. Test verifies save→load→save
produces byte-identical JSON for the full Calculator model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:14:45 -07:00
Bill
5579a4747f Sprint 2 Step 5: JSON serialization with nlohmann/json
toJson(ASTNode*) recursively serializes the AST to JSON with id, concept,
properties, and children structure. Added childRoles() to ASTNode for
enumeration. FetchContent pulls nlohmann/json v3.11.3. Test serializes the
full Calculator model and verifies every node in the JSON output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:11:48 -07:00
Bill
71cd903fa8 Sprint 2 Step 4: annotation concepts (DerefStrategy, OptimizationLock, LangSpecific)
Adds the three annotation types from SemAnno. Test builds SimpleFunctionExample
with @deref(batched), exercises OptimizationLock on Module, LangSpecific on
Variable, and DerefStrategy's derefTime child link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:04:37 -07:00
Bill
25b9d5c480 Sprint 2 Step 3: all Statement, Expression, Type, and Parameter concepts
Ports all 33 SemAnno concepts from MPS into C++ headers grouped by category.
Test builds the exact Calculator model from Phase1Test.mps as a 27-node C++
object graph and verifies every property, child link, and parent chain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:01:35 -07:00
Bill
0f90bec21f Sprint 2 Step 2: child links, Function and Variable concepts
Adds generic child link support to ASTNode (addChild/setChild for multi/single-
valued roles, getChildren/getChild/allChildren for traversal). Function and
Variable as first child concepts of Module. Test builds Module->Function tree,
walks parent/child pointers in both directions, verifies single-valued replace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 18:54:18 -07:00
Bill
586914df4e Sprint 2 Step 1: base ASTNode class and Module concept
Adds the C++ editor stack foundation with ASTNode (id, conceptType, parent pointer, virtual dtor) and Module as the first concrete concept (name, targetLanguage). Header-only, compiles with C++20, test passes all assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 18:44:42 -07:00
Bill
25aa8bd024 claude shutdown, trying with qwen 2026-02-06 14:02:02 -07:00
Bill
ec68ce551c fixed booleanliteral and integerliteral by adding "" + before node.value 2026-02-06 09:15:15 -07:00
Bill
668d056bab broken state 2026-02-06 08:58:46 -07:00
Bill
e763c2c32b Phase1Example working on choosing from enums actually done 2026-02-06 01:40:37 -07:00
Bill
9b420ba658 Phase1Example working on choosing from enum 2026-02-05 17:13:06 -07:00
Bill
a803676f0d textGen fixed, Phase1Example has 1 error left 2026-02-04 12:40:33 -07:00
Bill
6a695e5ed1 textGen borked, saving before further borking 2026-02-04 09:54:51 -07:00
Bill
a295f01a26 Fix Module child link IDs in Phase1Test registry
- Changed variables link ID from 8982541288447632589 to 8982541288447632590
- Changed functions link ID from 8982541288447632588 to 8982541288447632589

These are the correct link IDs from the structure definition.
2026-02-03 21:22:11 -07:00
Bill
0400c1bd91 Simplify Phase1Test to avoid XML character escaping issues
- Removed comparison operators that need XML escaping (<, >, etc.)
- Use text-based operators (plus, times) instead of symbols
- Two functions: add() and multiply() with parameters and bodies
- Demonstrates core Phase 1 concepts: Module, Function, Parameter, Assignment, Return, BinaryOperation

This version should load without XML parsing errors.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 21:19:59 -07:00
Bill
66840fbfe7 Fix XML special characters in operator properties
- Changed < to &lt;
- Changed > to &gt;

These need to be escaped in XML property values.
2026-02-03 21:18:39 -07:00
Bill
1b49ff317c Expand Phase1Test with comprehensive examples
Added to Calculator module:
- Global variable: PI
- Function add(x, y): Parameters, binary operations, assignments, returns
- Function isPositive(num): If/else statements, boolean literals, conditions
- Function sumTo(n): While loops, assignments, complex control flow

Now demonstrates:
- Functions with parameters and return types
- Multiple statement types (Assignment, IfStatement, WhileLoop, Return)
- Multiple expression types (BinaryOperation, VariableReference, Literals)
- Type annotations (PrimitiveType)

Should generate meaningful text output for textgen validation.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 21:17:34 -07:00
Bill
8f7f933a17 Register Phase1Example.sandbox in MPS project modules 2026-02-03 21:13:44 -07:00
Bill
67b01c6c41 Create Phase1Example sandbox with minimal test model
- New sandbox: Phase1Example.sandbox with proper module descriptor
- Test model: Phase1Test.mps with minimal Phase 1 concept usage
- Registry includes Module and Variable with proper child relationships
- Child relationships mapped: variables (2Ks9RG) and functions (2Ks9RH)
- Simple structure: Module containing one Variable

Avoids complex nested structures to focus on verifying basic concept resolution.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 21:12:07 -07:00
Bill
f960ea6a0d Remove incomplete SimpleExample model - will create dedicated sandbox instead 2026-02-03 21:11:30 -07:00
Bill
8a2ab8d614 Fix property indices in SimpleExample model
- Changed all property role="name" to role="TrG5h" (the registered index)
- Changed property role="operator" to role="TrG5h"
- Uses proper registry index instead of property name string

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 21:09:26 -07:00
Bill
5b4d5ada7a Add registry to SimpleExample and update concept references
- Added registry section with all Phase 1 concepts and their EcuMT IDs
- Mapped concepts to short index names (e.g., Module=2Ks9RF)
- Updated all concept attributes to use registry indices
- Updated all role attributes to use registry roles
- Follows same pattern as existing SemAnno.sandbox.mps model

This allows MPS to properly resolve concept definitions from the model itself.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 21:06:53 -07:00
Bill
a86db27292 Fix SimpleExample model to use SemAnno language instead of structure
- Changed language use from structure to actual SemAnno language
- Matches the language configuration in SemAnno.sandbox.msd
- Allows proper concept resolution through language namespace
- Should resolve the 'bad concept index key' error

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 21:02:26 -07:00
Bill
2fe1bf108e Move test model to existing SemAnno.sandbox
- Moved SimpleExample.mps to languages/SemAnno.sandbox/models/
- Removed redundantly created sandbox directory
- Test model now in the correct, existing sandbox location

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 21:00:18 -07:00
Bill
3eea795de0 Create sandbox with test model using correct concept syntax
- Created sandbox/ directory for test models (proper MPS structure)
- Created .mps module descriptor with SemAnno.structure dependency
- Created SimpleExample.mps using concept names instead of node IDs
- Uses proper role names (variables, functions, parameters, etc.)
- Uses readable property names (name, operator) instead of internal IDs

The sandbox is now properly configured to use the SemAnno language concepts.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 20:56:19 -07:00
Bill
813683bc9d Remove incorrectly placed test model from language directory 2026-02-03 20:55:27 -07:00
Bill
45dbdacc46 Fix SimpleExample test model concept reference syntax
- Removed namespace prefix from all concept attributes (k8se:XXXX -> XXXX)
- Removed namespace prefix from all role attributes
- Made SemAnno.structure import implicit=true
- Corrects MPS concept index resolution for model instantiation

This should resolve "Bad concept index key" error when loading the model.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-03 20:51:35 -07:00