2024-11-18 16:20:32 -06:00
|
|
|
---
|
|
|
|
source: kcl/src/simulation_tests.rs
|
|
|
|
description: Program memory after executing riddle_small.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"environments": [
|
|
|
|
{
|
|
|
|
"bindings": {
|
|
|
|
"ANSWER": {
|
2024-11-25 10:50:43 +13:00
|
|
|
"type": "Number",
|
|
|
|
"value": 41803.0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
|
|
|
9,
|
|
|
|
14,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"HALF_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 180.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"QUARTER_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 90.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"THREE_QUARTER_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 270.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"ZERO": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 0.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"ox": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": -26.0,
|
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
96,
|
|
|
|
98,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
|
|
|
9,
|
|
|
|
14,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
73,
|
2024-11-18 16:20:32 -06:00
|
|
|
79,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
49,
|
|
|
|
54,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
58,
|
2024-11-18 16:20:32 -06:00
|
|
|
64,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
110,
|
|
|
|
112,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"oy": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 34.0,
|
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
119,
|
|
|
|
121,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
|
|
|
9,
|
|
|
|
14,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
85,
|
|
|
|
90,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
49,
|
|
|
|
54,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
58,
|
2024-11-18 16:20:32 -06:00
|
|
|
64,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
133,
|
|
|
|
135,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"r": {
|
|
|
|
"type": "Solid",
|
|
|
|
"type": "Solid",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"value": [
|
|
|
|
{
|
|
|
|
"faceId": "[uuid]",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
199,
|
|
|
|
214,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"type": "extrudePlane"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"faceId": "[uuid]",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
220,
|
|
|
|
236,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"type": "extrudePlane"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"faceId": "[uuid]",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
242,
|
|
|
|
258,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"type": "extrudePlane"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"faceId": "[uuid]",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
264,
|
|
|
|
272,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"type": "extrudePlane"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"sketch": {
|
|
|
|
"type": "Sketch",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"paths": [
|
|
|
|
{
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
199,
|
|
|
|
214,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"from": [
|
|
|
|
-26.0,
|
|
|
|
34.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"to": [
|
|
|
|
-25.0,
|
|
|
|
34.0
|
|
|
|
],
|
|
|
|
"type": "ToPoint"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
220,
|
|
|
|
236,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"from": [
|
|
|
|
-25.0,
|
|
|
|
34.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"to": [
|
|
|
|
-25.0,
|
|
|
|
33.0
|
|
|
|
],
|
|
|
|
"type": "ToPoint"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
242,
|
|
|
|
258,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"from": [
|
|
|
|
-25.0,
|
|
|
|
33.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"to": [
|
|
|
|
-26.0,
|
|
|
|
33.0
|
|
|
|
],
|
|
|
|
"type": "ToPoint"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
264,
|
|
|
|
272,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"from": [
|
|
|
|
-26.0,
|
|
|
|
33.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"to": [
|
|
|
|
-26.0,
|
|
|
|
34.0
|
|
|
|
],
|
|
|
|
"type": "ToPoint"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"on": {
|
|
|
|
"type": "plane",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"value": "XZ",
|
|
|
|
"origin": {
|
|
|
|
"x": 0.0,
|
|
|
|
"y": 0.0,
|
|
|
|
"z": 0.0
|
|
|
|
},
|
|
|
|
"xAxis": {
|
|
|
|
"x": 1.0,
|
|
|
|
"y": 0.0,
|
|
|
|
"z": 0.0
|
|
|
|
},
|
|
|
|
"yAxis": {
|
|
|
|
"x": 0.0,
|
|
|
|
"y": 0.0,
|
|
|
|
"z": 1.0
|
|
|
|
},
|
|
|
|
"zAxis": {
|
|
|
|
"x": 0.0,
|
|
|
|
"y": -1.0,
|
|
|
|
"z": 0.0
|
|
|
|
},
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"start": {
|
|
|
|
"from": [
|
|
|
|
-26.0,
|
|
|
|
34.0
|
|
|
|
],
|
|
|
|
"to": [
|
|
|
|
-26.0,
|
|
|
|
34.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
166,
|
|
|
|
193,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
166,
|
|
|
|
193,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"height": 1.0,
|
|
|
|
"startCapId": "[uuid]",
|
|
|
|
"endCapId": "[uuid]",
|
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
166,
|
|
|
|
193,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"t": {
|
|
|
|
"type": "Function",
|
|
|
|
"expression": {
|
|
|
|
"body": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"argument": {
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 64,
|
2024-11-18 16:20:32 -06:00
|
|
|
"left": {
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 54,
|
2024-11-18 16:20:32 -06:00
|
|
|
"left": {
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 46,
|
2024-11-18 16:20:32 -06:00
|
|
|
"left": {
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 42,
|
2024-11-18 16:20:32 -06:00
|
|
|
"name": "ANSWER",
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 36,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"operator": "*",
|
|
|
|
"right": {
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 46,
|
2024-11-18 16:20:32 -06:00
|
|
|
"name": "s",
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 45,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 36,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "BinaryExpression",
|
|
|
|
"type": "BinaryExpression"
|
|
|
|
},
|
|
|
|
"operator": "+",
|
|
|
|
"right": {
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 54,
|
2024-11-18 16:20:32 -06:00
|
|
|
"raw": "12345",
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 49,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 12345.0
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 36,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "BinaryExpression",
|
|
|
|
"type": "BinaryExpression"
|
|
|
|
},
|
|
|
|
"operator": "%",
|
|
|
|
"right": {
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 64,
|
2024-11-18 16:20:32 -06:00
|
|
|
"raw": "214748",
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 58,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 214748.0
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 36,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "BinaryExpression",
|
|
|
|
"type": "BinaryExpression"
|
|
|
|
},
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 64,
|
|
|
|
"start": 28,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "ReturnStatement",
|
|
|
|
"type": "ReturnStatement"
|
|
|
|
}
|
|
|
|
],
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 66,
|
|
|
|
"start": 24
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 66,
|
2024-11-18 16:20:32 -06:00
|
|
|
"params": [
|
|
|
|
{
|
|
|
|
"type": "Parameter",
|
|
|
|
"identifier": {
|
2024-11-27 15:46:58 +13:00
|
|
|
"end": 22,
|
2024-11-18 16:20:32 -06:00
|
|
|
"name": "s",
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 21,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"optional": false
|
|
|
|
}
|
|
|
|
],
|
2024-11-27 15:46:58 +13:00
|
|
|
"start": 20,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "FunctionExpression"
|
|
|
|
},
|
|
|
|
"memory": {
|
|
|
|
"environments": [
|
|
|
|
{
|
|
|
|
"bindings": {
|
|
|
|
"ANSWER": {
|
2024-11-25 10:50:43 +13:00
|
|
|
"type": "Number",
|
|
|
|
"value": 41803.0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
|
|
|
9,
|
|
|
|
14,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"HALF_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 180.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"QUARTER_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 90.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"THREE_QUARTER_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 270.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"ZERO": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 0.0,
|
|
|
|
"__meta": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parent": null
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"currentEnv": 0,
|
|
|
|
"return": null
|
|
|
|
},
|
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
20,
|
|
|
|
66,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"xs": {
|
2024-11-25 10:50:43 +13:00
|
|
|
"type": "Number",
|
|
|
|
"value": 205804.0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
73,
|
2024-11-18 16:20:32 -06:00
|
|
|
79,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"ys": {
|
2024-11-25 10:50:43 +13:00
|
|
|
"type": "Number",
|
|
|
|
"value": 71816.0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
2024-11-27 15:46:58 +13:00
|
|
|
85,
|
|
|
|
90,
|
2024-11-18 16:20:32 -06:00
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parent": null
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"currentEnv": 0,
|
|
|
|
"return": null
|
|
|
|
}
|