Add ordered pair format (<</>>) for Relations Model JSON representation#13
Add ordered pair format (<</>>) for Relations Model JSON representation#13konard wants to merge 4 commits into
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: netkeep80#10
Implements the second JSON representation format for the Relations Model
based on the mathematical triplet-as-nested-ordered-pairs notation:
ent = (rel, (obj, sub))
New format uses << and >> keys instead of $rel, $obj, $sub:
{
"<<": "<relation-controller>",
">>": {
"<<": "<object-model>",
">>": "<subject-view>"
}
}
Changes:
- vm.rm.h: Added parsing of << / >> ordered pair format in exec_ent()
- doc/relations-model-ru.md: Document both formats with comparison table
- doc/relations-model-en.md: Document both formats with comparison table
- modules/console/test/: Add test JSON files and test cases
- examples/: Add example showing ordered pair format usage
Closes netkeep80#10
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 075731f.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart 1/3Detected uncommitted changes from previous run. Starting new session to review and commit them. Uncommitted files: Auto-restart will stop after changes are committed or after 2 more iterations. Please wait until working session will end and give your feedback. |
🔄 Auto-restart 1/3 LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Сделай code review всего проекта. |
|
🤖 AI Work Session Started Starting automated work session at 2026-03-20T01:24:19.924Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
📋 Code Review всего проектаВыполнен полный обзор кода проекта jsonRVM, включая изменения в PR #13 (ordered pair format). ✅ Что сделано хорошо
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart 1/3Detected uncommitted changes from previous run. Starting new session to review and commit or discard them. Uncommitted files: Auto-restart will stop after changes are committed or discarded, or after 2 more iterations. Please wait until working session will end and give your feedback. |
🔄 Auto-restart 1/3 LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Summary
Implements the second JSON representation format for the Relations Model based on the mathematical triplet-as-nested-ordered-pairs notation, as requested in issue #10.
Problem
The Relations Model currently only supports one JSON format for entities:
```json
{
"$rel": "",
"$obj": "",
"$sub": ""
}
```
Solution
Added a second equivalent format based on the mathematical representation of a triplet as nested ordered pairs:
ent = (rel, (obj, sub))```json
{
"<<": "",
">>": {
"<<": "",
">>": ""
}
}
```
Field mapping between formats
$rel<<$obj>>/<<$sub>>/>>Changes
modules/common/include/vm.rm.h: Added parsing of<</>>ordered pair format inexec_ent(). When a JSON object contains a<<key (but not$rel), it is interpreted as the new ordered pair format.doc/relations-model-ru.md: Documented both formats with a comparison table (Russian)doc/relations-model-en.md: Documented both formats with a comparison table (English)modules/console/test/ordered_pair_format.json: Test file for ordered pair format (version entity)modules/console/test/ordered_pair_format_where.json: Test file for ordered pair format (where filter)modules/console/test/main.cpp: Two new test cases verifying the new format works correctlyexamples/ordered_pair_format.json: Example demonstrating the new formatTest plan
testing ordered pair format (<</>>) - version— verifies{"<<": "rmvm/version"}returns"3.0.0"testing ordered pair format (<</>>) - where filter— verifies the full(rel, (obj, sub))triplet form works with real entityFixes #10
🤖 Generated with Claude Code