Create Context » History » Version 30
Tomislav Pleše, 09/28/2025 08:58 PM
| 1 | 1 | Tomislav Pleše | # Create Context |
|---|---|---|---|
| 2 | 2 | Tomislav Pleše | |
| 3 | |||
| 4 | |- T-001: Shard-01 |
||
| 5 | | |- T-004: Point |
||
| 6 | | |- T-015: Point |
||
| 7 | |- T-001: Shard-02 |
||
| 8 | | |- T-016: Point |
||
| 9 | 3 | Tomislav Pleše | | |- T-017: Point |
| 10 | 2 | Tomislav Pleše | | |- T-005: Shard-01 |
| 11 | | | |- T-006: Point |
||
| 12 | | | |- T-014: Point |
||
| 13 | | | |- T-007: Shard-01 |
||
| 14 | | | | |- T-010: Point |
||
| 15 | | | | |- T-013: Point |
||
| 16 | | | |- T-007: Shard-02 |
||
| 17 | | | | |- T-011: Point |
||
| 18 | | | | |- T-012: Point <-- starting point |
||
| 19 | | | |- T-007: Shard-03 |
||
| 20 | | | |- T-008: Point |
||
| 21 | | |- T-005: Shard-02 |
||
| 22 | | | |- T-018: Point |
||
| 23 | | |- T-005: Shard-03 |
||
| 24 | | |- T-009: Point |
||
| 25 | |- T-001: Shard-03 |
||
| 26 | |- T-002: Point |
||
| 27 | 3 | Tomislav Pleše | |- T-003: Point |
| 28 | 2 | Tomislav Pleše | |
| 29 | 1 | Tomislav Pleše | |
| 30 | 2 | Tomislav Pleše | |
| 31 | 3 | Tomislav Pleše | Context: [012, 011, 007(S01+S02), 014, 006, 005(S01), 017, 016, 001(S01+S02) ] |
| 32 | 2 | Tomislav Pleše | |
| 33 | 1 | Tomislav Pleše | |
| 34 | 2 | Tomislav Pleše | |
| 35 | 3 | Tomislav Pleše | |
| 36 | 2 | Tomislav Pleše | | PointId | 012 | 007 | 005 | 001 | |
| 37 | |------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| |
||
| 38 | | StartingPoint [in code] | 012 | 012 | 012 | 012 | |
||
| 39 | | PreviousPoint [in code] | "" | 012 | 007 | 005 | |
||
| 40 | | ParentPoint | 007 | 005 | 001 | 001 | |
||
| 41 | | PointChildren | null | null | null | [002, 003] | |
||
| 42 | | ShardList | null | [S01, S02, S03] | [S01, S02, S03] | [S01, S02, S03] | |
||
| 43 | | ParentShard | 007-S02 | 005-S01 | 001-S02 | null | |
||
| 44 | | CurrentParentShard [in code] | null | 007-S02 | 005-S01 | 001-S02 | |
||
| 45 | | ShardPointChildren | null | S02[011, 012] | S01[006, 014, 007] | S02[016, 017, 005, 009] | |
||
| 46 | | | | | | | |
||
| 47 | | PRINT full: | 012 | 011, 007(S01+S02) | 014, 006, 005(S01) | 017, 016, 001(S01+S02) | |
||
| 48 | | | | | | | |
||
| 49 | | If (ShardPointChildren == null && currentParentShard == null) Else (PointChildren == null) | * True: not a Shard | * False: It's a shard. Print ShardPointChildren preceding PreviousPoint | * False: It's a shard. Print ShardPointChildren preceding PreviousPoint | * False: It's a shard. Print ShardPointChildren preceding PreviousPoint (else, print PointChildren) | |
||
| 50 | | | | * PRINT [011] | * PRINT [014, 006] | * PRINT [017, 016] | |
||
| 51 | | Print CurrentPoint: If(Shard) => Print from ShardList Else If (!Shard) => Print Point | * Not a Shard: Print Point | * Shard: Print ShardList from CurrentParentShard and those preceding | * Shard: Print ShardList from CurrentParentShard and those preceding | * Shard: Print ShardList from CurrentParentShard and those preceding | |
||
| 52 | | | * PRINT: 012 | * PRINT: 007- [S01+S02] | * PRINT: 005-[S01] | * PRINT: 001-[S01+S02] | |
||
| 53 | | If (ParentShard == null) | * False: Set CurrentParentShard = ParentShard | * False: Set CurrentParentShard = ParentShard | * False: Set CurrentParentShard = ParentShard | True: | |
||
| 54 | 1 | Tomislav Pleše | | If (ParentPoint == PointId) | * False: Set PreviousPoint = currentPoint | * False: Set PreviousPoint = currentPoint | * False: Set PreviousPoint = currentPoint | * True: This is Root ParentPoint - END | |
| 55 | | | * Go to ParentPoint: 007 | Go to ParentPoint: 005 | Go to ParentPoint: 001 | | |
||
| 56 | 3 | Tomislav Pleše | |
| 57 | |||
| 58 | |||
| 59 | FLOW |
||
| 60 | |||
| 61 | 29 | Tomislav Pleše | PointArgs |
| 62 | * String currentPointId; |
||
| 63 | * String? parentPointId; |
||
| 64 | * String? parentShardId; |
||
| 65 | * bool isShardChild = false; // TODO TP: delete: do I need this? I have parentShardId |
||
| 66 | * int? startPosition; |
||
| 67 | * int? endPosition; |
||
| 68 | * String? error; |
||
| 69 | 4 | Tomislav Pleše | |
| 70 | 26 | Tomislav Pleše | |
| 71 | 30 | Tomislav Pleše | Decision points in the flow: |
| 72 | |||
| 73 | 26 | Tomislav Pleše | * Is previousPoint = null - new Root Point? |
| 74 | * Is previousPoint = Root - directly under Root - root.pointChildren[] -> previousPoint = Root |
||
| 75 | 27 | Tomislav Pleše | * Is previousPoint = rootChild - under Regular Point - root.pointChildren[] -> previousPoint = Child Point |
| 76 | 28 | Tomislav Pleše | * Is previousPoint = Shard - directly under Shard |
| 77 | 1 | Tomislav Pleše | * Is previousPoint = shardChild - under |
| 78 | * Is it a child of a Point /w Shard? |
||
| 79 | * If yes: |
||
| 80 | * If no: print currentPoint |
||
| 81 | * |
||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | 30 | Tomislav Pleše | Pseudo-Code |
| 86 | 29 | Tomislav Pleše | |
| 87 | 1. currentPoint(T-012) = newPoint -> addToMessages[] |
||
| 88 | * what's the nextCurrentPoint? |
||
| 89 | * is it a Sub Prompt (Sharding)? |
||
| 90 | * true: nextCurrentPoint = previousPoint |
||
| 91 | * false: nextCurrentPoint = prevPoint.parentPoint |
||
| 92 | 2. currentPoint(T-007) |
||
| 93 | * is the previousPoint a Shard Child? (prevPoint.parentShard != null) |
||
| 94 | * true: nextCurrentPoint = prevPoint. |
||
| 95 | * false: |
||
| 96 | * is there a prevPoint.parentShardId? |
||
| 97 | * true: newCurrentPoint = prevPoint.parentShardId |
||
| 98 | * false: is there a prevPoint.parentPointId? |
||
| 99 | * true: nextCurrentPoint = prevPoint.parentPointId |
||
| 100 | * false: |
||
| 101 | 2. currentPoint = previousPoint |
||
| 102 | * isItRoot? - if (previousPoint.id = previousPoint.parentPointId) |
||
| 103 | * true: This is a Root Point -> addToMessages[] -> Return messages[] |
||
| 104 | 26 | Tomislav Pleše | * false: Not a Root Point |
| 105 | 29 | Tomislav Pleše | * isItShard? - if ( |