diff --git a/Cargo.toml b/Cargo.toml index 7d9fec15..b34b4875 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,6 +54,7 @@ pretty_env_logger = "0.5.0" [features] default = ["lu-dog-vec"] lu-dog-vec = [] +lu-dog-vec-tracy = [] lu-dog-rwlock-vec = [] lu-dog-ndrwlock-vec = [] lu-dog-rc = [] diff --git a/models/lu_dog.json b/models/lu_dog.json index 3d8457b6..92cab497 100644 --- a/models/lu_dog.json +++ b/models/lu_dog.json @@ -1 +1 @@ -{"paper":{"ids":["3d320f60-bf7c-5f3b-a456-06fa8de4c2ef"],"entities":{"3d320f60-bf7c-5f3b-a456-06fa8de4c2ef":{"id":"3d320f60-bf7c-5f3b-a456-06fa8de4c2ef","domain_name":"lu_dog","description":"A blank domain","domain_ns":"3d320f60-bf7c-5f3b-a456-06fa8de4c2ef","width":8000,"height":6400,"offset":{"x":-2862,"y":-2628},"objects":{"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f":{"x":2185,"y":2132,"width":232,"height":95},"7178e7a4-5131-504b-a7b3-c2c0cfedf343":{"x":2647,"y":2269,"width":252,"height":142},"45644594-b418-5362-9294-a62fe2a0fa8e":{"x":3662,"y":1923,"width":271,"height":100,"id":"45644594-b418-5362-9294-a62fe2a0fa8e"},"2e277e34-ab6f-4028-9c52-935c31520fec":{"x":2668,"y":2461,"width":252,"height":126,"id":"2e277e34-ab6f-4028-9c52-935c31520fec"},"e68f8912-9897-4cbd-b363-cb4203a726a9":{"x":3162,"y":2270,"width":245,"height":145,"id":"e68f8912-9897-4cbd-b363-cb4203a726a9"},"141350e6-b62d-4a6d-9ea2-47333e51e3ea":{"x":3163,"y":2461,"width":246,"height":133,"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea"},"88687f76-5d9e-404e-a801-f6f57f9b30ca":{"x":3656,"y":2269,"width":285,"height":148,"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca"},"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5":{"x":4151,"y":2426,"width":320,"height":154,"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5"},"c89e362d-7905-4226-8713-97d3d6f05037":{"x":4527,"y":2257,"width":283,"height":139,"id":"c89e362d-7905-4226-8713-97d3d6f05037"},"94fc0044-4b88-4f5c-ac60-3a44262ade10":{"x":2696,"y":2767,"width":253,"height":131,"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10"},"f192b162-8ada-4128-8805-1953e9165c54":{"x":2024,"y":2660,"width":265,"height":130,"id":"f192b162-8ada-4128-8805-1953e9165c54"},"954b354f-3a90-440b-ab0f-43efc00d275e":{"x":2390,"y":3118,"width":211,"height":129,"id":"954b354f-3a90-440b-ab0f-43efc00d275e"},"0365b40c-c40a-4653-84ab-44d1c12d294f":{"x":2028,"y":2832,"width":256,"height":116,"id":"0365b40c-c40a-4653-84ab-44d1c12d294f"},"9352c766-9f6b-413b-9ea0-13f9c8e4d86e":{"x":3010,"y":3115,"width":234,"height":135,"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e"},"30c31621-a4bd-4356-80b9-1226e00651c9":{"x":3865,"y":2738,"width":242,"height":128,"id":"30c31621-a4bd-4356-80b9-1226e00651c9"},"6c7969f3-f150-4975-a989-a7bc8164b168":{"x":3868,"y":2997,"width":241,"height":117,"id":"6c7969f3-f150-4975-a989-a7bc8164b168"},"c32fcb6d-b505-492f-95c8-5f118079a399":{"x":4296,"y":2896,"width":259,"height":125,"id":"c32fcb6d-b505-492f-95c8-5f118079a399"},"59f269ab-2dbc-4b07-b9bc-48441f20e78f":{"x":4300,"y":3074,"width":251,"height":137,"id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f"},"b359d531-77ae-436f-9f0d-6a5632f1648e":{"x":4302,"y":3264,"width":252,"height":133,"id":"b359d531-77ae-436f-9f0d-6a5632f1648e"},"ce2da156-e0fd-4e56-bb31-2030d4e0c599":{"x":4298,"y":2717,"width":252,"height":117,"id":"ce2da156-e0fd-4e56-bb31-2030d4e0c599"},"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea":{"x":3858,"y":3704,"width":267,"height":142,"id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea"},"a8b86e41-5b04-4469-8a10-91bd89603e27":{"x":2185,"y":2002,"width":233,"height":109,"id":"a8b86e41-5b04-4469-8a10-91bd89603e27"},"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5":{"x":4390,"y":3880,"width":239,"height":115,"id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5"},"dc6d1ffa-5dca-43ef-b973-0628ab580cb7":{"x":4797,"y":3826,"width":173,"height":118,"id":"dc6d1ffa-5dca-43ef-b973-0628ab580cb7"},"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d":{"x":4800,"y":3989,"width":171,"height":114,"id":"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d"},"b1612607-a813-4bc2-896b-88ec4b249447":{"x":4389,"y":3738,"width":241,"height":117,"id":"b1612607-a813-4bc2-896b-88ec4b249447"},"d30d2b03-732b-41bb-89ed-d053750bf987":{"x":4389,"y":3591,"width":242,"height":118,"id":"d30d2b03-732b-41bb-89ed-d053750bf987"},"fa42f4e2-1ff3-473f-a4b9-593c01134e96":{"x":4394,"y":4025,"width":235,"height":116,"id":"fa42f4e2-1ff3-473f-a4b9-593c01134e96"},"d715c5f9-23f8-45e0-a1df-34e27acd01f5":{"x":3850,"y":3199,"width":280,"height":132,"id":"d715c5f9-23f8-45e0-a1df-34e27acd01f5"},"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b":{"x":3854,"y":3371,"width":276,"height":130,"id":"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b"},"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656":{"x":3856,"y":3540,"width":272,"height":121,"id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656"},"d546feef-91df-49ea-ac61-430bdcf9832c":{"x":3861,"y":3896,"width":263,"height":141,"id":"d546feef-91df-49ea-ac61-430bdcf9832c"},"3874760d-0104-4670-ba8b-1af413c5ec4a":{"x":3863,"y":4181,"width":263,"height":136,"id":"3874760d-0104-4670-ba8b-1af413c5ec4a"},"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7":{"x":3426,"y":4149,"width":284,"height":141,"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7"},"846aa191-7b0c-4325-8c21-09fa5edf7c78":{"x":3129,"y":4149,"width":254,"height":139,"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78"},"26dba2c5-a7e9-4556-a9c2-79091a97b941":{"x":2713,"y":4148,"width":248,"height":138,"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941"},"75a16785-d611-45ce-b52c-284a9da0b4b8":{"x":2456,"y":4492,"width":221,"height":128,"id":"75a16785-d611-45ce-b52c-284a9da0b4b8"},"01c8907d-cb59-4fae-a3ca-8cb331d18387":{"x":3171,"y":4386,"width":264,"height":131,"id":"01c8907d-cb59-4fae-a3ca-8cb331d18387"},"79069fc2-4d65-4073-b610-4afc0488de5c":{"x":2585,"y":4688,"width":306,"height":141,"id":"79069fc2-4d65-4073-b610-4afc0488de5c"},"23a9a479-68e7-4a70-bcef-9041f10fd287":{"x":2571,"y":1569,"width":233,"height":112,"id":"23a9a479-68e7-4a70-bcef-9041f10fd287"},"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9":{"x":2187,"y":1861,"width":231,"height":114,"id":"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9"},"a9b74602-bdc5-481f-af4c-8021553b895a":{"x":2186,"y":1710,"width":233,"height":119,"id":"a9b74602-bdc5-481f-af4c-8021553b895a"},"cdb1afaf-245c-4d56-bfea-10f69e45007d":{"x":2185,"y":1552,"width":233,"height":123,"id":"cdb1afaf-245c-4d56-bfea-10f69e45007d"},"b7483723-222d-4f08-b7b9-e8b14f0308cf":{"x":2141,"y":1390,"width":277,"height":126,"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf"},"97f815f0-dcc4-4bd3-843d-13ff1dc5802c":{"x":3673,"y":1599,"width":222,"height":126,"id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c"},"72443b79-5645-4b5f-b317-e1a8f815b81c":{"x":3117,"y":2660,"width":256,"height":136,"id":"72443b79-5645-4b5f-b317-e1a8f815b81c"},"93f288e7-d670-40a6-91f3-2006b5efa8b4":{"x":2517,"y":3913,"width":252,"height":115,"id":"93f288e7-d670-40a6-91f3-2006b5efa8b4"},"e1321ffa-07d5-480d-89f9-227b13d27ce1":{"x":3399,"y":2855,"width":218,"height":102,"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1"},"3f7fd816-518b-4b9e-8134-3059e78045a0":{"x":2389,"y":3341,"width":199,"height":113,"id":"3f7fd816-518b-4b9e-8134-3059e78045a0"},"c46e6b80-0365-429a-abf9-ca75ce4f469a":{"x":1935,"y":3121,"width":196,"height":105,"id":"c46e6b80-0365-429a-abf9-ca75ce4f469a"},"9c8bc563-b596-4348-9189-065d747f7c9f":{"x":1949,"y":3755,"width":194,"height":107,"id":"9c8bc563-b596-4348-9189-065d747f7c9f"},"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523":{"x":1633,"y":3690,"width":160,"height":108,"id":"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523"},"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e":{"x":1630,"y":3822,"width":160,"height":108,"id":"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e"},"484e429b-bf54-45cb-9b87-baddf7fb5f5b":{"x":1528,"y":3121,"width":222,"height":108,"id":"484e429b-bf54-45cb-9b87-baddf7fb5f5b"},"c47b8696-7e98-4733-ab33-a4dca7b61d01":{"x":1635,"y":3554,"width":160,"height":111,"id":"c47b8696-7e98-4733-ab33-a4dca7b61d01"},"e05ab5f3-17e7-4594-8ce0-c02d793a1df9":{"x":2416,"y":3520,"width":244,"height":112,"id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9"},"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d":{"x":2189,"y":3777,"width":251,"height":111,"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d"},"4d5720eb-da8c-493d-ab8d-cb6111dd6099":{"x":3170,"y":3635,"width":223,"height":126,"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099"},"6767c0cf-4041-4047-b2b4-d7375f33bc97":{"x":1629,"y":3956,"width":159,"height":114,"id":"6767c0cf-4041-4047-b2b4-d7375f33bc97"},"35b3de4e-46b8-490f-8e30-c305ed348a78":{"x":1628,"y":4097,"width":159,"height":116,"id":"35b3de4e-46b8-490f-8e30-c305ed348a78"},"d8b554d4-03ac-4613-a3e0-fc0b901bfd70":{"x":1526,"y":3254,"width":220,"height":109,"id":"d8b554d4-03ac-4613-a3e0-fc0b901bfd70"},"0edc535b-405d-4dd5-bcd2-f5772ab116c2":{"x":1525,"y":3387,"width":221,"height":111,"id":"0edc535b-405d-4dd5-bcd2-f5772ab116c2"},"0b3e9de0-d139-4934-a043-d1913a24de0c":{"x":2117,"y":4193,"width":199,"height":120,"id":"0b3e9de0-d139-4934-a043-d1913a24de0c"},"70932b40-f444-4341-bb19-0a29d1daecbe":{"x":2136,"y":4436,"width":136,"height":99,"id":"70932b40-f444-4341-bb19-0a29d1daecbe"},"32dbb54a-9693-4847-9278-7c956ea045f8":{"x":2290,"y":4434,"width":135,"height":102,"id":"32dbb54a-9693-4847-9278-7c956ea045f8"},"0dc0e921-e7ff-4766-9738-e6e312f7f0de":{"x":2359,"y":4189,"width":249,"height":104,"id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de"},"122e4157-381f-400f-ac30-a1c8a2a9e8c1":{"x":1987,"y":4434,"width":128,"height":102,"id":"122e4157-381f-400f-ac30-a1c8a2a9e8c1"},"17db2afc-ae6c-4e53-a527-48516811fe3e":{"x":1832,"y":4435,"width":136,"height":100,"id":"17db2afc-ae6c-4e53-a527-48516811fe3e"},"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd":{"x":1670,"y":4435,"width":141,"height":96,"id":"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd"},"ba8a3bbf-86a8-47e2-92bb-f41878981c41":{"x":2190,"y":1222,"width":232,"height":131,"id":"ba8a3bbf-86a8-47e2-92bb-f41878981c41"},"79571896-9798-44a3-acef-5aa2d9773b93":{"x":2821,"y":1940,"width":267,"height":145,"id":"79571896-9798-44a3-acef-5aa2d9773b93"},"5c85a8db-e4cc-4e38-9922-58d93773f4f0":{"x":3205,"y":3844,"width":174,"height":122,"id":"5c85a8db-e4cc-4e38-9922-58d93773f4f0"},"bf69c9af-f268-4c9b-8e67-4497eb490478":{"x":3665,"y":2456,"width":259,"height":81,"id":"bf69c9af-f268-4c9b-8e67-4497eb490478"},"ce73a111-4670-411e-9bd2-f3308d6399c9":{"x":1530,"y":2997,"width":222,"height":96,"id":"ce73a111-4670-411e-9bd2-f3308d6399c9"},"1e7a66b2-f559-4c21-b8e6-969999ed171d":{"x":2412,"y":2803,"width":207,"height":111,"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d"},"80f73c4e-caf1-4e1f-a634-00965f6ad032":{"x":958,"y":3402,"width":154,"height":98,"id":"80f73c4e-caf1-4e1f-a634-00965f6ad032"},"222307c0-668c-43f9-9368-34cc048f0ae3":{"x":1359,"y":3771,"width":195,"height":90,"id":"222307c0-668c-43f9-9368-34cc048f0ae3"},"6187076b-e765-4e6b-af28-f577eba40b5e":{"x":1086,"y":3735,"width":140,"height":88,"id":"6187076b-e765-4e6b-af28-f577eba40b5e"},"f7fc16ac-6a23-4f5d-a04c-1163617701c1":{"x":1273,"y":3485,"width":176,"height":102,"id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1"},"0ad229c4-1782-4783-b64e-0d15fe482463":{"x":958,"y":3549,"width":155,"height":95,"id":"0ad229c4-1782-4783-b64e-0d15fe482463"},"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a":{"x":1531,"y":2863,"width":219,"height":111,"id":"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a"},"470246f6-91ec-4993-b915-93480d0f4eb9":{"x":3026,"y":4641,"width":240,"height":149,"id":"470246f6-91ec-4993-b915-93480d0f4eb9"},"f6a3ce12-18e1-4675-ab94-6b2a7c91d951":{"x":4519,"y":2028,"width":234,"height":137,"id":"f6a3ce12-18e1-4675-ab94-6b2a7c91d951"},"41b7bda7-f5a2-4c94-af22-fedbe8d6f287":{"x":1085,"y":3857,"width":142,"height":92,"id":"41b7bda7-f5a2-4c94-af22-fedbe8d6f287"},"84f1c5fd-d907-4653-a132-bfd420ad9212":{"x":1529,"y":2714,"width":220,"height":121,"id":"84f1c5fd-d907-4653-a132-bfd420ad9212"},"efde0481-1599-4c5c-bf30-51dbd4a8ed83":{"x":1737,"y":2304,"width":203,"height":108,"id":"efde0481-1599-4c5c-bf30-51dbd4a8ed83"},"95e17479-07a5-41b1-9930-1b9b520514f6":{"x":3594,"y":2634,"width":267,"height":86,"id":"95e17479-07a5-41b1-9930-1b9b520514f6"},"8d86dceb-7e6e-4767-8a3f-cbbde458ad93":{"x":2029,"y":2973,"width":255,"height":124,"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93"},"68e7191a-fe94-423f-8a5d-5551384ae998":{"x":2771,"y":1733,"width":253,"height":110,"id":"68e7191a-fe94-423f-8a5d-5551384ae998"},"c4723d6d-1584-49bd-80f1-4c700185746e":{"x":4612,"y":2457,"width":199,"height":112,"id":"c4723d6d-1584-49bd-80f1-4c700185746e"},"7794ada6-49c3-4bf0-991f-828c6583ebb8":{"x":4788,"y":2694,"width":280,"height":119,"id":"7794ada6-49c3-4bf0-991f-828c6583ebb8"},"d48d948b-5291-4eb3-ba35-7ab1c1ffa098":{"x":4081,"y":1919,"width":348,"height":113,"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098"},"7eaea922-8807-4c38-a704-0143e0594664":{"x":4450,"y":1722,"width":212,"height":105,"id":"7eaea922-8807-4c38-a704-0143e0594664"},"4b6c7fde-0878-4947-b960-bc73a4558c60":{"x":4185,"y":1504,"width":147,"height":115,"id":"4b6c7fde-0878-4947-b960-bc73a4558c60"},"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2":{"x":4351,"y":1504,"width":297,"height":114,"id":"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2"},"c8fcd612-6ca8-469a-824c-de218e4fd075":{"x":4667,"y":1504,"width":324,"height":116,"id":"c8fcd612-6ca8-469a-824c-de218e4fd075"},"968ea4f4-0a3b-44d4-a266-16facf7d325f":{"x":2212,"y":2427,"width":201,"height":113,"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f"},"52143d28-8474-44bc-b63f-e654150888d3":{"x":2619,"y":3122,"width":241,"height":108,"id":"52143d28-8474-44bc-b63f-e654150888d3"},"ab7a5708-6d12-4dce-b488-fa3a3b480510":{"x":3490,"y":3922,"width":232,"height":83,"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510"},"6094aad5-613b-42b6-8f48-c3b9e2161aa9":{"x":2842,"y":3296,"width":250,"height":113,"id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9"},"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7":{"x":3737,"y":4431,"width":245,"height":132,"id":"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7"},"910e3a08-5e99-47a5-bde4-3e35cf9f00da":{"x":4023,"y":4431,"width":272,"height":132,"id":"910e3a08-5e99-47a5-bde4-3e35cf9f00da"},"31deb355-b737-43a6-ae88-199bb51f940d":{"x":3566,"y":3110,"width":210,"height":107,"id":"31deb355-b737-43a6-ae88-199bb51f940d"},"39060ea9-5d45-4954-a29f-ba88e01e7217":{"x":3478,"y":3726,"width":240,"height":116,"id":"39060ea9-5d45-4954-a29f-ba88e01e7217"},"4856978f-20be-4b59-8bf6-b941091119a9":{"x":3032,"y":2834,"width":215,"height":140,"id":"4856978f-20be-4b59-8bf6-b941091119a9"},"dbada891-ca0d-4fbc-8371-9f9234867bd6":{"x":2186,"y":2247,"width":231,"height":119,"id":"dbada891-ca0d-4fbc-8371-9f9234867bd6"},"290f49d3-8ce7-408e-be14-611b66db9687":{"x":3161,"y":2031,"width":243,"height":126,"id":"290f49d3-8ce7-408e-be14-611b66db9687"}},"relationships":{"21f08565-d913-4302-a853-e5f688ec1bc1":{"IsaUI":{"from":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2496,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f","x":2417,"y":2184,"offset":{"x":20,"y":20},"dir":"East"},{"id":"a8b86e41-5b04-4469-8a10-91bd89603e27","x":2418,"y":2067,"offset":{"x":20,"y":20},"dir":"East"},{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4225,"y":2426,"offset":{"x":20,"y":20},"dir":"North"},{"id":"23a9a479-68e7-4a70-bcef-9041f10fd287","x":2625,"y":1681,"offset":{"x":20,"y":20},"dir":"South"},{"id":"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9","x":2418,"y":1914,"offset":{"x":20,"y":20},"dir":"East"},{"id":"a9b74602-bdc5-481f-af4c-8021553b895a","x":2419,"y":1797,"offset":{"x":20,"y":20},"dir":"East"},{"id":"cdb1afaf-245c-4d56-bfea-10f69e45007d","x":2418,"y":1648,"offset":{"x":20,"y":20},"dir":"East"},{"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","x":2418,"y":1464,"offset":{"x":20,"y":20},"dir":"East"},{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3162,"y":2380,"offset":{"x":20,"y":20},"dir":"West"},{"id":"c89e362d-7905-4226-8713-97d3d6f05037","x":4612,"y":2396,"offset":{"x":20,"y":20},"dir":"South"},{"id":"ba8a3bbf-86a8-47e2-92bb-f41878981c41","x":2422,"y":1297,"offset":{"x":20,"y":20},"dir":"East"},{"id":"efde0481-1599-4c5c-bf30-51dbd4a8ed83","x":1940,"y":2360,"offset":{"x":20,"y":20},"dir":"East"},{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3699,"y":2634,"offset":{"x":20,"y":20},"dir":"North"},{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4111,"y":2032,"offset":{"x":20,"y":20},"dir":"South"},{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","x":2413,"y":2462,"offset":{"x":20,"y":20},"dir":"East"},{"id":"dbada891-ca0d-4fbc-8371-9f9234867bd6","x":2417,"y":2311,"offset":{"x":20,"y":20},"dir":"East"}]}},"c12fcdf7-ec63-58c7-8555-36222f25b91b":{"AssociativeUI":{"from":{"x":3162,"y":2346},"middle":{"id":"68e7191a-fe94-423f-8a5d-5551384ae998","x":2771,"y":1780,"offset":{"x":0,"y":0},"dir":"West"},"one":{"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","x":2418,"y":1493,"offset":{"x":-75,"y":54},"dir":"East"},"other":{"id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","x":2775,"y":2269,"offset":{"x":18,"y":-27},"dir":"North"}}},"4b7360ba-8de3-4c93-bc90-22478c128a75":{"BinaryUI":{"from":{"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","x":3163,"y":2543,"offset":{"x":-92,"y":30},"dir":"West"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2920,"y":2562,"offset":{"x":24,"y":-21},"dir":"East"}}},"3746c64a-c63d-424d-afb2-c253470b6d7b":{"IsaUI":{"from":{"id":"45644594-b418-5362-9294-a62fe2a0fa8e","x":3790,"y":2023,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3285,"y":2270,"offset":{"x":20,"y":20},"dir":"North"},{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3789,"y":2269,"offset":{"x":20,"y":20},"dir":"North"},{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4308,"y":2426,"offset":{"x":20,"y":20},"dir":"North"},{"id":"c89e362d-7905-4226-8713-97d3d6f05037","x":4649,"y":2257,"offset":{"x":20,"y":20},"dir":"North"},{"id":"f6a3ce12-18e1-4675-ab94-6b2a7c91d951","x":4519,"y":2094,"offset":{"x":20,"y":20},"dir":"West"},{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4222,"y":2032,"offset":{"x":20,"y":20},"dir":"South"}]}},"02892323-60e9-470b-b162-b2bc8d9ef1cd":{"BinaryUI":{"from":{"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","x":3409,"y":2523,"offset":{"x":19,"y":33},"dir":"East"},"to":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3407,"y":2390,"offset":{"x":61,"y":35},"dir":"East"}}},"98c79b91-da7b-443a-b1fb-18596cd6b4bc":{"BinaryUI":{"from":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3656,"y":2323,"offset":{"x":-128,"y":-40},"dir":"West"},"to":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3407,"y":2323,"offset":{"x":15,"y":34},"dir":"East"}}},"7993e2c7-7efa-4346-b50e-bc02d55e1ca7":{"BinaryUI":{"from":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4151,"y":2455,"offset":{"x":-80,"y":-74},"dir":"West"},"to":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3941,"y":2355,"offset":{"x":-104,"y":95},"dir":"East"}}},"fdb49afe-13fb-4c79-99d1-92728d8652c7":{"BinaryUI":{"from":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4213,"y":2580,"offset":{"x":-168,"y":17},"dir":"South"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2849,"y":2587,"offset":{"x":38,"y":26},"dir":"South"}}},"ea1e6d1c-279b-4b6d-806e-fa133c6a5da9":{"IsaUI":{"from":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","x":2823,"y":2898,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"954b354f-3a90-440b-ab0f-43efc00d275e","x":2526,"y":3118,"offset":{"x":20,"y":20},"dir":"North"},{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3120,"y":3115,"offset":{"x":20,"y":20},"dir":"North"}]}},"35491126-597f-4301-ae48-88da4a23c845":{"IsaUI":{"from":{"id":"954b354f-3a90-440b-ab0f-43efc00d275e","x":2444,"y":3118,"offset":{"x":20,"y":20},"dir":"North"},"to":[{"id":"0365b40c-c40a-4653-84ab-44d1c12d294f","x":2284,"y":2898,"offset":{"x":20,"y":20},"dir":"East"},{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2289,"y":2763,"offset":{"x":20,"y":20},"dir":"East"},{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2284,"y":3077,"offset":{"x":20,"y":20},"dir":"East"}]}},"336674ce-19be-4baa-8117-19ee19886e2d":{"BinaryUI":{"from":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2289,"y":2693,"offset":{"x":102,"y":35},"dir":"East"},"to":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4340,"y":2580,"offset":{"x":20,"y":20},"dir":"South"}}},"95b8c311-1f3f-42ab-93cd-9b95c8d8c02a":{"BinaryUI":{"from":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2024,"y":2694,"offset":{"x":-113,"y":-51},"dir":"West"},"to":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2024,"y":2759,"offset":{"x":35,"y":28},"dir":"West"}}},"3966271b-9938-48c7-b4fe-177c307e22bf":{"IsaUI":{"from":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3182,"offset":{"x":20,"y":20},"dir":"East"},"to":[{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2827,"offset":{"x":20,"y":20},"dir":"West"},{"id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","x":3858,"y":3769,"offset":{"x":20,"y":20},"dir":"West"},{"id":"d715c5f9-23f8-45e0-a1df-34e27acd01f5","x":3850,"y":3257,"offset":{"x":20,"y":20},"dir":"West"},{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","x":3861,"y":3963,"offset":{"x":20,"y":20},"dir":"West"},{"id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","x":3856,"y":3588,"offset":{"x":20,"y":20},"dir":"West"},{"id":"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b","x":3854,"y":3445,"offset":{"x":20,"y":20},"dir":"West"},{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","x":3538,"y":4149,"offset":{"x":20,"y":20},"dir":"North"},{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2878,"y":4148,"offset":{"x":20,"y":20},"dir":"North"},{"id":"72443b79-5645-4b5f-b317-e1a8f815b81c","x":3288,"y":2796,"offset":{"x":20,"y":20},"dir":"South"},{"id":"93f288e7-d670-40a6-91f3-2006b5efa8b4","x":2628,"y":3913,"offset":{"x":20,"y":20},"dir":"North"},{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","x":3542,"y":2957,"offset":{"x":20,"y":20},"dir":"South"},{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","x":2588,"y":3401,"offset":{"x":20,"y":20},"dir":"East"},{"id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9","x":2572,"y":3520,"offset":{"x":20,"y":20},"dir":"North"},{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2423,"y":3777,"offset":{"x":20,"y":20},"dir":"North"},{"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","x":3291,"y":3635,"offset":{"x":20,"y":20},"dir":"North"},{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","x":2230,"y":4193,"offset":{"x":20,"y":20},"dir":"North"},{"id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de","x":2501,"y":4189,"offset":{"x":20,"y":20},"dir":"North"},{"id":"5c85a8db-e4cc-4e38-9922-58d93773f4f0","x":3293,"y":3844,"offset":{"x":20,"y":20},"dir":"North"},{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","x":3863,"y":4240,"offset":{"x":20,"y":20},"dir":"West"},{"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","x":2544,"y":2914,"offset":{"x":20,"y":20},"dir":"South"},{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3771,"y":2720,"offset":{"x":20,"y":20},"dir":"South"},{"id":"52143d28-8474-44bc-b63f-e654150888d3","x":2860,"y":3184,"offset":{"x":20,"y":20},"dir":"East"},{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","x":3490,"y":3952,"offset":{"x":20,"y":20},"dir":"West"},{"id":"4856978f-20be-4b59-8bf6-b941091119a9","x":3247,"y":2919,"offset":{"x":20,"y":20},"dir":"East"}]}},"2e81ce06-82d5-47e6-9f38-783d8af057d9":{"IsaUI":{"from":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":4109,"y":3052,"offset":{"x":20,"y":20},"dir":"East"},"to":[{"id":"ce2da156-e0fd-4e56-bb31-2030d4e0c599","x":4298,"y":2778,"offset":{"x":20,"y":20},"dir":"West"},{"id":"c32fcb6d-b505-492f-95c8-5f118079a399","x":4296,"y":2960,"offset":{"x":20,"y":20},"dir":"West"},{"id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f","x":4300,"y":3143,"offset":{"x":20,"y":20},"dir":"West"},{"id":"b359d531-77ae-436f-9f0d-6a5632f1648e","x":4302,"y":3333,"offset":{"x":20,"y":20},"dir":"West"}]}},"03745d2b-a85f-40a9-b038-8f22c83e8eb1":{"BinaryUI":{"from":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":3951,"y":3114,"offset":{"x":-131,"y":-23},"dir":"South"},"to":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":4045,"y":3114,"offset":{"x":20,"y":20},"dir":"South"}}},"c715993f-c840-4d48-8442-b5635e4324e7":{"BinaryUI":{"from":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":3950,"y":2997,"offset":{"x":26,"y":-17},"dir":"North"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3950,"y":2866,"offset":{"x":20,"y":20},"dir":"South"}}},"f6c19c17-3e01-4945-bffb-7ec408dd7fcf":{"BinaryUI":{"from":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4471,"y":2518,"offset":{"x":-247,"y":12},"dir":"East"},"to":{"id":"c4723d6d-1584-49bd-80f1-4c700185746e","x":4612,"y":2518,"offset":{"x":19,"y":-18},"dir":"West"}}},"d8bf88d3-35da-422d-a7d9-1726ce66a288":{"BinaryUI":{"from":{"id":"c32fcb6d-b505-492f-95c8-5f118079a399","x":4296,"y":2925,"offset":{"x":-142,"y":-36},"dir":"West"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3115,"offset":{"x":-5,"y":-83},"dir":"East"}}},"0b5aab4e-5077-4627-9091-89c71a921be1":{"BinaryUI":{"from":{"id":"c32fcb6d-b505-492f-95c8-5f118079a399","x":4296,"y":2945,"offset":{"x":-178,"y":19},"dir":"West"},"to":{"id":"0365b40c-c40a-4653-84ab-44d1c12d294f","x":2284,"y":2923,"offset":{"x":16,"y":32},"dir":"East"}}},"3bb006c5-a66d-440b-b54b-35bc9da87b33":{"IsaUI":{"from":{"id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","x":4125,"y":3778,"offset":{"x":20,"y":20},"dir":"East"},"to":[{"id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","x":4390,"y":3945,"offset":{"x":20,"y":20},"dir":"West"},{"id":"d30d2b03-732b-41bb-89ed-d053750bf987","x":4389,"y":3664,"offset":{"x":20,"y":20},"dir":"West"},{"id":"b1612607-a813-4bc2-896b-88ec4b249447","x":4389,"y":3801,"offset":{"x":20,"y":20},"dir":"West"},{"id":"fa42f4e2-1ff3-473f-a4b9-593c01134e96","x":4394,"y":4079,"offset":{"x":20,"y":20},"dir":"West"}]}},"e67c9242-2aac-4930-ae2e-b2a1678ed3d9":{"BinaryUI":{"from":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","x":2846,"y":2767,"offset":{"x":23,"y":-16},"dir":"North"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2704,"y":2587,"offset":{"x":10,"y":22},"dir":"South"}}},"332f2cb5-0719-4c2d-8737-c1a0375fad8e":{"IsaUI":{"from":{"id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","x":4629,"y":3942,"offset":{"x":20,"y":20},"dir":"East"},"to":[{"id":"dc6d1ffa-5dca-43ef-b973-0628ab580cb7","x":4797,"y":3882,"offset":{"x":20,"y":20},"dir":"West"},{"id":"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d","x":4800,"y":4043,"offset":{"x":20,"y":20},"dir":"West"}]}},"e93a7669-d7d0-4cb2-bbb1-36dedf3f893d":{"BinaryUI":{"from":{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","x":4008,"y":4181,"offset":{"x":24,"y":-14},"dir":"North"},"to":{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","x":4008,"y":4037,"offset":{"x":20,"y":20},"dir":"South"}}},"ead7f44b-e37a-4122-8824-17f4079c2e70":{"BinaryUI":{"from":{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","x":3484,"y":4149,"offset":{"x":2,"y":-62},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3230,"offset":{"x":-36,"y":54},"dir":"East"}}},"33838622-f03e-415f-9588-e7f9e644727e":{"BinaryUI":{"from":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3229,"y":4288,"offset":{"x":-18,"y":70},"dir":"South"},"to":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3311,"y":4288,"offset":{"x":7,"y":41},"dir":"South"}}},"54994661-e099-453c-904f-c09cc0fa0bfa":{"BinaryUI":{"from":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3129,"y":4258,"offset":{"x":-75,"y":30},"dir":"West"},"to":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2961,"y":4259,"offset":{"x":11,"y":-27},"dir":"East"}}},"0cde3a3b-6678-42ac-8fa4-8ab02acb3dea":{"BinaryUI":{"from":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2784,"y":4148,"offset":{"x":-112,"y":-44},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3037,"y":3250,"offset":{"x":-99,"y":-45},"dir":"South"}}},"688ec08e-9fd6-4a2f-bcd5-5ea94e946d1b":{"IsaUI":{"from":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2814,"y":4286,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"01c8907d-cb59-4fae-a3ca-8cb331d18387","x":3171,"y":4460,"offset":{"x":20,"y":20},"dir":"West"},{"id":"75a16785-d611-45ce-b52c-284a9da0b4b8","x":2568,"y":4492,"offset":{"x":20,"y":20},"dir":"North"},{"id":"79069fc2-4d65-4073-b610-4afc0488de5c","x":2737,"y":4688,"offset":{"x":20,"y":20},"dir":"North"},{"id":"470246f6-91ec-4993-b915-93480d0f4eb9","x":3132,"y":4641,"offset":{"x":20,"y":20},"dir":"North"}]}},"e0a24038-1c85-4d6f-afbc-5c034062a557":{"BinaryUI":{"from":{"id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f","x":4300,"y":3166,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3148,"offset":{"x":20,"y":20},"dir":"East"}}},"96737350-249d-4701-9b47-0f56bf8bfc7f":{"BinaryUI":{"from":{"id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","x":3856,"y":3636,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3247,"offset":{"x":20,"y":20},"dir":"East"}}},"9fd61528-8e0f-40d0-b1bb-53b468851d30":{"BinaryUI":{"from":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","x":2949,"y":2795,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2795,"offset":{"x":20,"y":20},"dir":"West"}}},"95fcc898-ef24-4ec4-8409-798a6623713e":{"BinaryUI":{"from":{"id":"cdb1afaf-245c-4d56-bfea-10f69e45007d","x":2418,"y":1601,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2674,"y":2461,"offset":{"x":20,"y":20},"dir":"North"}}},"de725e45-a751-4f4b-8c44-6c79671c70eb":{"BinaryUI":{"from":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3191,"y":4149,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3101,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"39f2d2c1-abf2-4f3e-a4f1-58a477b12f9e":{"BinaryUI":{"from":{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","x":3956,"y":4181,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3247,"offset":{"x":20,"y":20},"dir":"East"}}},"81d77ddd-6aae-4023-8467-2f5705d5e633":{"BinaryUI":{"from":{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","x":3861,"y":3935,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"31deb355-b737-43a6-ae88-199bb51f940d","x":3776,"y":3193,"offset":{"x":20,"y":20},"dir":"East"}}},"c45955d9-c799-4d61-8bc6-6335bde326b8":{"BinaryUI":{"from":{"id":"c89e362d-7905-4226-8713-97d3d6f05037","x":4694,"y":2396,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","x":2859,"y":2411,"offset":{"x":20,"y":20},"dir":"South"}}},"bc8075e9-e5ba-4a26-b696-7cf2651997ba":{"BinaryUI":{"from":{"id":"b359d531-77ae-436f-9f0d-6a5632f1648e","x":4332,"y":3264,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3147,"offset":{"x":20,"y":20},"dir":"East"}}},"6f636d63-667a-40ad-b554-a301a62ddebd":{"BinaryUI":{"from":{"id":"45644594-b418-5362-9294-a62fe2a0fa8e","x":3780,"y":1923,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","x":3778,"y":1725,"offset":{"x":20,"y":20},"dir":"South"}}},"f564f775-febe-442e-a0f1-492a2265e991":{"BinaryUI":{"from":{"id":"72443b79-5645-4b5f-b317-e1a8f815b81c","x":3211,"y":2796,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3209,"y":3115,"offset":{"x":20,"y":20},"dir":"North"}}},"0e780acf-9221-4e84-9377-64d31e653187":{"BinaryUI":{"from":{"id":"72443b79-5645-4b5f-b317-e1a8f815b81c","x":3373,"y":2762,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2763,"offset":{"x":20,"y":20},"dir":"West"}}},"fc2e5c67-6c98-4bfd-93a7-711fa2ae573f":{"BinaryUI":{"from":{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","x":3473,"y":2957,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3115,"offset":{"x":20,"y":20},"dir":"East"}}},"ba437581-658a-497d-9790-ab79ad56cd4f":{"BinaryUI":{"from":{"id":"93f288e7-d670-40a6-91f3-2006b5efa8b4","x":2726,"y":3913,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"cdd19ddf-67e5-4e9b-9958-0745e8f9729e":{"BinaryUI":{"from":{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","x":3617,"y":2895,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2809,"offset":{"x":20,"y":20},"dir":"West"}}},"c8d05983-b88d-40da-bf31-83d2d8b8c574":{"IsaUI":{"from":{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","x":2389,"y":3395,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"9c8bc563-b596-4348-9189-065d747f7c9f","x":2143,"y":3807,"offset":{"x":20,"y":20},"dir":"East"},{"id":"c46e6b80-0365-429a-abf9-ca75ce4f469a","x":2131,"y":3176,"offset":{"x":20,"y":20},"dir":"East"},{"id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1","x":1449,"y":3562,"offset":{"x":20,"y":20},"dir":"East"}]}},"c6ed5fc4-f04a-45e0-afc3-6f421b81fea7":{"IsaUI":{"from":{"id":"9c8bc563-b596-4348-9189-065d747f7c9f","x":1949,"y":3817,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523","x":1793,"y":3741,"offset":{"x":20,"y":20},"dir":"East"},{"id":"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e","x":1790,"y":3879,"offset":{"x":20,"y":20},"dir":"East"},{"id":"c47b8696-7e98-4733-ab33-a4dca7b61d01","x":1795,"y":3607,"offset":{"x":20,"y":20},"dir":"East"},{"id":"6767c0cf-4041-4047-b2b4-d7375f33bc97","x":1788,"y":4014,"offset":{"x":20,"y":20},"dir":"East"},{"id":"35b3de4e-46b8-490f-8e30-c305ed348a78","x":1787,"y":4161,"offset":{"x":20,"y":20},"dir":"East"},{"id":"222307c0-668c-43f9-9368-34cc048f0ae3","x":1554,"y":3816,"offset":{"x":20,"y":20},"dir":"East"}]}},"27350475-a322-4ede-a4b2-eb88a3c847f5":{"IsaUI":{"from":{"id":"c46e6b80-0365-429a-abf9-ca75ce4f469a","x":1935,"y":3182,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"484e429b-bf54-45cb-9b87-baddf7fb5f5b","x":1750,"y":3183,"offset":{"x":20,"y":20},"dir":"East"},{"id":"d8b554d4-03ac-4613-a3e0-fc0b901bfd70","x":1746,"y":3314,"offset":{"x":20,"y":20},"dir":"East"},{"id":"0edc535b-405d-4dd5-bcd2-f5772ab116c2","x":1746,"y":3447,"offset":{"x":20,"y":20},"dir":"East"},{"id":"ce73a111-4670-411e-9bd2-f3308d6399c9","x":1752,"y":3048,"offset":{"x":20,"y":20},"dir":"East"},{"id":"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a","x":1750,"y":2920,"offset":{"x":20,"y":20},"dir":"East"},{"id":"84f1c5fd-d907-4653-a132-bfd420ad9212","x":1749,"y":2772,"offset":{"x":20,"y":20},"dir":"East"}]}},"513c99bc-140c-44c2-b605-0d377805ac43":{"BinaryUI":{"from":{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","x":2544,"y":3341,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"55ae9c5d-bcdb-4c29-8f06-cc9f596662d5":{"BinaryUI":{"from":{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","x":2439,"y":3341,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"23c220df-e5a3-44dc-b521-d29378c6a5e0":{"BinaryUI":{"from":{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","x":3617,"y":2920,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2852,"offset":{"x":20,"y":20},"dir":"West"}}},"71251371-81c5-4f25-8141-fef1e23e12fe":{"BinaryUI":{"from":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2440,"y":3876,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2442,"y":3804,"offset":{"x":20,"y":20},"dir":"East"}}},"761a6c93-ae0b-4508-9437-d68d0b2c1f22":{"BinaryUI":{"from":{"id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9","x":2416,"y":3584,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2374,"y":3777,"offset":{"x":20,"y":20},"dir":"North"}}},"8398d7d3-d42f-4ca6-89d3-7a563eb50131":{"BinaryUI":{"from":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2440,"y":3777,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3018,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"124d7dea-f1d6-477f-a096-42e92dd297c2":{"BinaryUI":{"from":{"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","x":3196,"y":3635,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3196,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"07097b52-f614-461b-9d4c-62ba7177a383":{"BinaryUI":{"from":{"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","x":3231,"y":3635,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3230,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"5e20da11-448d-41a5-8b92-7dd75d64ad3d":{"BinaryUI":{"from":{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","x":2279,"y":4193,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3070,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"10e2f3e9-2995-47e0-9456-ed375eb610b7":{"BinaryUI":{"from":{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","x":2190,"y":4193,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"d64c3d2d-51d9-4586-b8e7-0b23aea46f49":{"IsaUI":{"from":{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","x":2232,"y":4313,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"70932b40-f444-4341-bb19-0a29d1daecbe","x":2201,"y":4436,"offset":{"x":20,"y":20},"dir":"North"},{"id":"32dbb54a-9693-4847-9278-7c956ea045f8","x":2371,"y":4434,"offset":{"x":20,"y":20},"dir":"North"},{"id":"122e4157-381f-400f-ac30-a1c8a2a9e8c1","x":2054,"y":4434,"offset":{"x":20,"y":20},"dir":"North"},{"id":"17db2afc-ae6c-4e53-a527-48516811fe3e","x":1902,"y":4435,"offset":{"x":20,"y":20},"dir":"North"},{"id":"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd","x":1752,"y":4435,"offset":{"x":20,"y":20},"dir":"North"}]}},"497076d2-1625-446b-b663-d75f5c2e2a3c":{"BinaryUI":{"from":{"id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de","x":2608,"y":4207,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3147,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"f42505df-9843-4914-97bc-c665dfbc2dcc":{"BinaryUI":{"from":{"id":"79571896-9798-44a3-acef-5aa2d9773b93","x":2964,"y":2085,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2920,"y":2532,"offset":{"x":20,"y":20},"dir":"East"}}},"dfa0880b-de0a-4d0f-9f42-7ed496af35ea":{"BinaryUI":{"from":{"id":"79571896-9798-44a3-acef-5aa2d9773b93","x":2991,"y":2085,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","x":2949,"y":2850,"offset":{"x":20,"y":20},"dir":"East"}}},"7fb6cd7d-16c0-43bc-9e29-f645c644afe1":{"BinaryUI":{"from":{"id":"79571896-9798-44a3-acef-5aa2d9773b93","x":3088,"y":2016,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","x":3673,"y":1656,"offset":{"x":20,"y":20},"dir":"West"}}},"f72fcd31-7056-4425-b0ce-7734a759e616":{"BinaryUI":{"from":{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","x":3645,"y":4149,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3407,"y":2410,"offset":{"x":20,"y":20},"dir":"East"}}},"b197d992-e4d6-4663-a6da-b46906374684":{"IsaUI":{"from":{"id":"bf69c9af-f268-4c9b-8e67-4497eb490478","x":3779,"y":2537,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","x":3379,"y":2594,"offset":{"x":20,"y":20},"dir":"South"},{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4273,"y":2580,"offset":{"x":20,"y":20},"dir":"South"},{"id":"7eaea922-8807-4c38-a704-0143e0594664","x":4544,"y":1827,"offset":{"x":20,"y":20},"dir":"South"}]}},"7022f5ed-020f-453f-bcab-8e632ca03b6e":{"BinaryUI":{"from":{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","x":3575,"y":4149,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"bf69c9af-f268-4c9b-8e67-4497eb490478","x":3725,"y":2537,"offset":{"x":20,"y":20},"dir":"South"}}},"1ec425ff-8b5a-49bf-87cb-9863defb9320":{"BinaryUI":{"from":{"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","x":2457,"y":2914,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3128,"offset":{"x":20,"y":20},"dir":"West"}}},"99d07c03-f3ce-42d7-bb64-8bde65c79dd6":{"BinaryUI":{"from":{"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","x":2510,"y":2803,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2584,"offset":{"x":20,"y":20},"dir":"West"}}},"3088e0b8-de0a-45d2-95fb-e8804c9c03fa":{"BinaryUI":{"from":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":4029,"y":2866,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":4029,"y":2997,"offset":{"x":20,"y":20},"dir":"North"}}},"a640575d-a105-4ad5-b786-6e7fb55a0b94":{"IsaUI":{"from":{"id":"222307c0-668c-43f9-9368-34cc048f0ae3","x":1359,"y":3810,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"6187076b-e765-4e6b-af28-f577eba40b5e","x":1226,"y":3784,"offset":{"x":20,"y":20},"dir":"East"},{"id":"41b7bda7-f5a2-4c94-af22-fedbe8d6f287","x":1227,"y":3906,"offset":{"x":20,"y":20},"dir":"East"}]}},"d32059a8-46ed-4ceb-9b92-5f661b98f4e6":{"IsaUI":{"from":{"id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1","x":1273,"y":3540,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"80f73c4e-caf1-4e1f-a634-00965f6ad032","x":1112,"y":3455,"offset":{"x":20,"y":20},"dir":"East"},{"id":"0ad229c4-1782-4783-b64e-0d15fe482463","x":1113,"y":3597,"offset":{"x":20,"y":20},"dir":"East"}]}},"cfe90847-d888-4245-bb66-901855bb0051":{"BinaryUI":{"from":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3861,"y":2655,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"c4723d6d-1584-49bd-80f1-4c700185746e","x":4645,"y":2569,"offset":{"x":20,"y":20},"dir":"South"}}},"45c4a4f5-e54b-45d2-bea6-617723a92b70":{"BinaryUI":{"from":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3594,"y":2677,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2913,"y":2587,"offset":{"x":20,"y":20},"dir":"South"}}},"14f71b3f-b918-4376-8e75-7333e85ca536":{"BinaryUI":{"from":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2029,"y":2995,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2029,"y":3059,"offset":{"x":20,"y":20},"dir":"West"}}},"8d8db4b1-8c90-472b-bc98-88fa6a2188d1":{"BinaryUI":{"from":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2284,"y":3042,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3661,"y":2720,"offset":{"x":20,"y":20},"dir":"South"}}},"44ad55c5-bb62-4864-90e7-e992494786aa":{"BinaryUI":{"from":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2261,"y":2973,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2682,"y":2587,"offset":{"x":20,"y":20},"dir":"South"}}},"c3dba39c-fe1e-49e0-9a45-8f872b6aa4c5":{"BinaryUI":{"from":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2289,"y":2733,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2565,"offset":{"x":20,"y":20},"dir":"West"}}},"f1c15ada-631b-4249-8c73-4e52391a532f":{"BinaryUI":{"from":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3162,"y":2337,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","x":2899,"y":2336,"offset":{"x":20,"y":20},"dir":"East"}}},"a5ac6af9-3cef-49e5-8d01-462817e1d641":{"IsaUI":{"from":{"id":"c4723d6d-1584-49bd-80f1-4c700185746e","x":4708,"y":2569,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"7794ada6-49c3-4bf0-991f-828c6583ebb8","x":4910,"y":2694,"offset":{"x":20,"y":20},"dir":"North"},{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":4047,"y":2738,"offset":{"x":20,"y":20},"dir":"North"}]}},"868b4a28-0d2f-4d78-b947-66f44c3bdaf9":{"BinaryUI":{"from":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2961,"y":4187,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3129,"y":4188,"offset":{"x":20,"y":20},"dir":"West"}}},"ca33902a-c6f2-45a5-9273-cf80a579cedd":{"BinaryUI":{"from":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4151,"y":2533,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2277,"y":2660,"offset":{"x":20,"y":20},"dir":"North"}}},"d440f204-2694-4438-b618-721a9108070f":{"BinaryUI":{"from":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3728,"y":2269,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","x":2418,"y":1431,"offset":{"x":20,"y":20},"dir":"East"}}},"69b40bff-5f3d-44ef-8c68-57ff9e033e7b":{"BinaryUI":{"from":{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4081,"y":1990,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3941,"y":2301,"offset":{"x":20,"y":20},"dir":"East"}}},"18c4566d-a7b7-4b1d-8e0b-470fddbaab9b":{"BinaryUI":{"from":{"id":"c8fcd612-6ca8-469a-824c-de218e4fd075","x":4738,"y":1620,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2920,"y":2473,"offset":{"x":20,"y":20},"dir":"East"}}},"33b9b943-0d44-4490-b20a-35c110ae9473":{"IsaUI":{"from":{"id":"7eaea922-8807-4c38-a704-0143e0594664","x":4549,"y":1722,"offset":{"x":20,"y":20},"dir":"North"},"to":[{"id":"4b6c7fde-0878-4947-b960-bc73a4558c60","x":4302,"y":1619,"offset":{"x":20,"y":20},"dir":"South"},{"id":"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2","x":4518,"y":1618,"offset":{"x":20,"y":20},"dir":"South"},{"id":"c8fcd612-6ca8-469a-824c-de218e4fd075","x":4694,"y":1620,"offset":{"x":20,"y":20},"dir":"South"}]}},"4ce09575-5a2c-40c5-b766-bb12ef0c1600":{"BinaryUI":{"from":{"id":"7eaea922-8807-4c38-a704-0143e0594664","x":4599,"y":1827,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4429,"y":1987,"offset":{"x":20,"y":20},"dir":"East"}}},"193d881e-9afd-4b9e-a431-cdb113a7ee88":{"BinaryUI":{"from":{"id":"52143d28-8474-44bc-b63f-e654150888d3","x":2860,"y":3152,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3152,"offset":{"x":20,"y":20},"dir":"West"}}},"badf3d57-aba3-4757-b0e4-9d0e7b55f2ea":{"AssociativeUI":{"from":{"x":3100,"y":3208},"middle":{"id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","x":2933,"y":3296,"offset":{"x":0,"y":0},"dir":"North"},"one":{"id":"52143d28-8474-44bc-b63f-e654150888d3","x":2860,"y":3206,"offset":{"x":-160,"y":50},"dir":"East"},"other":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3207,"offset":{"x":20,"y":20},"dir":"West"}}},"08512716-f1d3-4a88-bd38-aea9ae0f9ca7":{"BinaryUI":{"from":{"id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","x":2874,"y":3296,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3231,"offset":{"x":20,"y":20},"dir":"West"}}},"0ed07f33-0bbb-497d-9823-9247fc520e85":{"BinaryUI":{"from":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":4107,"y":2835,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":4107,"y":2757,"offset":{"x":20,"y":20},"dir":"East"}}},"cea29749-dc0f-40c0-adf9-4c21b187751e":{"IsaUI":{"from":{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","x":3995,"y":4317,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7","x":3864,"y":4431,"offset":{"x":20,"y":20},"dir":"North"},{"id":"910e3a08-5e99-47a5-bde4-3e35cf9f00da","x":4143,"y":4431,"offset":{"x":20,"y":20},"dir":"North"}]}},"599c1454-9525-4386-b50f-4fdee4b08373":{"IsaUI":{"from":{"id":"31deb355-b737-43a6-ae88-199bb51f940d","x":3692,"y":3110,"offset":{"x":20,"y":20},"dir":"North"},"to":[{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3407,"y":2355,"offset":{"x":20,"y":20},"dir":"East"},{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4275,"y":2032,"offset":{"x":20,"y":20},"dir":"South"}]}},"9f2917c8-b17b-4ab2-8c6e-0269a0b80681":{"BinaryUI":{"from":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","x":3718,"y":3753,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","x":3718,"y":3822,"offset":{"x":20,"y":20},"dir":"East"}}},"3c241319-416a-4195-ae80-fa4439198c1c":{"BinaryUI":{"from":{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","x":3861,"y":3977,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","x":3722,"y":3978,"offset":{"x":20,"y":20},"dir":"East"}}},"12003437-2898-4b1d-ba27-b1cc69d8dbb2":{"BinaryUI":{"from":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","x":3651,"y":3842,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","x":3651,"y":3922,"offset":{"x":20,"y":20},"dir":"North"}}},"940f5aba-58f5-46fa-bbba-43fc6b10a3fe":{"BinaryUI":{"from":{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","x":3565,"y":3922,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","x":3565,"y":3842,"offset":{"x":20,"y":20},"dir":"South"}}},"42c18b66-d259-40d1-a77d-0c0e76080a6d":{"BinaryUI":{"from":{"id":"4856978f-20be-4b59-8bf6-b941091119a9","x":3160,"y":2974,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3159,"y":3115,"offset":{"x":20,"y":20},"dir":"North"}}},"04ae2e8d-c499-4068-88bd-015b0bba57bf":{"BinaryUI":{"from":{"id":"dbada891-ca0d-4fbc-8371-9f9234867bd6","x":2304,"y":2366,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2526,"offset":{"x":20,"y":20},"dir":"West"}}},"7e2c2118-fb6c-4ac4-9676-e7427cd495c2":{"BinaryUI":{"from":{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","x":2350,"y":2540,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","x":2241,"y":2540,"offset":{"x":20,"y":20},"dir":"South"}}},"b21bc0c0-fab4-42f8-ae6c-eb6ab8f5968a":{"BinaryUI":{"from":{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","x":2413,"y":2502,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2547,"offset":{"x":20,"y":20},"dir":"West"}}},"e4734a39-1f45-400f-937a-285e2fad31a4":{"BinaryUI":{"from":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","x":3331,"y":2157,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3331,"y":2270,"offset":{"x":20,"y":20},"dir":"North"}}},"da1d6545-b9d6-499e-9175-fd2a340b1f2e":{"BinaryUI":{"from":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","x":3203,"y":2031,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","x":3320,"y":2031,"offset":{"x":20,"y":20},"dir":"North"}}},"c8a4b21a-62c3-4fbd-8799-2b55d93d951c":{"BinaryUI":{"from":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3218,"y":2270,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","x":3217,"y":2157,"offset":{"x":20,"y":20},"dir":"South"}}}}}}},"objects":{"ids":["b8ec6afc-ddbd-53d6-9be3-e4b738941c2f","7178e7a4-5131-504b-a7b3-c2c0cfedf343","45644594-b418-5362-9294-a62fe2a0fa8e","2e277e34-ab6f-4028-9c52-935c31520fec","e68f8912-9897-4cbd-b363-cb4203a726a9","141350e6-b62d-4a6d-9ea2-47333e51e3ea","88687f76-5d9e-404e-a801-f6f57f9b30ca","d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","c89e362d-7905-4226-8713-97d3d6f05037","94fc0044-4b88-4f5c-ac60-3a44262ade10","f192b162-8ada-4128-8805-1953e9165c54","954b354f-3a90-440b-ab0f-43efc00d275e","0365b40c-c40a-4653-84ab-44d1c12d294f","9352c766-9f6b-413b-9ea0-13f9c8e4d86e","30c31621-a4bd-4356-80b9-1226e00651c9","6c7969f3-f150-4975-a989-a7bc8164b168","c32fcb6d-b505-492f-95c8-5f118079a399","59f269ab-2dbc-4b07-b9bc-48441f20e78f","b359d531-77ae-436f-9f0d-6a5632f1648e","ce2da156-e0fd-4e56-bb31-2030d4e0c599","dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","a8b86e41-5b04-4469-8a10-91bd89603e27","d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","dc6d1ffa-5dca-43ef-b973-0628ab580cb7","a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d","b1612607-a813-4bc2-896b-88ec4b249447","d30d2b03-732b-41bb-89ed-d053750bf987","fa42f4e2-1ff3-473f-a4b9-593c01134e96","d715c5f9-23f8-45e0-a1df-34e27acd01f5","43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b","6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","d546feef-91df-49ea-ac61-430bdcf9832c","3874760d-0104-4670-ba8b-1af413c5ec4a","1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","846aa191-7b0c-4325-8c21-09fa5edf7c78","26dba2c5-a7e9-4556-a9c2-79091a97b941","75a16785-d611-45ce-b52c-284a9da0b4b8","01c8907d-cb59-4fae-a3ca-8cb331d18387","79069fc2-4d65-4073-b610-4afc0488de5c","23a9a479-68e7-4a70-bcef-9041f10fd287","3a1c7f6a-459d-4eba-9291-2aebb9bf60c9","a9b74602-bdc5-481f-af4c-8021553b895a","cdb1afaf-245c-4d56-bfea-10f69e45007d","b7483723-222d-4f08-b7b9-e8b14f0308cf","97f815f0-dcc4-4bd3-843d-13ff1dc5802c","72443b79-5645-4b5f-b317-e1a8f815b81c","93f288e7-d670-40a6-91f3-2006b5efa8b4","e1321ffa-07d5-480d-89f9-227b13d27ce1","3f7fd816-518b-4b9e-8134-3059e78045a0","c46e6b80-0365-429a-abf9-ca75ce4f469a","9c8bc563-b596-4348-9189-065d747f7c9f","1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523","e3329a9e-1c52-44f6-a1f7-fc85f7362e9e","484e429b-bf54-45cb-9b87-baddf7fb5f5b","c47b8696-7e98-4733-ab33-a4dca7b61d01","e05ab5f3-17e7-4594-8ce0-c02d793a1df9","ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","4d5720eb-da8c-493d-ab8d-cb6111dd6099","6767c0cf-4041-4047-b2b4-d7375f33bc97","35b3de4e-46b8-490f-8e30-c305ed348a78","d8b554d4-03ac-4613-a3e0-fc0b901bfd70","0edc535b-405d-4dd5-bcd2-f5772ab116c2","0b3e9de0-d139-4934-a043-d1913a24de0c","70932b40-f444-4341-bb19-0a29d1daecbe","32dbb54a-9693-4847-9278-7c956ea045f8","0dc0e921-e7ff-4766-9738-e6e312f7f0de","122e4157-381f-400f-ac30-a1c8a2a9e8c1","17db2afc-ae6c-4e53-a527-48516811fe3e","30abb231-4248-4ffa-9a69-e0eb6bb9dbbd","ba8a3bbf-86a8-47e2-92bb-f41878981c41","79571896-9798-44a3-acef-5aa2d9773b93","5c85a8db-e4cc-4e38-9922-58d93773f4f0","bf69c9af-f268-4c9b-8e67-4497eb490478","ce73a111-4670-411e-9bd2-f3308d6399c9","1e7a66b2-f559-4c21-b8e6-969999ed171d","80f73c4e-caf1-4e1f-a634-00965f6ad032","222307c0-668c-43f9-9368-34cc048f0ae3","6187076b-e765-4e6b-af28-f577eba40b5e","f7fc16ac-6a23-4f5d-a04c-1163617701c1","0ad229c4-1782-4783-b64e-0d15fe482463","b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a","470246f6-91ec-4993-b915-93480d0f4eb9","f6a3ce12-18e1-4675-ab94-6b2a7c91d951","41b7bda7-f5a2-4c94-af22-fedbe8d6f287","84f1c5fd-d907-4653-a132-bfd420ad9212","efde0481-1599-4c5c-bf30-51dbd4a8ed83","95e17479-07a5-41b1-9930-1b9b520514f6","8d86dceb-7e6e-4767-8a3f-cbbde458ad93","68e7191a-fe94-423f-8a5d-5551384ae998","c4723d6d-1584-49bd-80f1-4c700185746e","7794ada6-49c3-4bf0-991f-828c6583ebb8","d48d948b-5291-4eb3-ba35-7ab1c1ffa098","7eaea922-8807-4c38-a704-0143e0594664","4b6c7fde-0878-4947-b960-bc73a4558c60","e6fbeeb8-6ade-46a2-bb52-9c99d06918b2","c8fcd612-6ca8-469a-824c-de218e4fd075","968ea4f4-0a3b-44d4-a266-16facf7d325f","52143d28-8474-44bc-b63f-e654150888d3","ab7a5708-6d12-4dce-b488-fa3a3b480510","6094aad5-613b-42b6-8f48-c3b9e2161aa9","6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7","910e3a08-5e99-47a5-bde4-3e35cf9f00da","31deb355-b737-43a6-ae88-199bb51f940d","39060ea9-5d45-4954-a29f-ba88e01e7217","4856978f-20be-4b59-8bf6-b941091119a9","dbada891-ca0d-4fbc-8371-9f9234867bd6","290f49d3-8ce7-408e-be14-611b66db9687"],"entities":{"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f":{"id":"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f","key_letter":"T","name":"Type","description":"The type of a value\n\nThere are several values available: [Integer], [Boolean], [Float], [String], and [UUID].\n\n# Object imported from the sarzak Domain.\n\nWe don’t have a means of representing this as imported in Cuckoo, so I’m just adding it here.\n\n🐶 { \"imported_object\": { \"domain\": \"crate::v2::sarzak\", \"model_file\": \"models/sarzak.json\", \"id\": \"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f\"}}\n","attributes":{"52783e59-f28c-5a8b-8947-12d60c2d49d0":{"id":"52783e59-f28c-5a8b-8947-12d60c2d49d0","name":"id","type":"Uuid"}}},"7178e7a4-5131-504b-a7b3-c2c0cfedf343":{"id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","key_letter":"OBJ","name":"Object","description":"An `Object` is a collection of related data. By creating `Object`s, and \nconnecting them with `Relationships` we build a powerful abstraction.\n\n`Object`s contain [Attribute]s that represent the data that the \n`Object`encapsulates. All `Object`s have an attribute called `id`, which \nis a unique idenifier for each class of `Object`. The `id` attribute is a\nversion 5 UUID.\n\n# Object imported from the sarzak Domain.\n\nWe don’t have a means of representing this as imported in Cuckoo, so I’m just adding it here.\n\n🐶 { \"imported_object\": { \"domain\": \"crate::v2::sarzak\", \"model_file\": \"models/sarzak.json\", \"id\": \"7178e7a4-5131-504b-a7b3-c2c0cfedf343\"}}","attributes":{"a37b26e0-49fb-5be8-95a8-fb563ab81cc4":{"id":"a37b26e0-49fb-5be8-95a8-fb563ab81cc4","name":"id","type":"Uuid"},"d01da69e-bf98-5825-a9f6-9ce0405417f1":{"id":"d01da69e-bf98-5825-a9f6-9ce0405417f1","name":"name","type":"String"},"a24410b8-5736-5216-b4ca-a4a7c70eb388":{"id":"a24410b8-5736-5216-b4ca-a4a7c70eb388","name":"key letters","type":"String"},"75f8f112-c966-5cbf-aebe-b377b488905b":{"id":"75f8f112-c966-5cbf-aebe-b377b488905b","name":"description","type":"String"}}},"45644594-b418-5362-9294-a62fe2a0fa8e":{"id":"45644594-b418-5362-9294-a62fe2a0fa8e","key_letter":"I","name":"Item","description":"","attributes":{"045ccee5-86de-4081-8d64-613e2e38a993":{"id":"045ccee5-86de-4081-8d64-613e2e38a993","name":"id","type":"Uuid"}}},"2e277e34-ab6f-4028-9c52-935c31520fec":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","key_letter":"TYP","name":"Value Type","description":"Value Type\n\nThis is the main type abstraction used in Lu Dog. We mostly rely on what is available in Sarzak, with two additions: ...\n\nTwo? I know that I need an Option<>. I'm not so sure about a & though. Everything from the store is going to be by UUID, so all of my references are really \"pointers\" underneath. I want them to be typed in the code though.\n\nSo how will the code work? We could store the type next to the pointer: (type, uuid). Huh. This is the eventual output domain. How does that affect my thinking?\n\nThis should end up looking like woog, but simpler. Woog was for generating rust. I want to generate dwarf. Dwarf needs to be typed? If so, when are they resolved to uuid's eventually? \n\nOption for now. We'll see later...","attributes":{"2b4f587e-1528-5813-b970-9560d145f091":{"id":"2b4f587e-1528-5813-b970-9560d145f091","name":"id","type":"Uuid"}}},"e68f8912-9897-4cbd-b363-cb4203a726a9":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","key_letter":"ST","name":"Struct","description":"A Type from the Model\n\nThis is really just an alias for `[Object]`.","attributes":{"e12db790-b02b-500e-9a6f-742378146a45":{"id":"e12db790-b02b-500e-9a6f-742378146a45","name":"id","type":"Uuid"},"3dde88a1-93c8-413d-b335-66a1f5f755f3":{"id":"3dde88a1-93c8-413d-b335-66a1f5f755f3","name":"name","type":"String"}}},"141350e6-b62d-4a6d-9ea2-47333e51e3ea":{"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","key_letter":"F","name":"Field","description":"A Field in a data structure\n\nA field has a name, and a type.","attributes":{"add99bda-d83f-558e-b54e-6373a658d0b6":{"id":"add99bda-d83f-558e-b54e-6373a658d0b6","name":"id","type":"Uuid"},"3f2dcff1-5f2e-4279-8d54-537cbb477874":{"id":"3f2dcff1-5f2e-4279-8d54-537cbb477874","name":"name","type":"String"}}},"88687f76-5d9e-404e-a801-f6f57f9b30ca":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","key_letter":"IMPL","name":"Implementation Block","description":"An Implementation Block\n\nInside this block functions are defined on a [`ModellType`].","attributes":{"69046536-f9f1-4c70-99c8-bf778c90cdea":{"id":"69046536-f9f1-4c70-99c8-bf778c90cdea","name":"id","type":"Uuid"}}},"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","key_letter":"FUNC","name":"Function","description":"A Function\n\nInputs, outputs. Stuff happens.","attributes":{"fda10b16-e061-4547-9ef1-0ab085270b88":{"id":"fda10b16-e061-4547-9ef1-0ab085270b88","name":"id","type":"Uuid"},"96a8868d-e8e7-4788-a81e-cc4b1210c85b":{"id":"96a8868d-e8e7-4788-a81e-cc4b1210c85b","name":"name","type":"String"}}},"c89e362d-7905-4226-8713-97d3d6f05037":{"id":"c89e362d-7905-4226-8713-97d3d6f05037","key_letter":"IMP","name":"Import","description":"An Import of a foreign ObjectStore\n\nThis indicates to the downstream model compiler that it needs to emit code to load the imported ObjectStore.\n\nI've got this has_alias boolean here because I don't have `Option`. I never needed it until now, because you get an option with a 1c relationship. Not proud of this, but it's the best alternative. Makes me wonder about adding an `Option` type to the primitives though.\n\nI suppose if there were a way to signify a null string. Or I could check if it's length is 0. I think adding the bool is cleaner.","attributes":{"8f8af328-cd2f-435d-8d29-b7bce353a0c7":{"id":"8f8af328-cd2f-435d-8d29-b7bce353a0c7","name":"id","type":"Uuid"},"7e6b9c84-ae9e-46d6-a5d6-5899e57c4687":{"id":"7e6b9c84-ae9e-46d6-a5d6-5899e57c4687","name":"path","type":"String"},"e1f19a18-4287-42b2-b767-5dc9cca24d6b":{"id":"e1f19a18-4287-42b2-b767-5dc9cca24d6b","name":"alias","type":"String"},"f5a8a036-bc55-44c0-8ae6-f03267b19032":{"id":"f5a8a036-bc55-44c0-8ae6-f03267b19032","name":"name","type":"String"},"002b29e8-97cc-4b8a-a339-db79f2306729":{"id":"002b29e8-97cc-4b8a-a339-db79f2306729","name":"has_alias","type":"Boolean"}}},"94fc0044-4b88-4f5c-ac60-3a44262ade10":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","key_letter":"VAL","name":"Value","description":"A Value\n\nA value has a Type.","attributes":{"87e26364-f525-4e59-8db0-eea6c972e140":{"id":"87e26364-f525-4e59-8db0-eea6c972e140","name":"id","type":"Uuid"}}},"f192b162-8ada-4128-8805-1953e9165c54":{"id":"f192b162-8ada-4128-8805-1953e9165c54","key_letter":"PARAM","name":"Parameter","description":"A Parameter to a Function\n\nFrom inside the function it's a parameter, from outside it's an argument. No idea why I wrote that — just looking for content... I mean, what else do you say about a parameter?","attributes":{"8ecf5553-7599-46d0-a3fe-e6b70c64d31f":{"id":"8ecf5553-7599-46d0-a3fe-e6b70c64d31f","name":"id","type":"Uuid"},"fe25d7e5-24ba-4d7a-9fd9-1bfc00b7f484":{"id":"fe25d7e5-24ba-4d7a-9fd9-1bfc00b7f484","name":"position","type":"Integer"}}},"954b354f-3a90-440b-ab0f-43efc00d275e":{"id":"954b354f-3a90-440b-ab0f-43efc00d275e","key_letter":"VAR","name":"Variable","description":"A Variable\n\nA variable in a function. It may be either a local variable or a parameter.\n\nA variable has a name, and and indirectly, via [`Value`], a type.","attributes":{"911aac13-fab4-4060-9ced-a807bb398f20":{"id":"911aac13-fab4-4060-9ced-a807bb398f20","name":"id","type":"Uuid"},"0afbe372-cdd7-4956-b174-e7126efd5540":{"id":"0afbe372-cdd7-4956-b174-e7126efd5540","name":"name","type":"String"}}},"0365b40c-c40a-4653-84ab-44d1c12d294f":{"id":"0365b40c-c40a-4653-84ab-44d1c12d294f","key_letter":"L_VAR","name":"Local Variable","description":"A Local Variable in a Block\n\nNote that a variable is an \"l-value\", so it represents a specific memory location.","attributes":{"53cfecb3-d4b2-4cb9-969d-964f7fdfc93e":{"id":"53cfecb3-d4b2-4cb9-969d-964f7fdfc93e","name":"id","type":"Uuid"},"546f0286-9be0-41e9-ad65-82b9b711f545":{"id":"546f0286-9be0-41e9-ad65-82b9b711f545","name":"bug","type":"Uuid"}}},"9352c766-9f6b-413b-9ea0-13f9c8e4d86e":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","key_letter":"EXP","name":"Expression","description":"An Expression\n\nExpressions are calculations that render values.","attributes":{"22291a6d-f2ea-49e5-875a-c6fe1557a092":{"id":"22291a6d-f2ea-49e5-875a-c6fe1557a092","name":"id","type":"Uuid"}}},"30c31621-a4bd-4356-80b9-1226e00651c9":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","key_letter":"BLK_E","name":"Block","description":"A Block Expression\n\nA block expression is an expression that consists of an ordered set of statements, living between an opening `{`, and a closing `}`.\n\n Given that it's an expression it has a Type. The type is the value of the last expression in the block, if it's not closed by a `;`. If the last statement is termintat thusly, then the value is `[Empty]`, or `()`.\n\nThe `bug` attribute is there to force the compiler to generate code. Apparently there's some bug in grace that's causing this to be generated as a const. I don't want to get into it, and this is the most expedient solution.","attributes":{"09f1ef4c-abf2-4e66-8388-3769cd10f0c4":{"id":"09f1ef4c-abf2-4e66-8388-3769cd10f0c4","name":"id","type":"Uuid"},"097419c0-05f7-482a-b458-58b592bc08dd":{"id":"097419c0-05f7-482a-b458-58b592bc08dd","name":"bug","type":"Uuid"},"fa475d83-dbe2-4a4a-8cd1-fb3dd3a09cdd":{"id":"fa475d83-dbe2-4a4a-8cd1-fb3dd3a09cdd","name":"async","type":"Boolean"}}},"6c7969f3-f150-4975-a989-a7bc8164b168":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","key_letter":"STMT","name":"Statement","description":"A Statement\n\nA statement is followed by a semi-colon (`;`), and in general yields no value.","attributes":{"9e4082cd-4246-4195-acfc-b120db88105a":{"id":"9e4082cd-4246-4195-acfc-b120db88105a","name":"id","type":"Uuid"},"fe339014-0b8d-4035-b0db-582005b545a2":{"id":"fe339014-0b8d-4035-b0db-582005b545a2","name":"index","type":"Integer"}}},"c32fcb6d-b505-492f-95c8-5f118079a399":{"id":"c32fcb6d-b505-492f-95c8-5f118079a399","key_letter":"LET_S","name":"Let Statement","description":"A Let Statement\n\nThis statement assigns a value from an expression to a local variable.","attributes":{"c959c65f-ce9a-4202-a715-c377c2031978":{"id":"c959c65f-ce9a-4202-a715-c377c2031978","name":"id","type":"Uuid"}}},"59f269ab-2dbc-4b07-b9bc-48441f20e78f":{"id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f","key_letter":"EXP_S","name":"Expression Statement","description":"A statement that consists of just an expression.","attributes":{"27101b62-83cc-4fec-8101-f2fb46b892e0":{"id":"27101b62-83cc-4fec-8101-f2fb46b892e0","name":"id","type":"Uuid"}}},"b359d531-77ae-436f-9f0d-6a5632f1648e":{"id":"b359d531-77ae-436f-9f0d-6a5632f1648e","key_letter":"RES_S","name":"Result Statement","description":"An Expression Statement that is not terminated by a semi-colon, and this yields a result. This is only applicable if it's the last statement in a block.","attributes":{"1e15f699-4dba-4627-a945-385e01c2b11c":{"id":"1e15f699-4dba-4627-a945-385e01c2b11c","name":"id","type":"Uuid"}}},"ce2da156-e0fd-4e56-bb31-2030d4e0c599":{"id":"ce2da156-e0fd-4e56-bb31-2030d4e0c599","key_letter":"I_S","name":"Item Statement","description":"An Item in statement position, i.e., inside of a block.","attributes":{"69657761-9338-408a-925b-d1f5734e02ac":{"id":"69657761-9338-408a-925b-d1f5734e02ac","name":"id","type":"Uuid"}}},"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea":{"id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","key_letter":"LIT_E","name":"Literal","description":"A Literal Expression\n\nThis is any literal value in the program.","attributes":{"28768c3e-8742-4036-9a1f-738ef56d4f2d":{"id":"28768c3e-8742-4036-9a1f-738ef56d4f2d","name":"id","type":"Uuid"}}},"a8b86e41-5b04-4469-8a10-91bd89603e27":{"id":"a8b86e41-5b04-4469-8a10-91bd89603e27","key_letter":"EMPT","name":"Empty","description":"The Empty Type\n\nThis type represents the lack of a type. It's actually sort of a werid construct, because it also implies the lack of a value. How can you have a value without a type?","attributes":{"5c9d0df8-c2f6-4aa8-a7f5-2315da514875":{"id":"5c9d0df8-c2f6-4aa8-a7f5-2315da514875","name":"id","type":"Uuid"}}},"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5":{"id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","key_letter":"BOOL_L","name":"Boolean Literal","description":"A Boolean\n\nIt's either `true` or `false`.","attributes":{"292f8c3b-a23d-492e-898e-799b12a0b5ac":{"id":"292f8c3b-a23d-492e-898e-799b12a0b5ac","name":"id","type":"Uuid"}}},"dc6d1ffa-5dca-43ef-b973-0628ab580cb7":{"id":"dc6d1ffa-5dca-43ef-b973-0628ab580cb7","key_letter":"T","name":"True","description":"True Literal\n\nThe literal `true`.","attributes":{"1aae6108-6151-4d10-9bac-91829343583b":{"id":"1aae6108-6151-4d10-9bac-91829343583b","name":"id","type":"Uuid"}}},"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d":{"id":"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d","key_letter":"F","name":"False","description":"False Literal\n\nThe literal `false`.","attributes":{"e61ae5a6-9598-427e-b576-5d36514f256c":{"id":"e61ae5a6-9598-427e-b576-5d36514f256c","name":"id","type":"Uuid"}}},"b1612607-a813-4bc2-896b-88ec4b249447":{"id":"b1612607-a813-4bc2-896b-88ec4b249447","key_letter":"INT_L","name":"Integer Literal","description":"An Integer\n\nI'm not sure what to do about width. I think I coded it as an i64 in the parser.","attributes":{"d8c8238b-b9cc-49fa-873c-cbaf71f6818d":{"id":"d8c8238b-b9cc-49fa-873c-cbaf71f6818d","name":"id","type":"Uuid"},"f865700c-11cb-48a7-8b8b-a80d2a4623dc":{"id":"f865700c-11cb-48a7-8b8b-a80d2a4623dc","name":"value","type":"Integer"}}},"d30d2b03-732b-41bb-89ed-d053750bf987":{"id":"d30d2b03-732b-41bb-89ed-d053750bf987","key_letter":"STR_L","name":"String Literal","description":"A String\n\nA string is a set of characters enclosed in double quotes. Strings are unicode strings encoded as UTF-8.","attributes":{"42f30de8-2e80-4b48-87f0-e06f1e236111":{"id":"42f30de8-2e80-4b48-87f0-e06f1e236111","name":"id","type":"Uuid"},"9032c943-4f50-4f4a-b9a9-7c17a627ff2d":{"id":"9032c943-4f50-4f4a-b9a9-7c17a627ff2d","name":"value","type":"String"}}},"fa42f4e2-1ff3-473f-a4b9-593c01134e96":{"id":"fa42f4e2-1ff3-473f-a4b9-593c01134e96","key_letter":"FLOT_L","name":"Float Literal","description":"A Floating Point Literal\n\nNothing fancy. No scientific notation.","attributes":{"98c46fba-95d0-4f33-9dab-6b458b39f938":{"id":"98c46fba-95d0-4f33-9dab-6b458b39f938","name":"id","type":"Uuid"},"ba6a66eb-d746-442f-b047-e944973cef84":{"id":"ba6a66eb-d746-442f-b047-e944973cef84","name":"value","type":"Float"}}},"d715c5f9-23f8-45e0-a1df-34e27acd01f5":{"id":"d715c5f9-23f8-45e0-a1df-34e27acd01f5","key_letter":"VAR_E","name":"Variable Expression","description":"A Local Variable Expression\n\nThis is what happens when a variable is an r-value.","attributes":{"7e3b8999-393b-4406-b085-b1335345416a":{"id":"7e3b8999-393b-4406-b085-b1335345416a","name":"id","type":"Uuid"},"f5925078-646c-464a-b99e-f3ef8692c7e2":{"id":"f5925078-646c-464a-b99e-f3ef8692c7e2","name":"name","type":"String"}}},"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b":{"id":"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b","key_letter":"NULL","name":"Empty Expression","description":"","attributes":{"c690466c-77c7-449c-a5ae-b402f43c53b5":{"id":"c690466c-77c7-449c-a5ae-b402f43c53b5","name":"id","type":"Uuid"}}},"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656":{"id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","key_letter":"PRT_E","name":"Print","description":"A Print Expression?\n\nShold this be a statement?","attributes":{"ee8c61be-204d-493b-b2e9-23ecbca76524":{"id":"ee8c61be-204d-493b-b2e9-23ecbca76524","name":"id","type":"Uuid"}}},"d546feef-91df-49ea-ac61-430bdcf9832c":{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","key_letter":"ST_E","name":"Struct Expression","description":"A Structure Expression\n\nThis is how we create instances in dwarf.","attributes":{"90c445a8-05b7-4942-b0d2-13a7cb18545c":{"id":"90c445a8-05b7-4942-b0d2-13a7cb18545c","name":"id","type":"Uuid"},"37a5a17d-2f7a-4c62-8e8f-37d7a7ec0943":{"id":"37a5a17d-2f7a-4c62-8e8f-37d7a7ec0943","name":"bug","type":"Uuid"}}},"3874760d-0104-4670-ba8b-1af413c5ec4a":{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","key_letter":"FLD_E","name":"Field Expression","description":"A Struct Field Expression\n\nThis assigns a value to a field in a structure.","attributes":{"ae9d7826-eab6-4baa-b094-62565e236579":{"id":"ae9d7826-eab6-4baa-b094-62565e236579","name":"id","type":"Uuid"}}},"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7":{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","key_letter":"FLD_A_E","name":"Field Access","description":"A Struct Field Access\n\nThink dotted notation.","attributes":{"37c7e82a-3674-4c5b-a8b4-3ea5af629001":{"id":"37c7e82a-3674-4c5b-a8b4-3ea5af629001","name":"id","type":"Uuid"}}},"846aa191-7b0c-4325-8c21-09fa5edf7c78":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","key_letter":"ARG_E","name":"Argument","description":"An Argument to a Function Call","attributes":{"f2debbd6-734a-4b2d-9174-ed6bf6a944c6":{"id":"f2debbd6-734a-4b2d-9174-ed6bf6a944c6","name":"id","type":"Uuid"},"78bb4e04-b894-4690-983e-2fdd82a16aba":{"id":"78bb4e04-b894-4690-983e-2fdd82a16aba","name":"position","type":"Integer"}}},"26dba2c5-a7e9-4556-a9c2-79091a97b941":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","key_letter":"CALL_E","name":"Call","description":"A Call, of some sort\n","attributes":{"00200770-a013-4671-b572-3287d58c5eeb":{"id":"00200770-a013-4671-b572-3287d58c5eeb","name":"id","type":"Uuid"},"29b7b08d-838a-4dbc-b6bd-0e7a1bd5462c":{"id":"29b7b08d-838a-4dbc-b6bd-0e7a1bd5462c","name":"arg_check","type":"Boolean"}}},"75a16785-d611-45ce-b52c-284a9da0b4b8":{"id":"75a16785-d611-45ce-b52c-284a9da0b4b8","key_letter":"METH_C","name":"Method Call","description":"A Method Call\n\nThis is when you call a function on an instance of a struct. The name attribute is the name of the method.","attributes":{"7ebdd935-e9a8-423e-a8d3-5c18ac4aff09":{"id":"7ebdd935-e9a8-423e-a8d3-5c18ac4aff09","name":"id","type":"Uuid"},"71021ec0-3099-4cc6-8aaa-c649a1486b1c":{"id":"71021ec0-3099-4cc6-8aaa-c649a1486b1c","name":"name","type":"String"}}},"01c8907d-cb59-4fae-a3ca-8cb331d18387":{"id":"01c8907d-cb59-4fae-a3ca-8cb331d18387","key_letter":"S_METH_C","name":"Static Method Call","description":"A Static Method Call\n\nThis is when you call a function on the type (struct) itself. There is no instance involved in this, although it may return an instance.\n\nThe name attribute is the name of the static method.","attributes":{"4e669862-93f4-4200-913d-03908f60936e":{"id":"4e669862-93f4-4200-913d-03908f60936e","name":"id","type":"Uuid"},"9e03633d-95d9-4fc5-80e8-d46c0da353ad":{"id":"9e03633d-95d9-4fc5-80e8-d46c0da353ad","name":"type","type":"String"},"5e897b18-d6ca-4623-b703-1588452afd3f":{"id":"5e897b18-d6ca-4623-b703-1588452afd3f","name":"func","type":"String"},"e902efa5-5a94-4a9d-a1f4-11b63b4f53e7":{"id":"e902efa5-5a94-4a9d-a1f4-11b63b4f53e7","name":"unique","type":"Uuid"}}},"79069fc2-4d65-4073-b610-4afc0488de5c":{"id":"79069fc2-4d65-4073-b610-4afc0488de5c","key_letter":"NO","name":"Function Call","description":"","attributes":{"8b633cc4-ae54-4516-8952-3b7cdfb9401b":{"id":"8b633cc4-ae54-4516-8952-3b7cdfb9401b","name":"id","type":"Uuid"}}},"23a9a479-68e7-4a70-bcef-9041f10fd287":{"id":"23a9a479-68e7-4a70-bcef-9041f10fd287","key_letter":"Tsk","name":"Task","description":"A type to contain a task.","attributes":{"46602550-66dc-4819-9050-a241868d0073":{"id":"46602550-66dc-4819-9050-a241868d0073","name":"id","type":"Uuid"}}},"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9":{"id":"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9","key_letter":"UNK","name":"Unknown","description":"Unknown Type\n\nThe type is unknown.","attributes":{"d9d874b2-9764-4148-8ace-57b70678b235":{"id":"d9d874b2-9764-4148-8ace-57b70678b235","name":"id","type":"Uuid"}}},"a9b74602-bdc5-481f-af4c-8021553b895a":{"id":"a9b74602-bdc5-481f-af4c-8021553b895a","key_letter":"PLUG","name":"Plugin","description":"An external compilation unit that may be loaded at run time.","attributes":{"f66d1d03-d541-4192-b02c-112783939999":{"id":"f66d1d03-d541-4192-b02c-112783939999","name":"id","type":"Uuid"},"a3e038e0-ae8b-4e03-9046-3df2bbf834b6":{"id":"a3e038e0-ae8b-4e03-9046-3df2bbf834b6","name":"name","type":"String"}}},"cdb1afaf-245c-4d56-bfea-10f69e45007d":{"id":"cdb1afaf-245c-4d56-bfea-10f69e45007d","key_letter":"LST","name":"List","description":"A List\n\nThis is like an array, I guess. It's also like a `Vec`.","attributes":{"5cbba856-e189-4b99-adc1-f1226aef8189":{"id":"5cbba856-e189-4b99-adc1-f1226aef8189","name":"id","type":"Uuid"}}},"b7483723-222d-4f08-b7b9-e8b14f0308cf":{"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","key_letter":"O_S","name":"Object Store","description":"A generated ObjectStore\n\nThis is the backing store for the structs.","attributes":{"2fa8c5a3-6c4b-4dec-ad0c-32034ce3d149":{"id":"2fa8c5a3-6c4b-4dec-ad0c-32034ce3d149","name":"id","type":"Uuid"},"68b4dc34-75d1-4fbd-ad0e-3047f0c8aed4":{"id":"68b4dc34-75d1-4fbd-ad0e-3047f0c8aed4","name":"domain","type":"String"},"435d1dba-242a-44f6-a6e8-4af89ada7c0d":{"id":"435d1dba-242a-44f6-a6e8-4af89ada7c0d","name":"name","type":"String"}}},"97f815f0-dcc4-4bd3-843d-13ff1dc5802c":{"id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","key_letter":"DSF","name":"Dwarf Source File","description":"The Source Code\n\nThe main purpose of this object is to capture the source code that contains the definitions that will be parsed. This allows us to do better error reporting in the interpreter. We may also be able to do something about displaying compiled functions, maybe.","attributes":{"151486f9-7e65-4064-835f-13e85312950e":{"id":"151486f9-7e65-4064-835f-13e85312950e","name":"source","type":"String"},"717a33ce-b0d5-4269-bed6-0a86966ef572":{"id":"717a33ce-b0d5-4269-bed6-0a86966ef572","name":"id","type":"Uuid"}}},"72443b79-5645-4b5f-b317-e1a8f815b81c":{"id":"72443b79-5645-4b5f-b317-e1a8f815b81c","key_letter":"FOR","name":"For Loop","description":"A For Loop Expression\n\nAn expression that matches for IDENT in EXPRESSION BLOCK.","attributes":{"59d5519e-7c33-4ff7-9d4c-13790cca88da":{"id":"59d5519e-7c33-4ff7-9d4c-13790cca88da","name":"id","type":"Uuid"},"b80303bd-a746-4ad8-a624-560a5829a5c9":{"id":"b80303bd-a746-4ad8-a624-560a5829a5c9","name":"ident","type":"String"}}},"93f288e7-d670-40a6-91f3-2006b5efa8b4":{"id":"93f288e7-d670-40a6-91f3-2006b5efa8b4","key_letter":"RET","name":"Return","description":"The Return Expression\n\nIt’s an expression, and not a statement. Isn’t that interesting?","attributes":{"9f78cd40-df48-46ed-9da1-685ec026e9c3":{"id":"9f78cd40-df48-46ed-9da1-685ec026e9c3","name":"id","type":"Uuid"}}},"e1321ffa-07d5-480d-89f9-227b13d27ce1":{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","key_letter":"IF","name":"If","description":"The if Expression\n\nIt does include an else, at no extra charge!","attributes":{"3316a1da-1817-4657-867b-0f0ac6ac145c":{"id":"3316a1da-1817-4657-867b-0f0ac6ac145c","name":"id","type":"Uuid"}}},"3f7fd816-518b-4b9e-8134-3059e78045a0":{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","key_letter":"OP","name":"Operator","description":"Operator Expressions\n\nBasically anything you can do with an expression is a subtype of this beasty.","attributes":{"d613ed9b-274e-483a-be79-7f06d2d7c0b7":{"id":"d613ed9b-274e-483a-be79-7f06d2d7c0b7","name":"id","type":"Uuid"}}},"c46e6b80-0365-429a-abf9-ca75ce4f469a":{"id":"c46e6b80-0365-429a-abf9-ca75ce4f469a","key_letter":"COMP","name":"Comparison","description":"Comparison Operators\n\nThings like == and !=, etc.","attributes":{"69c73e42-bde8-4241-abc1-50531b19ba66":{"id":"69c73e42-bde8-4241-abc1-50531b19ba66","name":"id","type":"Uuid"}}},"9c8bc563-b596-4348-9189-065d747f7c9f":{"id":"9c8bc563-b596-4348-9189-065d747f7c9f","key_letter":"BIN","name":"Binary","description":"Binary Operators\n\n+, -, etc.","attributes":{"1d132fac-43cc-4085-969c-ea0ead6e90f0":{"id":"1d132fac-43cc-4085-969c-ea0ead6e90f0","name":"id","type":"Uuid"}}},"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523":{"id":"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523","key_letter":"PLUS","name":"Addition","description":"The addition operator: `+`.","attributes":{"71662c9f-8108-43ba-9f39-956ba4137c79":{"id":"71662c9f-8108-43ba-9f39-956ba4137c79","name":"id","type":"Uuid"}}},"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e":{"id":"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e","key_letter":"MINUS","name":"Subtraction","description":"The subtraction operator: `-`.","attributes":{"3ad6559a-d90e-4445-b305-f1e7f3634e4d":{"id":"3ad6559a-d90e-4445-b305-f1e7f3634e4d","name":"id","type":"Uuid"}}},"484e429b-bf54-45cb-9b87-baddf7fb5f5b":{"id":"484e429b-bf54-45cb-9b87-baddf7fb5f5b","key_letter":"LTE","name":"Less Than or Equal","description":"Less than or equal: `<=`.","attributes":{"762792a8-a56d-4abd-a0cb-05fa91ce7af7":{"id":"762792a8-a56d-4abd-a0cb-05fa91ce7af7","name":"id","type":"Uuid"}}},"c47b8696-7e98-4733-ab33-a4dca7b61d01":{"id":"c47b8696-7e98-4733-ab33-a4dca7b61d01","key_letter":"ASS","name":"Assignment","description":"Assignment to a storage location\n\nE.g., `a = b`.","attributes":{"1525eed3-c6e2-4dce-b587-2c1591d998b2":{"id":"1525eed3-c6e2-4dce-b587-2c1591d998b2","name":"id","type":"Uuid"}}},"e05ab5f3-17e7-4594-8ce0-c02d793a1df9":{"id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9","key_letter":"LEXP","name":"List Expression","description":"A list of expressions\n\nE.g., `let a = [0, 1, 2, 3];`","attributes":{"01684c5c-b511-40c8-9564-e9cb91f4269b":{"id":"01684c5c-b511-40c8-9564-e9cb91f4269b","name":"id","type":"Uuid"}}},"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","key_letter":"LE","name":"List Element","description":"","attributes":{"ecb6461a-b55a-4a66-b6ec-f22addfd992f":{"id":"ecb6461a-b55a-4a66-b6ec-f22addfd992f","name":"id","type":"Uuid"},"39368f96-3fa6-401e-8706-f9375109af18":{"id":"39368f96-3fa6-401e-8706-f9375109af18","name":"position","type":"Integer"}}},"4d5720eb-da8c-493d-ab8d-cb6111dd6099":{"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","key_letter":"IND","name":"Index","description":"An index expression","attributes":{"f97a16a4-1e1f-4d17-9a67-6ea53e6fe20b":{"id":"f97a16a4-1e1f-4d17-9a67-6ea53e6fe20b","name":"id","type":"Uuid"}}},"6767c0cf-4041-4047-b2b4-d7375f33bc97":{"id":"6767c0cf-4041-4047-b2b4-d7375f33bc97","key_letter":"MULT","name":"Multiplication","description":"","attributes":{"47c44caf-bbbb-48f9-b604-322715ea4f70":{"id":"47c44caf-bbbb-48f9-b604-322715ea4f70","name":"id","type":"Uuid"}}},"35b3de4e-46b8-490f-8e30-c305ed348a78":{"id":"35b3de4e-46b8-490f-8e30-c305ed348a78","key_letter":"DIV","name":"Division","description":"","attributes":{"a2750f60-6827-4ade-aeca-b8e6ff5ba5fd":{"id":"a2750f60-6827-4ade-aeca-b8e6ff5ba5fd","name":"id","type":"Uuid"}}},"d8b554d4-03ac-4613-a3e0-fc0b901bfd70":{"id":"d8b554d4-03ac-4613-a3e0-fc0b901bfd70","key_letter":"GTE","name":"Greater Than or Equal","description":"","attributes":{"a1a3feb0-7273-4f2c-bee1-52ed1afa6692":{"id":"a1a3feb0-7273-4f2c-bee1-52ed1afa6692","name":"id","type":"Uuid"}}},"0edc535b-405d-4dd5-bcd2-f5772ab116c2":{"id":"0edc535b-405d-4dd5-bcd2-f5772ab116c2","key_letter":"EQ","name":"Equal","description":"","attributes":{"5cc2098c-fb9c-47f2-9e78-e82e68e94112":{"id":"5cc2098c-fb9c-47f2-9e78-e82e68e94112","name":"id","type":"Uuid"}}},"0b3e9de0-d139-4934-a043-d1913a24de0c":{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","key_letter":"RNG_EXPR","name":"Range Expression","description":"","attributes":{"c4270112-8fc2-472c-9ec8-0e47eba39942":{"id":"c4270112-8fc2-472c-9ec8-0e47eba39942","name":"id","type":"Uuid"}}},"70932b40-f444-4341-bb19-0a29d1daecbe":{"id":"70932b40-f444-4341-bb19-0a29d1daecbe","key_letter":"RNG_FRM","name":"From","description":"","attributes":{"0e8d45b6-c1af-4ce9-8c86-8852e8808224":{"id":"0e8d45b6-c1af-4ce9-8c86-8852e8808224","name":"id","type":"Uuid"}}},"32dbb54a-9693-4847-9278-7c956ea045f8":{"id":"32dbb54a-9693-4847-9278-7c956ea045f8","key_letter":"RNG_TO","name":"To","description":"","attributes":{"dc7879f5-8f75-4973-ad02-7d611b68a07c":{"id":"dc7879f5-8f75-4973-ad02-7d611b68a07c","name":"id","type":"Uuid"}}},"0dc0e921-e7ff-4766-9738-e6e312f7f0de":{"id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de","key_letter":"GRP","name":"Grouped","description":"Parens","attributes":{"f0ae9b32-3c23-4a34-b6e9-29ff8d94e3f6":{"id":"f0ae9b32-3c23-4a34-b6e9-29ff8d94e3f6","name":"id","type":"Uuid"}}},"122e4157-381f-400f-ac30-a1c8a2a9e8c1":{"id":"122e4157-381f-400f-ac30-a1c8a2a9e8c1","key_letter":"NO","name":"Full","description":"","attributes":{"55c208e0-c7ff-4428-93e9-519c9cffd3c6":{"id":"55c208e0-c7ff-4428-93e9-519c9cffd3c6","name":"id","type":"Uuid"}}},"17db2afc-ae6c-4e53-a527-48516811fe3e":{"id":"17db2afc-ae6c-4e53-a527-48516811fe3e","key_letter":"NO","name":"Inclusive","description":"","attributes":{"c84dd526-b305-4a9c-9ce6-381aab4ca0b8":{"id":"c84dd526-b305-4a9c-9ce6-381aab4ca0b8","name":"id","type":"Uuid"}}},"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd":{"id":"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd","key_letter":"NO","name":"To Inclusive","description":"","attributes":{"70b1a65d-4f0f-41f8-aa77-72fead5078be":{"id":"70b1a65d-4f0f-41f8-aa77-72fead5078be","name":"id","type":"Uuid"}}},"ba8a3bbf-86a8-47e2-92bb-f41878981c41":{"id":"ba8a3bbf-86a8-47e2-92bb-f41878981c41","key_letter":"RNG","name":"Range","description":"","attributes":{"49068e96-7836-4e76-97c5-93f02f20c7da":{"id":"49068e96-7836-4e76-97c5-93f02f20c7da","name":"id","type":"Uuid"}}},"79571896-9798-44a3-acef-5aa2d9773b93":{"id":"79571896-9798-44a3-acef-5aa2d9773b93","key_letter":"SPN","name":"Span","description":"A span is just a two-tuple that specifies the start and end locations, in the source code, for an entitiy.\n\nLooking at this, I think that this should be a supertype, and then a subtype for each relationship. I’m feeling lazy.","attributes":{"4c61e3ec-89ef-42e8-a9f6-ba4131cee575":{"id":"4c61e3ec-89ef-42e8-a9f6-ba4131cee575","name":"id","type":"Uuid"},"b4499f82-5249-4f87-af52-e49caab056e2":{"id":"b4499f82-5249-4f87-af52-e49caab056e2","name":"start","type":"Integer"},"a09bcdab-3c16-4660-9d9d-0c5c39c0092b":{"id":"a09bcdab-3c16-4660-9d9d-0c5c39c0092b","name":"end","type":"Integer"}}},"5c85a8db-e4cc-4e38-9922-58d93773f4f0":{"id":"5c85a8db-e4cc-4e38-9922-58d93773f4f0","key_letter":"BUG","name":"Debugger","description":"An expresision to invoke the debugger;","attributes":{"d7c6ddc5-9913-41fc-a772-eae95f4e4cfc":{"id":"d7c6ddc5-9913-41fc-a772-eae95f4e4cfc","name":"id","type":"Uuid"}}},"bf69c9af-f268-4c9b-8e67-4497eb490478":{"id":"bf69c9af-f268-4c9b-8e67-4497eb490478","key_letter":"FAT","name":"Field Access Target","description":"The target of a field access.\n\nIt may be either a [`Field`] or a [`Function`].","attributes":{"c9c926da-906f-4e95-9feb-63b67b8449cb":{"id":"c9c926da-906f-4e95-9feb-63b67b8449cb","name":"id","type":"Uuid"}}},"ce73a111-4670-411e-9bd2-f3308d6399c9":{"id":"ce73a111-4670-411e-9bd2-f3308d6399c9","key_letter":"GT","name":"Greater Than","description":"","attributes":{"5fbf068e-83be-483b-bf12-9f3bedc79a81":{"id":"5fbf068e-83be-483b-bf12-9f3bedc79a81","name":"id","type":"Uuid"}}},"1e7a66b2-f559-4c21-b8e6-969999ed171d":{"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","key_letter":"TC","name":"Type Cast","description":"Typecast Operator Expression\n\nThis is the `as` operator.","attributes":{"29309379-1198-4290-9efe-7d27b342c4e3":{"id":"29309379-1198-4290-9efe-7d27b342c4e3","name":"id","type":"Uuid"}}},"80f73c4e-caf1-4e1f-a634-00965f6ad032":{"id":"80f73c4e-caf1-4e1f-a634-00965f6ad032","key_letter":"NEG","name":"Negation","description":"The unary minus","attributes":{"220e79fa-e20b-4bcc-af9b-ce07f3364c01":{"id":"220e79fa-e20b-4bcc-af9b-ce07f3364c01","name":"id","type":"Uuid"}}},"222307c0-668c-43f9-9368-34cc048f0ae3":{"id":"222307c0-668c-43f9-9368-34cc048f0ae3","key_letter":"BO","name":"Boolean Operator","description":"A Boolean Operaator\n\nThere are two — || and &&.","attributes":{"14ad81ac-dc91-4764-844f-9aeab3ff7370":{"id":"14ad81ac-dc91-4764-844f-9aeab3ff7370","name":"id","type":"Uuid"}}},"6187076b-e765-4e6b-af28-f577eba40b5e":{"id":"6187076b-e765-4e6b-af28-f577eba40b5e","key_letter":"","name":"And","description":"The Boolean And Operator\n\nAnd, aka, `&&`.","attributes":{"54f9c8e5-80f5-4003-b7c1-210f80fc850b":{"id":"54f9c8e5-80f5-4003-b7c1-210f80fc850b","name":"id","type":"Uuid"}}},"f7fc16ac-6a23-4f5d-a04c-1163617701c1":{"id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1","key_letter":"","name":"Unary","description":"Unary Operators","attributes":{"a78f7aab-b13b-4f74-9bc5-1dba9849374d":{"id":"a78f7aab-b13b-4f74-9bc5-1dba9849374d","name":"id","type":"Uuid"}}},"0ad229c4-1782-4783-b64e-0d15fe482463":{"id":"0ad229c4-1782-4783-b64e-0d15fe482463","key_letter":"NOT","name":"Not","description":"","attributes":{"e308e26b-9675-4f06-b06b-510d03409ad1":{"id":"e308e26b-9675-4f06-b06b-510d03409ad1","name":"id","type":"Uuid"}}},"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a":{"id":"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a","key_letter":"NE","name":"Not Equal","description":"The Not Equal Expression\n\nThis is the `!=` operator expression.","attributes":{"f05219d1-d3cb-4535-80f3-961384d3ec2c":{"id":"f05219d1-d3cb-4535-80f3-961384d3ec2c","name":"id","type":"Uuid"}}},"470246f6-91ec-4993-b915-93480d0f4eb9":{"id":"470246f6-91ec-4993-b915-93480d0f4eb9","key_letter":"M_CALL","name":"Macro Call","description":"A macro invocation\n\nA macro invocation is a string, followed by a bang (`!`), followed by parens and arguments.","attributes":{"2f2c62e2-d8d8-40a7-b2a5-2235c59a5b7c":{"id":"2f2c62e2-d8d8-40a7-b2a5-2235c59a5b7c","name":"id","type":"Uuid"}}},"f6a3ce12-18e1-4675-ab94-6b2a7c91d951":{"id":"f6a3ce12-18e1-4675-ab94-6b2a7c91d951","key_letter":"MAC","name":"Macro","description":"This is a macro\n\nIt sort of interesting that the way that we create a new macro is with a macro. So it’s nice and recursive like that. The macro in question, will be none other than `macro_rules!`!.\n\nOK, so that means something like this:\n\n```no-test\nmacro_rules! `ident` {\n ($[ ( | `ident`]<,)*>[,$ident]*) => {\n }\n}\n```","attributes":{"778b867f-ce73-48da-9a4a-96bc5ea3f3ee":{"id":"778b867f-ce73-48da-9a4a-96bc5ea3f3ee","name":"id","type":"Uuid"},"630d01d4-d139-43d6-8d70-a471850fd9c8":{"id":"630d01d4-d139-43d6-8d70-a471850fd9c8","name":"name","type":"String"}}},"41b7bda7-f5a2-4c94-af22-fedbe8d6f287":{"id":"41b7bda7-f5a2-4c94-af22-fedbe8d6f287","key_letter":"BO_OR","name":"Or","description":"The or `||` operator","attributes":{"020e49d4-3f70-453a-b8c3-9bb71793ab45":{"id":"020e49d4-3f70-453a-b8c3-9bb71793ab45","name":"id","type":"Uuid"}}},"84f1c5fd-d907-4653-a132-bfd420ad9212":{"id":"84f1c5fd-d907-4653-a132-bfd420ad9212","key_letter":"C_LT","name":"Less Than","description":"Less that operator `<`\n","attributes":{"9287a992-353f-4d7e-977d-925f121263e0":{"id":"9287a992-353f-4d7e-977d-925f121263e0","name":"id","type":"Uuid"}}},"efde0481-1599-4c5c-bf30-51dbd4a8ed83":{"id":"efde0481-1599-4c5c-bf30-51dbd4a8ed83","key_letter":"CHAR","name":"Char","description":"A char\n\nI char is a single printable UNICODE character. It may contain multiple bytes.","attributes":{"755111b8-1fe8-444d-bafb-d72ea047b4a5":{"id":"755111b8-1fe8-444d-bafb-d72ea047b4a5","name":"id","type":"Uuid"}}},"95e17479-07a5-41b1-9930-1b9b520514f6":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","key_letter":"ƛ","name":"Lambda","description":"Lambda Function\n\nIt’s a function, it has a type, parameters, etc. It does not have a name, which is problematic with Function having one. It’s also an Expression, unlike a Function.\n\nI should think about creating another function subtype that contains just the name...","attributes":{"be05773d-1ed6-401c-bbbc-678cde7f713c":{"id":"be05773d-1ed6-401c-bbbc-678cde7f713c","name":"id","type":"Uuid"}}},"8d86dceb-7e6e-4767-8a3f-cbbde458ad93":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","key_letter":"LP","name":"Lambda Parameter","description":"id","attributes":{"adfee8d0-94b3-420c-a673-f6e9c34f8523":{"id":"adfee8d0-94b3-420c-a673-f6e9c34f8523","name":"id","type":"Uuid"},"0c5ba019-cc16-4d1f-8ffa-427acba8c280":{"id":"0c5ba019-cc16-4d1f-8ffa-427acba8c280","name":"position","type":"Integer"}}},"68e7191a-fe94-423f-8a5d-5551384ae998":{"id":"68e7191a-fe94-423f-8a5d-5551384ae998","key_letter":"OW","name":"Object Wrapper","description":"The purpose of this object is to wrap `Object`. We need to be able to store a referential attribute to the `ObjectStore`, and we can’t/don’t want to add that to `Object`.","attributes":{"12d98e93-60a2-43c7-830e-960ab321e270":{"id":"12d98e93-60a2-43c7-830e-960ab321e270","name":"id","type":"Uuid"}}},"c4723d6d-1584-49bd-80f1-4c700185746e":{"id":"c4723d6d-1584-49bd-80f1-4c700185746e","key_letter":"FB","name":"Body","description":"The function body. Generally contains statements, but may point to some other implementation.","attributes":{"acb18c42-11c2-4db0-bb5d-efe60e176212":{"id":"acb18c42-11c2-4db0-bb5d-efe60e176212","name":"id","type":"Uuid"},"23056543-73de-448f-a6b3-251f8228823d":{"id":"23056543-73de-448f-a6b3-251f8228823d","name":"async","type":"Boolean"}}},"7794ada6-49c3-4bf0-991f-828c6583ebb8":{"id":"7794ada6-49c3-4bf0-991f-828c6583ebb8","key_letter":"EI","name":"External Implementation","description":"Some extern source of the function’s body.","attributes":{"beb2a174-9ec1-44ba-b57d-2c40146e39e1":{"id":"beb2a174-9ec1-44ba-b57d-2c40146e39e1","name":"id","type":"Uuid"},"d79d5062-aa25-49d6-bc5d-fb56436e86c1":{"id":"d79d5062-aa25-49d6-bc5d-fb56436e86c1","name":"model","type":"String"},"30968bac-2fd6-4372-b3ce-7fb1752920cd":{"id":"30968bac-2fd6-4372-b3ce-7fb1752920cd","name":"object","type":"String"},"a8faf2e5-4bc5-4251-84c2-3abdbc194264":{"id":"a8faf2e5-4bc5-4251-84c2-3abdbc194264","name":"function","type":"String"}}},"d48d948b-5291-4eb3-ba35-7ab1c1ffa098":{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","key_letter":"ENUM","name":"Enumeration","description":"An Enumeration\n\nAn enumeration is an algebraic type that takes on one if it’s fielsd, another type. as it’s value.","attributes":{"6ab143f9-3bd4-40d9-a640-95402bcf8c7a":{"id":"6ab143f9-3bd4-40d9-a640-95402bcf8c7a","name":"id","type":"Uuid"},"1dfbaeda-b91f-4559-b6f5-5a7792766eb0":{"id":"1dfbaeda-b91f-4559-b6f5-5a7792766eb0","name":"name","type":"String"}}},"7eaea922-8807-4c38-a704-0143e0594664":{"id":"7eaea922-8807-4c38-a704-0143e0594664","key_letter":"EF","name":"Enum Field","description":"A field on an Enumeration\n\nNote that there are three sorts of fields. Tuple, Struct, and “plain?”.","attributes":{"74e4b7fb-c8fa-4c9f-b3dd-223385b34f78":{"id":"74e4b7fb-c8fa-4c9f-b3dd-223385b34f78","name":"id","type":"Uuid"},"ba15e7df-bb85-4ae5-ac02-570f915d25a2":{"id":"ba15e7df-bb85-4ae5-ac02-570f915d25a2","name":"name","type":"String"}}},"4b6c7fde-0878-4947-b960-bc73a4558c60":{"id":"4b6c7fde-0878-4947-b960-bc73a4558c60","key_letter":"UEF","name":"Unit","description":"Just a marker, no other value.","attributes":{"5dab5104-dd9d-413a-afde-24e1cd249566":{"id":"5dab5104-dd9d-413a-afde-24e1cd249566","name":"id","type":"Uuid"},"9f44da33-ba44-4b17-a5f8-54b397515b2a":{"id":"9f44da33-ba44-4b17-a5f8-54b397515b2a","name":"value","type":"Integer"}}},"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2":{"id":"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2","key_letter":"EFSF","name":"Struct Field","description":"A field that is a structure.","attributes":{"b05b1a17-ec60-490a-816e-32cd8623390f":{"id":"b05b1a17-ec60-490a-816e-32cd8623390f","name":"id","type":"Uuid"},"22d2baf6-1373-4d2f-802f-c0a3315d8bae":{"id":"22d2baf6-1373-4d2f-802f-c0a3315d8bae","name":"name","type":"String"}}},"c8fcd612-6ca8-469a-824c-de218e4fd075":{"id":"c8fcd612-6ca8-469a-824c-de218e4fd075","key_letter":"EFTF","name":"Tuple Field","description":"A field that is a tuple.\n\nCurrently in this implementation we are cheating, as we don’t yet actually have tuples. So this is limited to a single item.\n\nNote the `hack` attribute. What’s happening is that during generic substitution?, expansion?, whatever. During that we are cloning the enum, and it’s fields. This is to create a new type. When we do this we don’t want the store optimizing away a duplicate Tuple Field.\n\nI deb thee hack because I think the right thing to do is something else, I’m just not sure what it is yet.\n\nI renamed it to `xyzzy`, because I think `hack` does magic in the compiler.","attributes":{"20d73af4-8fc2-44e5-84a0-f0cc3f2ebf72":{"id":"20d73af4-8fc2-44e5-84a0-f0cc3f2ebf72","name":"id","type":"Uuid"},"126ed291-1bc1-44c0-87e8-5ec89a94e077":{"id":"126ed291-1bc1-44c0-87e8-5ec89a94e077","name":"xyzzy","type":"Uuid"}}},"968ea4f4-0a3b-44d4-a266-16facf7d325f":{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","key_letter":"BEER","name":"Generic","description":"This is a generic “type”.\n\nIt’s really a placeholder in the extruder/compiler. We’ll use it as a type declaration, and then define a new type for each use.","attributes":{"180e5ef3-21bf-4329-a381-a82022a691bd":{"id":"180e5ef3-21bf-4329-a381-a82022a691bd","name":"id","type":"Uuid"},"4ff1f1c6-9ee0-4d0a-9e30-a2d287833911":{"id":"4ff1f1c6-9ee0-4d0a-9e30-a2d287833911","name":"name","type":"String"}}},"52143d28-8474-44bc-b63f-e654150888d3":{"id":"52143d28-8474-44bc-b63f-e654150888d3","key_letter":"FIRE","name":"Match","description":"Match a pattern to a scrutinee and evaluate a branch based on the results.","attributes":{"670a1371-78dd-49df-82fb-d51a664263a3":{"id":"670a1371-78dd-49df-82fb-d51a664263a3","name":"id","type":"Uuid"},"f165e2b2-cc7e-46ba-bc71-9ee1a6d7ddb4":{"id":"f165e2b2-cc7e-46ba-bc71-9ee1a6d7ddb4","name":"uniqueness_generator","type":"Uuid"}}},"ab7a5708-6d12-4dce-b488-fa3a3b480510":{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","key_letter":"道","name":"Path","description":"This is a path to a local variable, or an item. It is made up of scopes, separated by `::`.","attributes":{"7b59e37b-41ec-44d0-a83a-e5811b16fb6c":{"id":"7b59e37b-41ec-44d0-a83a-e5811b16fb6c","name":"id","type":"Uuid"},"ca5743c6-dc5e-4801-9925-b2dbe29e34a3":{"id":"ca5743c6-dc5e-4801-9925-b2dbe29e34a3","name":"unique","type":"Uuid"}}},"6094aad5-613b-42b6-8f48-c3b9e2161aa9":{"id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","key_letter":"PAT","name":"Pattern","description":"The pattern is a specification for extracting data from a type. It’s sort of a reverse impression of what you are looking for. If the shape of the impression matches the scrutinee, then they “fit” and the pattern’s lvalues will be populated with data from the scrutinee.\n\nThere are a bunch of diffirent kinds of patterns. Literal, ident, struct, tuple, etc. Modeling this will take a lot of room and time.\n\nDoing this I’m going to cheat a bit and store the code that does matching as a string on this object during compilation. During runtime the string will be evaluated (either as dwrf, or perhasps using a small VM. Or maybe use the built-in VM. It should be able to handle all that we need. This way, I don’t have to model all the bits because they are encoded in the code attribute.\n\nSo I guess that means I’ll be writing assembly code...","attributes":{"faad8dc6-64c0-4c15-8e76-44328eaa72b8":{"id":"faad8dc6-64c0-4c15-8e76-44328eaa72b8","name":"id","type":"Uuid"}}},"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7":{"id":"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7","key_letter":"NFE","name":"Named Field Expression","description":"","attributes":{"bc2a2349-fae2-4f3b-84b1-84eab8ab1d77":{"id":"bc2a2349-fae2-4f3b-84b1-84eab8ab1d77","name":"name","type":"String"},"8ea54fa1-5f86-408d-822c-dccdf5505db3":{"id":"8ea54fa1-5f86-408d-822c-dccdf5505db3","name":"id","type":"Uuid"}}},"910e3a08-5e99-47a5-bde4-3e35cf9f00da":{"id":"910e3a08-5e99-47a5-bde4-3e35cf9f00da","key_letter":"UFE","name":"Unnamed Field Expression","description":"","attributes":{"7aae03a2-e0e0-43db-9861-6c732eb85ef5":{"id":"7aae03a2-e0e0-43db-9861-6c732eb85ef5","name":"id","type":"Uuid"},"e90de56f-91a2-4df6-b013-3bf7d08bab73":{"id":"e90de56f-91a2-4df6-b013-3bf7d08bab73","name":"position","type":"Integer"}}},"31deb355-b737-43a6-ae88-199bb51f940d":{"id":"31deb355-b737-43a6-ae88-199bb51f940d","key_letter":"DS","name":"Data Structure","description":"","attributes":{"9af827eb-88fb-495e-8000-bcded4b9caea":{"id":"9af827eb-88fb-495e-8000-bcded4b9caea","name":"id","type":"Uuid"}}},"39060ea9-5d45-4954-a29f-ba88e01e7217":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","key_letter":"GYM","name":"Path Element","description":"🖕🤣","attributes":{"ca0023ad-2efb-475a-b663-4ecad4117a31":{"id":"ca0023ad-2efb-475a-b663-4ecad4117a31","name":"id","type":"Uuid"},"1ec6c6dd-1792-4ea5-bbda-dc490dc601c2":{"id":"1ec6c6dd-1792-4ea5-bbda-dc490dc601c2","name":"name","type":"String"}}},"4856978f-20be-4b59-8bf6-b941091119a9":{"id":"4856978f-20be-4b59-8bf6-b941091119a9","key_letter":"A_WAIT","name":"Await","description":"","attributes":{"b0944a25-05f1-4f14-bc2b-e67851d66f8b":{"id":"b0944a25-05f1-4f14-bc2b-e67851d66f8b","name":"id","type":"Uuid"}}},"dbada891-ca0d-4fbc-8371-9f9234867bd6":{"id":"dbada891-ca0d-4fbc-8371-9f9234867bd6","key_letter":"FUT","name":"Future","description":"","attributes":{"37182d8e-782a-4071-86bd-b1c7f30c53ba":{"id":"37182d8e-782a-4071-86bd-b1c7f30c53ba","name":"id","type":"Uuid"}}},"290f49d3-8ce7-408e-be14-611b66db9687":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","key_letter":"SG1","name":"Struct Generic","description":"A generic type applied to the struct.","attributes":{"d8e275eb-cd85-46a4-b5b8-5e71baec33c3":{"id":"d8e275eb-cd85-46a4-b5b8-5e71baec33c3","name":"id","type":"Uuid"},"6077a668-17b2-4d8d-8fdd-a34442e7d10c":{"id":"6077a668-17b2-4d8d-8fdd-a34442e7d10c","name":"name","type":"String"}}}}},"relationships":{"ids":["21f08565-d913-4302-a853-e5f688ec1bc1","4b7360ba-8de3-4c93-bc90-22478c128a75","3746c64a-c63d-424d-afb2-c253470b6d7b","02892323-60e9-470b-b162-b2bc8d9ef1cd","98c79b91-da7b-443a-b1fb-18596cd6b4bc","7993e2c7-7efa-4346-b50e-bc02d55e1ca7","fdb49afe-13fb-4c79-99d1-92728d8652c7","ea1e6d1c-279b-4b6d-806e-fa133c6a5da9","35491126-597f-4301-ae48-88da4a23c845","336674ce-19be-4baa-8117-19ee19886e2d","95b8c311-1f3f-42ab-93cd-9b95c8d8c02a","3966271b-9938-48c7-b4fe-177c307e22bf","2e81ce06-82d5-47e6-9f38-783d8af057d9","03745d2b-a85f-40a9-b038-8f22c83e8eb1","c715993f-c840-4d48-8442-b5635e4324e7","f6c19c17-3e01-4945-bffb-7ec408dd7fcf","d8bf88d3-35da-422d-a7d9-1726ce66a288","0b5aab4e-5077-4627-9091-89c71a921be1","3bb006c5-a66d-440b-b54b-35bc9da87b33","e67c9242-2aac-4930-ae2e-b2a1678ed3d9","332f2cb5-0719-4c2d-8737-c1a0375fad8e","e93a7669-d7d0-4cb2-bbb1-36dedf3f893d","ead7f44b-e37a-4122-8824-17f4079c2e70","33838622-f03e-415f-9588-e7f9e644727e","54994661-e099-453c-904f-c09cc0fa0bfa","0cde3a3b-6678-42ac-8fa4-8ab02acb3dea","688ec08e-9fd6-4a2f-bcd5-5ea94e946d1b","e0a24038-1c85-4d6f-afbc-5c034062a557","96737350-249d-4701-9b47-0f56bf8bfc7f","9fd61528-8e0f-40d0-b1bb-53b468851d30","95fcc898-ef24-4ec4-8409-798a6623713e","de725e45-a751-4f4b-8c44-6c79671c70eb","39f2d2c1-abf2-4f3e-a4f1-58a477b12f9e","81d77ddd-6aae-4023-8467-2f5705d5e633","c45955d9-c799-4d61-8bc6-6335bde326b8","bc8075e9-e5ba-4a26-b696-7cf2651997ba","6f636d63-667a-40ad-b554-a301a62ddebd","f564f775-febe-442e-a0f1-492a2265e991","0e780acf-9221-4e84-9377-64d31e653187","fc2e5c67-6c98-4bfd-93a7-711fa2ae573f","ba437581-658a-497d-9790-ab79ad56cd4f","cdd19ddf-67e5-4e9b-9958-0745e8f9729e","c8d05983-b88d-40da-bf31-83d2d8b8c574","c6ed5fc4-f04a-45e0-afc3-6f421b81fea7","27350475-a322-4ede-a4b2-eb88a3c847f5","513c99bc-140c-44c2-b605-0d377805ac43","55ae9c5d-bcdb-4c29-8f06-cc9f596662d5","23c220df-e5a3-44dc-b521-d29378c6a5e0","71251371-81c5-4f25-8141-fef1e23e12fe","761a6c93-ae0b-4508-9437-d68d0b2c1f22","8398d7d3-d42f-4ca6-89d3-7a563eb50131","124d7dea-f1d6-477f-a096-42e92dd297c2","07097b52-f614-461b-9d4c-62ba7177a383","5e20da11-448d-41a5-8b92-7dd75d64ad3d","10e2f3e9-2995-47e0-9456-ed375eb610b7","d64c3d2d-51d9-4586-b8e7-0b23aea46f49","497076d2-1625-446b-b663-d75f5c2e2a3c","f42505df-9843-4914-97bc-c665dfbc2dcc","dfa0880b-de0a-4d0f-9f42-7ed496af35ea","7fb6cd7d-16c0-43bc-9e29-f645c644afe1","f72fcd31-7056-4425-b0ce-7734a759e616","b197d992-e4d6-4663-a6da-b46906374684","7022f5ed-020f-453f-bcab-8e632ca03b6e","1ec425ff-8b5a-49bf-87cb-9863defb9320","99d07c03-f3ce-42d7-bb64-8bde65c79dd6","3088e0b8-de0a-45d2-95fb-e8804c9c03fa","a640575d-a105-4ad5-b786-6e7fb55a0b94","d32059a8-46ed-4ceb-9b92-5f661b98f4e6","cfe90847-d888-4245-bb66-901855bb0051","45c4a4f5-e54b-45d2-bea6-617723a92b70","14f71b3f-b918-4376-8e75-7333e85ca536","8d8db4b1-8c90-472b-bc98-88fa6a2188d1","44ad55c5-bb62-4864-90e7-e992494786aa","c12fcdf7-ec63-58c7-8555-36222f25b91b","c3dba39c-fe1e-49e0-9a45-8f872b6aa4c5","f1c15ada-631b-4249-8c73-4e52391a532f","a5ac6af9-3cef-49e5-8d01-462817e1d641","868b4a28-0d2f-4d78-b947-66f44c3bdaf9","ca33902a-c6f2-45a5-9273-cf80a579cedd","d440f204-2694-4438-b618-721a9108070f","69b40bff-5f3d-44ef-8c68-57ff9e033e7b","18c4566d-a7b7-4b1d-8e0b-470fddbaab9b","33b9b943-0d44-4490-b20a-35c110ae9473","4ce09575-5a2c-40c5-b766-bb12ef0c1600","193d881e-9afd-4b9e-a431-cdb113a7ee88","badf3d57-aba3-4757-b0e4-9d0e7b55f2ea","08512716-f1d3-4a88-bd38-aea9ae0f9ca7","0ed07f33-0bbb-497d-9823-9247fc520e85","cea29749-dc0f-40c0-adf9-4c21b187751e","599c1454-9525-4386-b50f-4fdee4b08373","9f2917c8-b17b-4ab2-8c6e-0269a0b80681","3c241319-416a-4195-ae80-fa4439198c1c","12003437-2898-4b1d-ba27-b1cc69d8dbb2","940f5aba-58f5-46fa-bbba-43fc6b10a3fe","42c18b66-d259-40d1-a77d-0c0e76080a6d","04ae2e8d-c499-4068-88bd-015b0bba57bf","7e2c2118-fb6c-4ac4-9676-e7427cd495c2","b21bc0c0-fab4-42f8-ae6c-eb6ab8f5968a","e4734a39-1f45-400f-937a-285e2fad31a4","da1d6545-b9d6-499e-9175-fd2a340b1f2e","c8a4b21a-62c3-4fbd-8799-2b55d93d951c"],"entities":{"21f08565-d913-4302-a853-e5f688ec1bc1":{"Isa":{"id":"21f08565-d913-4302-a853-e5f688ec1bc1","number":1,"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","subtypes":["b8ec6afc-ddbd-53d6-9be3-e4b738941c2f","a8b86e41-5b04-4469-8a10-91bd89603e27","d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","23a9a479-68e7-4a70-bcef-9041f10fd287","3a1c7f6a-459d-4eba-9291-2aebb9bf60c9","a9b74602-bdc5-481f-af4c-8021553b895a","cdb1afaf-245c-4d56-bfea-10f69e45007d","b7483723-222d-4f08-b7b9-e8b14f0308cf","e68f8912-9897-4cbd-b363-cb4203a726a9","c89e362d-7905-4226-8713-97d3d6f05037","ba8a3bbf-86a8-47e2-92bb-f41878981c41","efde0481-1599-4c5c-bf30-51dbd4a8ed83","95e17479-07a5-41b1-9930-1b9b520514f6","d48d948b-5291-4eb3-ba35-7ab1c1ffa098","968ea4f4-0a3b-44d4-a266-16facf7d325f","dbada891-ca0d-4fbc-8371-9f9234867bd6"]}},"4b7360ba-8de3-4c93-bc90-22478c128a75":{"Binary":{"id":"4b7360ba-8de3-4c93-bc90-22478c128a75","number":5,"from":{"obj_id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","description":"has a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"describes a","cardinality":"One","conditionality":"Conditional"}}},"3746c64a-c63d-424d-afb2-c253470b6d7b":{"Isa":{"id":"3746c64a-c63d-424d-afb2-c253470b6d7b","number":6,"obj_id":"45644594-b418-5362-9294-a62fe2a0fa8e","subtypes":["e68f8912-9897-4cbd-b363-cb4203a726a9","88687f76-5d9e-404e-a801-f6f57f9b30ca","d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","c89e362d-7905-4226-8713-97d3d6f05037","f6a3ce12-18e1-4675-ab94-6b2a7c91d951","d48d948b-5291-4eb3-ba35-7ab1c1ffa098"]}},"02892323-60e9-470b-b162-b2bc8d9ef1cd":{"Binary":{"id":"02892323-60e9-470b-b162-b2bc8d9ef1cd","number":7,"from":{"obj_id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","description":"comprises a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"model"},"to":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"is comprised of","cardinality":"One","conditionality":"Conditional"}}},"98c79b91-da7b-443a-b1fb-18596cd6b4bc":{"Binary":{"id":"98c79b91-da7b-443a-b1fb-18596cd6b4bc","number":8,"from":{"obj_id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","description":"adds functions to a","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"model_type"},"to":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"may have an","cardinality":"One","conditionality":"Conditional"}}},"7993e2c7-7efa-4346-b50e-bc02d55e1ca7":{"Binary":{"id":"7993e2c7-7efa-4346-b50e-bc02d55e1ca7","number":9,"from":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"may be contained in an","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"impl_block"},"to":{"obj_id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","description":"may contain","cardinality":"One","conditionality":"Conditional"}}},"fdb49afe-13fb-4c79-99d1-92728d8652c7":{"Binary":{"id":"fdb49afe-13fb-4c79-99d1-92728d8652c7","number":10,"from":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"returns","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"return_type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"is returned by","cardinality":"One","conditionality":"Conditional"}}},"ea1e6d1c-279b-4b6d-806e-fa133c6a5da9":{"Isa":{"id":"ea1e6d1c-279b-4b6d-806e-fa133c6a5da9","number":11,"obj_id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","subtypes":["954b354f-3a90-440b-ab0f-43efc00d275e","9352c766-9f6b-413b-9ea0-13f9c8e4d86e"]}},"35491126-597f-4301-ae48-88da4a23c845":{"Isa":{"id":"35491126-597f-4301-ae48-88da4a23c845","number":12,"obj_id":"954b354f-3a90-440b-ab0f-43efc00d275e","subtypes":["0365b40c-c40a-4653-84ab-44d1c12d294f","f192b162-8ada-4128-8805-1953e9165c54","8d86dceb-7e6e-4767-8a3f-cbbde458ad93"]}},"336674ce-19be-4baa-8117-19ee19886e2d":{"Binary":{"id":"336674ce-19be-4baa-8117-19ee19886e2d","number":13,"from":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"is available to a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"function"},"to":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"receives a value via a","cardinality":"One","conditionality":"Conditional"}}},"95b8c311-1f3f-42ab-93cd-9b95c8d8c02a":{"Binary":{"id":"95b8c311-1f3f-42ab-93cd-9b95c8d8c02a","number":14,"from":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"follows","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"preceeds","cardinality":"One","conditionality":"Conditional"}}},"3966271b-9938-48c7-b4fe-177c307e22bf":{"Isa":{"id":"3966271b-9938-48c7-b4fe-177c307e22bf","number":15,"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","subtypes":["30c31621-a4bd-4356-80b9-1226e00651c9","dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","d715c5f9-23f8-45e0-a1df-34e27acd01f5","d546feef-91df-49ea-ac61-430bdcf9832c","6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b","1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","26dba2c5-a7e9-4556-a9c2-79091a97b941","72443b79-5645-4b5f-b317-e1a8f815b81c","93f288e7-d670-40a6-91f3-2006b5efa8b4","e1321ffa-07d5-480d-89f9-227b13d27ce1","3f7fd816-518b-4b9e-8134-3059e78045a0","e05ab5f3-17e7-4594-8ce0-c02d793a1df9","ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","4d5720eb-da8c-493d-ab8d-cb6111dd6099","0b3e9de0-d139-4934-a043-d1913a24de0c","0dc0e921-e7ff-4766-9738-e6e312f7f0de","5c85a8db-e4cc-4e38-9922-58d93773f4f0","3874760d-0104-4670-ba8b-1af413c5ec4a","1e7a66b2-f559-4c21-b8e6-969999ed171d","95e17479-07a5-41b1-9930-1b9b520514f6","52143d28-8474-44bc-b63f-e654150888d3","ab7a5708-6d12-4dce-b488-fa3a3b480510","4856978f-20be-4b59-8bf6-b941091119a9"]}},"2e81ce06-82d5-47e6-9f38-783d8af057d9":{"Isa":{"id":"2e81ce06-82d5-47e6-9f38-783d8af057d9","number":16,"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","subtypes":["ce2da156-e0fd-4e56-bb31-2030d4e0c599","c32fcb6d-b505-492f-95c8-5f118079a399","59f269ab-2dbc-4b07-b9bc-48441f20e78f","59f269ab-2dbc-4b07-b9bc-48441f20e78f","b359d531-77ae-436f-9f0d-6a5632f1648e"]}},"03745d2b-a85f-40a9-b038-8f22c83e8eb1":{"Binary":{"id":"03745d2b-a85f-40a9-b038-8f22c83e8eb1","number":17,"from":{"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","description":"follows","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","description":"preceeds","cardinality":"One","conditionality":"Conditional"}}},"c715993f-c840-4d48-8442-b5635e4324e7":{"Binary":{"id":"c715993f-c840-4d48-8442-b5635e4324e7","number":18,"from":{"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","description":"is contianed in a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"may contain many","cardinality":"One","conditionality":"Conditional"}}},"f6c19c17-3e01-4945-bffb-7ec408dd7fcf":{"Binary":{"id":"f6c19c17-3e01-4945-bffb-7ec408dd7fcf","number":19,"from":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"executes statements in a","cardinality":"One","conditionality":"Unconditional","formalizing_attribute_name":"body"},"to":{"obj_id":"c4723d6d-1584-49bd-80f1-4c700185746e","description":"provides statements to a","cardinality":"One","conditionality":"Conditional"}}},"d8bf88d3-35da-422d-a7d9-1726ce66a288":{"Binary":{"id":"d8bf88d3-35da-422d-a7d9-1726ce66a288","number":20,"from":{"obj_id":"c32fcb6d-b505-492f-95c8-5f118079a399","description":"assigns the value of an","cardinality":"One","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is assigned by a","cardinality":"One","conditionality":"Conditional"}}},"0b5aab4e-5077-4627-9091-89c71a921be1":{"Binary":{"id":"0b5aab4e-5077-4627-9091-89c71a921be1","number":21,"from":{"obj_id":"c32fcb6d-b505-492f-95c8-5f118079a399","description":"assigns a value to a","cardinality":"One","conditionality":"Unconditional","formalizing_attribute_name":"variable"},"to":{"obj_id":"0365b40c-c40a-4653-84ab-44d1c12d294f","description":"is introduced by a","cardinality":"One","conditionality":"Unconditional"}}},"3bb006c5-a66d-440b-b54b-35bc9da87b33":{"Isa":{"id":"3bb006c5-a66d-440b-b54b-35bc9da87b33","number":22,"obj_id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","subtypes":["d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","d30d2b03-732b-41bb-89ed-d053750bf987","b1612607-a813-4bc2-896b-88ec4b249447","fa42f4e2-1ff3-473f-a4b9-593c01134e96"]}},"e67c9242-2aac-4930-ae2e-b2a1678ed3d9":{"Binary":{"id":"e67c9242-2aac-4930-ae2e-b2a1678ed3d9","number":24,"from":{"obj_id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","description":"is decoded by a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"lends semantics to a","cardinality":"One","conditionality":"Conditional"}}},"332f2cb5-0719-4c2d-8737-c1a0375fad8e":{"Isa":{"id":"332f2cb5-0719-4c2d-8737-c1a0375fad8e","number":35,"obj_id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","subtypes":["dc6d1ffa-5dca-43ef-b973-0628ab580cb7","a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d"]}},"e93a7669-d7d0-4cb2-bbb1-36dedf3f893d":{"Binary":{"id":"e93a7669-d7d0-4cb2-bbb1-36dedf3f893d","number":26,"from":{"obj_id":"3874760d-0104-4670-ba8b-1af413c5ec4a","description":"belongs to a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"struct"},"to":{"obj_id":"d546feef-91df-49ea-ac61-430bdcf9832c","description":"may have many","cardinality":"One","conditionality":"Conditional"}}},"ead7f44b-e37a-4122-8824-17f4079c2e70":{"Binary":{"id":"ead7f44b-e37a-4122-8824-17f4079c2e70","number":27,"from":{"obj_id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","description":"contains an","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"may be a","cardinality":"One","conditionality":"Conditional"}}},"33838622-f03e-415f-9588-e7f9e644727e":{"Binary":{"id":"33838622-f03e-415f-9588-e7f9e644727e","number":27,"from":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"follows","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"preceeds","cardinality":"One","conditionality":"Conditional"}}},"54994661-e099-453c-904f-c09cc0fa0bfa":{"Binary":{"id":"54994661-e099-453c-904f-c09cc0fa0bfa","number":28,"from":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"is part of a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"function"},"to":{"obj_id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","description":"may have","cardinality":"One","conditionality":"Conditional"}}},"0cde3a3b-6678-42ac-8fa4-8ab02acb3dea":{"Binary":{"id":"0cde3a3b-6678-42ac-8fa4-8ab02acb3dea","number":29,"from":{"obj_id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","description":"may be an","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"may be a","cardinality":"One","conditionality":"Conditional"}}},"688ec08e-9fd6-4a2f-bcd5-5ea94e946d1b":{"Isa":{"id":"688ec08e-9fd6-4a2f-bcd5-5ea94e946d1b","number":30,"obj_id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","subtypes":["01c8907d-cb59-4fae-a3ca-8cb331d18387","75a16785-d611-45ce-b52c-284a9da0b4b8","79069fc2-4d65-4073-b610-4afc0488de5c","470246f6-91ec-4993-b915-93480d0f4eb9"]}},"e0a24038-1c85-4d6f-afbc-5c034062a557":{"Binary":{"id":"e0a24038-1c85-4d6f-afbc-5c034062a557","number":31,"from":{"obj_id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"96737350-249d-4701-9b47-0f56bf8bfc7f":{"Binary":{"id":"96737350-249d-4701-9b47-0f56bf8bfc7f","number":32,"from":{"obj_id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"9fd61528-8e0f-40d0-b1bb-53b468851d30":{"Binary":{"id":"9fd61528-8e0f-40d0-b1bb-53b468851d30","number":33,"from":{"obj_id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"","cardinality":"One","conditionality":"Conditional"}}},"95fcc898-ef24-4ec4-8409-798a6623713e":{"Binary":{"id":"95fcc898-ef24-4ec4-8409-798a6623713e","number":36,"from":{"obj_id":"cdb1afaf-245c-4d56-bfea-10f69e45007d","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"","cardinality":"One","conditionality":"Conditional"}}},"de725e45-a751-4f4b-8c44-6c79671c70eb":{"Binary":{"id":"de725e45-a751-4f4b-8c44-6c79671c70eb","number":37,"from":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"39f2d2c1-abf2-4f3e-a4f1-58a477b12f9e":{"Binary":{"id":"39f2d2c1-abf2-4f3e-a4f1-58a477b12f9e","number":38,"from":{"obj_id":"3874760d-0104-4670-ba8b-1af413c5ec4a","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"81d77ddd-6aae-4023-8467-2f5705d5e633":{"Binary":{"id":"81d77ddd-6aae-4023-8467-2f5705d5e633","number":39,"from":{"obj_id":"d546feef-91df-49ea-ac61-430bdcf9832c","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"data"},"to":{"obj_id":"31deb355-b737-43a6-ae88-199bb51f940d","description":"","cardinality":"One","conditionality":"Conditional"}}},"c45955d9-c799-4d61-8bc6-6335bde326b8":{"Binary":{"id":"c45955d9-c799-4d61-8bc6-6335bde326b8","number":40,"from":{"obj_id":"c89e362d-7905-4226-8713-97d3d6f05037","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"object"},"to":{"obj_id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","description":"","cardinality":"One","conditionality":"Conditional"}}},"bc8075e9-e5ba-4a26-b696-7cf2651997ba":{"Binary":{"id":"bc8075e9-e5ba-4a26-b696-7cf2651997ba","number":41,"from":{"obj_id":"b359d531-77ae-436f-9f0d-6a5632f1648e","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"6f636d63-667a-40ad-b554-a301a62ddebd":{"Binary":{"id":"6f636d63-667a-40ad-b554-a301a62ddebd","number":25,"from":{"obj_id":"45644594-b418-5362-9294-a62fe2a0fa8e","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"source"},"to":{"obj_id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","description":"","cardinality":"One","conditionality":"Conditional"}}},"f564f775-febe-442e-a0f1-492a2265e991":{"Binary":{"id":"f564f775-febe-442e-a0f1-492a2265e991","number":42,"from":{"obj_id":"72443b79-5645-4b5f-b317-e1a8f815b81c","description":"iterates over an","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is provided to a","cardinality":"One","conditionality":"Conditional"}}},"0e780acf-9221-4e84-9377-64d31e653187":{"Binary":{"id":"0e780acf-9221-4e84-9377-64d31e653187","number":43,"from":{"obj_id":"72443b79-5645-4b5f-b317-e1a8f815b81c","description":"executes a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"is executed by","cardinality":"One","conditionality":"Conditional"}}},"fc2e5c67-6c98-4bfd-93a7-711fa2ae573f":{"Binary":{"id":"fc2e5c67-6c98-4bfd-93a7-711fa2ae573f","number":44,"from":{"obj_id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","description":"branches based on","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"test"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is evaluated by","cardinality":"One","conditionality":"Conditional"}}},"ba437581-658a-497d-9790-ab79ad56cd4f":{"Binary":{"id":"ba437581-658a-497d-9790-ab79ad56cd4f","number":45,"from":{"obj_id":"93f288e7-d670-40a6-91f3-2006b5efa8b4","description":"evaluates and returns","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is returned by","cardinality":"One","conditionality":"Conditional"}}},"cdd19ddf-67e5-4e9b-9958-0745e8f9729e":{"Binary":{"id":"cdd19ddf-67e5-4e9b-9958-0745e8f9729e","number":46,"from":{"obj_id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","description":"when true, evaluates","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"true_block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"is evaluated by","cardinality":"One","conditionality":"Conditional"}}},"c8d05983-b88d-40da-bf31-83d2d8b8c574":{"Isa":{"id":"c8d05983-b88d-40da-bf31-83d2d8b8c574","number":47,"obj_id":"3f7fd816-518b-4b9e-8134-3059e78045a0","subtypes":["9c8bc563-b596-4348-9189-065d747f7c9f","c46e6b80-0365-429a-abf9-ca75ce4f469a","f7fc16ac-6a23-4f5d-a04c-1163617701c1"]}},"c6ed5fc4-f04a-45e0-afc3-6f421b81fea7":{"Isa":{"id":"c6ed5fc4-f04a-45e0-afc3-6f421b81fea7","number":48,"obj_id":"9c8bc563-b596-4348-9189-065d747f7c9f","subtypes":["1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523","e3329a9e-1c52-44f6-a1f7-fc85f7362e9e","c47b8696-7e98-4733-ab33-a4dca7b61d01","6767c0cf-4041-4047-b2b4-d7375f33bc97","35b3de4e-46b8-490f-8e30-c305ed348a78","222307c0-668c-43f9-9368-34cc048f0ae3"]}},"27350475-a322-4ede-a4b2-eb88a3c847f5":{"Isa":{"id":"27350475-a322-4ede-a4b2-eb88a3c847f5","number":49,"obj_id":"c46e6b80-0365-429a-abf9-ca75ce4f469a","subtypes":["484e429b-bf54-45cb-9b87-baddf7fb5f5b","d8b554d4-03ac-4613-a3e0-fc0b901bfd70","0edc535b-405d-4dd5-bcd2-f5772ab116c2","ce73a111-4670-411e-9bd2-f3308d6399c9","b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a","84f1c5fd-d907-4653-a132-bfd420ad9212"]}},"513c99bc-140c-44c2-b605-0d377805ac43":{"Binary":{"id":"513c99bc-140c-44c2-b605-0d377805ac43","number":50,"from":{"obj_id":"3f7fd816-518b-4b9e-8134-3059e78045a0","description":"left hand side","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"lhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"55ae9c5d-bcdb-4c29-8f06-cc9f596662d5":{"Binary":{"id":"55ae9c5d-bcdb-4c29-8f06-cc9f596662d5","number":51,"from":{"obj_id":"3f7fd816-518b-4b9e-8134-3059e78045a0","description":"right hand side","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"rhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"23c220df-e5a3-44dc-b521-d29378c6a5e0":{"Binary":{"id":"23c220df-e5a3-44dc-b521-d29378c6a5e0","number":52,"from":{"obj_id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","description":"false block","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"false_block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"","cardinality":"One","conditionality":"Conditional"}}},"71251371-81c5-4f25-8141-fef1e23e12fe":{"Binary":{"id":"71251371-81c5-4f25-8141-fef1e23e12fe","number":53,"from":{"obj_id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","description":"follows","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","description":"preceeds","cardinality":"One","conditionality":"Conditional"}}},"761a6c93-ae0b-4508-9437-d68d0b2c1f22":{"Binary":{"id":"761a6c93-ae0b-4508-9437-d68d0b2c1f22","number":54,"from":{"obj_id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9","description":"contains","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"elements"},"to":{"obj_id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","description":"is in a ","cardinality":"Many","conditionality":"Unconditional"}}},"8398d7d3-d42f-4ca6-89d3-7a563eb50131":{"Binary":{"id":"8398d7d3-d42f-4ca6-89d3-7a563eb50131","number":55,"from":{"obj_id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","description":"points at an","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is used by a","cardinality":"One","conditionality":"Conditional"}}},"124d7dea-f1d6-477f-a096-42e92dd297c2":{"Binary":{"id":"124d7dea-f1d6-477f-a096-42e92dd297c2","number":56,"from":{"obj_id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"index"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"07097b52-f614-461b-9d4c-62ba7177a383":{"Binary":{"id":"07097b52-f614-461b-9d4c-62ba7177a383","number":57,"from":{"obj_id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"target"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"5e20da11-448d-41a5-8b92-7dd75d64ad3d":{"Binary":{"id":"5e20da11-448d-41a5-8b92-7dd75d64ad3d","number":58,"from":{"obj_id":"0b3e9de0-d139-4934-a043-d1913a24de0c","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"lhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"10e2f3e9-2995-47e0-9456-ed375eb610b7":{"Binary":{"id":"10e2f3e9-2995-47e0-9456-ed375eb610b7","number":59,"from":{"obj_id":"0b3e9de0-d139-4934-a043-d1913a24de0c","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"rhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"d64c3d2d-51d9-4586-b8e7-0b23aea46f49":{"Isa":{"id":"d64c3d2d-51d9-4586-b8e7-0b23aea46f49","number":60,"obj_id":"0b3e9de0-d139-4934-a043-d1913a24de0c","subtypes":["70932b40-f444-4341-bb19-0a29d1daecbe","32dbb54a-9693-4847-9278-7c956ea045f8","122e4157-381f-400f-ac30-a1c8a2a9e8c1","17db2afc-ae6c-4e53-a527-48516811fe3e","30abb231-4248-4ffa-9a69-e0eb6bb9dbbd"]}},"497076d2-1625-446b-b663-d75f5c2e2a3c":{"Binary":{"id":"497076d2-1625-446b-b663-d75f5c2e2a3c","number":61,"from":{"obj_id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"f42505df-9843-4914-97bc-c665dfbc2dcc":{"Binary":{"id":"f42505df-9843-4914-97bc-c665dfbc2dcc","number":62,"from":{"obj_id":"79571896-9798-44a3-acef-5aa2d9773b93","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"","cardinality":"One","conditionality":"Conditional"}}},"dfa0880b-de0a-4d0f-9f42-7ed496af35ea":{"Binary":{"id":"dfa0880b-de0a-4d0f-9f42-7ed496af35ea","number":63,"from":{"obj_id":"79571896-9798-44a3-acef-5aa2d9773b93","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"value"},"to":{"obj_id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","description":"","cardinality":"One","conditionality":"Unconditional"}}},"7fb6cd7d-16c0-43bc-9e29-f645c644afe1":{"Binary":{"id":"7fb6cd7d-16c0-43bc-9e29-f645c644afe1","number":64,"from":{"obj_id":"79571896-9798-44a3-acef-5aa2d9773b93","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"source"},"to":{"obj_id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","description":"","cardinality":"One","conditionality":"Conditional"}}},"f72fcd31-7056-4425-b0ce-7734a759e616":{"Binary":{"id":"f72fcd31-7056-4425-b0ce-7734a759e616","number":66,"from":{"obj_id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"struct"},"to":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"","cardinality":"One","conditionality":"Conditional"}}},"b197d992-e4d6-4663-a6da-b46906374684":{"Isa":{"id":"b197d992-e4d6-4663-a6da-b46906374684","number":67,"obj_id":"bf69c9af-f268-4c9b-8e67-4497eb490478","subtypes":["141350e6-b62d-4a6d-9ea2-47333e51e3ea","d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","7eaea922-8807-4c38-a704-0143e0594664"]}},"7022f5ed-020f-453f-bcab-8e632ca03b6e":{"Binary":{"id":"7022f5ed-020f-453f-bcab-8e632ca03b6e","number":65,"from":{"obj_id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"field"},"to":{"obj_id":"bf69c9af-f268-4c9b-8e67-4497eb490478","description":"","cardinality":"One","conditionality":"Conditional"}}},"1ec425ff-8b5a-49bf-87cb-9863defb9320":{"Binary":{"id":"1ec425ff-8b5a-49bf-87cb-9863defb9320","number":68,"from":{"obj_id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"lhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"99d07c03-f3ce-42d7-bb64-8bde65c79dd6":{"Binary":{"id":"99d07c03-f3ce-42d7-bb64-8bde65c79dd6","number":69,"from":{"obj_id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"","cardinality":"One","conditionality":"Conditional"}}},"3088e0b8-de0a-45d2-95fb-e8804c9c03fa":{"Binary":{"id":"3088e0b8-de0a-45d2-95fb-e8804c9c03fa","number":71,"from":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"statement"},"to":{"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","description":"","cardinality":"One","conditionality":"Conditional"}}},"a640575d-a105-4ad5-b786-6e7fb55a0b94":{"Isa":{"id":"a640575d-a105-4ad5-b786-6e7fb55a0b94","number":72,"obj_id":"222307c0-668c-43f9-9368-34cc048f0ae3","subtypes":["6187076b-e765-4e6b-af28-f577eba40b5e","41b7bda7-f5a2-4c94-af22-fedbe8d6f287"]}},"d32059a8-46ed-4ceb-9b92-5f661b98f4e6":{"Isa":{"id":"d32059a8-46ed-4ceb-9b92-5f661b98f4e6","number":70,"obj_id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1","subtypes":["80f73c4e-caf1-4e1f-a634-00965f6ad032","0ad229c4-1782-4783-b64e-0d15fe482463"]}},"cfe90847-d888-4245-bb66-901855bb0051":{"Binary":{"id":"cfe90847-d888-4245-bb66-901855bb0051","number":73,"from":{"obj_id":"95e17479-07a5-41b1-9930-1b9b520514f6","description":"contains a","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"body"},"to":{"obj_id":"c4723d6d-1584-49bd-80f1-4c700185746e","description":"is defined by","cardinality":"One","conditionality":"Conditional"}}},"45c4a4f5-e54b-45d2-bea6-617723a92b70":{"Binary":{"id":"45c4a4f5-e54b-45d2-bea6-617723a92b70","number":74,"from":{"obj_id":"95e17479-07a5-41b1-9930-1b9b520514f6","description":"has a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"return_type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"","cardinality":"One","conditionality":"Conditional"}}},"14f71b3f-b918-4376-8e75-7333e85ca536":{"Binary":{"id":"14f71b3f-b918-4376-8e75-7333e85ca536","number":75,"from":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"previous","cardinality":"One","conditionality":"Conditional"}}},"8d8db4b1-8c90-472b-bc98-88fa6a2188d1":{"Binary":{"id":"8d8db4b1-8c90-472b-bc98-88fa6a2188d1","number":76,"from":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"helps define a function signature","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"lambda"},"to":{"obj_id":"95e17479-07a5-41b1-9930-1b9b520514f6","description":"use used by","cardinality":"One","conditionality":"Conditional"}}},"44ad55c5-bb62-4864-90e7-e992494786aa":{"Binary":{"id":"44ad55c5-bb62-4864-90e7-e992494786aa","number":77,"from":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"may require a type","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"applies to","cardinality":"One","conditionality":"Conditional"}}},"c12fcdf7-ec63-58c7-8555-36222f25b91b":{"Associative":{"id":"c12fcdf7-ec63-58c7-8555-36222f25b91b","number":78,"from":{"id":"4c7a4c0b-c22d-5b7d-8d58-028ae5116e1b","obj_id":"68e7191a-fe94-423f-8a5d-5551384ae998","cardinality":"One","one_referential_attribute":"z_store","other_referential_attribute":"object"},"one":{"obj_id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","description":"houses","cardinality":"Many","conditionality":"Unconditional"},"other":{"obj_id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","description":"lives in an","cardinality":"One","conditionality":"Unconditional"}}},"c3dba39c-fe1e-49e0-9a45-8f872b6aa4c5":{"Binary":{"id":"c3dba39c-fe1e-49e0-9a45-8f872b6aa4c5","number":79,"from":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"requires a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"is used by","cardinality":"One","conditionality":"Conditional"}}},"f1c15ada-631b-4249-8c73-4e52391a532f":{"Binary":{"id":"f1c15ada-631b-4249-8c73-4e52391a532f","number":4,"from":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"mirrors an","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"object"},"to":{"obj_id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","description":"is surfaced as a","cardinality":"One","conditionality":"Conditional"}}},"a5ac6af9-3cef-49e5-8d01-462817e1d641":{"Isa":{"id":"a5ac6af9-3cef-49e5-8d01-462817e1d641","number":80,"obj_id":"c4723d6d-1584-49bd-80f1-4c700185746e","subtypes":["7794ada6-49c3-4bf0-991f-828c6583ebb8","30c31621-a4bd-4356-80b9-1226e00651c9"]}},"868b4a28-0d2f-4d78-b947-66f44c3bdaf9":{"Binary":{"id":"868b4a28-0d2f-4d78-b947-66f44c3bdaf9","number":81,"from":{"obj_id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","description":"may have a first","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"argument"},"to":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"may be the first to (lame)","cardinality":"One","conditionality":"Conditional"}}},"ca33902a-c6f2-45a5-9273-cf80a579cedd":{"Binary":{"id":"ca33902a-c6f2-45a5-9273-cf80a579cedd","number":82,"from":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"may have a first parameter","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"first_param"},"to":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"may be the first to this","cardinality":"One","conditionality":"Conditional"}}},"d440f204-2694-4438-b618-721a9108070f":{"Binary":{"id":"d440f204-2694-4438-b618-721a9108070f","number":83,"from":{"obj_id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","description":"may refer to an","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"object_store"},"to":{"obj_id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","description":"This should really be to a subtype","cardinality":"One","conditionality":"Conditional"}}},"69b40bff-5f3d-44ef-8c68-57ff9e033e7b":{"Binary":{"id":"69b40bff-5f3d-44ef-8c68-57ff9e033e7b","number":84,"from":{"obj_id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","description":"may have an","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"implementation"},"to":{"obj_id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","description":"may be provided to an","cardinality":"One","conditionality":"Conditional"}}},"18c4566d-a7b7-4b1d-8e0b-470fddbaab9b":{"Binary":{"id":"18c4566d-a7b7-4b1d-8e0b-470fddbaab9b","number":86,"from":{"obj_id":"c8fcd612-6ca8-469a-824c-de218e4fd075","description":"must have a type","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"is used my a","cardinality":"One","conditionality":"Conditional"}}},"33b9b943-0d44-4490-b20a-35c110ae9473":{"Isa":{"id":"33b9b943-0d44-4490-b20a-35c110ae9473","number":85,"obj_id":"7eaea922-8807-4c38-a704-0143e0594664","subtypes":["4b6c7fde-0878-4947-b960-bc73a4558c60","e6fbeeb8-6ade-46a2-bb52-9c99d06918b2","c8fcd612-6ca8-469a-824c-de218e4fd075"]}},"4ce09575-5a2c-40c5-b766-bb12ef0c1600":{"Binary":{"id":"4ce09575-5a2c-40c5-b766-bb12ef0c1600","number":88,"from":{"obj_id":"7eaea922-8807-4c38-a704-0143e0594664","description":"belongs to an","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"enum"},"to":{"obj_id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","description":"is composed of","cardinality":"One","conditionality":"Conditional"}}},"193d881e-9afd-4b9e-a431-cdb113a7ee88":{"Binary":{"id":"193d881e-9afd-4b9e-a431-cdb113a7ee88","number":91,"from":{"obj_id":"52143d28-8474-44bc-b63f-e654150888d3","description":"deconstructs ","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"scrutinee"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is deconstructod by","cardinality":"One","conditionality":"Conditional"}}},"badf3d57-aba3-4757-b0e4-9d0e7b55f2ea":{"Associative":{"id":"badf3d57-aba3-4757-b0e4-9d0e7b55f2ea","number":87,"from":{"id":"091c60c4-87c3-559d-88d0-e8fc60f68a9b","obj_id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","cardinality":"One","one_referential_attribute":"match","other_referential_attribute":"match_expr"},"one":{"obj_id":"52143d28-8474-44bc-b63f-e654150888d3","description":"matches","cardinality":"Many","conditionality":"Unconditional"},"other":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"are matched by","cardinality":"Many","conditionality":"Conditional"}}},"08512716-f1d3-4a88-bd38-aea9ae0f9ca7":{"Binary":{"id":"08512716-f1d3-4a88-bd38-aea9ae0f9ca7","number":92,"from":{"obj_id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","description":"executes","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is executed because of a ","cardinality":"One","conditionality":"Conditional"}}},"0ed07f33-0bbb-497d-9823-9247fc520e85":{"Binary":{"id":"0ed07f33-0bbb-497d-9823-9247fc520e85","number":93,"from":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"parent"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"child","cardinality":"One","conditionality":"Conditional"}}},"cea29749-dc0f-40c0-adf9-4c21b187751e":{"Isa":{"id":"cea29749-dc0f-40c0-adf9-4c21b187751e","number":94,"obj_id":"3874760d-0104-4670-ba8b-1af413c5ec4a","subtypes":["6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7","910e3a08-5e99-47a5-bde4-3e35cf9f00da"]}},"599c1454-9525-4386-b50f-4fdee4b08373":{"Isa":{"id":"599c1454-9525-4386-b50f-4fdee4b08373","number":95,"obj_id":"31deb355-b737-43a6-ae88-199bb51f940d","subtypes":["e68f8912-9897-4cbd-b363-cb4203a726a9","d48d948b-5291-4eb3-ba35-7ab1c1ffa098"]}},"9f2917c8-b17b-4ab2-8c6e-0269a0b80681":{"Binary":{"id":"9f2917c8-b17b-4ab2-8c6e-0269a0b80681","number":89,"from":{"obj_id":"39060ea9-5d45-4954-a29f-ba88e01e7217","description":"next","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"39060ea9-5d45-4954-a29f-ba88e01e7217","description":"previous","cardinality":"One","conditionality":"Conditional"}}},"3c241319-416a-4195-ae80-fa4439198c1c":{"Binary":{"id":"3c241319-416a-4195-ae80-fa4439198c1c","number":96,"from":{"obj_id":"d546feef-91df-49ea-ac61-430bdcf9832c","description":"has a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"path"},"to":{"obj_id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","description":"points at","cardinality":"One","conditionality":"Unconditional"}}},"12003437-2898-4b1d-ba27-b1cc69d8dbb2":{"Binary":{"id":"12003437-2898-4b1d-ba27-b1cc69d8dbb2","number":90,"from":{"obj_id":"39060ea9-5d45-4954-a29f-ba88e01e7217","description":"comprises","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"path"},"to":{"obj_id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","description":"is comprised of","cardinality":"One","conditionality":"Unconditional"}}},"940f5aba-58f5-46fa-bbba-43fc6b10a3fe":{"Binary":{"id":"940f5aba-58f5-46fa-bbba-43fc6b10a3fe","number":97,"from":{"obj_id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","description":"first element","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"first"},"to":{"obj_id":"39060ea9-5d45-4954-a29f-ba88e01e7217","description":"i win!","cardinality":"One","conditionality":"Unconditional"}}},"42c18b66-d259-40d1-a77d-0c0e76080a6d":{"Binary":{"id":"42c18b66-d259-40d1-a77d-0c0e76080a6d","number":98,"from":{"obj_id":"4856978f-20be-4b59-8bf6-b941091119a9","description":"awaits","cardinality":"One","conditionality":"Unconditional","formalizing_attribute_name":"future"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is awaited upon by","cardinality":"One","conditionality":"Conditional"}}},"04ae2e8d-c499-4068-88bd-015b0bba57bf":{"Binary":{"id":"04ae2e8d-c499-4068-88bd-015b0bba57bf","number":2,"from":{"obj_id":"dbada891-ca0d-4fbc-8371-9f9234867bd6","description":"contains","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"value"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"may be wrapped by a","cardinality":"One","conditionality":"Conditional"}}},"7e2c2118-fb6c-4ac4-9676-e7427cd495c2":{"Binary":{"id":"7e2c2118-fb6c-4ac4-9676-e7427cd495c2","number":3,"from":{"obj_id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","description":"next","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","description":"previous","cardinality":"One","conditionality":"Conditional"}}},"b21bc0c0-fab4-42f8-ae6c-eb6ab8f5968a":{"Binary":{"id":"b21bc0c0-fab4-42f8-ae6c-eb6ab8f5968a","number":99,"from":{"obj_id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","description":"has an inner","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"may be represented as a","cardinality":"One","conditionality":"Conditional"}}},"e4734a39-1f45-400f-937a-285e2fad31a4":{"Binary":{"id":"e4734a39-1f45-400f-937a-285e2fad31a4","number":100,"from":{"obj_id":"290f49d3-8ce7-408e-be14-611b66db9687","description":"applies to a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"struct"},"to":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"may be parameterized by","cardinality":"One","conditionality":"Conditional"}}},"da1d6545-b9d6-499e-9175-fd2a340b1f2e":{"Binary":{"id":"da1d6545-b9d6-499e-9175-fd2a340b1f2e","number":101,"from":{"obj_id":"290f49d3-8ce7-408e-be14-611b66db9687","description":"","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"290f49d3-8ce7-408e-be14-611b66db9687","description":"previous","cardinality":"One","conditionality":"Conditional"}}},"c8a4b21a-62c3-4fbd-8799-2b55d93d951c":{"Binary":{"id":"c8a4b21a-62c3-4fbd-8799-2b55d93d951c","number":102,"from":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"may have a ","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"first generic"},"to":{"obj_id":"290f49d3-8ce7-408e-be14-611b66db9687","description":"struct leader","cardinality":"One","conditionality":"Unconditional"}}}}}} \ No newline at end of file +{"paper":{"ids":["3d320f60-bf7c-5f3b-a456-06fa8de4c2ef"],"entities":{"3d320f60-bf7c-5f3b-a456-06fa8de4c2ef":{"id":"3d320f60-bf7c-5f3b-a456-06fa8de4c2ef","domain_name":"lu_dog","description":"A blank domain","domain_ns":"3d320f60-bf7c-5f3b-a456-06fa8de4c2ef","width":8000,"height":6400,"offset":{"x":-1652,"y":-1214},"objects":{"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f":{"x":2185,"y":2132,"width":232,"height":95},"7178e7a4-5131-504b-a7b3-c2c0cfedf343":{"x":2647,"y":2269,"width":252,"height":142},"45644594-b418-5362-9294-a62fe2a0fa8e":{"x":3662,"y":1923,"width":271,"height":100,"id":"45644594-b418-5362-9294-a62fe2a0fa8e"},"2e277e34-ab6f-4028-9c52-935c31520fec":{"x":2668,"y":2461,"width":252,"height":126,"id":"2e277e34-ab6f-4028-9c52-935c31520fec"},"e68f8912-9897-4cbd-b363-cb4203a726a9":{"x":3162,"y":2270,"width":245,"height":145,"id":"e68f8912-9897-4cbd-b363-cb4203a726a9"},"141350e6-b62d-4a6d-9ea2-47333e51e3ea":{"x":3163,"y":2461,"width":246,"height":133,"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea"},"88687f76-5d9e-404e-a801-f6f57f9b30ca":{"x":3656,"y":2269,"width":285,"height":148,"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca"},"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5":{"x":4151,"y":2426,"width":320,"height":154,"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5"},"c89e362d-7905-4226-8713-97d3d6f05037":{"x":4527,"y":2257,"width":283,"height":139,"id":"c89e362d-7905-4226-8713-97d3d6f05037"},"94fc0044-4b88-4f5c-ac60-3a44262ade10":{"x":2696,"y":2767,"width":253,"height":131,"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10"},"f192b162-8ada-4128-8805-1953e9165c54":{"x":2024,"y":2660,"width":265,"height":133,"id":"f192b162-8ada-4128-8805-1953e9165c54"},"954b354f-3a90-440b-ab0f-43efc00d275e":{"x":2390,"y":3118,"width":211,"height":129,"id":"954b354f-3a90-440b-ab0f-43efc00d275e"},"0365b40c-c40a-4653-84ab-44d1c12d294f":{"x":2028,"y":2832,"width":256,"height":116,"id":"0365b40c-c40a-4653-84ab-44d1c12d294f"},"9352c766-9f6b-413b-9ea0-13f9c8e4d86e":{"x":3010,"y":3115,"width":234,"height":135,"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e"},"30c31621-a4bd-4356-80b9-1226e00651c9":{"x":3865,"y":2738,"width":242,"height":128,"id":"30c31621-a4bd-4356-80b9-1226e00651c9"},"6c7969f3-f150-4975-a989-a7bc8164b168":{"x":3868,"y":2997,"width":241,"height":117,"id":"6c7969f3-f150-4975-a989-a7bc8164b168"},"c32fcb6d-b505-492f-95c8-5f118079a399":{"x":4296,"y":2896,"width":259,"height":125,"id":"c32fcb6d-b505-492f-95c8-5f118079a399"},"59f269ab-2dbc-4b07-b9bc-48441f20e78f":{"x":4300,"y":3074,"width":251,"height":137,"id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f"},"b359d531-77ae-436f-9f0d-6a5632f1648e":{"x":4302,"y":3264,"width":252,"height":133,"id":"b359d531-77ae-436f-9f0d-6a5632f1648e"},"ce2da156-e0fd-4e56-bb31-2030d4e0c599":{"x":4298,"y":2717,"width":252,"height":117,"id":"ce2da156-e0fd-4e56-bb31-2030d4e0c599"},"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea":{"x":3858,"y":3704,"width":267,"height":142,"id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea"},"a8b86e41-5b04-4469-8a10-91bd89603e27":{"x":2185,"y":2002,"width":233,"height":109,"id":"a8b86e41-5b04-4469-8a10-91bd89603e27"},"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5":{"x":4390,"y":3880,"width":239,"height":115,"id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5"},"dc6d1ffa-5dca-43ef-b973-0628ab580cb7":{"x":4797,"y":3826,"width":173,"height":118,"id":"dc6d1ffa-5dca-43ef-b973-0628ab580cb7"},"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d":{"x":4800,"y":3989,"width":171,"height":114,"id":"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d"},"b1612607-a813-4bc2-896b-88ec4b249447":{"x":4389,"y":3738,"width":241,"height":117,"id":"b1612607-a813-4bc2-896b-88ec4b249447"},"d30d2b03-732b-41bb-89ed-d053750bf987":{"x":4389,"y":3591,"width":242,"height":118,"id":"d30d2b03-732b-41bb-89ed-d053750bf987"},"fa42f4e2-1ff3-473f-a4b9-593c01134e96":{"x":4394,"y":4025,"width":235,"height":116,"id":"fa42f4e2-1ff3-473f-a4b9-593c01134e96"},"d715c5f9-23f8-45e0-a1df-34e27acd01f5":{"x":3850,"y":3199,"width":280,"height":132,"id":"d715c5f9-23f8-45e0-a1df-34e27acd01f5"},"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b":{"x":3854,"y":3371,"width":276,"height":130,"id":"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b"},"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656":{"x":3856,"y":3540,"width":272,"height":121,"id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656"},"d546feef-91df-49ea-ac61-430bdcf9832c":{"x":3861,"y":3896,"width":263,"height":141,"id":"d546feef-91df-49ea-ac61-430bdcf9832c"},"3874760d-0104-4670-ba8b-1af413c5ec4a":{"x":3863,"y":4181,"width":263,"height":136,"id":"3874760d-0104-4670-ba8b-1af413c5ec4a"},"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7":{"x":3426,"y":4149,"width":284,"height":141,"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7"},"846aa191-7b0c-4325-8c21-09fa5edf7c78":{"x":3129,"y":4149,"width":254,"height":139,"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78"},"26dba2c5-a7e9-4556-a9c2-79091a97b941":{"x":2713,"y":4148,"width":248,"height":138,"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941"},"75a16785-d611-45ce-b52c-284a9da0b4b8":{"x":2456,"y":4492,"width":221,"height":128,"id":"75a16785-d611-45ce-b52c-284a9da0b4b8"},"01c8907d-cb59-4fae-a3ca-8cb331d18387":{"x":3171,"y":4386,"width":264,"height":131,"id":"01c8907d-cb59-4fae-a3ca-8cb331d18387"},"79069fc2-4d65-4073-b610-4afc0488de5c":{"x":2585,"y":4688,"width":306,"height":141,"id":"79069fc2-4d65-4073-b610-4afc0488de5c"},"23a9a479-68e7-4a70-bcef-9041f10fd287":{"x":2571,"y":1569,"width":233,"height":112,"id":"23a9a479-68e7-4a70-bcef-9041f10fd287"},"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9":{"x":2187,"y":1861,"width":231,"height":114,"id":"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9"},"a9b74602-bdc5-481f-af4c-8021553b895a":{"x":2186,"y":1710,"width":233,"height":119,"id":"a9b74602-bdc5-481f-af4c-8021553b895a"},"cdb1afaf-245c-4d56-bfea-10f69e45007d":{"x":2185,"y":1552,"width":233,"height":123,"id":"cdb1afaf-245c-4d56-bfea-10f69e45007d"},"b7483723-222d-4f08-b7b9-e8b14f0308cf":{"x":2141,"y":1390,"width":277,"height":126,"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf"},"97f815f0-dcc4-4bd3-843d-13ff1dc5802c":{"x":3673,"y":1599,"width":222,"height":126,"id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c"},"72443b79-5645-4b5f-b317-e1a8f815b81c":{"x":3117,"y":2660,"width":256,"height":136,"id":"72443b79-5645-4b5f-b317-e1a8f815b81c"},"93f288e7-d670-40a6-91f3-2006b5efa8b4":{"x":2517,"y":3913,"width":252,"height":115,"id":"93f288e7-d670-40a6-91f3-2006b5efa8b4"},"e1321ffa-07d5-480d-89f9-227b13d27ce1":{"x":3399,"y":2855,"width":218,"height":102,"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1"},"3f7fd816-518b-4b9e-8134-3059e78045a0":{"x":2389,"y":3341,"width":199,"height":113,"id":"3f7fd816-518b-4b9e-8134-3059e78045a0"},"c46e6b80-0365-429a-abf9-ca75ce4f469a":{"x":1935,"y":3121,"width":196,"height":105,"id":"c46e6b80-0365-429a-abf9-ca75ce4f469a"},"9c8bc563-b596-4348-9189-065d747f7c9f":{"x":1949,"y":3755,"width":194,"height":107,"id":"9c8bc563-b596-4348-9189-065d747f7c9f"},"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523":{"x":1633,"y":3690,"width":160,"height":108,"id":"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523"},"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e":{"x":1630,"y":3822,"width":160,"height":108,"id":"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e"},"484e429b-bf54-45cb-9b87-baddf7fb5f5b":{"x":1528,"y":3121,"width":222,"height":108,"id":"484e429b-bf54-45cb-9b87-baddf7fb5f5b"},"c47b8696-7e98-4733-ab33-a4dca7b61d01":{"x":1635,"y":3554,"width":160,"height":111,"id":"c47b8696-7e98-4733-ab33-a4dca7b61d01"},"e05ab5f3-17e7-4594-8ce0-c02d793a1df9":{"x":2416,"y":3520,"width":244,"height":112,"id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9"},"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d":{"x":2189,"y":3777,"width":251,"height":111,"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d"},"4d5720eb-da8c-493d-ab8d-cb6111dd6099":{"x":3170,"y":3635,"width":223,"height":126,"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099"},"6767c0cf-4041-4047-b2b4-d7375f33bc97":{"x":1629,"y":3956,"width":159,"height":114,"id":"6767c0cf-4041-4047-b2b4-d7375f33bc97"},"35b3de4e-46b8-490f-8e30-c305ed348a78":{"x":1628,"y":4097,"width":159,"height":116,"id":"35b3de4e-46b8-490f-8e30-c305ed348a78"},"d8b554d4-03ac-4613-a3e0-fc0b901bfd70":{"x":1526,"y":3254,"width":220,"height":109,"id":"d8b554d4-03ac-4613-a3e0-fc0b901bfd70"},"0edc535b-405d-4dd5-bcd2-f5772ab116c2":{"x":1525,"y":3387,"width":221,"height":111,"id":"0edc535b-405d-4dd5-bcd2-f5772ab116c2"},"0b3e9de0-d139-4934-a043-d1913a24de0c":{"x":2117,"y":4193,"width":199,"height":120,"id":"0b3e9de0-d139-4934-a043-d1913a24de0c"},"70932b40-f444-4341-bb19-0a29d1daecbe":{"x":2136,"y":4436,"width":136,"height":99,"id":"70932b40-f444-4341-bb19-0a29d1daecbe"},"32dbb54a-9693-4847-9278-7c956ea045f8":{"x":2290,"y":4434,"width":135,"height":102,"id":"32dbb54a-9693-4847-9278-7c956ea045f8"},"0dc0e921-e7ff-4766-9738-e6e312f7f0de":{"x":2359,"y":4189,"width":249,"height":104,"id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de"},"122e4157-381f-400f-ac30-a1c8a2a9e8c1":{"x":1987,"y":4434,"width":128,"height":102,"id":"122e4157-381f-400f-ac30-a1c8a2a9e8c1"},"17db2afc-ae6c-4e53-a527-48516811fe3e":{"x":1832,"y":4435,"width":136,"height":100,"id":"17db2afc-ae6c-4e53-a527-48516811fe3e"},"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd":{"x":1670,"y":4435,"width":141,"height":96,"id":"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd"},"ba8a3bbf-86a8-47e2-92bb-f41878981c41":{"x":2190,"y":1222,"width":232,"height":131,"id":"ba8a3bbf-86a8-47e2-92bb-f41878981c41"},"79571896-9798-44a3-acef-5aa2d9773b93":{"x":2821,"y":1940,"width":267,"height":145,"id":"79571896-9798-44a3-acef-5aa2d9773b93"},"5c85a8db-e4cc-4e38-9922-58d93773f4f0":{"x":3205,"y":3844,"width":174,"height":122,"id":"5c85a8db-e4cc-4e38-9922-58d93773f4f0"},"bf69c9af-f268-4c9b-8e67-4497eb490478":{"x":3665,"y":2456,"width":259,"height":81,"id":"bf69c9af-f268-4c9b-8e67-4497eb490478"},"ce73a111-4670-411e-9bd2-f3308d6399c9":{"x":1530,"y":2997,"width":222,"height":96,"id":"ce73a111-4670-411e-9bd2-f3308d6399c9"},"1e7a66b2-f559-4c21-b8e6-969999ed171d":{"x":2412,"y":2803,"width":207,"height":111,"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d"},"80f73c4e-caf1-4e1f-a634-00965f6ad032":{"x":958,"y":3402,"width":154,"height":98,"id":"80f73c4e-caf1-4e1f-a634-00965f6ad032"},"222307c0-668c-43f9-9368-34cc048f0ae3":{"x":1359,"y":3771,"width":195,"height":90,"id":"222307c0-668c-43f9-9368-34cc048f0ae3"},"6187076b-e765-4e6b-af28-f577eba40b5e":{"x":1086,"y":3735,"width":140,"height":88,"id":"6187076b-e765-4e6b-af28-f577eba40b5e"},"f7fc16ac-6a23-4f5d-a04c-1163617701c1":{"x":1273,"y":3485,"width":176,"height":102,"id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1"},"0ad229c4-1782-4783-b64e-0d15fe482463":{"x":958,"y":3549,"width":155,"height":95,"id":"0ad229c4-1782-4783-b64e-0d15fe482463"},"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a":{"x":1531,"y":2863,"width":219,"height":111,"id":"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a"},"470246f6-91ec-4993-b915-93480d0f4eb9":{"x":3026,"y":4641,"width":240,"height":149,"id":"470246f6-91ec-4993-b915-93480d0f4eb9"},"f6a3ce12-18e1-4675-ab94-6b2a7c91d951":{"x":4519,"y":2028,"width":234,"height":137,"id":"f6a3ce12-18e1-4675-ab94-6b2a7c91d951"},"41b7bda7-f5a2-4c94-af22-fedbe8d6f287":{"x":1085,"y":3857,"width":142,"height":92,"id":"41b7bda7-f5a2-4c94-af22-fedbe8d6f287"},"84f1c5fd-d907-4653-a132-bfd420ad9212":{"x":1529,"y":2714,"width":220,"height":121,"id":"84f1c5fd-d907-4653-a132-bfd420ad9212"},"efde0481-1599-4c5c-bf30-51dbd4a8ed83":{"x":1737,"y":2304,"width":203,"height":108,"id":"efde0481-1599-4c5c-bf30-51dbd4a8ed83"},"95e17479-07a5-41b1-9930-1b9b520514f6":{"x":3552,"y":2634,"width":309,"height":105,"id":"95e17479-07a5-41b1-9930-1b9b520514f6"},"8d86dceb-7e6e-4767-8a3f-cbbde458ad93":{"x":2029,"y":2973,"width":255,"height":124,"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93"},"68e7191a-fe94-423f-8a5d-5551384ae998":{"x":2771,"y":1733,"width":253,"height":110,"id":"68e7191a-fe94-423f-8a5d-5551384ae998"},"c4723d6d-1584-49bd-80f1-4c700185746e":{"x":4612,"y":2457,"width":199,"height":112,"id":"c4723d6d-1584-49bd-80f1-4c700185746e"},"7794ada6-49c3-4bf0-991f-828c6583ebb8":{"x":4788,"y":2694,"width":280,"height":119,"id":"7794ada6-49c3-4bf0-991f-828c6583ebb8"},"d48d948b-5291-4eb3-ba35-7ab1c1ffa098":{"x":4081,"y":1919,"width":348,"height":113,"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098"},"7eaea922-8807-4c38-a704-0143e0594664":{"x":4450,"y":1722,"width":212,"height":105,"id":"7eaea922-8807-4c38-a704-0143e0594664"},"4b6c7fde-0878-4947-b960-bc73a4558c60":{"x":4185,"y":1504,"width":147,"height":115,"id":"4b6c7fde-0878-4947-b960-bc73a4558c60"},"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2":{"x":4351,"y":1504,"width":297,"height":114,"id":"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2"},"c8fcd612-6ca8-469a-824c-de218e4fd075":{"x":4667,"y":1504,"width":324,"height":116,"id":"c8fcd612-6ca8-469a-824c-de218e4fd075"},"968ea4f4-0a3b-44d4-a266-16facf7d325f":{"x":2212,"y":2427,"width":201,"height":113,"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f"},"52143d28-8474-44bc-b63f-e654150888d3":{"x":2619,"y":3122,"width":241,"height":108,"id":"52143d28-8474-44bc-b63f-e654150888d3"},"ab7a5708-6d12-4dce-b488-fa3a3b480510":{"x":3490,"y":3922,"width":232,"height":83,"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510"},"6094aad5-613b-42b6-8f48-c3b9e2161aa9":{"x":2842,"y":3296,"width":250,"height":113,"id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9"},"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7":{"x":3737,"y":4431,"width":245,"height":132,"id":"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7"},"910e3a08-5e99-47a5-bde4-3e35cf9f00da":{"x":4023,"y":4431,"width":272,"height":132,"id":"910e3a08-5e99-47a5-bde4-3e35cf9f00da"},"31deb355-b737-43a6-ae88-199bb51f940d":{"x":3566,"y":3110,"width":210,"height":107,"id":"31deb355-b737-43a6-ae88-199bb51f940d"},"39060ea9-5d45-4954-a29f-ba88e01e7217":{"x":3478,"y":3726,"width":240,"height":116,"id":"39060ea9-5d45-4954-a29f-ba88e01e7217"},"4856978f-20be-4b59-8bf6-b941091119a9":{"x":3032,"y":2834,"width":215,"height":140,"id":"4856978f-20be-4b59-8bf6-b941091119a9"},"dbada891-ca0d-4fbc-8371-9f9234867bd6":{"x":2186,"y":2247,"width":231,"height":119,"id":"dbada891-ca0d-4fbc-8371-9f9234867bd6"},"290f49d3-8ce7-408e-be14-611b66db9687":{"x":3161,"y":2031,"width":243,"height":126,"id":"290f49d3-8ce7-408e-be14-611b66db9687"}},"relationships":{"21f08565-d913-4302-a853-e5f688ec1bc1":{"IsaUI":{"from":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2496,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f","x":2417,"y":2184,"offset":{"x":20,"y":20},"dir":"East"},{"id":"a8b86e41-5b04-4469-8a10-91bd89603e27","x":2418,"y":2067,"offset":{"x":20,"y":20},"dir":"East"},{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4225,"y":2426,"offset":{"x":20,"y":20},"dir":"North"},{"id":"23a9a479-68e7-4a70-bcef-9041f10fd287","x":2625,"y":1681,"offset":{"x":20,"y":20},"dir":"South"},{"id":"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9","x":2418,"y":1914,"offset":{"x":20,"y":20},"dir":"East"},{"id":"a9b74602-bdc5-481f-af4c-8021553b895a","x":2419,"y":1797,"offset":{"x":20,"y":20},"dir":"East"},{"id":"cdb1afaf-245c-4d56-bfea-10f69e45007d","x":2418,"y":1648,"offset":{"x":20,"y":20},"dir":"East"},{"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","x":2418,"y":1464,"offset":{"x":20,"y":20},"dir":"East"},{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3162,"y":2380,"offset":{"x":20,"y":20},"dir":"West"},{"id":"c89e362d-7905-4226-8713-97d3d6f05037","x":4612,"y":2396,"offset":{"x":20,"y":20},"dir":"South"},{"id":"ba8a3bbf-86a8-47e2-92bb-f41878981c41","x":2422,"y":1297,"offset":{"x":20,"y":20},"dir":"East"},{"id":"efde0481-1599-4c5c-bf30-51dbd4a8ed83","x":1940,"y":2360,"offset":{"x":20,"y":20},"dir":"East"},{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3699,"y":2634,"offset":{"x":20,"y":20},"dir":"North"},{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4111,"y":2032,"offset":{"x":20,"y":20},"dir":"South"},{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","x":2413,"y":2462,"offset":{"x":20,"y":20},"dir":"East"},{"id":"dbada891-ca0d-4fbc-8371-9f9234867bd6","x":2417,"y":2311,"offset":{"x":20,"y":20},"dir":"East"}]}},"c12fcdf7-ec63-58c7-8555-36222f25b91b":{"AssociativeUI":{"from":{"x":3162,"y":2346},"middle":{"id":"68e7191a-fe94-423f-8a5d-5551384ae998","x":2771,"y":1780,"offset":{"x":0,"y":0},"dir":"West"},"one":{"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","x":2418,"y":1493,"offset":{"x":-75,"y":54},"dir":"East"},"other":{"id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","x":2775,"y":2269,"offset":{"x":18,"y":-27},"dir":"North"}}},"4b7360ba-8de3-4c93-bc90-22478c128a75":{"BinaryUI":{"from":{"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","x":3163,"y":2543,"offset":{"x":-92,"y":30},"dir":"West"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2920,"y":2562,"offset":{"x":24,"y":-21},"dir":"East"}}},"3746c64a-c63d-424d-afb2-c253470b6d7b":{"IsaUI":{"from":{"id":"45644594-b418-5362-9294-a62fe2a0fa8e","x":3790,"y":2023,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3285,"y":2270,"offset":{"x":20,"y":20},"dir":"North"},{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3789,"y":2269,"offset":{"x":20,"y":20},"dir":"North"},{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4308,"y":2426,"offset":{"x":20,"y":20},"dir":"North"},{"id":"c89e362d-7905-4226-8713-97d3d6f05037","x":4649,"y":2257,"offset":{"x":20,"y":20},"dir":"North"},{"id":"f6a3ce12-18e1-4675-ab94-6b2a7c91d951","x":4519,"y":2094,"offset":{"x":20,"y":20},"dir":"West"},{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4222,"y":2032,"offset":{"x":20,"y":20},"dir":"South"}]}},"02892323-60e9-470b-b162-b2bc8d9ef1cd":{"BinaryUI":{"from":{"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","x":3409,"y":2523,"offset":{"x":19,"y":33},"dir":"East"},"to":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3407,"y":2390,"offset":{"x":61,"y":35},"dir":"East"}}},"98c79b91-da7b-443a-b1fb-18596cd6b4bc":{"BinaryUI":{"from":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3656,"y":2323,"offset":{"x":-128,"y":-40},"dir":"West"},"to":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3407,"y":2323,"offset":{"x":15,"y":34},"dir":"East"}}},"7993e2c7-7efa-4346-b50e-bc02d55e1ca7":{"BinaryUI":{"from":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4151,"y":2455,"offset":{"x":-80,"y":-74},"dir":"West"},"to":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3941,"y":2355,"offset":{"x":-104,"y":95},"dir":"East"}}},"fdb49afe-13fb-4c79-99d1-92728d8652c7":{"BinaryUI":{"from":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4213,"y":2580,"offset":{"x":-168,"y":17},"dir":"South"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2849,"y":2587,"offset":{"x":38,"y":26},"dir":"South"}}},"ea1e6d1c-279b-4b6d-806e-fa133c6a5da9":{"IsaUI":{"from":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","x":2823,"y":2898,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"954b354f-3a90-440b-ab0f-43efc00d275e","x":2526,"y":3118,"offset":{"x":20,"y":20},"dir":"North"},{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3120,"y":3115,"offset":{"x":20,"y":20},"dir":"North"}]}},"35491126-597f-4301-ae48-88da4a23c845":{"IsaUI":{"from":{"id":"954b354f-3a90-440b-ab0f-43efc00d275e","x":2444,"y":3118,"offset":{"x":20,"y":20},"dir":"North"},"to":[{"id":"0365b40c-c40a-4653-84ab-44d1c12d294f","x":2284,"y":2898,"offset":{"x":20,"y":20},"dir":"East"},{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2289,"y":2763,"offset":{"x":20,"y":20},"dir":"East"},{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2284,"y":3077,"offset":{"x":20,"y":20},"dir":"East"}]}},"336674ce-19be-4baa-8117-19ee19886e2d":{"BinaryUI":{"from":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2289,"y":2693,"offset":{"x":102,"y":35},"dir":"East"},"to":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4340,"y":2580,"offset":{"x":20,"y":20},"dir":"South"}}},"95b8c311-1f3f-42ab-93cd-9b95c8d8c02a":{"BinaryUI":{"from":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2024,"y":2694,"offset":{"x":-113,"y":-51},"dir":"West"},"to":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2024,"y":2759,"offset":{"x":35,"y":28},"dir":"West"}}},"3966271b-9938-48c7-b4fe-177c307e22bf":{"IsaUI":{"from":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3182,"offset":{"x":20,"y":20},"dir":"East"},"to":[{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2827,"offset":{"x":20,"y":20},"dir":"West"},{"id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","x":3858,"y":3769,"offset":{"x":20,"y":20},"dir":"West"},{"id":"d715c5f9-23f8-45e0-a1df-34e27acd01f5","x":3850,"y":3257,"offset":{"x":20,"y":20},"dir":"West"},{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","x":3861,"y":3963,"offset":{"x":20,"y":20},"dir":"West"},{"id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","x":3856,"y":3588,"offset":{"x":20,"y":20},"dir":"West"},{"id":"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b","x":3854,"y":3445,"offset":{"x":20,"y":20},"dir":"West"},{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","x":3538,"y":4149,"offset":{"x":20,"y":20},"dir":"North"},{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2878,"y":4148,"offset":{"x":20,"y":20},"dir":"North"},{"id":"72443b79-5645-4b5f-b317-e1a8f815b81c","x":3288,"y":2796,"offset":{"x":20,"y":20},"dir":"South"},{"id":"93f288e7-d670-40a6-91f3-2006b5efa8b4","x":2628,"y":3913,"offset":{"x":20,"y":20},"dir":"North"},{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","x":3542,"y":2957,"offset":{"x":20,"y":20},"dir":"South"},{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","x":2588,"y":3401,"offset":{"x":20,"y":20},"dir":"East"},{"id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9","x":2572,"y":3520,"offset":{"x":20,"y":20},"dir":"North"},{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2423,"y":3777,"offset":{"x":20,"y":20},"dir":"North"},{"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","x":3291,"y":3635,"offset":{"x":20,"y":20},"dir":"North"},{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","x":2230,"y":4193,"offset":{"x":20,"y":20},"dir":"North"},{"id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de","x":2501,"y":4189,"offset":{"x":20,"y":20},"dir":"North"},{"id":"5c85a8db-e4cc-4e38-9922-58d93773f4f0","x":3293,"y":3844,"offset":{"x":20,"y":20},"dir":"North"},{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","x":3863,"y":4240,"offset":{"x":20,"y":20},"dir":"West"},{"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","x":2544,"y":2914,"offset":{"x":20,"y":20},"dir":"South"},{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3771,"y":2720,"offset":{"x":20,"y":20},"dir":"South"},{"id":"52143d28-8474-44bc-b63f-e654150888d3","x":2860,"y":3184,"offset":{"x":20,"y":20},"dir":"East"},{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","x":3490,"y":3952,"offset":{"x":20,"y":20},"dir":"West"},{"id":"4856978f-20be-4b59-8bf6-b941091119a9","x":3247,"y":2919,"offset":{"x":20,"y":20},"dir":"East"}]}},"2e81ce06-82d5-47e6-9f38-783d8af057d9":{"IsaUI":{"from":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":4109,"y":3052,"offset":{"x":20,"y":20},"dir":"East"},"to":[{"id":"ce2da156-e0fd-4e56-bb31-2030d4e0c599","x":4298,"y":2778,"offset":{"x":20,"y":20},"dir":"West"},{"id":"c32fcb6d-b505-492f-95c8-5f118079a399","x":4296,"y":2960,"offset":{"x":20,"y":20},"dir":"West"},{"id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f","x":4300,"y":3143,"offset":{"x":20,"y":20},"dir":"West"},{"id":"b359d531-77ae-436f-9f0d-6a5632f1648e","x":4302,"y":3333,"offset":{"x":20,"y":20},"dir":"West"}]}},"03745d2b-a85f-40a9-b038-8f22c83e8eb1":{"BinaryUI":{"from":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":3951,"y":3114,"offset":{"x":-131,"y":-23},"dir":"South"},"to":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":4045,"y":3114,"offset":{"x":20,"y":20},"dir":"South"}}},"c715993f-c840-4d48-8442-b5635e4324e7":{"BinaryUI":{"from":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":3950,"y":2997,"offset":{"x":26,"y":-17},"dir":"North"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3950,"y":2866,"offset":{"x":20,"y":20},"dir":"South"}}},"f6c19c17-3e01-4945-bffb-7ec408dd7fcf":{"BinaryUI":{"from":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4471,"y":2518,"offset":{"x":-247,"y":12},"dir":"East"},"to":{"id":"c4723d6d-1584-49bd-80f1-4c700185746e","x":4612,"y":2518,"offset":{"x":19,"y":-18},"dir":"West"}}},"d8bf88d3-35da-422d-a7d9-1726ce66a288":{"BinaryUI":{"from":{"id":"c32fcb6d-b505-492f-95c8-5f118079a399","x":4296,"y":2925,"offset":{"x":-142,"y":-36},"dir":"West"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3115,"offset":{"x":-5,"y":-83},"dir":"East"}}},"0b5aab4e-5077-4627-9091-89c71a921be1":{"BinaryUI":{"from":{"id":"c32fcb6d-b505-492f-95c8-5f118079a399","x":4296,"y":2945,"offset":{"x":-178,"y":19},"dir":"West"},"to":{"id":"0365b40c-c40a-4653-84ab-44d1c12d294f","x":2284,"y":2923,"offset":{"x":16,"y":32},"dir":"East"}}},"3bb006c5-a66d-440b-b54b-35bc9da87b33":{"IsaUI":{"from":{"id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","x":4125,"y":3778,"offset":{"x":20,"y":20},"dir":"East"},"to":[{"id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","x":4390,"y":3945,"offset":{"x":20,"y":20},"dir":"West"},{"id":"d30d2b03-732b-41bb-89ed-d053750bf987","x":4389,"y":3664,"offset":{"x":20,"y":20},"dir":"West"},{"id":"b1612607-a813-4bc2-896b-88ec4b249447","x":4389,"y":3801,"offset":{"x":20,"y":20},"dir":"West"},{"id":"fa42f4e2-1ff3-473f-a4b9-593c01134e96","x":4394,"y":4079,"offset":{"x":20,"y":20},"dir":"West"}]}},"e67c9242-2aac-4930-ae2e-b2a1678ed3d9":{"BinaryUI":{"from":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","x":2846,"y":2767,"offset":{"x":23,"y":-16},"dir":"North"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2704,"y":2587,"offset":{"x":10,"y":22},"dir":"South"}}},"332f2cb5-0719-4c2d-8737-c1a0375fad8e":{"IsaUI":{"from":{"id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","x":4629,"y":3942,"offset":{"x":20,"y":20},"dir":"East"},"to":[{"id":"dc6d1ffa-5dca-43ef-b973-0628ab580cb7","x":4797,"y":3882,"offset":{"x":20,"y":20},"dir":"West"},{"id":"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d","x":4800,"y":4043,"offset":{"x":20,"y":20},"dir":"West"}]}},"e93a7669-d7d0-4cb2-bbb1-36dedf3f893d":{"BinaryUI":{"from":{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","x":4008,"y":4181,"offset":{"x":24,"y":-14},"dir":"North"},"to":{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","x":4008,"y":4037,"offset":{"x":20,"y":20},"dir":"South"}}},"ead7f44b-e37a-4122-8824-17f4079c2e70":{"BinaryUI":{"from":{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","x":3484,"y":4149,"offset":{"x":2,"y":-62},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3230,"offset":{"x":-36,"y":54},"dir":"East"}}},"33838622-f03e-415f-9588-e7f9e644727e":{"BinaryUI":{"from":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3229,"y":4288,"offset":{"x":-18,"y":70},"dir":"South"},"to":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3311,"y":4288,"offset":{"x":7,"y":41},"dir":"South"}}},"54994661-e099-453c-904f-c09cc0fa0bfa":{"BinaryUI":{"from":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3129,"y":4258,"offset":{"x":-75,"y":30},"dir":"West"},"to":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2961,"y":4259,"offset":{"x":11,"y":-27},"dir":"East"}}},"0cde3a3b-6678-42ac-8fa4-8ab02acb3dea":{"BinaryUI":{"from":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2784,"y":4148,"offset":{"x":-112,"y":-44},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3037,"y":3250,"offset":{"x":-99,"y":-45},"dir":"South"}}},"688ec08e-9fd6-4a2f-bcd5-5ea94e946d1b":{"IsaUI":{"from":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2814,"y":4286,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"01c8907d-cb59-4fae-a3ca-8cb331d18387","x":3171,"y":4460,"offset":{"x":20,"y":20},"dir":"West"},{"id":"75a16785-d611-45ce-b52c-284a9da0b4b8","x":2568,"y":4492,"offset":{"x":20,"y":20},"dir":"North"},{"id":"79069fc2-4d65-4073-b610-4afc0488de5c","x":2737,"y":4688,"offset":{"x":20,"y":20},"dir":"North"},{"id":"470246f6-91ec-4993-b915-93480d0f4eb9","x":3132,"y":4641,"offset":{"x":20,"y":20},"dir":"North"}]}},"e0a24038-1c85-4d6f-afbc-5c034062a557":{"BinaryUI":{"from":{"id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f","x":4300,"y":3166,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3148,"offset":{"x":20,"y":20},"dir":"East"}}},"96737350-249d-4701-9b47-0f56bf8bfc7f":{"BinaryUI":{"from":{"id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","x":3856,"y":3636,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3247,"offset":{"x":20,"y":20},"dir":"East"}}},"9fd61528-8e0f-40d0-b1bb-53b468851d30":{"BinaryUI":{"from":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","x":2949,"y":2795,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2795,"offset":{"x":20,"y":20},"dir":"West"}}},"95fcc898-ef24-4ec4-8409-798a6623713e":{"BinaryUI":{"from":{"id":"cdb1afaf-245c-4d56-bfea-10f69e45007d","x":2418,"y":1601,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2674,"y":2461,"offset":{"x":20,"y":20},"dir":"North"}}},"de725e45-a751-4f4b-8c44-6c79671c70eb":{"BinaryUI":{"from":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3191,"y":4149,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3101,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"39f2d2c1-abf2-4f3e-a4f1-58a477b12f9e":{"BinaryUI":{"from":{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","x":3956,"y":4181,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3247,"offset":{"x":20,"y":20},"dir":"East"}}},"81d77ddd-6aae-4023-8467-2f5705d5e633":{"BinaryUI":{"from":{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","x":3861,"y":3935,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"31deb355-b737-43a6-ae88-199bb51f940d","x":3776,"y":3193,"offset":{"x":20,"y":20},"dir":"East"}}},"c45955d9-c799-4d61-8bc6-6335bde326b8":{"BinaryUI":{"from":{"id":"c89e362d-7905-4226-8713-97d3d6f05037","x":4694,"y":2396,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","x":2859,"y":2411,"offset":{"x":20,"y":20},"dir":"South"}}},"bc8075e9-e5ba-4a26-b696-7cf2651997ba":{"BinaryUI":{"from":{"id":"b359d531-77ae-436f-9f0d-6a5632f1648e","x":4332,"y":3264,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3147,"offset":{"x":20,"y":20},"dir":"East"}}},"6f636d63-667a-40ad-b554-a301a62ddebd":{"BinaryUI":{"from":{"id":"45644594-b418-5362-9294-a62fe2a0fa8e","x":3780,"y":1923,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","x":3778,"y":1725,"offset":{"x":20,"y":20},"dir":"South"}}},"f564f775-febe-442e-a0f1-492a2265e991":{"BinaryUI":{"from":{"id":"72443b79-5645-4b5f-b317-e1a8f815b81c","x":3211,"y":2796,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3209,"y":3115,"offset":{"x":20,"y":20},"dir":"North"}}},"0e780acf-9221-4e84-9377-64d31e653187":{"BinaryUI":{"from":{"id":"72443b79-5645-4b5f-b317-e1a8f815b81c","x":3373,"y":2762,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2763,"offset":{"x":20,"y":20},"dir":"West"}}},"fc2e5c67-6c98-4bfd-93a7-711fa2ae573f":{"BinaryUI":{"from":{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","x":3473,"y":2957,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3244,"y":3115,"offset":{"x":20,"y":20},"dir":"East"}}},"ba437581-658a-497d-9790-ab79ad56cd4f":{"BinaryUI":{"from":{"id":"93f288e7-d670-40a6-91f3-2006b5efa8b4","x":2726,"y":3913,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"cdd19ddf-67e5-4e9b-9958-0745e8f9729e":{"BinaryUI":{"from":{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","x":3617,"y":2895,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2809,"offset":{"x":20,"y":20},"dir":"West"}}},"c8d05983-b88d-40da-bf31-83d2d8b8c574":{"IsaUI":{"from":{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","x":2389,"y":3395,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"9c8bc563-b596-4348-9189-065d747f7c9f","x":2143,"y":3807,"offset":{"x":20,"y":20},"dir":"East"},{"id":"c46e6b80-0365-429a-abf9-ca75ce4f469a","x":2131,"y":3176,"offset":{"x":20,"y":20},"dir":"East"},{"id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1","x":1449,"y":3562,"offset":{"x":20,"y":20},"dir":"East"}]}},"c6ed5fc4-f04a-45e0-afc3-6f421b81fea7":{"IsaUI":{"from":{"id":"9c8bc563-b596-4348-9189-065d747f7c9f","x":1949,"y":3817,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523","x":1793,"y":3741,"offset":{"x":20,"y":20},"dir":"East"},{"id":"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e","x":1790,"y":3879,"offset":{"x":20,"y":20},"dir":"East"},{"id":"c47b8696-7e98-4733-ab33-a4dca7b61d01","x":1795,"y":3607,"offset":{"x":20,"y":20},"dir":"East"},{"id":"6767c0cf-4041-4047-b2b4-d7375f33bc97","x":1788,"y":4014,"offset":{"x":20,"y":20},"dir":"East"},{"id":"35b3de4e-46b8-490f-8e30-c305ed348a78","x":1787,"y":4161,"offset":{"x":20,"y":20},"dir":"East"},{"id":"222307c0-668c-43f9-9368-34cc048f0ae3","x":1554,"y":3816,"offset":{"x":20,"y":20},"dir":"East"}]}},"27350475-a322-4ede-a4b2-eb88a3c847f5":{"IsaUI":{"from":{"id":"c46e6b80-0365-429a-abf9-ca75ce4f469a","x":1935,"y":3182,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"484e429b-bf54-45cb-9b87-baddf7fb5f5b","x":1750,"y":3183,"offset":{"x":20,"y":20},"dir":"East"},{"id":"d8b554d4-03ac-4613-a3e0-fc0b901bfd70","x":1746,"y":3314,"offset":{"x":20,"y":20},"dir":"East"},{"id":"0edc535b-405d-4dd5-bcd2-f5772ab116c2","x":1746,"y":3447,"offset":{"x":20,"y":20},"dir":"East"},{"id":"ce73a111-4670-411e-9bd2-f3308d6399c9","x":1752,"y":3048,"offset":{"x":20,"y":20},"dir":"East"},{"id":"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a","x":1750,"y":2920,"offset":{"x":20,"y":20},"dir":"East"},{"id":"84f1c5fd-d907-4653-a132-bfd420ad9212","x":1749,"y":2772,"offset":{"x":20,"y":20},"dir":"East"}]}},"513c99bc-140c-44c2-b605-0d377805ac43":{"BinaryUI":{"from":{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","x":2544,"y":3341,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"55ae9c5d-bcdb-4c29-8f06-cc9f596662d5":{"BinaryUI":{"from":{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","x":2439,"y":3341,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"23c220df-e5a3-44dc-b521-d29378c6a5e0":{"BinaryUI":{"from":{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","x":3617,"y":2920,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":3865,"y":2852,"offset":{"x":20,"y":20},"dir":"West"}}},"71251371-81c5-4f25-8141-fef1e23e12fe":{"BinaryUI":{"from":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2440,"y":3876,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2442,"y":3804,"offset":{"x":20,"y":20},"dir":"East"}}},"761a6c93-ae0b-4508-9437-d68d0b2c1f22":{"BinaryUI":{"from":{"id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9","x":2416,"y":3584,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2374,"y":3777,"offset":{"x":20,"y":20},"dir":"North"}}},"8398d7d3-d42f-4ca6-89d3-7a563eb50131":{"BinaryUI":{"from":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","x":2440,"y":3777,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3018,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"124d7dea-f1d6-477f-a096-42e92dd297c2":{"BinaryUI":{"from":{"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","x":3196,"y":3635,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3196,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"07097b52-f614-461b-9d4c-62ba7177a383":{"BinaryUI":{"from":{"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","x":3231,"y":3635,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3230,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"5e20da11-448d-41a5-8b92-7dd75d64ad3d":{"BinaryUI":{"from":{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","x":2279,"y":4193,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3070,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"10e2f3e9-2995-47e0-9456-ed375eb610b7":{"BinaryUI":{"from":{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","x":2190,"y":4193,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"d64c3d2d-51d9-4586-b8e7-0b23aea46f49":{"IsaUI":{"from":{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","x":2232,"y":4313,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"70932b40-f444-4341-bb19-0a29d1daecbe","x":2201,"y":4436,"offset":{"x":20,"y":20},"dir":"North"},{"id":"32dbb54a-9693-4847-9278-7c956ea045f8","x":2371,"y":4434,"offset":{"x":20,"y":20},"dir":"North"},{"id":"122e4157-381f-400f-ac30-a1c8a2a9e8c1","x":2054,"y":4434,"offset":{"x":20,"y":20},"dir":"North"},{"id":"17db2afc-ae6c-4e53-a527-48516811fe3e","x":1902,"y":4435,"offset":{"x":20,"y":20},"dir":"North"},{"id":"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd","x":1752,"y":4435,"offset":{"x":20,"y":20},"dir":"North"}]}},"497076d2-1625-446b-b663-d75f5c2e2a3c":{"BinaryUI":{"from":{"id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de","x":2608,"y":4207,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3147,"y":3250,"offset":{"x":20,"y":20},"dir":"South"}}},"f42505df-9843-4914-97bc-c665dfbc2dcc":{"BinaryUI":{"from":{"id":"79571896-9798-44a3-acef-5aa2d9773b93","x":2964,"y":2085,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2920,"y":2532,"offset":{"x":20,"y":20},"dir":"East"}}},"dfa0880b-de0a-4d0f-9f42-7ed496af35ea":{"BinaryUI":{"from":{"id":"79571896-9798-44a3-acef-5aa2d9773b93","x":2991,"y":2085,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","x":2949,"y":2850,"offset":{"x":20,"y":20},"dir":"East"}}},"7fb6cd7d-16c0-43bc-9e29-f645c644afe1":{"BinaryUI":{"from":{"id":"79571896-9798-44a3-acef-5aa2d9773b93","x":3088,"y":2016,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","x":3673,"y":1656,"offset":{"x":20,"y":20},"dir":"West"}}},"f72fcd31-7056-4425-b0ce-7734a759e616":{"BinaryUI":{"from":{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","x":3645,"y":4149,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3407,"y":2410,"offset":{"x":20,"y":20},"dir":"East"}}},"b197d992-e4d6-4663-a6da-b46906374684":{"IsaUI":{"from":{"id":"bf69c9af-f268-4c9b-8e67-4497eb490478","x":3779,"y":2537,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","x":3379,"y":2594,"offset":{"x":20,"y":20},"dir":"South"},{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4273,"y":2580,"offset":{"x":20,"y":20},"dir":"South"},{"id":"7eaea922-8807-4c38-a704-0143e0594664","x":4544,"y":1827,"offset":{"x":20,"y":20},"dir":"South"}]}},"7022f5ed-020f-453f-bcab-8e632ca03b6e":{"BinaryUI":{"from":{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","x":3575,"y":4149,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"bf69c9af-f268-4c9b-8e67-4497eb490478","x":3725,"y":2537,"offset":{"x":20,"y":20},"dir":"South"}}},"1ec425ff-8b5a-49bf-87cb-9863defb9320":{"BinaryUI":{"from":{"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","x":2457,"y":2914,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3128,"offset":{"x":20,"y":20},"dir":"West"}}},"99d07c03-f3ce-42d7-bb64-8bde65c79dd6":{"BinaryUI":{"from":{"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","x":2510,"y":2803,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2584,"offset":{"x":20,"y":20},"dir":"West"}}},"3088e0b8-de0a-45d2-95fb-e8804c9c03fa":{"BinaryUI":{"from":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":4029,"y":2866,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","x":4029,"y":2997,"offset":{"x":20,"y":20},"dir":"North"}}},"a640575d-a105-4ad5-b786-6e7fb55a0b94":{"IsaUI":{"from":{"id":"222307c0-668c-43f9-9368-34cc048f0ae3","x":1359,"y":3810,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"6187076b-e765-4e6b-af28-f577eba40b5e","x":1226,"y":3784,"offset":{"x":20,"y":20},"dir":"East"},{"id":"41b7bda7-f5a2-4c94-af22-fedbe8d6f287","x":1227,"y":3906,"offset":{"x":20,"y":20},"dir":"East"}]}},"d32059a8-46ed-4ceb-9b92-5f661b98f4e6":{"IsaUI":{"from":{"id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1","x":1273,"y":3540,"offset":{"x":20,"y":20},"dir":"West"},"to":[{"id":"80f73c4e-caf1-4e1f-a634-00965f6ad032","x":1112,"y":3455,"offset":{"x":20,"y":20},"dir":"East"},{"id":"0ad229c4-1782-4783-b64e-0d15fe482463","x":1113,"y":3597,"offset":{"x":20,"y":20},"dir":"East"}]}},"cfe90847-d888-4245-bb66-901855bb0051":{"BinaryUI":{"from":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3861,"y":2655,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"c4723d6d-1584-49bd-80f1-4c700185746e","x":4645,"y":2569,"offset":{"x":20,"y":20},"dir":"South"}}},"45c4a4f5-e54b-45d2-bea6-617723a92b70":{"BinaryUI":{"from":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3552,"y":2676,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2913,"y":2587,"offset":{"x":20,"y":20},"dir":"South"}}},"14f71b3f-b918-4376-8e75-7333e85ca536":{"BinaryUI":{"from":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2029,"y":2995,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2029,"y":3059,"offset":{"x":20,"y":20},"dir":"West"}}},"8d8db4b1-8c90-472b-bc98-88fa6a2188d1":{"BinaryUI":{"from":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2284,"y":3042,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3660,"y":2739,"offset":{"x":20,"y":20},"dir":"South"}}},"44ad55c5-bb62-4864-90e7-e992494786aa":{"BinaryUI":{"from":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2261,"y":2973,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2682,"y":2587,"offset":{"x":20,"y":20},"dir":"South"}}},"c3dba39c-fe1e-49e0-9a45-8f872b6aa4c5":{"BinaryUI":{"from":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2289,"y":2733,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2565,"offset":{"x":20,"y":20},"dir":"West"}}},"f1c15ada-631b-4249-8c73-4e52391a532f":{"BinaryUI":{"from":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3162,"y":2337,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","x":2899,"y":2336,"offset":{"x":20,"y":20},"dir":"East"}}},"a5ac6af9-3cef-49e5-8d01-462817e1d641":{"IsaUI":{"from":{"id":"c4723d6d-1584-49bd-80f1-4c700185746e","x":4708,"y":2569,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"7794ada6-49c3-4bf0-991f-828c6583ebb8","x":4910,"y":2694,"offset":{"x":20,"y":20},"dir":"North"},{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":4047,"y":2738,"offset":{"x":20,"y":20},"dir":"North"}]}},"868b4a28-0d2f-4d78-b947-66f44c3bdaf9":{"BinaryUI":{"from":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","x":2961,"y":4187,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","x":3129,"y":4188,"offset":{"x":20,"y":20},"dir":"West"}}},"ca33902a-c6f2-45a5-9273-cf80a579cedd":{"BinaryUI":{"from":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","x":4151,"y":2533,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"f192b162-8ada-4128-8805-1953e9165c54","x":2277,"y":2660,"offset":{"x":20,"y":20},"dir":"North"}}},"d440f204-2694-4438-b618-721a9108070f":{"BinaryUI":{"from":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3728,"y":2269,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","x":2418,"y":1431,"offset":{"x":20,"y":20},"dir":"East"}}},"69b40bff-5f3d-44ef-8c68-57ff9e033e7b":{"BinaryUI":{"from":{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4081,"y":1990,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","x":3941,"y":2301,"offset":{"x":20,"y":20},"dir":"East"}}},"18c4566d-a7b7-4b1d-8e0b-470fddbaab9b":{"BinaryUI":{"from":{"id":"c8fcd612-6ca8-469a-824c-de218e4fd075","x":4738,"y":1620,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2920,"y":2473,"offset":{"x":20,"y":20},"dir":"East"}}},"33b9b943-0d44-4490-b20a-35c110ae9473":{"IsaUI":{"from":{"id":"7eaea922-8807-4c38-a704-0143e0594664","x":4549,"y":1722,"offset":{"x":20,"y":20},"dir":"North"},"to":[{"id":"4b6c7fde-0878-4947-b960-bc73a4558c60","x":4302,"y":1619,"offset":{"x":20,"y":20},"dir":"South"},{"id":"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2","x":4518,"y":1618,"offset":{"x":20,"y":20},"dir":"South"},{"id":"c8fcd612-6ca8-469a-824c-de218e4fd075","x":4694,"y":1620,"offset":{"x":20,"y":20},"dir":"South"}]}},"4ce09575-5a2c-40c5-b766-bb12ef0c1600":{"BinaryUI":{"from":{"id":"7eaea922-8807-4c38-a704-0143e0594664","x":4599,"y":1827,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4429,"y":1987,"offset":{"x":20,"y":20},"dir":"East"}}},"193d881e-9afd-4b9e-a431-cdb113a7ee88":{"BinaryUI":{"from":{"id":"52143d28-8474-44bc-b63f-e654150888d3","x":2860,"y":3152,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3152,"offset":{"x":20,"y":20},"dir":"West"}}},"badf3d57-aba3-4757-b0e4-9d0e7b55f2ea":{"AssociativeUI":{"from":{"x":3100,"y":3208},"middle":{"id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","x":2933,"y":3296,"offset":{"x":0,"y":0},"dir":"North"},"one":{"id":"52143d28-8474-44bc-b63f-e654150888d3","x":2860,"y":3206,"offset":{"x":-160,"y":50},"dir":"East"},"other":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3207,"offset":{"x":20,"y":20},"dir":"West"}}},"08512716-f1d3-4a88-bd38-aea9ae0f9ca7":{"BinaryUI":{"from":{"id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","x":2874,"y":3296,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3010,"y":3231,"offset":{"x":20,"y":20},"dir":"West"}}},"0ed07f33-0bbb-497d-9823-9247fc520e85":{"BinaryUI":{"from":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":4107,"y":2835,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","x":4107,"y":2757,"offset":{"x":20,"y":20},"dir":"East"}}},"cea29749-dc0f-40c0-adf9-4c21b187751e":{"IsaUI":{"from":{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","x":3995,"y":4317,"offset":{"x":20,"y":20},"dir":"South"},"to":[{"id":"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7","x":3864,"y":4431,"offset":{"x":20,"y":20},"dir":"North"},{"id":"910e3a08-5e99-47a5-bde4-3e35cf9f00da","x":4143,"y":4431,"offset":{"x":20,"y":20},"dir":"North"}]}},"599c1454-9525-4386-b50f-4fdee4b08373":{"IsaUI":{"from":{"id":"31deb355-b737-43a6-ae88-199bb51f940d","x":3692,"y":3110,"offset":{"x":20,"y":20},"dir":"North"},"to":[{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3407,"y":2355,"offset":{"x":20,"y":20},"dir":"East"},{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","x":4275,"y":2032,"offset":{"x":20,"y":20},"dir":"South"}]}},"9f2917c8-b17b-4ab2-8c6e-0269a0b80681":{"BinaryUI":{"from":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","x":3718,"y":3753,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","x":3718,"y":3822,"offset":{"x":20,"y":20},"dir":"East"}}},"3c241319-416a-4195-ae80-fa4439198c1c":{"BinaryUI":{"from":{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","x":3861,"y":3977,"offset":{"x":20,"y":20},"dir":"West"},"to":{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","x":3722,"y":3978,"offset":{"x":20,"y":20},"dir":"East"}}},"12003437-2898-4b1d-ba27-b1cc69d8dbb2":{"BinaryUI":{"from":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","x":3651,"y":3842,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","x":3651,"y":3922,"offset":{"x":20,"y":20},"dir":"North"}}},"940f5aba-58f5-46fa-bbba-43fc6b10a3fe":{"BinaryUI":{"from":{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","x":3565,"y":3922,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","x":3565,"y":3842,"offset":{"x":20,"y":20},"dir":"South"}}},"42c18b66-d259-40d1-a77d-0c0e76080a6d":{"BinaryUI":{"from":{"id":"4856978f-20be-4b59-8bf6-b941091119a9","x":3160,"y":2974,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","x":3159,"y":3115,"offset":{"x":20,"y":20},"dir":"North"}}},"04ae2e8d-c499-4068-88bd-015b0bba57bf":{"BinaryUI":{"from":{"id":"dbada891-ca0d-4fbc-8371-9f9234867bd6","x":2304,"y":2366,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2526,"offset":{"x":20,"y":20},"dir":"West"}}},"7e2c2118-fb6c-4ac4-9676-e7427cd495c2":{"BinaryUI":{"from":{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","x":2350,"y":2540,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","x":2241,"y":2540,"offset":{"x":20,"y":20},"dir":"South"}}},"b21bc0c0-fab4-42f8-ae6c-eb6ab8f5968a":{"BinaryUI":{"from":{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","x":2413,"y":2502,"offset":{"x":20,"y":20},"dir":"East"},"to":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","x":2668,"y":2547,"offset":{"x":20,"y":20},"dir":"West"}}},"e4734a39-1f45-400f-937a-285e2fad31a4":{"BinaryUI":{"from":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","x":3331,"y":2157,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3331,"y":2270,"offset":{"x":20,"y":20},"dir":"North"}}},"da1d6545-b9d6-499e-9175-fd2a340b1f2e":{"BinaryUI":{"from":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","x":3203,"y":2031,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","x":3320,"y":2031,"offset":{"x":20,"y":20},"dir":"North"}}},"c8a4b21a-62c3-4fbd-8799-2b55d93d951c":{"BinaryUI":{"from":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","x":3218,"y":2270,"offset":{"x":20,"y":20},"dir":"North"},"to":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","x":3217,"y":2157,"offset":{"x":20,"y":20},"dir":"South"}}},"23ef9104-65a5-4b32-943f-a2db064c699f":{"BinaryUI":{"from":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","x":3598,"y":2739,"offset":{"x":20,"y":20},"dir":"South"},"to":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","x":2284,"y":3004,"offset":{"x":20,"y":20},"dir":"East"}}}}}}},"objects":{"ids":["b8ec6afc-ddbd-53d6-9be3-e4b738941c2f","7178e7a4-5131-504b-a7b3-c2c0cfedf343","45644594-b418-5362-9294-a62fe2a0fa8e","2e277e34-ab6f-4028-9c52-935c31520fec","e68f8912-9897-4cbd-b363-cb4203a726a9","141350e6-b62d-4a6d-9ea2-47333e51e3ea","88687f76-5d9e-404e-a801-f6f57f9b30ca","d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","c89e362d-7905-4226-8713-97d3d6f05037","94fc0044-4b88-4f5c-ac60-3a44262ade10","f192b162-8ada-4128-8805-1953e9165c54","954b354f-3a90-440b-ab0f-43efc00d275e","0365b40c-c40a-4653-84ab-44d1c12d294f","9352c766-9f6b-413b-9ea0-13f9c8e4d86e","30c31621-a4bd-4356-80b9-1226e00651c9","6c7969f3-f150-4975-a989-a7bc8164b168","c32fcb6d-b505-492f-95c8-5f118079a399","59f269ab-2dbc-4b07-b9bc-48441f20e78f","b359d531-77ae-436f-9f0d-6a5632f1648e","ce2da156-e0fd-4e56-bb31-2030d4e0c599","dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","a8b86e41-5b04-4469-8a10-91bd89603e27","d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","dc6d1ffa-5dca-43ef-b973-0628ab580cb7","a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d","b1612607-a813-4bc2-896b-88ec4b249447","d30d2b03-732b-41bb-89ed-d053750bf987","fa42f4e2-1ff3-473f-a4b9-593c01134e96","d715c5f9-23f8-45e0-a1df-34e27acd01f5","43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b","6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","d546feef-91df-49ea-ac61-430bdcf9832c","3874760d-0104-4670-ba8b-1af413c5ec4a","1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","846aa191-7b0c-4325-8c21-09fa5edf7c78","26dba2c5-a7e9-4556-a9c2-79091a97b941","75a16785-d611-45ce-b52c-284a9da0b4b8","01c8907d-cb59-4fae-a3ca-8cb331d18387","79069fc2-4d65-4073-b610-4afc0488de5c","23a9a479-68e7-4a70-bcef-9041f10fd287","3a1c7f6a-459d-4eba-9291-2aebb9bf60c9","a9b74602-bdc5-481f-af4c-8021553b895a","cdb1afaf-245c-4d56-bfea-10f69e45007d","b7483723-222d-4f08-b7b9-e8b14f0308cf","97f815f0-dcc4-4bd3-843d-13ff1dc5802c","72443b79-5645-4b5f-b317-e1a8f815b81c","93f288e7-d670-40a6-91f3-2006b5efa8b4","e1321ffa-07d5-480d-89f9-227b13d27ce1","3f7fd816-518b-4b9e-8134-3059e78045a0","c46e6b80-0365-429a-abf9-ca75ce4f469a","9c8bc563-b596-4348-9189-065d747f7c9f","1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523","e3329a9e-1c52-44f6-a1f7-fc85f7362e9e","484e429b-bf54-45cb-9b87-baddf7fb5f5b","c47b8696-7e98-4733-ab33-a4dca7b61d01","e05ab5f3-17e7-4594-8ce0-c02d793a1df9","ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","4d5720eb-da8c-493d-ab8d-cb6111dd6099","6767c0cf-4041-4047-b2b4-d7375f33bc97","35b3de4e-46b8-490f-8e30-c305ed348a78","d8b554d4-03ac-4613-a3e0-fc0b901bfd70","0edc535b-405d-4dd5-bcd2-f5772ab116c2","0b3e9de0-d139-4934-a043-d1913a24de0c","70932b40-f444-4341-bb19-0a29d1daecbe","32dbb54a-9693-4847-9278-7c956ea045f8","0dc0e921-e7ff-4766-9738-e6e312f7f0de","122e4157-381f-400f-ac30-a1c8a2a9e8c1","17db2afc-ae6c-4e53-a527-48516811fe3e","30abb231-4248-4ffa-9a69-e0eb6bb9dbbd","ba8a3bbf-86a8-47e2-92bb-f41878981c41","79571896-9798-44a3-acef-5aa2d9773b93","5c85a8db-e4cc-4e38-9922-58d93773f4f0","bf69c9af-f268-4c9b-8e67-4497eb490478","ce73a111-4670-411e-9bd2-f3308d6399c9","1e7a66b2-f559-4c21-b8e6-969999ed171d","80f73c4e-caf1-4e1f-a634-00965f6ad032","222307c0-668c-43f9-9368-34cc048f0ae3","6187076b-e765-4e6b-af28-f577eba40b5e","f7fc16ac-6a23-4f5d-a04c-1163617701c1","0ad229c4-1782-4783-b64e-0d15fe482463","b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a","470246f6-91ec-4993-b915-93480d0f4eb9","f6a3ce12-18e1-4675-ab94-6b2a7c91d951","41b7bda7-f5a2-4c94-af22-fedbe8d6f287","84f1c5fd-d907-4653-a132-bfd420ad9212","efde0481-1599-4c5c-bf30-51dbd4a8ed83","95e17479-07a5-41b1-9930-1b9b520514f6","8d86dceb-7e6e-4767-8a3f-cbbde458ad93","68e7191a-fe94-423f-8a5d-5551384ae998","c4723d6d-1584-49bd-80f1-4c700185746e","7794ada6-49c3-4bf0-991f-828c6583ebb8","d48d948b-5291-4eb3-ba35-7ab1c1ffa098","7eaea922-8807-4c38-a704-0143e0594664","4b6c7fde-0878-4947-b960-bc73a4558c60","e6fbeeb8-6ade-46a2-bb52-9c99d06918b2","c8fcd612-6ca8-469a-824c-de218e4fd075","968ea4f4-0a3b-44d4-a266-16facf7d325f","52143d28-8474-44bc-b63f-e654150888d3","ab7a5708-6d12-4dce-b488-fa3a3b480510","6094aad5-613b-42b6-8f48-c3b9e2161aa9","6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7","910e3a08-5e99-47a5-bde4-3e35cf9f00da","31deb355-b737-43a6-ae88-199bb51f940d","39060ea9-5d45-4954-a29f-ba88e01e7217","4856978f-20be-4b59-8bf6-b941091119a9","dbada891-ca0d-4fbc-8371-9f9234867bd6","290f49d3-8ce7-408e-be14-611b66db9687"],"entities":{"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f":{"id":"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f","key_letter":"T","name":"Type","description":"The type of a value\n\nThere are several values available: [Integer], [Boolean], [Float], [String], and [UUID].\n\n# Object imported from the sarzak Domain.\n\nWe don’t have a means of representing this as imported in Cuckoo, so I’m just adding it here.\n\n🐶 { \"imported_object\": { \"domain\": \"crate::v2::sarzak\", \"model_file\": \"models/sarzak.json\", \"id\": \"b8ec6afc-ddbd-53d6-9be3-e4b738941c2f\"}}\n","attributes":{"52783e59-f28c-5a8b-8947-12d60c2d49d0":{"id":"52783e59-f28c-5a8b-8947-12d60c2d49d0","name":"id","type":"Uuid"}}},"7178e7a4-5131-504b-a7b3-c2c0cfedf343":{"id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","key_letter":"OBJ","name":"Object","description":"An `Object` is a collection of related data. By creating `Object`s, and \nconnecting them with `Relationships` we build a powerful abstraction.\n\n`Object`s contain [Attribute]s that represent the data that the \n`Object`encapsulates. All `Object`s have an attribute called `id`, which \nis a unique idenifier for each class of `Object`. The `id` attribute is a\nversion 5 UUID.\n\n# Object imported from the sarzak Domain.\n\nWe don’t have a means of representing this as imported in Cuckoo, so I’m just adding it here.\n\n🐶 { \"imported_object\": { \"domain\": \"crate::v2::sarzak\", \"model_file\": \"models/sarzak.json\", \"id\": \"7178e7a4-5131-504b-a7b3-c2c0cfedf343\"}}","attributes":{"a37b26e0-49fb-5be8-95a8-fb563ab81cc4":{"id":"a37b26e0-49fb-5be8-95a8-fb563ab81cc4","name":"id","type":"Uuid"},"d01da69e-bf98-5825-a9f6-9ce0405417f1":{"id":"d01da69e-bf98-5825-a9f6-9ce0405417f1","name":"name","type":"String"},"a24410b8-5736-5216-b4ca-a4a7c70eb388":{"id":"a24410b8-5736-5216-b4ca-a4a7c70eb388","name":"key letters","type":"String"},"75f8f112-c966-5cbf-aebe-b377b488905b":{"id":"75f8f112-c966-5cbf-aebe-b377b488905b","name":"description","type":"String"}}},"45644594-b418-5362-9294-a62fe2a0fa8e":{"id":"45644594-b418-5362-9294-a62fe2a0fa8e","key_letter":"I","name":"Item","description":"","attributes":{"045ccee5-86de-4081-8d64-613e2e38a993":{"id":"045ccee5-86de-4081-8d64-613e2e38a993","name":"id","type":"Uuid"}}},"2e277e34-ab6f-4028-9c52-935c31520fec":{"id":"2e277e34-ab6f-4028-9c52-935c31520fec","key_letter":"TYP","name":"Value Type","description":"Value Type\n\nThis is the main type abstraction used in Lu Dog. We mostly rely on what is available in Sarzak, with two additions: ...\n\nTwo? I know that I need an Option<>. I'm not so sure about a & though. Everything from the store is going to be by UUID, so all of my references are really \"pointers\" underneath. I want them to be typed in the code though.\n\nSo how will the code work? We could store the type next to the pointer: (type, uuid). Huh. This is the eventual output domain. How does that affect my thinking?\n\nThis should end up looking like woog, but simpler. Woog was for generating rust. I want to generate dwarf. Dwarf needs to be typed? If so, when are they resolved to uuid's eventually? \n\nOption for now. We'll see later...","attributes":{"2b4f587e-1528-5813-b970-9560d145f091":{"id":"2b4f587e-1528-5813-b970-9560d145f091","name":"id","type":"Uuid"}}},"e68f8912-9897-4cbd-b363-cb4203a726a9":{"id":"e68f8912-9897-4cbd-b363-cb4203a726a9","key_letter":"ST","name":"Struct","description":"A Type from the Model\n\nThis is really just an alias for `[Object]`.","attributes":{"e12db790-b02b-500e-9a6f-742378146a45":{"id":"e12db790-b02b-500e-9a6f-742378146a45","name":"id","type":"Uuid"},"3dde88a1-93c8-413d-b335-66a1f5f755f3":{"id":"3dde88a1-93c8-413d-b335-66a1f5f755f3","name":"name","type":"String"}}},"141350e6-b62d-4a6d-9ea2-47333e51e3ea":{"id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","key_letter":"F","name":"Field","description":"A Field in a data structure\n\nA field has a name, and a type.","attributes":{"add99bda-d83f-558e-b54e-6373a658d0b6":{"id":"add99bda-d83f-558e-b54e-6373a658d0b6","name":"id","type":"Uuid"},"3f2dcff1-5f2e-4279-8d54-537cbb477874":{"id":"3f2dcff1-5f2e-4279-8d54-537cbb477874","name":"name","type":"String"}}},"88687f76-5d9e-404e-a801-f6f57f9b30ca":{"id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","key_letter":"IMPL","name":"Implementation Block","description":"An Implementation Block\n\nInside this block functions are defined on a [`ModellType`].","attributes":{"69046536-f9f1-4c70-99c8-bf778c90cdea":{"id":"69046536-f9f1-4c70-99c8-bf778c90cdea","name":"id","type":"Uuid"}}},"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5":{"id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","key_letter":"FUNC","name":"Function","description":"A Function\n\nInputs, outputs. Stuff happens.","attributes":{"fda10b16-e061-4547-9ef1-0ab085270b88":{"id":"fda10b16-e061-4547-9ef1-0ab085270b88","name":"id","type":"Uuid"},"96a8868d-e8e7-4788-a81e-cc4b1210c85b":{"id":"96a8868d-e8e7-4788-a81e-cc4b1210c85b","name":"name","type":"String"}}},"c89e362d-7905-4226-8713-97d3d6f05037":{"id":"c89e362d-7905-4226-8713-97d3d6f05037","key_letter":"IMP","name":"Import","description":"An Import of a foreign ObjectStore\n\nThis indicates to the downstream model compiler that it needs to emit code to load the imported ObjectStore.\n\nI've got this has_alias boolean here because I don't have `Option`. I never needed it until now, because you get an option with a 1c relationship. Not proud of this, but it's the best alternative. Makes me wonder about adding an `Option` type to the primitives though.\n\nI suppose if there were a way to signify a null string. Or I could check if it's length is 0. I think adding the bool is cleaner.","attributes":{"8f8af328-cd2f-435d-8d29-b7bce353a0c7":{"id":"8f8af328-cd2f-435d-8d29-b7bce353a0c7","name":"id","type":"Uuid"},"7e6b9c84-ae9e-46d6-a5d6-5899e57c4687":{"id":"7e6b9c84-ae9e-46d6-a5d6-5899e57c4687","name":"path","type":"String"},"e1f19a18-4287-42b2-b767-5dc9cca24d6b":{"id":"e1f19a18-4287-42b2-b767-5dc9cca24d6b","name":"alias","type":"String"},"f5a8a036-bc55-44c0-8ae6-f03267b19032":{"id":"f5a8a036-bc55-44c0-8ae6-f03267b19032","name":"name","type":"String"},"002b29e8-97cc-4b8a-a339-db79f2306729":{"id":"002b29e8-97cc-4b8a-a339-db79f2306729","name":"has_alias","type":"Boolean"}}},"94fc0044-4b88-4f5c-ac60-3a44262ade10":{"id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","key_letter":"VAL","name":"Value","description":"A Value\n\nA value has a Type.","attributes":{"87e26364-f525-4e59-8db0-eea6c972e140":{"id":"87e26364-f525-4e59-8db0-eea6c972e140","name":"id","type":"Uuid"}}},"f192b162-8ada-4128-8805-1953e9165c54":{"id":"f192b162-8ada-4128-8805-1953e9165c54","key_letter":"PARAM","name":"Parameter","description":"A Parameter to a Function\n\nFrom inside the function it's a parameter, from outside it's an argument. No idea why I wrote that — just looking for content... I mean, what else do you say about a parameter?","attributes":{"8ecf5553-7599-46d0-a3fe-e6b70c64d31f":{"id":"8ecf5553-7599-46d0-a3fe-e6b70c64d31f","name":"id","type":"Uuid"},"fe25d7e5-24ba-4d7a-9fd9-1bfc00b7f484":{"id":"fe25d7e5-24ba-4d7a-9fd9-1bfc00b7f484","name":"position","type":"Integer"}}},"954b354f-3a90-440b-ab0f-43efc00d275e":{"id":"954b354f-3a90-440b-ab0f-43efc00d275e","key_letter":"VAR","name":"Variable","description":"A Variable\n\nA variable in a function. It may be either a local variable or a parameter.\n\nA variable has a name, and and indirectly, via [`Value`], a type.","attributes":{"911aac13-fab4-4060-9ced-a807bb398f20":{"id":"911aac13-fab4-4060-9ced-a807bb398f20","name":"id","type":"Uuid"},"0afbe372-cdd7-4956-b174-e7126efd5540":{"id":"0afbe372-cdd7-4956-b174-e7126efd5540","name":"name","type":"String"}}},"0365b40c-c40a-4653-84ab-44d1c12d294f":{"id":"0365b40c-c40a-4653-84ab-44d1c12d294f","key_letter":"L_VAR","name":"Local Variable","description":"A Local Variable in a Block\n\nNote that a variable is an \"l-value\", so it represents a specific memory location.","attributes":{"53cfecb3-d4b2-4cb9-969d-964f7fdfc93e":{"id":"53cfecb3-d4b2-4cb9-969d-964f7fdfc93e","name":"id","type":"Uuid"},"546f0286-9be0-41e9-ad65-82b9b711f545":{"id":"546f0286-9be0-41e9-ad65-82b9b711f545","name":"bug","type":"Uuid"}}},"9352c766-9f6b-413b-9ea0-13f9c8e4d86e":{"id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","key_letter":"EXP","name":"Expression","description":"An Expression\n\nExpressions are calculations that render values.","attributes":{"22291a6d-f2ea-49e5-875a-c6fe1557a092":{"id":"22291a6d-f2ea-49e5-875a-c6fe1557a092","name":"id","type":"Uuid"}}},"30c31621-a4bd-4356-80b9-1226e00651c9":{"id":"30c31621-a4bd-4356-80b9-1226e00651c9","key_letter":"BLK_E","name":"Block","description":"A Block Expression\n\nA block expression is an expression that consists of an ordered set of statements, living between an opening `{`, and a closing `}`.\n\n Given that it's an expression it has a Type. The type is the value of the last expression in the block, if it's not closed by a `;`. If the last statement is termintat thusly, then the value is `[Empty]`, or `()`.\n\nThe `bug` attribute is there to force the compiler to generate code. Apparently there's some bug in grace that's causing this to be generated as a const. I don't want to get into it, and this is the most expedient solution.","attributes":{"09f1ef4c-abf2-4e66-8388-3769cd10f0c4":{"id":"09f1ef4c-abf2-4e66-8388-3769cd10f0c4","name":"id","type":"Uuid"},"097419c0-05f7-482a-b458-58b592bc08dd":{"id":"097419c0-05f7-482a-b458-58b592bc08dd","name":"bug","type":"Uuid"},"fa475d83-dbe2-4a4a-8cd1-fb3dd3a09cdd":{"id":"fa475d83-dbe2-4a4a-8cd1-fb3dd3a09cdd","name":"async","type":"Boolean"}}},"6c7969f3-f150-4975-a989-a7bc8164b168":{"id":"6c7969f3-f150-4975-a989-a7bc8164b168","key_letter":"STMT","name":"Statement","description":"A Statement\n\nA statement is followed by a semi-colon (`;`), and in general yields no value.","attributes":{"9e4082cd-4246-4195-acfc-b120db88105a":{"id":"9e4082cd-4246-4195-acfc-b120db88105a","name":"id","type":"Uuid"},"fe339014-0b8d-4035-b0db-582005b545a2":{"id":"fe339014-0b8d-4035-b0db-582005b545a2","name":"index","type":"Integer"}}},"c32fcb6d-b505-492f-95c8-5f118079a399":{"id":"c32fcb6d-b505-492f-95c8-5f118079a399","key_letter":"LET_S","name":"Let Statement","description":"A Let Statement\n\nThis statement assigns a value from an expression to a local variable.","attributes":{"c959c65f-ce9a-4202-a715-c377c2031978":{"id":"c959c65f-ce9a-4202-a715-c377c2031978","name":"id","type":"Uuid"}}},"59f269ab-2dbc-4b07-b9bc-48441f20e78f":{"id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f","key_letter":"EXP_S","name":"Expression Statement","description":"A statement that consists of just an expression.","attributes":{"27101b62-83cc-4fec-8101-f2fb46b892e0":{"id":"27101b62-83cc-4fec-8101-f2fb46b892e0","name":"id","type":"Uuid"}}},"b359d531-77ae-436f-9f0d-6a5632f1648e":{"id":"b359d531-77ae-436f-9f0d-6a5632f1648e","key_letter":"RES_S","name":"Result Statement","description":"An Expression Statement that is not terminated by a semi-colon, and this yields a result. This is only applicable if it's the last statement in a block.","attributes":{"1e15f699-4dba-4627-a945-385e01c2b11c":{"id":"1e15f699-4dba-4627-a945-385e01c2b11c","name":"id","type":"Uuid"}}},"ce2da156-e0fd-4e56-bb31-2030d4e0c599":{"id":"ce2da156-e0fd-4e56-bb31-2030d4e0c599","key_letter":"I_S","name":"Item Statement","description":"An Item in statement position, i.e., inside of a block.","attributes":{"69657761-9338-408a-925b-d1f5734e02ac":{"id":"69657761-9338-408a-925b-d1f5734e02ac","name":"id","type":"Uuid"}}},"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea":{"id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","key_letter":"LIT_E","name":"Literal","description":"A Literal Expression\n\nThis is any literal value in the program.","attributes":{"28768c3e-8742-4036-9a1f-738ef56d4f2d":{"id":"28768c3e-8742-4036-9a1f-738ef56d4f2d","name":"id","type":"Uuid"}}},"a8b86e41-5b04-4469-8a10-91bd89603e27":{"id":"a8b86e41-5b04-4469-8a10-91bd89603e27","key_letter":"EMPT","name":"Empty","description":"The Empty Type\n\nThis type represents the lack of a type. It's actually sort of a werid construct, because it also implies the lack of a value. How can you have a value without a type?","attributes":{"5c9d0df8-c2f6-4aa8-a7f5-2315da514875":{"id":"5c9d0df8-c2f6-4aa8-a7f5-2315da514875","name":"id","type":"Uuid"}}},"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5":{"id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","key_letter":"BOOL_L","name":"Boolean Literal","description":"A Boolean\n\nIt's either `true` or `false`.","attributes":{"292f8c3b-a23d-492e-898e-799b12a0b5ac":{"id":"292f8c3b-a23d-492e-898e-799b12a0b5ac","name":"id","type":"Uuid"}}},"dc6d1ffa-5dca-43ef-b973-0628ab580cb7":{"id":"dc6d1ffa-5dca-43ef-b973-0628ab580cb7","key_letter":"T","name":"True","description":"True Literal\n\nThe literal `true`.","attributes":{"1aae6108-6151-4d10-9bac-91829343583b":{"id":"1aae6108-6151-4d10-9bac-91829343583b","name":"id","type":"Uuid"}}},"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d":{"id":"a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d","key_letter":"F","name":"False","description":"False Literal\n\nThe literal `false`.","attributes":{"e61ae5a6-9598-427e-b576-5d36514f256c":{"id":"e61ae5a6-9598-427e-b576-5d36514f256c","name":"id","type":"Uuid"}}},"b1612607-a813-4bc2-896b-88ec4b249447":{"id":"b1612607-a813-4bc2-896b-88ec4b249447","key_letter":"INT_L","name":"Integer Literal","description":"An Integer\n\nI'm not sure what to do about width. I think I coded it as an i64 in the parser.","attributes":{"d8c8238b-b9cc-49fa-873c-cbaf71f6818d":{"id":"d8c8238b-b9cc-49fa-873c-cbaf71f6818d","name":"id","type":"Uuid"},"f865700c-11cb-48a7-8b8b-a80d2a4623dc":{"id":"f865700c-11cb-48a7-8b8b-a80d2a4623dc","name":"value","type":"Integer"}}},"d30d2b03-732b-41bb-89ed-d053750bf987":{"id":"d30d2b03-732b-41bb-89ed-d053750bf987","key_letter":"STR_L","name":"String Literal","description":"A String\n\nA string is a set of characters enclosed in double quotes. Strings are unicode strings encoded as UTF-8.","attributes":{"42f30de8-2e80-4b48-87f0-e06f1e236111":{"id":"42f30de8-2e80-4b48-87f0-e06f1e236111","name":"id","type":"Uuid"},"9032c943-4f50-4f4a-b9a9-7c17a627ff2d":{"id":"9032c943-4f50-4f4a-b9a9-7c17a627ff2d","name":"value","type":"String"}}},"fa42f4e2-1ff3-473f-a4b9-593c01134e96":{"id":"fa42f4e2-1ff3-473f-a4b9-593c01134e96","key_letter":"FLOT_L","name":"Float Literal","description":"A Floating Point Literal\n\nNothing fancy. No scientific notation.","attributes":{"98c46fba-95d0-4f33-9dab-6b458b39f938":{"id":"98c46fba-95d0-4f33-9dab-6b458b39f938","name":"id","type":"Uuid"},"ba6a66eb-d746-442f-b047-e944973cef84":{"id":"ba6a66eb-d746-442f-b047-e944973cef84","name":"value","type":"Float"}}},"d715c5f9-23f8-45e0-a1df-34e27acd01f5":{"id":"d715c5f9-23f8-45e0-a1df-34e27acd01f5","key_letter":"VAR_E","name":"Variable Expression","description":"A Local Variable Expression\n\nThis is what happens when a variable is an r-value.","attributes":{"7e3b8999-393b-4406-b085-b1335345416a":{"id":"7e3b8999-393b-4406-b085-b1335345416a","name":"id","type":"Uuid"},"f5925078-646c-464a-b99e-f3ef8692c7e2":{"id":"f5925078-646c-464a-b99e-f3ef8692c7e2","name":"name","type":"String"}}},"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b":{"id":"43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b","key_letter":"NULL","name":"Empty Expression","description":"","attributes":{"c690466c-77c7-449c-a5ae-b402f43c53b5":{"id":"c690466c-77c7-449c-a5ae-b402f43c53b5","name":"id","type":"Uuid"}}},"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656":{"id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","key_letter":"PRT_E","name":"Print","description":"A Print Expression?\n\nShold this be a statement?","attributes":{"ee8c61be-204d-493b-b2e9-23ecbca76524":{"id":"ee8c61be-204d-493b-b2e9-23ecbca76524","name":"id","type":"Uuid"}}},"d546feef-91df-49ea-ac61-430bdcf9832c":{"id":"d546feef-91df-49ea-ac61-430bdcf9832c","key_letter":"ST_E","name":"Struct Expression","description":"A Structure Expression\n\nThis is how we create instances in dwarf.","attributes":{"90c445a8-05b7-4942-b0d2-13a7cb18545c":{"id":"90c445a8-05b7-4942-b0d2-13a7cb18545c","name":"id","type":"Uuid"},"37a5a17d-2f7a-4c62-8e8f-37d7a7ec0943":{"id":"37a5a17d-2f7a-4c62-8e8f-37d7a7ec0943","name":"bug","type":"Uuid"}}},"3874760d-0104-4670-ba8b-1af413c5ec4a":{"id":"3874760d-0104-4670-ba8b-1af413c5ec4a","key_letter":"FLD_E","name":"Field Expression","description":"A Struct Field Expression\n\nThis assigns a value to a field in a structure.","attributes":{"ae9d7826-eab6-4baa-b094-62565e236579":{"id":"ae9d7826-eab6-4baa-b094-62565e236579","name":"id","type":"Uuid"}}},"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7":{"id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","key_letter":"FLD_A_E","name":"Field Access","description":"A Struct Field Access\n\nThink dotted notation.","attributes":{"37c7e82a-3674-4c5b-a8b4-3ea5af629001":{"id":"37c7e82a-3674-4c5b-a8b4-3ea5af629001","name":"id","type":"Uuid"}}},"846aa191-7b0c-4325-8c21-09fa5edf7c78":{"id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","key_letter":"ARG_E","name":"Argument","description":"An Argument to a Function Call","attributes":{"f2debbd6-734a-4b2d-9174-ed6bf6a944c6":{"id":"f2debbd6-734a-4b2d-9174-ed6bf6a944c6","name":"id","type":"Uuid"},"78bb4e04-b894-4690-983e-2fdd82a16aba":{"id":"78bb4e04-b894-4690-983e-2fdd82a16aba","name":"position","type":"Integer"}}},"26dba2c5-a7e9-4556-a9c2-79091a97b941":{"id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","key_letter":"CALL_E","name":"Call","description":"A Call, of some sort\n","attributes":{"00200770-a013-4671-b572-3287d58c5eeb":{"id":"00200770-a013-4671-b572-3287d58c5eeb","name":"id","type":"Uuid"},"29b7b08d-838a-4dbc-b6bd-0e7a1bd5462c":{"id":"29b7b08d-838a-4dbc-b6bd-0e7a1bd5462c","name":"arg_check","type":"Boolean"}}},"75a16785-d611-45ce-b52c-284a9da0b4b8":{"id":"75a16785-d611-45ce-b52c-284a9da0b4b8","key_letter":"METH_C","name":"Method Call","description":"A Method Call\n\nThis is when you call a function on an instance of a struct. The name attribute is the name of the method.","attributes":{"7ebdd935-e9a8-423e-a8d3-5c18ac4aff09":{"id":"7ebdd935-e9a8-423e-a8d3-5c18ac4aff09","name":"id","type":"Uuid"},"71021ec0-3099-4cc6-8aaa-c649a1486b1c":{"id":"71021ec0-3099-4cc6-8aaa-c649a1486b1c","name":"name","type":"String"}}},"01c8907d-cb59-4fae-a3ca-8cb331d18387":{"id":"01c8907d-cb59-4fae-a3ca-8cb331d18387","key_letter":"S_METH_C","name":"Static Method Call","description":"A Static Method Call\n\nThis is when you call a function on the type (struct) itself. There is no instance involved in this, although it may return an instance.\n\nThe name attribute is the name of the static method.","attributes":{"4e669862-93f4-4200-913d-03908f60936e":{"id":"4e669862-93f4-4200-913d-03908f60936e","name":"id","type":"Uuid"},"9e03633d-95d9-4fc5-80e8-d46c0da353ad":{"id":"9e03633d-95d9-4fc5-80e8-d46c0da353ad","name":"type","type":"String"},"5e897b18-d6ca-4623-b703-1588452afd3f":{"id":"5e897b18-d6ca-4623-b703-1588452afd3f","name":"func","type":"String"},"e902efa5-5a94-4a9d-a1f4-11b63b4f53e7":{"id":"e902efa5-5a94-4a9d-a1f4-11b63b4f53e7","name":"unique","type":"Uuid"}}},"79069fc2-4d65-4073-b610-4afc0488de5c":{"id":"79069fc2-4d65-4073-b610-4afc0488de5c","key_letter":"NO","name":"Function Call","description":"","attributes":{"8b633cc4-ae54-4516-8952-3b7cdfb9401b":{"id":"8b633cc4-ae54-4516-8952-3b7cdfb9401b","name":"id","type":"Uuid"}}},"23a9a479-68e7-4a70-bcef-9041f10fd287":{"id":"23a9a479-68e7-4a70-bcef-9041f10fd287","key_letter":"Tsk","name":"Task","description":"A type to contain a task.","attributes":{"46602550-66dc-4819-9050-a241868d0073":{"id":"46602550-66dc-4819-9050-a241868d0073","name":"id","type":"Uuid"}}},"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9":{"id":"3a1c7f6a-459d-4eba-9291-2aebb9bf60c9","key_letter":"UNK","name":"Unknown","description":"Unknown Type\n\nThe type is unknown.","attributes":{"d9d874b2-9764-4148-8ace-57b70678b235":{"id":"d9d874b2-9764-4148-8ace-57b70678b235","name":"id","type":"Uuid"}}},"a9b74602-bdc5-481f-af4c-8021553b895a":{"id":"a9b74602-bdc5-481f-af4c-8021553b895a","key_letter":"PLUG","name":"Plugin","description":"An external compilation unit that may be loaded at run time.","attributes":{"f66d1d03-d541-4192-b02c-112783939999":{"id":"f66d1d03-d541-4192-b02c-112783939999","name":"id","type":"Uuid"},"a3e038e0-ae8b-4e03-9046-3df2bbf834b6":{"id":"a3e038e0-ae8b-4e03-9046-3df2bbf834b6","name":"name","type":"String"}}},"cdb1afaf-245c-4d56-bfea-10f69e45007d":{"id":"cdb1afaf-245c-4d56-bfea-10f69e45007d","key_letter":"LST","name":"List","description":"A List\n\nThis is like an array, I guess. It's also like a `Vec`.","attributes":{"5cbba856-e189-4b99-adc1-f1226aef8189":{"id":"5cbba856-e189-4b99-adc1-f1226aef8189","name":"id","type":"Uuid"}}},"b7483723-222d-4f08-b7b9-e8b14f0308cf":{"id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","key_letter":"O_S","name":"Object Store","description":"A generated ObjectStore\n\nThis is the backing store for the structs.","attributes":{"2fa8c5a3-6c4b-4dec-ad0c-32034ce3d149":{"id":"2fa8c5a3-6c4b-4dec-ad0c-32034ce3d149","name":"id","type":"Uuid"},"68b4dc34-75d1-4fbd-ad0e-3047f0c8aed4":{"id":"68b4dc34-75d1-4fbd-ad0e-3047f0c8aed4","name":"domain","type":"String"},"435d1dba-242a-44f6-a6e8-4af89ada7c0d":{"id":"435d1dba-242a-44f6-a6e8-4af89ada7c0d","name":"name","type":"String"}}},"97f815f0-dcc4-4bd3-843d-13ff1dc5802c":{"id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","key_letter":"DSF","name":"Dwarf Source File","description":"The Source Code\n\nThe main purpose of this object is to capture the source code that contains the definitions that will be parsed. This allows us to do better error reporting in the interpreter. We may also be able to do something about displaying compiled functions, maybe.","attributes":{"151486f9-7e65-4064-835f-13e85312950e":{"id":"151486f9-7e65-4064-835f-13e85312950e","name":"source","type":"String"},"717a33ce-b0d5-4269-bed6-0a86966ef572":{"id":"717a33ce-b0d5-4269-bed6-0a86966ef572","name":"id","type":"Uuid"}}},"72443b79-5645-4b5f-b317-e1a8f815b81c":{"id":"72443b79-5645-4b5f-b317-e1a8f815b81c","key_letter":"FOR","name":"For Loop","description":"A For Loop Expression\n\nAn expression that matches for IDENT in EXPRESSION BLOCK.","attributes":{"59d5519e-7c33-4ff7-9d4c-13790cca88da":{"id":"59d5519e-7c33-4ff7-9d4c-13790cca88da","name":"id","type":"Uuid"},"b80303bd-a746-4ad8-a624-560a5829a5c9":{"id":"b80303bd-a746-4ad8-a624-560a5829a5c9","name":"ident","type":"String"}}},"93f288e7-d670-40a6-91f3-2006b5efa8b4":{"id":"93f288e7-d670-40a6-91f3-2006b5efa8b4","key_letter":"RET","name":"Return","description":"The Return Expression\n\nIt’s an expression, and not a statement. Isn’t that interesting?","attributes":{"9f78cd40-df48-46ed-9da1-685ec026e9c3":{"id":"9f78cd40-df48-46ed-9da1-685ec026e9c3","name":"id","type":"Uuid"}}},"e1321ffa-07d5-480d-89f9-227b13d27ce1":{"id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","key_letter":"IF","name":"If","description":"The if Expression\n\nIt does include an else, at no extra charge!","attributes":{"3316a1da-1817-4657-867b-0f0ac6ac145c":{"id":"3316a1da-1817-4657-867b-0f0ac6ac145c","name":"id","type":"Uuid"}}},"3f7fd816-518b-4b9e-8134-3059e78045a0":{"id":"3f7fd816-518b-4b9e-8134-3059e78045a0","key_letter":"OP","name":"Operator","description":"Operator Expressions\n\nBasically anything you can do with an expression is a subtype of this beasty.","attributes":{"d613ed9b-274e-483a-be79-7f06d2d7c0b7":{"id":"d613ed9b-274e-483a-be79-7f06d2d7c0b7","name":"id","type":"Uuid"}}},"c46e6b80-0365-429a-abf9-ca75ce4f469a":{"id":"c46e6b80-0365-429a-abf9-ca75ce4f469a","key_letter":"COMP","name":"Comparison","description":"Comparison Operators\n\nThings like == and !=, etc.","attributes":{"69c73e42-bde8-4241-abc1-50531b19ba66":{"id":"69c73e42-bde8-4241-abc1-50531b19ba66","name":"id","type":"Uuid"}}},"9c8bc563-b596-4348-9189-065d747f7c9f":{"id":"9c8bc563-b596-4348-9189-065d747f7c9f","key_letter":"BIN","name":"Binary","description":"Binary Operators\n\n+, -, etc.","attributes":{"1d132fac-43cc-4085-969c-ea0ead6e90f0":{"id":"1d132fac-43cc-4085-969c-ea0ead6e90f0","name":"id","type":"Uuid"}}},"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523":{"id":"1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523","key_letter":"PLUS","name":"Addition","description":"The addition operator: `+`.","attributes":{"71662c9f-8108-43ba-9f39-956ba4137c79":{"id":"71662c9f-8108-43ba-9f39-956ba4137c79","name":"id","type":"Uuid"}}},"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e":{"id":"e3329a9e-1c52-44f6-a1f7-fc85f7362e9e","key_letter":"MINUS","name":"Subtraction","description":"The subtraction operator: `-`.","attributes":{"3ad6559a-d90e-4445-b305-f1e7f3634e4d":{"id":"3ad6559a-d90e-4445-b305-f1e7f3634e4d","name":"id","type":"Uuid"}}},"484e429b-bf54-45cb-9b87-baddf7fb5f5b":{"id":"484e429b-bf54-45cb-9b87-baddf7fb5f5b","key_letter":"LTE","name":"Less Than or Equal","description":"Less than or equal: `<=`.","attributes":{"762792a8-a56d-4abd-a0cb-05fa91ce7af7":{"id":"762792a8-a56d-4abd-a0cb-05fa91ce7af7","name":"id","type":"Uuid"}}},"c47b8696-7e98-4733-ab33-a4dca7b61d01":{"id":"c47b8696-7e98-4733-ab33-a4dca7b61d01","key_letter":"ASS","name":"Assignment","description":"Assignment to a storage location\n\nE.g., `a = b`.","attributes":{"1525eed3-c6e2-4dce-b587-2c1591d998b2":{"id":"1525eed3-c6e2-4dce-b587-2c1591d998b2","name":"id","type":"Uuid"}}},"e05ab5f3-17e7-4594-8ce0-c02d793a1df9":{"id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9","key_letter":"LEXP","name":"List Expression","description":"A list of expressions\n\nE.g., `let a = [0, 1, 2, 3];`","attributes":{"01684c5c-b511-40c8-9564-e9cb91f4269b":{"id":"01684c5c-b511-40c8-9564-e9cb91f4269b","name":"id","type":"Uuid"}}},"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d":{"id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","key_letter":"LE","name":"List Element","description":"","attributes":{"ecb6461a-b55a-4a66-b6ec-f22addfd992f":{"id":"ecb6461a-b55a-4a66-b6ec-f22addfd992f","name":"id","type":"Uuid"},"39368f96-3fa6-401e-8706-f9375109af18":{"id":"39368f96-3fa6-401e-8706-f9375109af18","name":"position","type":"Integer"}}},"4d5720eb-da8c-493d-ab8d-cb6111dd6099":{"id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","key_letter":"IND","name":"Index","description":"An index expression","attributes":{"f97a16a4-1e1f-4d17-9a67-6ea53e6fe20b":{"id":"f97a16a4-1e1f-4d17-9a67-6ea53e6fe20b","name":"id","type":"Uuid"}}},"6767c0cf-4041-4047-b2b4-d7375f33bc97":{"id":"6767c0cf-4041-4047-b2b4-d7375f33bc97","key_letter":"MULT","name":"Multiplication","description":"","attributes":{"47c44caf-bbbb-48f9-b604-322715ea4f70":{"id":"47c44caf-bbbb-48f9-b604-322715ea4f70","name":"id","type":"Uuid"}}},"35b3de4e-46b8-490f-8e30-c305ed348a78":{"id":"35b3de4e-46b8-490f-8e30-c305ed348a78","key_letter":"DIV","name":"Division","description":"","attributes":{"a2750f60-6827-4ade-aeca-b8e6ff5ba5fd":{"id":"a2750f60-6827-4ade-aeca-b8e6ff5ba5fd","name":"id","type":"Uuid"}}},"d8b554d4-03ac-4613-a3e0-fc0b901bfd70":{"id":"d8b554d4-03ac-4613-a3e0-fc0b901bfd70","key_letter":"GTE","name":"Greater Than or Equal","description":"","attributes":{"a1a3feb0-7273-4f2c-bee1-52ed1afa6692":{"id":"a1a3feb0-7273-4f2c-bee1-52ed1afa6692","name":"id","type":"Uuid"}}},"0edc535b-405d-4dd5-bcd2-f5772ab116c2":{"id":"0edc535b-405d-4dd5-bcd2-f5772ab116c2","key_letter":"EQ","name":"Equal","description":"","attributes":{"5cc2098c-fb9c-47f2-9e78-e82e68e94112":{"id":"5cc2098c-fb9c-47f2-9e78-e82e68e94112","name":"id","type":"Uuid"}}},"0b3e9de0-d139-4934-a043-d1913a24de0c":{"id":"0b3e9de0-d139-4934-a043-d1913a24de0c","key_letter":"RNG_EXPR","name":"Range Expression","description":"","attributes":{"c4270112-8fc2-472c-9ec8-0e47eba39942":{"id":"c4270112-8fc2-472c-9ec8-0e47eba39942","name":"id","type":"Uuid"}}},"70932b40-f444-4341-bb19-0a29d1daecbe":{"id":"70932b40-f444-4341-bb19-0a29d1daecbe","key_letter":"RNG_FRM","name":"From","description":"","attributes":{"0e8d45b6-c1af-4ce9-8c86-8852e8808224":{"id":"0e8d45b6-c1af-4ce9-8c86-8852e8808224","name":"id","type":"Uuid"}}},"32dbb54a-9693-4847-9278-7c956ea045f8":{"id":"32dbb54a-9693-4847-9278-7c956ea045f8","key_letter":"RNG_TO","name":"To","description":"","attributes":{"dc7879f5-8f75-4973-ad02-7d611b68a07c":{"id":"dc7879f5-8f75-4973-ad02-7d611b68a07c","name":"id","type":"Uuid"}}},"0dc0e921-e7ff-4766-9738-e6e312f7f0de":{"id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de","key_letter":"GRP","name":"Grouped","description":"Parens","attributes":{"f0ae9b32-3c23-4a34-b6e9-29ff8d94e3f6":{"id":"f0ae9b32-3c23-4a34-b6e9-29ff8d94e3f6","name":"id","type":"Uuid"}}},"122e4157-381f-400f-ac30-a1c8a2a9e8c1":{"id":"122e4157-381f-400f-ac30-a1c8a2a9e8c1","key_letter":"NO","name":"Full","description":"","attributes":{"55c208e0-c7ff-4428-93e9-519c9cffd3c6":{"id":"55c208e0-c7ff-4428-93e9-519c9cffd3c6","name":"id","type":"Uuid"}}},"17db2afc-ae6c-4e53-a527-48516811fe3e":{"id":"17db2afc-ae6c-4e53-a527-48516811fe3e","key_letter":"NO","name":"Inclusive","description":"","attributes":{"c84dd526-b305-4a9c-9ce6-381aab4ca0b8":{"id":"c84dd526-b305-4a9c-9ce6-381aab4ca0b8","name":"id","type":"Uuid"}}},"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd":{"id":"30abb231-4248-4ffa-9a69-e0eb6bb9dbbd","key_letter":"NO","name":"To Inclusive","description":"","attributes":{"70b1a65d-4f0f-41f8-aa77-72fead5078be":{"id":"70b1a65d-4f0f-41f8-aa77-72fead5078be","name":"id","type":"Uuid"}}},"ba8a3bbf-86a8-47e2-92bb-f41878981c41":{"id":"ba8a3bbf-86a8-47e2-92bb-f41878981c41","key_letter":"RNG","name":"Range","description":"","attributes":{"49068e96-7836-4e76-97c5-93f02f20c7da":{"id":"49068e96-7836-4e76-97c5-93f02f20c7da","name":"id","type":"Uuid"}}},"79571896-9798-44a3-acef-5aa2d9773b93":{"id":"79571896-9798-44a3-acef-5aa2d9773b93","key_letter":"SPN","name":"Span","description":"A span is just a two-tuple that specifies the start and end locations, in the source code, for an entitiy.\n\nLooking at this, I think that this should be a supertype, and then a subtype for each relationship. I’m feeling lazy.","attributes":{"4c61e3ec-89ef-42e8-a9f6-ba4131cee575":{"id":"4c61e3ec-89ef-42e8-a9f6-ba4131cee575","name":"id","type":"Uuid"},"b4499f82-5249-4f87-af52-e49caab056e2":{"id":"b4499f82-5249-4f87-af52-e49caab056e2","name":"start","type":"Integer"},"a09bcdab-3c16-4660-9d9d-0c5c39c0092b":{"id":"a09bcdab-3c16-4660-9d9d-0c5c39c0092b","name":"end","type":"Integer"}}},"5c85a8db-e4cc-4e38-9922-58d93773f4f0":{"id":"5c85a8db-e4cc-4e38-9922-58d93773f4f0","key_letter":"BUG","name":"Debugger","description":"An expresision to invoke the debugger;","attributes":{"d7c6ddc5-9913-41fc-a772-eae95f4e4cfc":{"id":"d7c6ddc5-9913-41fc-a772-eae95f4e4cfc","name":"id","type":"Uuid"}}},"bf69c9af-f268-4c9b-8e67-4497eb490478":{"id":"bf69c9af-f268-4c9b-8e67-4497eb490478","key_letter":"FAT","name":"Field Access Target","description":"The target of a field access.\n\nIt may be either a [`Field`] or a [`Function`].","attributes":{"c9c926da-906f-4e95-9feb-63b67b8449cb":{"id":"c9c926da-906f-4e95-9feb-63b67b8449cb","name":"id","type":"Uuid"}}},"ce73a111-4670-411e-9bd2-f3308d6399c9":{"id":"ce73a111-4670-411e-9bd2-f3308d6399c9","key_letter":"GT","name":"Greater Than","description":"","attributes":{"5fbf068e-83be-483b-bf12-9f3bedc79a81":{"id":"5fbf068e-83be-483b-bf12-9f3bedc79a81","name":"id","type":"Uuid"}}},"1e7a66b2-f559-4c21-b8e6-969999ed171d":{"id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","key_letter":"TC","name":"Type Cast","description":"Typecast Operator Expression\n\nThis is the `as` operator.","attributes":{"29309379-1198-4290-9efe-7d27b342c4e3":{"id":"29309379-1198-4290-9efe-7d27b342c4e3","name":"id","type":"Uuid"}}},"80f73c4e-caf1-4e1f-a634-00965f6ad032":{"id":"80f73c4e-caf1-4e1f-a634-00965f6ad032","key_letter":"NEG","name":"Negation","description":"The unary minus","attributes":{"220e79fa-e20b-4bcc-af9b-ce07f3364c01":{"id":"220e79fa-e20b-4bcc-af9b-ce07f3364c01","name":"id","type":"Uuid"}}},"222307c0-668c-43f9-9368-34cc048f0ae3":{"id":"222307c0-668c-43f9-9368-34cc048f0ae3","key_letter":"BO","name":"Boolean Operator","description":"A Boolean Operaator\n\nThere are two — || and &&.","attributes":{"14ad81ac-dc91-4764-844f-9aeab3ff7370":{"id":"14ad81ac-dc91-4764-844f-9aeab3ff7370","name":"id","type":"Uuid"}}},"6187076b-e765-4e6b-af28-f577eba40b5e":{"id":"6187076b-e765-4e6b-af28-f577eba40b5e","key_letter":"","name":"And","description":"The Boolean And Operator\n\nAnd, aka, `&&`.","attributes":{"54f9c8e5-80f5-4003-b7c1-210f80fc850b":{"id":"54f9c8e5-80f5-4003-b7c1-210f80fc850b","name":"id","type":"Uuid"}}},"f7fc16ac-6a23-4f5d-a04c-1163617701c1":{"id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1","key_letter":"","name":"Unary","description":"Unary Operators","attributes":{"a78f7aab-b13b-4f74-9bc5-1dba9849374d":{"id":"a78f7aab-b13b-4f74-9bc5-1dba9849374d","name":"id","type":"Uuid"}}},"0ad229c4-1782-4783-b64e-0d15fe482463":{"id":"0ad229c4-1782-4783-b64e-0d15fe482463","key_letter":"NOT","name":"Not","description":"","attributes":{"e308e26b-9675-4f06-b06b-510d03409ad1":{"id":"e308e26b-9675-4f06-b06b-510d03409ad1","name":"id","type":"Uuid"}}},"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a":{"id":"b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a","key_letter":"NE","name":"Not Equal","description":"The Not Equal Expression\n\nThis is the `!=` operator expression.","attributes":{"f05219d1-d3cb-4535-80f3-961384d3ec2c":{"id":"f05219d1-d3cb-4535-80f3-961384d3ec2c","name":"id","type":"Uuid"}}},"470246f6-91ec-4993-b915-93480d0f4eb9":{"id":"470246f6-91ec-4993-b915-93480d0f4eb9","key_letter":"M_CALL","name":"Macro Call","description":"A macro invocation\n\nA macro invocation is a string, followed by a bang (`!`), followed by parens and arguments.","attributes":{"2f2c62e2-d8d8-40a7-b2a5-2235c59a5b7c":{"id":"2f2c62e2-d8d8-40a7-b2a5-2235c59a5b7c","name":"id","type":"Uuid"}}},"f6a3ce12-18e1-4675-ab94-6b2a7c91d951":{"id":"f6a3ce12-18e1-4675-ab94-6b2a7c91d951","key_letter":"MAC","name":"Macro","description":"This is a macro\n\nIt sort of interesting that the way that we create a new macro is with a macro. So it’s nice and recursive like that. The macro in question, will be none other than `macro_rules!`!.\n\nOK, so that means something like this:\n\n```no-test\nmacro_rules! `ident` {\n ($[ ( | `ident`]<,)*>[,$ident]*) => {\n }\n}\n```","attributes":{"778b867f-ce73-48da-9a4a-96bc5ea3f3ee":{"id":"778b867f-ce73-48da-9a4a-96bc5ea3f3ee","name":"id","type":"Uuid"},"630d01d4-d139-43d6-8d70-a471850fd9c8":{"id":"630d01d4-d139-43d6-8d70-a471850fd9c8","name":"name","type":"String"}}},"41b7bda7-f5a2-4c94-af22-fedbe8d6f287":{"id":"41b7bda7-f5a2-4c94-af22-fedbe8d6f287","key_letter":"BO_OR","name":"Or","description":"The or `||` operator","attributes":{"020e49d4-3f70-453a-b8c3-9bb71793ab45":{"id":"020e49d4-3f70-453a-b8c3-9bb71793ab45","name":"id","type":"Uuid"}}},"84f1c5fd-d907-4653-a132-bfd420ad9212":{"id":"84f1c5fd-d907-4653-a132-bfd420ad9212","key_letter":"C_LT","name":"Less Than","description":"Less that operator `<`\n","attributes":{"9287a992-353f-4d7e-977d-925f121263e0":{"id":"9287a992-353f-4d7e-977d-925f121263e0","name":"id","type":"Uuid"}}},"efde0481-1599-4c5c-bf30-51dbd4a8ed83":{"id":"efde0481-1599-4c5c-bf30-51dbd4a8ed83","key_letter":"CHAR","name":"Char","description":"A char\n\nI char is a single printable UNICODE character. It may contain multiple bytes.","attributes":{"755111b8-1fe8-444d-bafb-d72ea047b4a5":{"id":"755111b8-1fe8-444d-bafb-d72ea047b4a5","name":"id","type":"Uuid"}}},"95e17479-07a5-41b1-9930-1b9b520514f6":{"id":"95e17479-07a5-41b1-9930-1b9b520514f6","key_letter":"ƛ","name":"Lambda","description":"Lambda Function\n\nIt’s a function, it has a type, parameters, etc. It does not have a name, which is problematic with Function having one. It’s also an Expression, unlike a Function.\n\nI should think about creating another function subtype that contains just the name...","attributes":{"be05773d-1ed6-401c-bbbc-678cde7f713c":{"id":"be05773d-1ed6-401c-bbbc-678cde7f713c","name":"id","type":"Uuid"}}},"8d86dceb-7e6e-4767-8a3f-cbbde458ad93":{"id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","key_letter":"LP","name":"Lambda Parameter","description":"id","attributes":{"adfee8d0-94b3-420c-a673-f6e9c34f8523":{"id":"adfee8d0-94b3-420c-a673-f6e9c34f8523","name":"id","type":"Uuid"},"0c5ba019-cc16-4d1f-8ffa-427acba8c280":{"id":"0c5ba019-cc16-4d1f-8ffa-427acba8c280","name":"position","type":"Integer"}}},"68e7191a-fe94-423f-8a5d-5551384ae998":{"id":"68e7191a-fe94-423f-8a5d-5551384ae998","key_letter":"OW","name":"Object Wrapper","description":"The purpose of this object is to wrap `Object`. We need to be able to store a referential attribute to the `ObjectStore`, and we can’t/don’t want to add that to `Object`.","attributes":{"12d98e93-60a2-43c7-830e-960ab321e270":{"id":"12d98e93-60a2-43c7-830e-960ab321e270","name":"id","type":"Uuid"}}},"c4723d6d-1584-49bd-80f1-4c700185746e":{"id":"c4723d6d-1584-49bd-80f1-4c700185746e","key_letter":"FB","name":"Body","description":"The function body. Generally contains statements, but may point to some other implementation.","attributes":{"acb18c42-11c2-4db0-bb5d-efe60e176212":{"id":"acb18c42-11c2-4db0-bb5d-efe60e176212","name":"id","type":"Uuid"},"23056543-73de-448f-a6b3-251f8228823d":{"id":"23056543-73de-448f-a6b3-251f8228823d","name":"async","type":"Boolean"}}},"7794ada6-49c3-4bf0-991f-828c6583ebb8":{"id":"7794ada6-49c3-4bf0-991f-828c6583ebb8","key_letter":"EI","name":"External Implementation","description":"Some extern source of the function’s body.","attributes":{"beb2a174-9ec1-44ba-b57d-2c40146e39e1":{"id":"beb2a174-9ec1-44ba-b57d-2c40146e39e1","name":"id","type":"Uuid"},"d79d5062-aa25-49d6-bc5d-fb56436e86c1":{"id":"d79d5062-aa25-49d6-bc5d-fb56436e86c1","name":"model","type":"String"},"30968bac-2fd6-4372-b3ce-7fb1752920cd":{"id":"30968bac-2fd6-4372-b3ce-7fb1752920cd","name":"object","type":"String"},"a8faf2e5-4bc5-4251-84c2-3abdbc194264":{"id":"a8faf2e5-4bc5-4251-84c2-3abdbc194264","name":"function","type":"String"}}},"d48d948b-5291-4eb3-ba35-7ab1c1ffa098":{"id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","key_letter":"ENUM","name":"Enumeration","description":"An Enumeration\n\nAn enumeration is an algebraic type that takes on one if it’s fielsd, another type. as it’s value.","attributes":{"6ab143f9-3bd4-40d9-a640-95402bcf8c7a":{"id":"6ab143f9-3bd4-40d9-a640-95402bcf8c7a","name":"id","type":"Uuid"},"1dfbaeda-b91f-4559-b6f5-5a7792766eb0":{"id":"1dfbaeda-b91f-4559-b6f5-5a7792766eb0","name":"name","type":"String"}}},"7eaea922-8807-4c38-a704-0143e0594664":{"id":"7eaea922-8807-4c38-a704-0143e0594664","key_letter":"EF","name":"Enum Field","description":"A field on an Enumeration\n\nNote that there are three sorts of fields. Tuple, Struct, and “plain?”.","attributes":{"74e4b7fb-c8fa-4c9f-b3dd-223385b34f78":{"id":"74e4b7fb-c8fa-4c9f-b3dd-223385b34f78","name":"id","type":"Uuid"},"ba15e7df-bb85-4ae5-ac02-570f915d25a2":{"id":"ba15e7df-bb85-4ae5-ac02-570f915d25a2","name":"name","type":"String"}}},"4b6c7fde-0878-4947-b960-bc73a4558c60":{"id":"4b6c7fde-0878-4947-b960-bc73a4558c60","key_letter":"UEF","name":"Unit","description":"Just a marker, no other value.","attributes":{"5dab5104-dd9d-413a-afde-24e1cd249566":{"id":"5dab5104-dd9d-413a-afde-24e1cd249566","name":"id","type":"Uuid"},"9f44da33-ba44-4b17-a5f8-54b397515b2a":{"id":"9f44da33-ba44-4b17-a5f8-54b397515b2a","name":"value","type":"Integer"}}},"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2":{"id":"e6fbeeb8-6ade-46a2-bb52-9c99d06918b2","key_letter":"EFSF","name":"Struct Field","description":"A field that is a structure.","attributes":{"b05b1a17-ec60-490a-816e-32cd8623390f":{"id":"b05b1a17-ec60-490a-816e-32cd8623390f","name":"id","type":"Uuid"},"22d2baf6-1373-4d2f-802f-c0a3315d8bae":{"id":"22d2baf6-1373-4d2f-802f-c0a3315d8bae","name":"name","type":"String"}}},"c8fcd612-6ca8-469a-824c-de218e4fd075":{"id":"c8fcd612-6ca8-469a-824c-de218e4fd075","key_letter":"EFTF","name":"Tuple Field","description":"A field that is a tuple.\n\nCurrently in this implementation we are cheating, as we don’t yet actually have tuples. So this is limited to a single item.\n\nNote the `hack` attribute. What’s happening is that during generic substitution?, expansion?, whatever. During that we are cloning the enum, and it’s fields. This is to create a new type. When we do this we don’t want the store optimizing away a duplicate Tuple Field.\n\nI deb thee hack because I think the right thing to do is something else, I’m just not sure what it is yet.\n\nI renamed it to `xyzzy`, because I think `hack` does magic in the compiler.","attributes":{"20d73af4-8fc2-44e5-84a0-f0cc3f2ebf72":{"id":"20d73af4-8fc2-44e5-84a0-f0cc3f2ebf72","name":"id","type":"Uuid"},"126ed291-1bc1-44c0-87e8-5ec89a94e077":{"id":"126ed291-1bc1-44c0-87e8-5ec89a94e077","name":"xyzzy","type":"Uuid"}}},"968ea4f4-0a3b-44d4-a266-16facf7d325f":{"id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","key_letter":"BEER","name":"Generic","description":"This is a generic “type”.\n\nIt’s really a placeholder in the extruder/compiler. We’ll use it as a type declaration, and then define a new type for each use.","attributes":{"180e5ef3-21bf-4329-a381-a82022a691bd":{"id":"180e5ef3-21bf-4329-a381-a82022a691bd","name":"id","type":"Uuid"},"4ff1f1c6-9ee0-4d0a-9e30-a2d287833911":{"id":"4ff1f1c6-9ee0-4d0a-9e30-a2d287833911","name":"name","type":"String"}}},"52143d28-8474-44bc-b63f-e654150888d3":{"id":"52143d28-8474-44bc-b63f-e654150888d3","key_letter":"FIRE","name":"Match","description":"Match a pattern to a scrutinee and evaluate a branch based on the results.","attributes":{"670a1371-78dd-49df-82fb-d51a664263a3":{"id":"670a1371-78dd-49df-82fb-d51a664263a3","name":"id","type":"Uuid"},"f165e2b2-cc7e-46ba-bc71-9ee1a6d7ddb4":{"id":"f165e2b2-cc7e-46ba-bc71-9ee1a6d7ddb4","name":"uniqueness_generator","type":"Uuid"}}},"ab7a5708-6d12-4dce-b488-fa3a3b480510":{"id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","key_letter":"道","name":"Path","description":"This is a path to a local variable, or an item. It is made up of scopes, separated by `::`.","attributes":{"7b59e37b-41ec-44d0-a83a-e5811b16fb6c":{"id":"7b59e37b-41ec-44d0-a83a-e5811b16fb6c","name":"id","type":"Uuid"},"ca5743c6-dc5e-4801-9925-b2dbe29e34a3":{"id":"ca5743c6-dc5e-4801-9925-b2dbe29e34a3","name":"unique","type":"Uuid"}}},"6094aad5-613b-42b6-8f48-c3b9e2161aa9":{"id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","key_letter":"PAT","name":"Pattern","description":"The pattern is a specification for extracting data from a type. It’s sort of a reverse impression of what you are looking for. If the shape of the impression matches the scrutinee, then they “fit” and the pattern’s lvalues will be populated with data from the scrutinee.\n\nThere are a bunch of diffirent kinds of patterns. Literal, ident, struct, tuple, etc. Modeling this will take a lot of room and time.\n\nDoing this I’m going to cheat a bit and store the code that does matching as a string on this object during compilation. During runtime the string will be evaluated (either as dwrf, or perhasps using a small VM. Or maybe use the built-in VM. It should be able to handle all that we need. This way, I don’t have to model all the bits because they are encoded in the code attribute.\n\nSo I guess that means I’ll be writing assembly code...","attributes":{"faad8dc6-64c0-4c15-8e76-44328eaa72b8":{"id":"faad8dc6-64c0-4c15-8e76-44328eaa72b8","name":"id","type":"Uuid"}}},"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7":{"id":"6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7","key_letter":"NFE","name":"Named Field Expression","description":"","attributes":{"bc2a2349-fae2-4f3b-84b1-84eab8ab1d77":{"id":"bc2a2349-fae2-4f3b-84b1-84eab8ab1d77","name":"name","type":"String"},"8ea54fa1-5f86-408d-822c-dccdf5505db3":{"id":"8ea54fa1-5f86-408d-822c-dccdf5505db3","name":"id","type":"Uuid"}}},"910e3a08-5e99-47a5-bde4-3e35cf9f00da":{"id":"910e3a08-5e99-47a5-bde4-3e35cf9f00da","key_letter":"UFE","name":"Unnamed Field Expression","description":"","attributes":{"7aae03a2-e0e0-43db-9861-6c732eb85ef5":{"id":"7aae03a2-e0e0-43db-9861-6c732eb85ef5","name":"id","type":"Uuid"},"e90de56f-91a2-4df6-b013-3bf7d08bab73":{"id":"e90de56f-91a2-4df6-b013-3bf7d08bab73","name":"position","type":"Integer"}}},"31deb355-b737-43a6-ae88-199bb51f940d":{"id":"31deb355-b737-43a6-ae88-199bb51f940d","key_letter":"DS","name":"Data Structure","description":"","attributes":{"9af827eb-88fb-495e-8000-bcded4b9caea":{"id":"9af827eb-88fb-495e-8000-bcded4b9caea","name":"id","type":"Uuid"}}},"39060ea9-5d45-4954-a29f-ba88e01e7217":{"id":"39060ea9-5d45-4954-a29f-ba88e01e7217","key_letter":"GYM","name":"Path Element","description":"🖕🤣","attributes":{"ca0023ad-2efb-475a-b663-4ecad4117a31":{"id":"ca0023ad-2efb-475a-b663-4ecad4117a31","name":"id","type":"Uuid"},"1ec6c6dd-1792-4ea5-bbda-dc490dc601c2":{"id":"1ec6c6dd-1792-4ea5-bbda-dc490dc601c2","name":"name","type":"String"}}},"4856978f-20be-4b59-8bf6-b941091119a9":{"id":"4856978f-20be-4b59-8bf6-b941091119a9","key_letter":"A_WAIT","name":"Await","description":"","attributes":{"b0944a25-05f1-4f14-bc2b-e67851d66f8b":{"id":"b0944a25-05f1-4f14-bc2b-e67851d66f8b","name":"id","type":"Uuid"}}},"dbada891-ca0d-4fbc-8371-9f9234867bd6":{"id":"dbada891-ca0d-4fbc-8371-9f9234867bd6","key_letter":"FUT","name":"Future","description":"","attributes":{"37182d8e-782a-4071-86bd-b1c7f30c53ba":{"id":"37182d8e-782a-4071-86bd-b1c7f30c53ba","name":"id","type":"Uuid"}}},"290f49d3-8ce7-408e-be14-611b66db9687":{"id":"290f49d3-8ce7-408e-be14-611b66db9687","key_letter":"SG1","name":"Struct Generic","description":"A generic type applied to the struct.","attributes":{"d8e275eb-cd85-46a4-b5b8-5e71baec33c3":{"id":"d8e275eb-cd85-46a4-b5b8-5e71baec33c3","name":"id","type":"Uuid"},"6077a668-17b2-4d8d-8fdd-a34442e7d10c":{"id":"6077a668-17b2-4d8d-8fdd-a34442e7d10c","name":"name","type":"String"}}}}},"relationships":{"ids":["21f08565-d913-4302-a853-e5f688ec1bc1","4b7360ba-8de3-4c93-bc90-22478c128a75","3746c64a-c63d-424d-afb2-c253470b6d7b","02892323-60e9-470b-b162-b2bc8d9ef1cd","98c79b91-da7b-443a-b1fb-18596cd6b4bc","7993e2c7-7efa-4346-b50e-bc02d55e1ca7","fdb49afe-13fb-4c79-99d1-92728d8652c7","ea1e6d1c-279b-4b6d-806e-fa133c6a5da9","35491126-597f-4301-ae48-88da4a23c845","336674ce-19be-4baa-8117-19ee19886e2d","95b8c311-1f3f-42ab-93cd-9b95c8d8c02a","3966271b-9938-48c7-b4fe-177c307e22bf","2e81ce06-82d5-47e6-9f38-783d8af057d9","03745d2b-a85f-40a9-b038-8f22c83e8eb1","c715993f-c840-4d48-8442-b5635e4324e7","f6c19c17-3e01-4945-bffb-7ec408dd7fcf","d8bf88d3-35da-422d-a7d9-1726ce66a288","0b5aab4e-5077-4627-9091-89c71a921be1","3bb006c5-a66d-440b-b54b-35bc9da87b33","e67c9242-2aac-4930-ae2e-b2a1678ed3d9","332f2cb5-0719-4c2d-8737-c1a0375fad8e","e93a7669-d7d0-4cb2-bbb1-36dedf3f893d","ead7f44b-e37a-4122-8824-17f4079c2e70","33838622-f03e-415f-9588-e7f9e644727e","54994661-e099-453c-904f-c09cc0fa0bfa","0cde3a3b-6678-42ac-8fa4-8ab02acb3dea","688ec08e-9fd6-4a2f-bcd5-5ea94e946d1b","e0a24038-1c85-4d6f-afbc-5c034062a557","96737350-249d-4701-9b47-0f56bf8bfc7f","9fd61528-8e0f-40d0-b1bb-53b468851d30","95fcc898-ef24-4ec4-8409-798a6623713e","de725e45-a751-4f4b-8c44-6c79671c70eb","39f2d2c1-abf2-4f3e-a4f1-58a477b12f9e","81d77ddd-6aae-4023-8467-2f5705d5e633","c45955d9-c799-4d61-8bc6-6335bde326b8","bc8075e9-e5ba-4a26-b696-7cf2651997ba","6f636d63-667a-40ad-b554-a301a62ddebd","f564f775-febe-442e-a0f1-492a2265e991","0e780acf-9221-4e84-9377-64d31e653187","fc2e5c67-6c98-4bfd-93a7-711fa2ae573f","ba437581-658a-497d-9790-ab79ad56cd4f","cdd19ddf-67e5-4e9b-9958-0745e8f9729e","c8d05983-b88d-40da-bf31-83d2d8b8c574","c6ed5fc4-f04a-45e0-afc3-6f421b81fea7","27350475-a322-4ede-a4b2-eb88a3c847f5","513c99bc-140c-44c2-b605-0d377805ac43","55ae9c5d-bcdb-4c29-8f06-cc9f596662d5","23c220df-e5a3-44dc-b521-d29378c6a5e0","71251371-81c5-4f25-8141-fef1e23e12fe","761a6c93-ae0b-4508-9437-d68d0b2c1f22","8398d7d3-d42f-4ca6-89d3-7a563eb50131","124d7dea-f1d6-477f-a096-42e92dd297c2","07097b52-f614-461b-9d4c-62ba7177a383","5e20da11-448d-41a5-8b92-7dd75d64ad3d","10e2f3e9-2995-47e0-9456-ed375eb610b7","d64c3d2d-51d9-4586-b8e7-0b23aea46f49","497076d2-1625-446b-b663-d75f5c2e2a3c","f42505df-9843-4914-97bc-c665dfbc2dcc","dfa0880b-de0a-4d0f-9f42-7ed496af35ea","7fb6cd7d-16c0-43bc-9e29-f645c644afe1","f72fcd31-7056-4425-b0ce-7734a759e616","b197d992-e4d6-4663-a6da-b46906374684","7022f5ed-020f-453f-bcab-8e632ca03b6e","1ec425ff-8b5a-49bf-87cb-9863defb9320","99d07c03-f3ce-42d7-bb64-8bde65c79dd6","3088e0b8-de0a-45d2-95fb-e8804c9c03fa","a640575d-a105-4ad5-b786-6e7fb55a0b94","d32059a8-46ed-4ceb-9b92-5f661b98f4e6","cfe90847-d888-4245-bb66-901855bb0051","45c4a4f5-e54b-45d2-bea6-617723a92b70","14f71b3f-b918-4376-8e75-7333e85ca536","8d8db4b1-8c90-472b-bc98-88fa6a2188d1","44ad55c5-bb62-4864-90e7-e992494786aa","c12fcdf7-ec63-58c7-8555-36222f25b91b","c3dba39c-fe1e-49e0-9a45-8f872b6aa4c5","f1c15ada-631b-4249-8c73-4e52391a532f","a5ac6af9-3cef-49e5-8d01-462817e1d641","868b4a28-0d2f-4d78-b947-66f44c3bdaf9","ca33902a-c6f2-45a5-9273-cf80a579cedd","d440f204-2694-4438-b618-721a9108070f","69b40bff-5f3d-44ef-8c68-57ff9e033e7b","18c4566d-a7b7-4b1d-8e0b-470fddbaab9b","33b9b943-0d44-4490-b20a-35c110ae9473","4ce09575-5a2c-40c5-b766-bb12ef0c1600","193d881e-9afd-4b9e-a431-cdb113a7ee88","badf3d57-aba3-4757-b0e4-9d0e7b55f2ea","08512716-f1d3-4a88-bd38-aea9ae0f9ca7","0ed07f33-0bbb-497d-9823-9247fc520e85","cea29749-dc0f-40c0-adf9-4c21b187751e","599c1454-9525-4386-b50f-4fdee4b08373","9f2917c8-b17b-4ab2-8c6e-0269a0b80681","3c241319-416a-4195-ae80-fa4439198c1c","12003437-2898-4b1d-ba27-b1cc69d8dbb2","940f5aba-58f5-46fa-bbba-43fc6b10a3fe","42c18b66-d259-40d1-a77d-0c0e76080a6d","04ae2e8d-c499-4068-88bd-015b0bba57bf","7e2c2118-fb6c-4ac4-9676-e7427cd495c2","b21bc0c0-fab4-42f8-ae6c-eb6ab8f5968a","e4734a39-1f45-400f-937a-285e2fad31a4","da1d6545-b9d6-499e-9175-fd2a340b1f2e","c8a4b21a-62c3-4fbd-8799-2b55d93d951c","23ef9104-65a5-4b32-943f-a2db064c699f"],"entities":{"21f08565-d913-4302-a853-e5f688ec1bc1":{"Isa":{"id":"21f08565-d913-4302-a853-e5f688ec1bc1","number":1,"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","subtypes":["b8ec6afc-ddbd-53d6-9be3-e4b738941c2f","a8b86e41-5b04-4469-8a10-91bd89603e27","d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","23a9a479-68e7-4a70-bcef-9041f10fd287","3a1c7f6a-459d-4eba-9291-2aebb9bf60c9","a9b74602-bdc5-481f-af4c-8021553b895a","cdb1afaf-245c-4d56-bfea-10f69e45007d","b7483723-222d-4f08-b7b9-e8b14f0308cf","e68f8912-9897-4cbd-b363-cb4203a726a9","c89e362d-7905-4226-8713-97d3d6f05037","ba8a3bbf-86a8-47e2-92bb-f41878981c41","efde0481-1599-4c5c-bf30-51dbd4a8ed83","95e17479-07a5-41b1-9930-1b9b520514f6","d48d948b-5291-4eb3-ba35-7ab1c1ffa098","968ea4f4-0a3b-44d4-a266-16facf7d325f","dbada891-ca0d-4fbc-8371-9f9234867bd6"]}},"4b7360ba-8de3-4c93-bc90-22478c128a75":{"Binary":{"id":"4b7360ba-8de3-4c93-bc90-22478c128a75","number":5,"from":{"obj_id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","description":"has a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"describes a","cardinality":"One","conditionality":"Conditional"}}},"3746c64a-c63d-424d-afb2-c253470b6d7b":{"Isa":{"id":"3746c64a-c63d-424d-afb2-c253470b6d7b","number":6,"obj_id":"45644594-b418-5362-9294-a62fe2a0fa8e","subtypes":["e68f8912-9897-4cbd-b363-cb4203a726a9","88687f76-5d9e-404e-a801-f6f57f9b30ca","d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","c89e362d-7905-4226-8713-97d3d6f05037","f6a3ce12-18e1-4675-ab94-6b2a7c91d951","d48d948b-5291-4eb3-ba35-7ab1c1ffa098"]}},"02892323-60e9-470b-b162-b2bc8d9ef1cd":{"Binary":{"id":"02892323-60e9-470b-b162-b2bc8d9ef1cd","number":7,"from":{"obj_id":"141350e6-b62d-4a6d-9ea2-47333e51e3ea","description":"comprises a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"model"},"to":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"is comprised of","cardinality":"One","conditionality":"Conditional"}}},"98c79b91-da7b-443a-b1fb-18596cd6b4bc":{"Binary":{"id":"98c79b91-da7b-443a-b1fb-18596cd6b4bc","number":8,"from":{"obj_id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","description":"adds functions to a","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"model_type"},"to":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"may have an","cardinality":"One","conditionality":"Conditional"}}},"7993e2c7-7efa-4346-b50e-bc02d55e1ca7":{"Binary":{"id":"7993e2c7-7efa-4346-b50e-bc02d55e1ca7","number":9,"from":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"may be contained in an","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"impl_block"},"to":{"obj_id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","description":"may contain","cardinality":"One","conditionality":"Conditional"}}},"fdb49afe-13fb-4c79-99d1-92728d8652c7":{"Binary":{"id":"fdb49afe-13fb-4c79-99d1-92728d8652c7","number":10,"from":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"returns","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"return_type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"is returned by","cardinality":"One","conditionality":"Conditional"}}},"ea1e6d1c-279b-4b6d-806e-fa133c6a5da9":{"Isa":{"id":"ea1e6d1c-279b-4b6d-806e-fa133c6a5da9","number":11,"obj_id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","subtypes":["954b354f-3a90-440b-ab0f-43efc00d275e","9352c766-9f6b-413b-9ea0-13f9c8e4d86e"]}},"35491126-597f-4301-ae48-88da4a23c845":{"Isa":{"id":"35491126-597f-4301-ae48-88da4a23c845","number":12,"obj_id":"954b354f-3a90-440b-ab0f-43efc00d275e","subtypes":["0365b40c-c40a-4653-84ab-44d1c12d294f","f192b162-8ada-4128-8805-1953e9165c54","8d86dceb-7e6e-4767-8a3f-cbbde458ad93"]}},"336674ce-19be-4baa-8117-19ee19886e2d":{"Binary":{"id":"336674ce-19be-4baa-8117-19ee19886e2d","number":13,"from":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"is available to a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"function"},"to":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"receives a value via a","cardinality":"One","conditionality":"Conditional"}}},"95b8c311-1f3f-42ab-93cd-9b95c8d8c02a":{"Binary":{"id":"95b8c311-1f3f-42ab-93cd-9b95c8d8c02a","number":14,"from":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"follows","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"preceeds","cardinality":"One","conditionality":"Conditional"}}},"3966271b-9938-48c7-b4fe-177c307e22bf":{"Isa":{"id":"3966271b-9938-48c7-b4fe-177c307e22bf","number":15,"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","subtypes":["30c31621-a4bd-4356-80b9-1226e00651c9","dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","d715c5f9-23f8-45e0-a1df-34e27acd01f5","d546feef-91df-49ea-ac61-430bdcf9832c","6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","43bebcb3-06a1-410d-a19e-b3c1c6d1fa6b","1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","26dba2c5-a7e9-4556-a9c2-79091a97b941","72443b79-5645-4b5f-b317-e1a8f815b81c","93f288e7-d670-40a6-91f3-2006b5efa8b4","e1321ffa-07d5-480d-89f9-227b13d27ce1","3f7fd816-518b-4b9e-8134-3059e78045a0","e05ab5f3-17e7-4594-8ce0-c02d793a1df9","ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","4d5720eb-da8c-493d-ab8d-cb6111dd6099","0b3e9de0-d139-4934-a043-d1913a24de0c","0dc0e921-e7ff-4766-9738-e6e312f7f0de","5c85a8db-e4cc-4e38-9922-58d93773f4f0","3874760d-0104-4670-ba8b-1af413c5ec4a","1e7a66b2-f559-4c21-b8e6-969999ed171d","95e17479-07a5-41b1-9930-1b9b520514f6","52143d28-8474-44bc-b63f-e654150888d3","ab7a5708-6d12-4dce-b488-fa3a3b480510","4856978f-20be-4b59-8bf6-b941091119a9"]}},"2e81ce06-82d5-47e6-9f38-783d8af057d9":{"Isa":{"id":"2e81ce06-82d5-47e6-9f38-783d8af057d9","number":16,"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","subtypes":["ce2da156-e0fd-4e56-bb31-2030d4e0c599","c32fcb6d-b505-492f-95c8-5f118079a399","59f269ab-2dbc-4b07-b9bc-48441f20e78f","59f269ab-2dbc-4b07-b9bc-48441f20e78f","b359d531-77ae-436f-9f0d-6a5632f1648e"]}},"03745d2b-a85f-40a9-b038-8f22c83e8eb1":{"Binary":{"id":"03745d2b-a85f-40a9-b038-8f22c83e8eb1","number":17,"from":{"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","description":"follows","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","description":"preceeds","cardinality":"One","conditionality":"Conditional"}}},"c715993f-c840-4d48-8442-b5635e4324e7":{"Binary":{"id":"c715993f-c840-4d48-8442-b5635e4324e7","number":18,"from":{"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","description":"is contianed in a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"may contain many","cardinality":"One","conditionality":"Conditional"}}},"f6c19c17-3e01-4945-bffb-7ec408dd7fcf":{"Binary":{"id":"f6c19c17-3e01-4945-bffb-7ec408dd7fcf","number":19,"from":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"executes statements in a","cardinality":"One","conditionality":"Unconditional","formalizing_attribute_name":"body"},"to":{"obj_id":"c4723d6d-1584-49bd-80f1-4c700185746e","description":"provides statements to a","cardinality":"One","conditionality":"Conditional"}}},"d8bf88d3-35da-422d-a7d9-1726ce66a288":{"Binary":{"id":"d8bf88d3-35da-422d-a7d9-1726ce66a288","number":20,"from":{"obj_id":"c32fcb6d-b505-492f-95c8-5f118079a399","description":"assigns the value of an","cardinality":"One","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is assigned by a","cardinality":"One","conditionality":"Conditional"}}},"0b5aab4e-5077-4627-9091-89c71a921be1":{"Binary":{"id":"0b5aab4e-5077-4627-9091-89c71a921be1","number":21,"from":{"obj_id":"c32fcb6d-b505-492f-95c8-5f118079a399","description":"assigns a value to a","cardinality":"One","conditionality":"Unconditional","formalizing_attribute_name":"variable"},"to":{"obj_id":"0365b40c-c40a-4653-84ab-44d1c12d294f","description":"is introduced by a","cardinality":"One","conditionality":"Unconditional"}}},"3bb006c5-a66d-440b-b54b-35bc9da87b33":{"Isa":{"id":"3bb006c5-a66d-440b-b54b-35bc9da87b33","number":22,"obj_id":"dbbb7d46-4072-49a6-b483-cc8b25cbb4ea","subtypes":["d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","d30d2b03-732b-41bb-89ed-d053750bf987","b1612607-a813-4bc2-896b-88ec4b249447","fa42f4e2-1ff3-473f-a4b9-593c01134e96"]}},"e67c9242-2aac-4930-ae2e-b2a1678ed3d9":{"Binary":{"id":"e67c9242-2aac-4930-ae2e-b2a1678ed3d9","number":24,"from":{"obj_id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","description":"is decoded by a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"lends semantics to a","cardinality":"One","conditionality":"Conditional"}}},"332f2cb5-0719-4c2d-8737-c1a0375fad8e":{"Isa":{"id":"332f2cb5-0719-4c2d-8737-c1a0375fad8e","number":35,"obj_id":"d86aef6f-0a91-4f3e-81cb-b220dbe7c7b5","subtypes":["dc6d1ffa-5dca-43ef-b973-0628ab580cb7","a16027c2-9a1d-42b7-ab37-a4e8e0bb7e4d"]}},"e93a7669-d7d0-4cb2-bbb1-36dedf3f893d":{"Binary":{"id":"e93a7669-d7d0-4cb2-bbb1-36dedf3f893d","number":26,"from":{"obj_id":"3874760d-0104-4670-ba8b-1af413c5ec4a","description":"belongs to a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"struct"},"to":{"obj_id":"d546feef-91df-49ea-ac61-430bdcf9832c","description":"may have many","cardinality":"One","conditionality":"Conditional"}}},"ead7f44b-e37a-4122-8824-17f4079c2e70":{"Binary":{"id":"ead7f44b-e37a-4122-8824-17f4079c2e70","number":27,"from":{"obj_id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","description":"contains an","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"may be a","cardinality":"One","conditionality":"Conditional"}}},"33838622-f03e-415f-9588-e7f9e644727e":{"Binary":{"id":"33838622-f03e-415f-9588-e7f9e644727e","number":27,"from":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"follows","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"preceeds","cardinality":"One","conditionality":"Conditional"}}},"54994661-e099-453c-904f-c09cc0fa0bfa":{"Binary":{"id":"54994661-e099-453c-904f-c09cc0fa0bfa","number":28,"from":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"is part of a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"function"},"to":{"obj_id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","description":"may have","cardinality":"One","conditionality":"Conditional"}}},"0cde3a3b-6678-42ac-8fa4-8ab02acb3dea":{"Binary":{"id":"0cde3a3b-6678-42ac-8fa4-8ab02acb3dea","number":29,"from":{"obj_id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","description":"may be an","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"may be a","cardinality":"One","conditionality":"Conditional"}}},"688ec08e-9fd6-4a2f-bcd5-5ea94e946d1b":{"Isa":{"id":"688ec08e-9fd6-4a2f-bcd5-5ea94e946d1b","number":30,"obj_id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","subtypes":["01c8907d-cb59-4fae-a3ca-8cb331d18387","75a16785-d611-45ce-b52c-284a9da0b4b8","79069fc2-4d65-4073-b610-4afc0488de5c","470246f6-91ec-4993-b915-93480d0f4eb9"]}},"e0a24038-1c85-4d6f-afbc-5c034062a557":{"Binary":{"id":"e0a24038-1c85-4d6f-afbc-5c034062a557","number":31,"from":{"obj_id":"59f269ab-2dbc-4b07-b9bc-48441f20e78f","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"96737350-249d-4701-9b47-0f56bf8bfc7f":{"Binary":{"id":"96737350-249d-4701-9b47-0f56bf8bfc7f","number":32,"from":{"obj_id":"6a0a9ba3-81ef-4fdc-8de1-d67e84dfb656","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"9fd61528-8e0f-40d0-b1bb-53b468851d30":{"Binary":{"id":"9fd61528-8e0f-40d0-b1bb-53b468851d30","number":33,"from":{"obj_id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"","cardinality":"One","conditionality":"Conditional"}}},"95fcc898-ef24-4ec4-8409-798a6623713e":{"Binary":{"id":"95fcc898-ef24-4ec4-8409-798a6623713e","number":36,"from":{"obj_id":"cdb1afaf-245c-4d56-bfea-10f69e45007d","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"","cardinality":"One","conditionality":"Conditional"}}},"de725e45-a751-4f4b-8c44-6c79671c70eb":{"Binary":{"id":"de725e45-a751-4f4b-8c44-6c79671c70eb","number":37,"from":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"39f2d2c1-abf2-4f3e-a4f1-58a477b12f9e":{"Binary":{"id":"39f2d2c1-abf2-4f3e-a4f1-58a477b12f9e","number":38,"from":{"obj_id":"3874760d-0104-4670-ba8b-1af413c5ec4a","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"81d77ddd-6aae-4023-8467-2f5705d5e633":{"Binary":{"id":"81d77ddd-6aae-4023-8467-2f5705d5e633","number":39,"from":{"obj_id":"d546feef-91df-49ea-ac61-430bdcf9832c","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"data"},"to":{"obj_id":"31deb355-b737-43a6-ae88-199bb51f940d","description":"","cardinality":"One","conditionality":"Conditional"}}},"c45955d9-c799-4d61-8bc6-6335bde326b8":{"Binary":{"id":"c45955d9-c799-4d61-8bc6-6335bde326b8","number":40,"from":{"obj_id":"c89e362d-7905-4226-8713-97d3d6f05037","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"object"},"to":{"obj_id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","description":"","cardinality":"One","conditionality":"Conditional"}}},"bc8075e9-e5ba-4a26-b696-7cf2651997ba":{"Binary":{"id":"bc8075e9-e5ba-4a26-b696-7cf2651997ba","number":41,"from":{"obj_id":"b359d531-77ae-436f-9f0d-6a5632f1648e","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"6f636d63-667a-40ad-b554-a301a62ddebd":{"Binary":{"id":"6f636d63-667a-40ad-b554-a301a62ddebd","number":25,"from":{"obj_id":"45644594-b418-5362-9294-a62fe2a0fa8e","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"source"},"to":{"obj_id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","description":"","cardinality":"One","conditionality":"Conditional"}}},"f564f775-febe-442e-a0f1-492a2265e991":{"Binary":{"id":"f564f775-febe-442e-a0f1-492a2265e991","number":42,"from":{"obj_id":"72443b79-5645-4b5f-b317-e1a8f815b81c","description":"iterates over an","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is provided to a","cardinality":"One","conditionality":"Conditional"}}},"0e780acf-9221-4e84-9377-64d31e653187":{"Binary":{"id":"0e780acf-9221-4e84-9377-64d31e653187","number":43,"from":{"obj_id":"72443b79-5645-4b5f-b317-e1a8f815b81c","description":"executes a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"is executed by","cardinality":"One","conditionality":"Conditional"}}},"fc2e5c67-6c98-4bfd-93a7-711fa2ae573f":{"Binary":{"id":"fc2e5c67-6c98-4bfd-93a7-711fa2ae573f","number":44,"from":{"obj_id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","description":"branches based on","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"test"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is evaluated by","cardinality":"One","conditionality":"Conditional"}}},"ba437581-658a-497d-9790-ab79ad56cd4f":{"Binary":{"id":"ba437581-658a-497d-9790-ab79ad56cd4f","number":45,"from":{"obj_id":"93f288e7-d670-40a6-91f3-2006b5efa8b4","description":"evaluates and returns","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is returned by","cardinality":"One","conditionality":"Conditional"}}},"cdd19ddf-67e5-4e9b-9958-0745e8f9729e":{"Binary":{"id":"cdd19ddf-67e5-4e9b-9958-0745e8f9729e","number":46,"from":{"obj_id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","description":"when true, evaluates","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"true_block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"is evaluated by","cardinality":"One","conditionality":"Conditional"}}},"c8d05983-b88d-40da-bf31-83d2d8b8c574":{"Isa":{"id":"c8d05983-b88d-40da-bf31-83d2d8b8c574","number":47,"obj_id":"3f7fd816-518b-4b9e-8134-3059e78045a0","subtypes":["9c8bc563-b596-4348-9189-065d747f7c9f","c46e6b80-0365-429a-abf9-ca75ce4f469a","f7fc16ac-6a23-4f5d-a04c-1163617701c1"]}},"c6ed5fc4-f04a-45e0-afc3-6f421b81fea7":{"Isa":{"id":"c6ed5fc4-f04a-45e0-afc3-6f421b81fea7","number":48,"obj_id":"9c8bc563-b596-4348-9189-065d747f7c9f","subtypes":["1b4e5b3a-a9b2-4316-94c4-ff34d4d3d523","e3329a9e-1c52-44f6-a1f7-fc85f7362e9e","c47b8696-7e98-4733-ab33-a4dca7b61d01","6767c0cf-4041-4047-b2b4-d7375f33bc97","35b3de4e-46b8-490f-8e30-c305ed348a78","222307c0-668c-43f9-9368-34cc048f0ae3"]}},"27350475-a322-4ede-a4b2-eb88a3c847f5":{"Isa":{"id":"27350475-a322-4ede-a4b2-eb88a3c847f5","number":49,"obj_id":"c46e6b80-0365-429a-abf9-ca75ce4f469a","subtypes":["484e429b-bf54-45cb-9b87-baddf7fb5f5b","d8b554d4-03ac-4613-a3e0-fc0b901bfd70","0edc535b-405d-4dd5-bcd2-f5772ab116c2","ce73a111-4670-411e-9bd2-f3308d6399c9","b8d3d40e-462e-4e4d-9fb4-b7d54f9fd03a","84f1c5fd-d907-4653-a132-bfd420ad9212"]}},"513c99bc-140c-44c2-b605-0d377805ac43":{"Binary":{"id":"513c99bc-140c-44c2-b605-0d377805ac43","number":50,"from":{"obj_id":"3f7fd816-518b-4b9e-8134-3059e78045a0","description":"left hand side","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"lhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"55ae9c5d-bcdb-4c29-8f06-cc9f596662d5":{"Binary":{"id":"55ae9c5d-bcdb-4c29-8f06-cc9f596662d5","number":51,"from":{"obj_id":"3f7fd816-518b-4b9e-8134-3059e78045a0","description":"right hand side","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"rhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"23c220df-e5a3-44dc-b521-d29378c6a5e0":{"Binary":{"id":"23c220df-e5a3-44dc-b521-d29378c6a5e0","number":52,"from":{"obj_id":"e1321ffa-07d5-480d-89f9-227b13d27ce1","description":"false block","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"false_block"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"","cardinality":"One","conditionality":"Conditional"}}},"71251371-81c5-4f25-8141-fef1e23e12fe":{"Binary":{"id":"71251371-81c5-4f25-8141-fef1e23e12fe","number":53,"from":{"obj_id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","description":"follows","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","description":"preceeds","cardinality":"One","conditionality":"Conditional"}}},"761a6c93-ae0b-4508-9437-d68d0b2c1f22":{"Binary":{"id":"761a6c93-ae0b-4508-9437-d68d0b2c1f22","number":54,"from":{"obj_id":"e05ab5f3-17e7-4594-8ce0-c02d793a1df9","description":"contains","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"elements"},"to":{"obj_id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","description":"is in a ","cardinality":"Many","conditionality":"Unconditional"}}},"8398d7d3-d42f-4ca6-89d3-7a563eb50131":{"Binary":{"id":"8398d7d3-d42f-4ca6-89d3-7a563eb50131","number":55,"from":{"obj_id":"ef4fe655-79cc-4eda-ac4e-d3ed30bd189d","description":"points at an","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is used by a","cardinality":"One","conditionality":"Conditional"}}},"124d7dea-f1d6-477f-a096-42e92dd297c2":{"Binary":{"id":"124d7dea-f1d6-477f-a096-42e92dd297c2","number":56,"from":{"obj_id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"index"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"07097b52-f614-461b-9d4c-62ba7177a383":{"Binary":{"id":"07097b52-f614-461b-9d4c-62ba7177a383","number":57,"from":{"obj_id":"4d5720eb-da8c-493d-ab8d-cb6111dd6099","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"target"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"5e20da11-448d-41a5-8b92-7dd75d64ad3d":{"Binary":{"id":"5e20da11-448d-41a5-8b92-7dd75d64ad3d","number":58,"from":{"obj_id":"0b3e9de0-d139-4934-a043-d1913a24de0c","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"lhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"10e2f3e9-2995-47e0-9456-ed375eb610b7":{"Binary":{"id":"10e2f3e9-2995-47e0-9456-ed375eb610b7","number":59,"from":{"obj_id":"0b3e9de0-d139-4934-a043-d1913a24de0c","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"rhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"d64c3d2d-51d9-4586-b8e7-0b23aea46f49":{"Isa":{"id":"d64c3d2d-51d9-4586-b8e7-0b23aea46f49","number":60,"obj_id":"0b3e9de0-d139-4934-a043-d1913a24de0c","subtypes":["70932b40-f444-4341-bb19-0a29d1daecbe","32dbb54a-9693-4847-9278-7c956ea045f8","122e4157-381f-400f-ac30-a1c8a2a9e8c1","17db2afc-ae6c-4e53-a527-48516811fe3e","30abb231-4248-4ffa-9a69-e0eb6bb9dbbd"]}},"497076d2-1625-446b-b663-d75f5c2e2a3c":{"Binary":{"id":"497076d2-1625-446b-b663-d75f5c2e2a3c","number":61,"from":{"obj_id":"0dc0e921-e7ff-4766-9738-e6e312f7f0de","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"f42505df-9843-4914-97bc-c665dfbc2dcc":{"Binary":{"id":"f42505df-9843-4914-97bc-c665dfbc2dcc","number":62,"from":{"obj_id":"79571896-9798-44a3-acef-5aa2d9773b93","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"","cardinality":"One","conditionality":"Conditional"}}},"dfa0880b-de0a-4d0f-9f42-7ed496af35ea":{"Binary":{"id":"dfa0880b-de0a-4d0f-9f42-7ed496af35ea","number":63,"from":{"obj_id":"79571896-9798-44a3-acef-5aa2d9773b93","description":"","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"value"},"to":{"obj_id":"94fc0044-4b88-4f5c-ac60-3a44262ade10","description":"","cardinality":"One","conditionality":"Unconditional"}}},"7fb6cd7d-16c0-43bc-9e29-f645c644afe1":{"Binary":{"id":"7fb6cd7d-16c0-43bc-9e29-f645c644afe1","number":64,"from":{"obj_id":"79571896-9798-44a3-acef-5aa2d9773b93","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"source"},"to":{"obj_id":"97f815f0-dcc4-4bd3-843d-13ff1dc5802c","description":"","cardinality":"One","conditionality":"Conditional"}}},"f72fcd31-7056-4425-b0ce-7734a759e616":{"Binary":{"id":"f72fcd31-7056-4425-b0ce-7734a759e616","number":66,"from":{"obj_id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"struct"},"to":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"","cardinality":"One","conditionality":"Conditional"}}},"b197d992-e4d6-4663-a6da-b46906374684":{"Isa":{"id":"b197d992-e4d6-4663-a6da-b46906374684","number":67,"obj_id":"bf69c9af-f268-4c9b-8e67-4497eb490478","subtypes":["141350e6-b62d-4a6d-9ea2-47333e51e3ea","d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","7eaea922-8807-4c38-a704-0143e0594664"]}},"7022f5ed-020f-453f-bcab-8e632ca03b6e":{"Binary":{"id":"7022f5ed-020f-453f-bcab-8e632ca03b6e","number":65,"from":{"obj_id":"1ae9bff3-fb8a-4b35-bd3f-7120691cc7e7","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"field"},"to":{"obj_id":"bf69c9af-f268-4c9b-8e67-4497eb490478","description":"","cardinality":"One","conditionality":"Conditional"}}},"1ec425ff-8b5a-49bf-87cb-9863defb9320":{"Binary":{"id":"1ec425ff-8b5a-49bf-87cb-9863defb9320","number":68,"from":{"obj_id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"lhs"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"","cardinality":"One","conditionality":"Conditional"}}},"99d07c03-f3ce-42d7-bb64-8bde65c79dd6":{"Binary":{"id":"99d07c03-f3ce-42d7-bb64-8bde65c79dd6","number":69,"from":{"obj_id":"1e7a66b2-f559-4c21-b8e6-969999ed171d","description":"","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"","cardinality":"One","conditionality":"Conditional"}}},"3088e0b8-de0a-45d2-95fb-e8804c9c03fa":{"Binary":{"id":"3088e0b8-de0a-45d2-95fb-e8804c9c03fa","number":71,"from":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"statement"},"to":{"obj_id":"6c7969f3-f150-4975-a989-a7bc8164b168","description":"","cardinality":"One","conditionality":"Conditional"}}},"a640575d-a105-4ad5-b786-6e7fb55a0b94":{"Isa":{"id":"a640575d-a105-4ad5-b786-6e7fb55a0b94","number":72,"obj_id":"222307c0-668c-43f9-9368-34cc048f0ae3","subtypes":["6187076b-e765-4e6b-af28-f577eba40b5e","41b7bda7-f5a2-4c94-af22-fedbe8d6f287"]}},"d32059a8-46ed-4ceb-9b92-5f661b98f4e6":{"Isa":{"id":"d32059a8-46ed-4ceb-9b92-5f661b98f4e6","number":70,"obj_id":"f7fc16ac-6a23-4f5d-a04c-1163617701c1","subtypes":["80f73c4e-caf1-4e1f-a634-00965f6ad032","0ad229c4-1782-4783-b64e-0d15fe482463"]}},"cfe90847-d888-4245-bb66-901855bb0051":{"Binary":{"id":"cfe90847-d888-4245-bb66-901855bb0051","number":73,"from":{"obj_id":"95e17479-07a5-41b1-9930-1b9b520514f6","description":"contains a","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"body"},"to":{"obj_id":"c4723d6d-1584-49bd-80f1-4c700185746e","description":"is defined by","cardinality":"One","conditionality":"Conditional"}}},"45c4a4f5-e54b-45d2-bea6-617723a92b70":{"Binary":{"id":"45c4a4f5-e54b-45d2-bea6-617723a92b70","number":74,"from":{"obj_id":"95e17479-07a5-41b1-9930-1b9b520514f6","description":"has a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"return_type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"","cardinality":"One","conditionality":"Conditional"}}},"14f71b3f-b918-4376-8e75-7333e85ca536":{"Binary":{"id":"14f71b3f-b918-4376-8e75-7333e85ca536","number":75,"from":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"previous","cardinality":"One","conditionality":"Conditional"}}},"8d8db4b1-8c90-472b-bc98-88fa6a2188d1":{"Binary":{"id":"8d8db4b1-8c90-472b-bc98-88fa6a2188d1","number":76,"from":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"helps define a function signature","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"lambda"},"to":{"obj_id":"95e17479-07a5-41b1-9930-1b9b520514f6","description":"use used by","cardinality":"One","conditionality":"Conditional"}}},"44ad55c5-bb62-4864-90e7-e992494786aa":{"Binary":{"id":"44ad55c5-bb62-4864-90e7-e992494786aa","number":77,"from":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"may require a type","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"applies to","cardinality":"One","conditionality":"Conditional"}}},"c12fcdf7-ec63-58c7-8555-36222f25b91b":{"Associative":{"id":"c12fcdf7-ec63-58c7-8555-36222f25b91b","number":78,"from":{"id":"4c7a4c0b-c22d-5b7d-8d58-028ae5116e1b","obj_id":"68e7191a-fe94-423f-8a5d-5551384ae998","cardinality":"One","one_referential_attribute":"z_store","other_referential_attribute":"object"},"one":{"obj_id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","description":"houses","cardinality":"Many","conditionality":"Unconditional"},"other":{"obj_id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","description":"lives in an","cardinality":"One","conditionality":"Unconditional"}}},"c3dba39c-fe1e-49e0-9a45-8f872b6aa4c5":{"Binary":{"id":"c3dba39c-fe1e-49e0-9a45-8f872b6aa4c5","number":79,"from":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"requires a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"is used by","cardinality":"One","conditionality":"Conditional"}}},"f1c15ada-631b-4249-8c73-4e52391a532f":{"Binary":{"id":"f1c15ada-631b-4249-8c73-4e52391a532f","number":4,"from":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"mirrors an","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"object"},"to":{"obj_id":"7178e7a4-5131-504b-a7b3-c2c0cfedf343","description":"is surfaced as a","cardinality":"One","conditionality":"Conditional"}}},"a5ac6af9-3cef-49e5-8d01-462817e1d641":{"Isa":{"id":"a5ac6af9-3cef-49e5-8d01-462817e1d641","number":80,"obj_id":"c4723d6d-1584-49bd-80f1-4c700185746e","subtypes":["7794ada6-49c3-4bf0-991f-828c6583ebb8","30c31621-a4bd-4356-80b9-1226e00651c9"]}},"868b4a28-0d2f-4d78-b947-66f44c3bdaf9":{"Binary":{"id":"868b4a28-0d2f-4d78-b947-66f44c3bdaf9","number":81,"from":{"obj_id":"26dba2c5-a7e9-4556-a9c2-79091a97b941","description":"may have a first","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"argument"},"to":{"obj_id":"846aa191-7b0c-4325-8c21-09fa5edf7c78","description":"may be the first to (lame)","cardinality":"One","conditionality":"Conditional"}}},"ca33902a-c6f2-45a5-9273-cf80a579cedd":{"Binary":{"id":"ca33902a-c6f2-45a5-9273-cf80a579cedd","number":82,"from":{"obj_id":"d8dbc4ff-77d0-470c-a8c9-5c700376fdd5","description":"may have a first parameter","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"first_param"},"to":{"obj_id":"f192b162-8ada-4128-8805-1953e9165c54","description":"may be the first to this","cardinality":"One","conditionality":"Conditional"}}},"d440f204-2694-4438-b618-721a9108070f":{"Binary":{"id":"d440f204-2694-4438-b618-721a9108070f","number":83,"from":{"obj_id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","description":"may refer to an","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"object_store"},"to":{"obj_id":"b7483723-222d-4f08-b7b9-e8b14f0308cf","description":"This should really be to a subtype","cardinality":"One","conditionality":"Conditional"}}},"69b40bff-5f3d-44ef-8c68-57ff9e033e7b":{"Binary":{"id":"69b40bff-5f3d-44ef-8c68-57ff9e033e7b","number":84,"from":{"obj_id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","description":"may have an","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"implementation"},"to":{"obj_id":"88687f76-5d9e-404e-a801-f6f57f9b30ca","description":"may be provided to an","cardinality":"One","conditionality":"Conditional"}}},"18c4566d-a7b7-4b1d-8e0b-470fddbaab9b":{"Binary":{"id":"18c4566d-a7b7-4b1d-8e0b-470fddbaab9b","number":86,"from":{"obj_id":"c8fcd612-6ca8-469a-824c-de218e4fd075","description":"must have a type","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"is used my a","cardinality":"One","conditionality":"Conditional"}}},"33b9b943-0d44-4490-b20a-35c110ae9473":{"Isa":{"id":"33b9b943-0d44-4490-b20a-35c110ae9473","number":85,"obj_id":"7eaea922-8807-4c38-a704-0143e0594664","subtypes":["4b6c7fde-0878-4947-b960-bc73a4558c60","e6fbeeb8-6ade-46a2-bb52-9c99d06918b2","c8fcd612-6ca8-469a-824c-de218e4fd075"]}},"4ce09575-5a2c-40c5-b766-bb12ef0c1600":{"Binary":{"id":"4ce09575-5a2c-40c5-b766-bb12ef0c1600","number":88,"from":{"obj_id":"7eaea922-8807-4c38-a704-0143e0594664","description":"belongs to an","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"enum"},"to":{"obj_id":"d48d948b-5291-4eb3-ba35-7ab1c1ffa098","description":"is composed of","cardinality":"One","conditionality":"Conditional"}}},"193d881e-9afd-4b9e-a431-cdb113a7ee88":{"Binary":{"id":"193d881e-9afd-4b9e-a431-cdb113a7ee88","number":91,"from":{"obj_id":"52143d28-8474-44bc-b63f-e654150888d3","description":"deconstructs ","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"scrutinee"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is deconstructod by","cardinality":"One","conditionality":"Conditional"}}},"badf3d57-aba3-4757-b0e4-9d0e7b55f2ea":{"Associative":{"id":"badf3d57-aba3-4757-b0e4-9d0e7b55f2ea","number":87,"from":{"id":"091c60c4-87c3-559d-88d0-e8fc60f68a9b","obj_id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","cardinality":"One","one_referential_attribute":"match","other_referential_attribute":"match_expr"},"one":{"obj_id":"52143d28-8474-44bc-b63f-e654150888d3","description":"matches","cardinality":"Many","conditionality":"Unconditional"},"other":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"are matched by","cardinality":"Many","conditionality":"Conditional"}}},"08512716-f1d3-4a88-bd38-aea9ae0f9ca7":{"Binary":{"id":"08512716-f1d3-4a88-bd38-aea9ae0f9ca7","number":92,"from":{"obj_id":"6094aad5-613b-42b6-8f48-c3b9e2161aa9","description":"executes","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"expression"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is executed because of a ","cardinality":"One","conditionality":"Conditional"}}},"0ed07f33-0bbb-497d-9823-9247fc520e85":{"Binary":{"id":"0ed07f33-0bbb-497d-9823-9247fc520e85","number":93,"from":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"parent"},"to":{"obj_id":"30c31621-a4bd-4356-80b9-1226e00651c9","description":"child","cardinality":"One","conditionality":"Conditional"}}},"cea29749-dc0f-40c0-adf9-4c21b187751e":{"Isa":{"id":"cea29749-dc0f-40c0-adf9-4c21b187751e","number":94,"obj_id":"3874760d-0104-4670-ba8b-1af413c5ec4a","subtypes":["6822b78e-e5ca-4c40-ba9d-cf7a69d4fdc7","910e3a08-5e99-47a5-bde4-3e35cf9f00da"]}},"599c1454-9525-4386-b50f-4fdee4b08373":{"Isa":{"id":"599c1454-9525-4386-b50f-4fdee4b08373","number":95,"obj_id":"31deb355-b737-43a6-ae88-199bb51f940d","subtypes":["e68f8912-9897-4cbd-b363-cb4203a726a9","d48d948b-5291-4eb3-ba35-7ab1c1ffa098"]}},"9f2917c8-b17b-4ab2-8c6e-0269a0b80681":{"Binary":{"id":"9f2917c8-b17b-4ab2-8c6e-0269a0b80681","number":89,"from":{"obj_id":"39060ea9-5d45-4954-a29f-ba88e01e7217","description":"next","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"39060ea9-5d45-4954-a29f-ba88e01e7217","description":"previous","cardinality":"One","conditionality":"Conditional"}}},"3c241319-416a-4195-ae80-fa4439198c1c":{"Binary":{"id":"3c241319-416a-4195-ae80-fa4439198c1c","number":96,"from":{"obj_id":"d546feef-91df-49ea-ac61-430bdcf9832c","description":"has a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"path"},"to":{"obj_id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","description":"points at","cardinality":"One","conditionality":"Unconditional"}}},"12003437-2898-4b1d-ba27-b1cc69d8dbb2":{"Binary":{"id":"12003437-2898-4b1d-ba27-b1cc69d8dbb2","number":90,"from":{"obj_id":"39060ea9-5d45-4954-a29f-ba88e01e7217","description":"comprises","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"path"},"to":{"obj_id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","description":"is comprised of","cardinality":"One","conditionality":"Unconditional"}}},"940f5aba-58f5-46fa-bbba-43fc6b10a3fe":{"Binary":{"id":"940f5aba-58f5-46fa-bbba-43fc6b10a3fe","number":97,"from":{"obj_id":"ab7a5708-6d12-4dce-b488-fa3a3b480510","description":"first element","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"first"},"to":{"obj_id":"39060ea9-5d45-4954-a29f-ba88e01e7217","description":"i win!","cardinality":"One","conditionality":"Unconditional"}}},"42c18b66-d259-40d1-a77d-0c0e76080a6d":{"Binary":{"id":"42c18b66-d259-40d1-a77d-0c0e76080a6d","number":98,"from":{"obj_id":"4856978f-20be-4b59-8bf6-b941091119a9","description":"awaits","cardinality":"One","conditionality":"Unconditional","formalizing_attribute_name":"future"},"to":{"obj_id":"9352c766-9f6b-413b-9ea0-13f9c8e4d86e","description":"is awaited upon by","cardinality":"One","conditionality":"Conditional"}}},"04ae2e8d-c499-4068-88bd-015b0bba57bf":{"Binary":{"id":"04ae2e8d-c499-4068-88bd-015b0bba57bf","number":2,"from":{"obj_id":"dbada891-ca0d-4fbc-8371-9f9234867bd6","description":"contains","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"value"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"may be wrapped by a","cardinality":"One","conditionality":"Conditional"}}},"7e2c2118-fb6c-4ac4-9676-e7427cd495c2":{"Binary":{"id":"7e2c2118-fb6c-4ac4-9676-e7427cd495c2","number":3,"from":{"obj_id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","description":"next","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","description":"previous","cardinality":"One","conditionality":"Conditional"}}},"b21bc0c0-fab4-42f8-ae6c-eb6ab8f5968a":{"Binary":{"id":"b21bc0c0-fab4-42f8-ae6c-eb6ab8f5968a","number":99,"from":{"obj_id":"968ea4f4-0a3b-44d4-a266-16facf7d325f","description":"has an inner","cardinality":"Many","conditionality":"Conditional","formalizing_attribute_name":"type"},"to":{"obj_id":"2e277e34-ab6f-4028-9c52-935c31520fec","description":"may be represented as a","cardinality":"One","conditionality":"Conditional"}}},"e4734a39-1f45-400f-937a-285e2fad31a4":{"Binary":{"id":"e4734a39-1f45-400f-937a-285e2fad31a4","number":100,"from":{"obj_id":"290f49d3-8ce7-408e-be14-611b66db9687","description":"applies to a","cardinality":"Many","conditionality":"Unconditional","formalizing_attribute_name":"struct"},"to":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"may be parameterized by","cardinality":"One","conditionality":"Conditional"}}},"da1d6545-b9d6-499e-9175-fd2a340b1f2e":{"Binary":{"id":"da1d6545-b9d6-499e-9175-fd2a340b1f2e","number":101,"from":{"obj_id":"290f49d3-8ce7-408e-be14-611b66db9687","description":"","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"next"},"to":{"obj_id":"290f49d3-8ce7-408e-be14-611b66db9687","description":"previous","cardinality":"One","conditionality":"Conditional"}}},"c8a4b21a-62c3-4fbd-8799-2b55d93d951c":{"Binary":{"id":"c8a4b21a-62c3-4fbd-8799-2b55d93d951c","number":102,"from":{"obj_id":"e68f8912-9897-4cbd-b363-cb4203a726a9","description":"may have a ","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"first generic"},"to":{"obj_id":"290f49d3-8ce7-408e-be14-611b66db9687","description":"struct leader","cardinality":"One","conditionality":"Unconditional"}}},"23ef9104-65a5-4b32-943f-a2db064c699f":{"Binary":{"id":"23ef9104-65a5-4b32-943f-a2db064c699f","number":103,"from":{"obj_id":"95e17479-07a5-41b1-9930-1b9b520514f6","description":"may have a","cardinality":"One","conditionality":"Conditional","formalizing_attribute_name":"first_param"},"to":{"obj_id":"8d86dceb-7e6e-4767-8a3f-cbbde458ad93","description":"may refer to a","cardinality":"One","conditionality":"Unconditional"}}}}}} \ No newline at end of file diff --git a/sarzak.toml b/sarzak.toml index e0d46de0..8f992203 100644 --- a/sarzak.toml +++ b/sarzak.toml @@ -44,6 +44,29 @@ persist_timestamps = false uber_store = "Single" target = "domain" +# +# Lu Dog Vec Tracy +# +[modules."v2/lu_dog_vec_tracy"] +model = "models/lu_dog.json" + +[[modules."v2/lu_dog_vec_tracy".compiler]] +always_process = true +compiler = "grace" +derive = ["Clone", "Debug", "Deserialize", "Serialize"] +imported_domains = ["crate/v2/sarzak"] +use_paths = ["serde::{Deserialize, Serialize}"] +tracy = true + +[modules."v2/lu_dog_vec_tracy".compiler.target] +optimization_level = "Vec" +is_meta_model = true +is_sarzak = false +persist = true +persist_timestamps = false +uber_store = "Single" +target = "domain" + # # Lu Dog RwLock Vec # diff --git a/src/lib.rs b/src/lib.rs index 0ab8c3c4..ec1e1bea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,6 +18,8 @@ cfg_if::cfg_if! { pub use v2::lu_dog; } else if #[cfg(feature = "lu-dog-vec")] { pub use v2::lu_dog_vec as lu_dog; + } else if #[cfg(feature = "lu-dog-vec-tracy")] { + pub use v2::lu_dog_vec_tracy as lu_dog; } else if #[cfg(feature = "lu-dog-async-vec")] { pub use v2::lu_dog_async as lu_dog; } else if #[cfg(feature = "lu-dog-rwlock-vec")] { diff --git a/src/v2.rs b/src/v2.rs index 4d1376c0..4b57cd0a 100644 --- a/src/v2.rs +++ b/src/v2.rs @@ -6,6 +6,7 @@ pub mod lu_dog_ndrwlock_vec; pub mod lu_dog_rwlock; pub mod lu_dog_rwlock_vec; pub mod lu_dog_vec; +pub mod lu_dog_vec_tracy; pub mod merlin; pub mod sarzak; pub mod woog; diff --git a/src/v2/lu_dog_ndrwlock_vec/types/lambda.rs b/src/v2/lu_dog_ndrwlock_vec/types/lambda.rs index 13207953..e99c212e 100644 --- a/src/v2/lu_dog_ndrwlock_vec/types/lambda.rs +++ b/src/v2/lu_dog_ndrwlock_vec/types/lambda.rs @@ -30,6 +30,8 @@ pub struct Lambda { pub id: usize, /// R73: [`Lambda`] 'contains a' [`Body`] pub body: Option, + /// R103: [`Lambda`] 'may have a' [`LambdaParameter`] + pub first_param: Option, /// R74: [`Lambda`] 'has a' [`ValueType`] pub return_type: usize, } @@ -40,6 +42,7 @@ impl Lambda { /// Inter a new 'Lambda' in the store, and return it's `id`. pub fn new( body: Option<&Arc>>, + first_param: Option<&Arc>>, return_type: &Arc>, store: &mut LuDogNdrwlockVecStore, ) -> Arc> { @@ -47,6 +50,8 @@ impl Lambda { Arc::new(RwLock::new(Lambda { id, body: body.map(|body| body.read().unwrap().id), + first_param: first_param + .map(|lambda_parameter| lambda_parameter.read().unwrap().id), return_type: return_type.read().unwrap().id, })) }) @@ -62,6 +67,18 @@ impl Lambda { } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-cond-to-first_param"}}} + /// Navigate to [`LambdaParameter`] across R103(1-*c) + pub fn r103_lambda_parameter<'a>( + &'a self, + store: &'a LuDogNdrwlockVecStore, + ) -> Vec>> { + match self.first_param { + Some(ref first_param) => vec![store.exhume_lambda_parameter(&first_param).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-to-return_type"}}} /// Navigate to [`ValueType`] across R74(1-*) pub fn r74_value_type<'a>( @@ -124,7 +141,9 @@ impl Lambda { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-implementation"}}} impl PartialEq for Lambda { fn eq(&self, other: &Self) -> bool { - self.body == other.body && self.return_type == other.return_type + self.body == other.body + && self.first_param == other.first_param + && self.return_type == other.return_type } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} diff --git a/src/v2/lu_dog_ndrwlock_vec/types/lambda_parameter.rs b/src/v2/lu_dog_ndrwlock_vec/types/lambda_parameter.rs index 8faf6a27..f35703a4 100644 --- a/src/v2/lu_dog_ndrwlock_vec/types/lambda_parameter.rs +++ b/src/v2/lu_dog_ndrwlock_vec/types/lambda_parameter.rs @@ -82,6 +82,15 @@ impl LambdaParameter { } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-backward-one-to-lambda"}}} + /// Navigate to [`Lambda`] across R103(1-1) + pub fn r103_lambda<'a>(&'a self, store: &'a LuDogNdrwlockVecStore) -> Vec>> { + vec![store + .iter_lambda() + .find(|lambda| lambda.read().unwrap().first_param == Some(self.id)) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-backward-one-bi-cond-to-lambda_parameter"}}} /// Navigate to [`LambdaParameter`] across R75(1c-1c) pub fn r75c_lambda_parameter<'a>( diff --git a/src/v2/lu_dog_ndrwlock_vec/types/parameter.rs b/src/v2/lu_dog_ndrwlock_vec/types/parameter.rs index 24535ea8..6e189682 100644 --- a/src/v2/lu_dog_ndrwlock_vec/types/parameter.rs +++ b/src/v2/lu_dog_ndrwlock_vec/types/parameter.rs @@ -99,6 +99,8 @@ impl Parameter { Some(ref function) => vec![function.clone()], None => Vec::new(), } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-to-lambda"}}} } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-bi-cond-to-parameter"}}} diff --git a/src/v2/lu_dog_rwlock_vec/types/lambda.rs b/src/v2/lu_dog_rwlock_vec/types/lambda.rs index e031d351..39cb6d78 100644 --- a/src/v2/lu_dog_rwlock_vec/types/lambda.rs +++ b/src/v2/lu_dog_rwlock_vec/types/lambda.rs @@ -32,6 +32,8 @@ pub struct Lambda { pub id: usize, /// R73: [`Lambda`] 'contains a' [`Body`] pub body: Option, + /// R103: [`Lambda`] 'may have a' [`LambdaParameter`] + pub first_param: Option, /// R74: [`Lambda`] 'has a' [`ValueType`] pub return_type: usize, } @@ -42,6 +44,7 @@ impl Lambda { /// Inter a new 'Lambda' in the store, and return it's `id`. pub fn new( body: Option<&Arc>>, + first_param: Option<&Arc>>, return_type: &Arc>, store: &mut LuDogRwlockVecStore, ) -> Arc> { @@ -49,6 +52,8 @@ impl Lambda { Arc::new(RwLock::new(Lambda { id, body: body.map(|body| body.read().unwrap().id), + first_param: first_param + .map(|lambda_parameter| lambda_parameter.read().unwrap().id), return_type: return_type.read().unwrap().id, })) }) @@ -66,6 +71,18 @@ impl Lambda { } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-cond-to-first_param"}}} + /// Navigate to [`LambdaParameter`] across R103(1-*c) + pub fn r103_lambda_parameter<'a>( + &'a self, + store: &'a LuDogRwlockVecStore, + ) -> Vec>> { + match self.first_param { + Some(ref first_param) => vec![store.exhume_lambda_parameter(&first_param).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-to-return_type"}}} /// Navigate to [`ValueType`] across R74(1-*) pub fn r74_value_type<'a>( @@ -128,7 +145,9 @@ impl Lambda { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-implementation"}}} impl PartialEq for Lambda { fn eq(&self, other: &Self) -> bool { - self.body == other.body && self.return_type == other.return_type + self.body == other.body + && self.first_param == other.first_param + && self.return_type == other.return_type } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} diff --git a/src/v2/lu_dog_rwlock_vec/types/lambda_parameter.rs b/src/v2/lu_dog_rwlock_vec/types/lambda_parameter.rs index 42055e54..243f2cc0 100644 --- a/src/v2/lu_dog_rwlock_vec/types/lambda_parameter.rs +++ b/src/v2/lu_dog_rwlock_vec/types/lambda_parameter.rs @@ -82,6 +82,15 @@ impl LambdaParameter { } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-backward-one-to-lambda"}}} + /// Navigate to [`Lambda`] across R103(1-1) + pub fn r103_lambda<'a>(&'a self, store: &'a LuDogRwlockVecStore) -> Vec>> { + vec![store + .iter_lambda() + .find(|lambda| lambda.read().unwrap().first_param == Some(self.id)) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-backward-one-bi-cond-to-lambda_parameter"}}} /// Navigate to [`LambdaParameter`] across R75(1c-1c) pub fn r75c_lambda_parameter<'a>( diff --git a/src/v2/lu_dog_rwlock_vec/types/parameter.rs b/src/v2/lu_dog_rwlock_vec/types/parameter.rs index e33eb9d3..a2ea0bdd 100644 --- a/src/v2/lu_dog_rwlock_vec/types/parameter.rs +++ b/src/v2/lu_dog_rwlock_vec/types/parameter.rs @@ -99,6 +99,8 @@ impl Parameter { Some(ref function) => vec![function.clone()], None => Vec::new(), } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-to-lambda"}}} } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-bi-cond-to-parameter"}}} diff --git a/src/v2/lu_dog_vec/types/lambda.rs b/src/v2/lu_dog_vec/types/lambda.rs index 2ba8141a..2dc10a65 100644 --- a/src/v2/lu_dog_vec/types/lambda.rs +++ b/src/v2/lu_dog_vec/types/lambda.rs @@ -30,6 +30,8 @@ pub struct Lambda { pub id: usize, /// R73: [`Lambda`] 'contains a' [`Body`] pub body: Option, + /// R103: [`Lambda`] 'may have a' [`LambdaParameter`] + pub first_param: Option, /// R74: [`Lambda`] 'has a' [`ValueType`] pub return_type: usize, } @@ -40,6 +42,7 @@ impl Lambda { /// Inter a new 'Lambda' in the store, and return it's `id`. pub fn new( body: Option<&Rc>>, + first_param: Option<&Rc>>, return_type: &Rc>, store: &mut LuDogVecStore, ) -> Rc> { @@ -47,6 +50,7 @@ impl Lambda { Rc::new(RefCell::new(Lambda { id, body: body.map(|body| body.borrow().id), + first_param: first_param.map(|lambda_parameter| lambda_parameter.borrow().id), return_type: return_type.borrow().id, })) }) @@ -65,6 +69,18 @@ impl Lambda { } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-cond-to-first_param"}}} + /// Navigate to [`LambdaParameter`] across R103(1-*c) + pub fn r103_lambda_parameter<'a>( + &'a self, + store: &'a LuDogVecStore, + ) -> Vec>> { + match self.first_param { + Some(ref first_param) => vec![store.exhume_lambda_parameter(&first_param).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-to-return_type"}}} /// Navigate to [`ValueType`] across R74(1-*) pub fn r74_value_type<'a>(&'a self, store: &'a LuDogVecStore) -> Vec>> { @@ -118,7 +134,9 @@ impl Lambda { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-implementation"}}} impl PartialEq for Lambda { fn eq(&self, other: &Self) -> bool { - self.body == other.body && self.return_type == other.return_type + self.body == other.body + && self.first_param == other.first_param + && self.return_type == other.return_type } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} diff --git a/src/v2/lu_dog_vec/types/lambda_parameter.rs b/src/v2/lu_dog_vec/types/lambda_parameter.rs index d721cb86..198941e6 100644 --- a/src/v2/lu_dog_vec/types/lambda_parameter.rs +++ b/src/v2/lu_dog_vec/types/lambda_parameter.rs @@ -80,6 +80,15 @@ impl LambdaParameter { } } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-backward-one-to-lambda"}}} + /// Navigate to [`Lambda`] across R103(1-1) + pub fn r103_lambda<'a>(&'a self, store: &'a LuDogVecStore) -> Vec>> { + vec![store + .iter_lambda() + .find(|lambda| lambda.borrow().first_param == Some(self.id)) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-backward-one-bi-cond-to-lambda_parameter"}}} /// Navigate to [`LambdaParameter`] across R75(1c-1c) pub fn r75c_lambda_parameter<'a>( diff --git a/src/v2/lu_dog_vec/types/parameter.rs b/src/v2/lu_dog_vec/types/parameter.rs index 47a1ec89..43a2e18d 100644 --- a/src/v2/lu_dog_vec/types/parameter.rs +++ b/src/v2/lu_dog_vec/types/parameter.rs @@ -87,6 +87,8 @@ impl Parameter { Some(ref function) => vec![function.clone()], None => Vec::new(), } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-to-lambda"}}} } // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-bi-cond-to-parameter"}}} diff --git a/src/v2/lu_dog_vec_tracy/store.rs b/src/v2/lu_dog_vec_tracy/store.rs new file mode 100644 index 00000000..67ca23cf --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/store.rs @@ -0,0 +1,8157 @@ +//! v2::lu_dog_vec_tracy Object Store +//! +//! The ObjectStore contains instances of objects in the domain. +//! The instances are stored in a hash map, keyed by the object's UUID. +//! This is used during code generation, and probably not useful elsewhere. +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"v2::lu_dog_vec_tracy-object-store-file"}}} +//! +//! # Contents: +//! +//! * [`Argument`] +//! * [`AWait`] +//! * [`Binary`] +//! * [`Block`] +//! * [`Body`] +//! * [`BooleanLiteral`] +//! * [`BooleanOperator`] +//! * [`Call`] +//! * [`Comparison`] +//! * [`DataStructure`] +//! * [`DwarfSourceFile`] +//! * [`EnumField`] +//! * [`Enumeration`] +//! * [`Expression`] +//! * [`ExpressionStatement`] +//! * [`ExternalImplementation`] +//! * [`Field`] +//! * [`FieldAccess`] +//! * [`FieldAccessTarget`] +//! * [`FieldExpression`] +//! * [`FloatLiteral`] +//! * [`ForLoop`] +//! * [`Function`] +//! * [`XFuture`] +//! * [`Generic`] +//! * [`Grouped`] +//! * [`XIf`] +//! * [`ImplementationBlock`] +//! * [`Import`] +//! * [`Index`] +//! * [`IntegerLiteral`] +//! * [`Item`] +//! * [`Lambda`] +//! * [`LambdaParameter`] +//! * [`LetStatement`] +//! * [`List`] +//! * [`ListElement`] +//! * [`ListExpression`] +//! * [`Literal`] +//! * [`LocalVariable`] +//! * [`XMacro`] +//! * [`XMatch`] +//! * [`MethodCall`] +//! * [`NamedFieldExpression`] +//! * [`ZObjectStore`] +//! * [`ObjectWrapper`] +//! * [`Operator`] +//! * [`Parameter`] +//! * [`XPath`] +//! * [`PathElement`] +//! * [`Pattern`] +//! * [`Plugin`] +//! * [`XPrint`] +//! * [`RangeExpression`] +//! * [`ResultStatement`] +//! * [`XReturn`] +//! * [`Span`] +//! * [`Statement`] +//! * [`StaticMethodCall`] +//! * [`StringLiteral`] +//! * [`WoogStruct`] +//! * [`StructExpression`] +//! * [`StructField`] +//! * [`StructGeneric`] +//! * [`TupleField`] +//! * [`TypeCast`] +//! * [`Unary`] +//! * [`Unit`] +//! * [`UnnamedFieldExpression`] +//! * [`XValue`] +//! * [`ValueType`] +//! * [`Variable`] +//! * [`VariableExpression`] +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"v2::lu_dog_vec_tracy-object-store-definition"}}} +use std::cell::RefCell; +use std::rc::Rc; +use std::{ + fs, + io::{self, prelude::*}, + path::Path, +}; + +use heck::ToUpperCamelCase; +use rustc_hash::FxHashMap as HashMap; +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::{ + AWait, Argument, Binary, Block, Body, BooleanLiteral, BooleanOperator, Call, Comparison, + DataStructure, DwarfSourceFile, EnumField, Enumeration, Expression, ExpressionStatement, + ExternalImplementation, Field, FieldAccess, FieldAccessTarget, FieldExpression, FloatLiteral, + ForLoop, Function, Generic, Grouped, ImplementationBlock, Import, Index, IntegerLiteral, Item, + Lambda, LambdaParameter, LetStatement, List, ListElement, ListExpression, Literal, + LocalVariable, MethodCall, NamedFieldExpression, ObjectWrapper, Operator, Parameter, + PathElement, Pattern, Plugin, RangeExpression, ResultStatement, Span, Statement, + StaticMethodCall, StringLiteral, StructExpression, StructField, StructGeneric, TupleField, + TypeCast, Unary, Unit, UnnamedFieldExpression, ValueType, Variable, VariableExpression, + WoogStruct, XFuture, XIf, XMacro, XMatch, XPath, XPrint, XReturn, XValue, ZObjectStore, + ADDITION, AND, ASSIGNMENT, CHAR, DEBUGGER, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, + FALSE_LITERAL, FROM, FULL, FUNCTION_CALL, GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, + ITEM_STATEMENT, LESS_THAN, LESS_THAN_OR_EQUAL, MACRO_CALL, MULTIPLICATION, NEGATION, NOT, + NOT_EQUAL, OR, RANGE, SUBTRACTION, TASK, TO, TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, +}; + +#[derive(Debug, Deserialize, Serialize)] +pub struct ObjectStore { + argument_free_list: Vec, + argument: Vec>>>, + a_wait_free_list: Vec, + a_wait: Vec>>>, + binary_free_list: Vec, + binary: Vec>>>, + block_free_list: Vec, + block: Vec>>>, + body_free_list: Vec, + body: Vec>>>, + boolean_literal_free_list: Vec, + boolean_literal: Vec>>>, + boolean_operator_free_list: Vec, + boolean_operator: Vec>>>, + call_free_list: Vec, + call: Vec>>>, + comparison_free_list: Vec, + comparison: Vec>>>, + data_structure_free_list: Vec, + data_structure: Vec>>>, + dwarf_source_file_free_list: Vec, + dwarf_source_file: Vec>>>, + enum_field_free_list: Vec, + enum_field: Vec>>>, + enumeration_free_list: Vec, + enumeration: Vec>>>, + enumeration_id_by_name: HashMap, + expression_free_list: Vec, + expression: Vec>>>, + expression_statement_free_list: Vec, + expression_statement: Vec>>>, + external_implementation_free_list: Vec, + external_implementation: Vec>>>, + field_free_list: Vec, + field: Vec>>>, + field_id_by_name: HashMap, + field_access_free_list: Vec, + field_access: Vec>>>, + field_access_target_free_list: Vec, + field_access_target: Vec>>>, + field_expression_free_list: Vec, + field_expression: Vec>>>, + float_literal_free_list: Vec, + float_literal: Vec>>>, + for_loop_free_list: Vec, + for_loop: Vec>>>, + function_free_list: Vec, + function: Vec>>>, + function_id_by_name: HashMap, + x_future_free_list: Vec, + x_future: Vec>>>, + generic_free_list: Vec, + generic: Vec>>>, + grouped_free_list: Vec, + grouped: Vec>>>, + x_if_free_list: Vec, + x_if: Vec>>>, + implementation_block_free_list: Vec, + implementation_block: Vec>>>, + import_free_list: Vec, + import: Vec>>>, + index_free_list: Vec, + index: Vec>>>, + integer_literal_free_list: Vec, + integer_literal: Vec>>>, + item_free_list: Vec, + item: Vec>>>, + lambda_free_list: Vec, + lambda: Vec>>>, + lambda_parameter_free_list: Vec, + lambda_parameter: Vec>>>, + let_statement_free_list: Vec, + let_statement: Vec>>>, + list_free_list: Vec, + list: Vec>>>, + list_element_free_list: Vec, + list_element: Vec>>>, + list_expression_free_list: Vec, + list_expression: Vec>>>, + literal_free_list: Vec, + literal: Vec>>>, + local_variable_free_list: Vec, + local_variable: Vec>>>, + x_macro_free_list: Vec, + x_macro: Vec>>>, + x_match_free_list: Vec, + x_match: Vec>>>, + method_call_free_list: Vec, + method_call: Vec>>>, + named_field_expression_free_list: Vec, + named_field_expression: Vec>>>, + z_object_store_free_list: Vec, + z_object_store: Vec>>>, + z_object_store_id_by_name: HashMap, + object_wrapper_free_list: Vec, + object_wrapper: Vec>>>, + operator_free_list: Vec, + operator: Vec>>>, + parameter_free_list: Vec, + parameter: Vec>>>, + x_path_free_list: Vec, + x_path: Vec>>>, + path_element_free_list: Vec, + path_element: Vec>>>, + pattern_free_list: Vec, + pattern: Vec>>>, + plugin_free_list: Vec, + plugin: Vec>>>, + x_print_free_list: Vec, + x_print: Vec>>>, + range_expression_free_list: Vec, + range_expression: Vec>>>, + result_statement_free_list: Vec, + result_statement: Vec>>>, + x_return_free_list: Vec, + x_return: Vec>>>, + span_free_list: Vec, + span: Vec>>>, + statement_free_list: Vec, + statement: Vec>>>, + static_method_call_free_list: Vec, + static_method_call: Vec>>>, + string_literal_free_list: Vec, + string_literal: Vec>>>, + woog_struct_free_list: Vec, + woog_struct: Vec>>>, + woog_struct_id_by_name: HashMap, + struct_expression_free_list: Vec, + struct_expression: Vec>>>, + struct_field_free_list: Vec, + struct_field: Vec>>>, + struct_generic_free_list: Vec, + struct_generic: Vec>>>, + tuple_field_free_list: Vec, + tuple_field: Vec>>>, + type_cast_free_list: Vec, + type_cast: Vec>>>, + unary_free_list: Vec, + unary: Vec>>>, + unit_free_list: Vec, + unit: Vec>>>, + unnamed_field_expression_free_list: Vec, + unnamed_field_expression: Vec>>>, + x_value_free_list: Vec, + x_value: Vec>>>, + value_type_free_list: Vec, + value_type: Vec>>>, + variable_free_list: Vec, + variable: Vec>>>, + variable_expression_free_list: Vec, + variable_expression: Vec>>>, +} + +impl ObjectStore { + pub fn new() -> Self { + let mut store = Self { + argument_free_list: Vec::new(), + argument: Vec::new(), + a_wait_free_list: Vec::new(), + a_wait: Vec::new(), + binary_free_list: Vec::new(), + binary: Vec::new(), + block_free_list: Vec::new(), + block: Vec::new(), + body_free_list: Vec::new(), + body: Vec::new(), + boolean_literal_free_list: Vec::new(), + boolean_literal: Vec::new(), + boolean_operator_free_list: Vec::new(), + boolean_operator: Vec::new(), + call_free_list: Vec::new(), + call: Vec::new(), + comparison_free_list: Vec::new(), + comparison: Vec::new(), + data_structure_free_list: Vec::new(), + data_structure: Vec::new(), + dwarf_source_file_free_list: Vec::new(), + dwarf_source_file: Vec::new(), + enum_field_free_list: Vec::new(), + enum_field: Vec::new(), + enumeration_free_list: Vec::new(), + enumeration: Vec::new(), + enumeration_id_by_name: HashMap::default(), + expression_free_list: Vec::new(), + expression: Vec::new(), + expression_statement_free_list: Vec::new(), + expression_statement: Vec::new(), + external_implementation_free_list: Vec::new(), + external_implementation: Vec::new(), + field_free_list: Vec::new(), + field: Vec::new(), + field_id_by_name: HashMap::default(), + field_access_free_list: Vec::new(), + field_access: Vec::new(), + field_access_target_free_list: Vec::new(), + field_access_target: Vec::new(), + field_expression_free_list: Vec::new(), + field_expression: Vec::new(), + float_literal_free_list: Vec::new(), + float_literal: Vec::new(), + for_loop_free_list: Vec::new(), + for_loop: Vec::new(), + function_free_list: Vec::new(), + function: Vec::new(), + function_id_by_name: HashMap::default(), + x_future_free_list: Vec::new(), + x_future: Vec::new(), + generic_free_list: Vec::new(), + generic: Vec::new(), + grouped_free_list: Vec::new(), + grouped: Vec::new(), + x_if_free_list: Vec::new(), + x_if: Vec::new(), + implementation_block_free_list: Vec::new(), + implementation_block: Vec::new(), + import_free_list: Vec::new(), + import: Vec::new(), + index_free_list: Vec::new(), + index: Vec::new(), + integer_literal_free_list: Vec::new(), + integer_literal: Vec::new(), + item_free_list: Vec::new(), + item: Vec::new(), + lambda_free_list: Vec::new(), + lambda: Vec::new(), + lambda_parameter_free_list: Vec::new(), + lambda_parameter: Vec::new(), + let_statement_free_list: Vec::new(), + let_statement: Vec::new(), + list_free_list: Vec::new(), + list: Vec::new(), + list_element_free_list: Vec::new(), + list_element: Vec::new(), + list_expression_free_list: Vec::new(), + list_expression: Vec::new(), + literal_free_list: Vec::new(), + literal: Vec::new(), + local_variable_free_list: Vec::new(), + local_variable: Vec::new(), + x_macro_free_list: Vec::new(), + x_macro: Vec::new(), + x_match_free_list: Vec::new(), + x_match: Vec::new(), + method_call_free_list: Vec::new(), + method_call: Vec::new(), + named_field_expression_free_list: Vec::new(), + named_field_expression: Vec::new(), + z_object_store_free_list: Vec::new(), + z_object_store: Vec::new(), + z_object_store_id_by_name: HashMap::default(), + object_wrapper_free_list: Vec::new(), + object_wrapper: Vec::new(), + operator_free_list: Vec::new(), + operator: Vec::new(), + parameter_free_list: Vec::new(), + parameter: Vec::new(), + x_path_free_list: Vec::new(), + x_path: Vec::new(), + path_element_free_list: Vec::new(), + path_element: Vec::new(), + pattern_free_list: Vec::new(), + pattern: Vec::new(), + plugin_free_list: Vec::new(), + plugin: Vec::new(), + x_print_free_list: Vec::new(), + x_print: Vec::new(), + range_expression_free_list: Vec::new(), + range_expression: Vec::new(), + result_statement_free_list: Vec::new(), + result_statement: Vec::new(), + x_return_free_list: Vec::new(), + x_return: Vec::new(), + span_free_list: Vec::new(), + span: Vec::new(), + statement_free_list: Vec::new(), + statement: Vec::new(), + static_method_call_free_list: Vec::new(), + static_method_call: Vec::new(), + string_literal_free_list: Vec::new(), + string_literal: Vec::new(), + woog_struct_free_list: Vec::new(), + woog_struct: Vec::new(), + woog_struct_id_by_name: HashMap::default(), + struct_expression_free_list: Vec::new(), + struct_expression: Vec::new(), + struct_field_free_list: Vec::new(), + struct_field: Vec::new(), + struct_generic_free_list: Vec::new(), + struct_generic: Vec::new(), + tuple_field_free_list: Vec::new(), + tuple_field: Vec::new(), + type_cast_free_list: Vec::new(), + type_cast: Vec::new(), + unary_free_list: Vec::new(), + unary: Vec::new(), + unit_free_list: Vec::new(), + unit: Vec::new(), + unnamed_field_expression_free_list: Vec::new(), + unnamed_field_expression: Vec::new(), + x_value_free_list: Vec::new(), + x_value: Vec::new(), + value_type_free_list: Vec::new(), + value_type: Vec::new(), + variable_free_list: Vec::new(), + variable: Vec::new(), + variable_expression_free_list: Vec::new(), + variable_expression: Vec::new(), + }; + + // Initialize Singleton Subtypes + // 💥 Look at how beautiful this generated code is for super/sub-type graphs! + // I remember having a bit of a struggle making it work. It's recursive, with + // a lot of special cases, and I think it calls other recursive functions...💥 + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: super::BinaryEnum::Addition(ADDITION), + id, + })) + }); + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: super::BinaryEnum::Assignment(ASSIGNMENT), + id, + })) + }); + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: super::BinaryEnum::Division(DIVISION), + id, + })) + }); + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: super::BinaryEnum::Multiplication(MULTIPLICATION), + id, + })) + }); + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: super::BinaryEnum::Subtraction(SUBTRACTION), + id, + })) + }); + store.inter_boolean_literal(|id| { + Rc::new(RefCell::new(BooleanLiteral { + subtype: super::BooleanLiteralEnum::FalseLiteral(FALSE_LITERAL), + id, + })) + }); + store.inter_boolean_literal(|id| { + Rc::new(RefCell::new(BooleanLiteral { + subtype: super::BooleanLiteralEnum::TrueLiteral(TRUE_LITERAL), + id, + })) + }); + store.inter_boolean_operator(|id| { + Rc::new(RefCell::new(BooleanOperator { + subtype: super::BooleanOperatorEnum::And(AND), + id, + })) + }); + store.inter_boolean_operator(|id| { + Rc::new(RefCell::new(BooleanOperator { + subtype: super::BooleanOperatorEnum::Or(OR), + id, + })) + }); + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: super::ComparisonEnum::Equal(EQUAL), + id, + })) + }); + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: super::ComparisonEnum::GreaterThan(GREATER_THAN), + id, + })) + }); + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: super::ComparisonEnum::GreaterThanOrEqual(GREATER_THAN_OR_EQUAL), + id, + })) + }); + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: super::ComparisonEnum::LessThan(LESS_THAN), + id, + })) + }); + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: super::ComparisonEnum::LessThanOrEqual(LESS_THAN_OR_EQUAL), + id, + })) + }); + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: super::ComparisonEnum::NotEqual(NOT_EQUAL), + id, + })) + }); + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: super::ExpressionEnum::Debugger(DEBUGGER), + id, + })) + }); + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: super::ExpressionEnum::EmptyExpression(EMPTY_EXPRESSION), + id, + })) + }); + store.inter_unary(|id| { + Rc::new(RefCell::new(Unary { + subtype: super::UnaryEnum::Negation(NEGATION), + id, + })) + }); + store.inter_unary(|id| { + Rc::new(RefCell::new(Unary { + subtype: super::UnaryEnum::Not(NOT), + id, + })) + }); + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: super::ValueTypeEnum::Char(CHAR), + id, + })) + }); + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: super::ValueTypeEnum::Empty(EMPTY), + id, + })) + }); + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: super::ValueTypeEnum::Range(RANGE), + id, + })) + }); + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: super::ValueTypeEnum::Task(TASK), + id, + })) + }); + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: super::ValueTypeEnum::Unknown(UNKNOWN), + id, + })) + }); + + store + } + + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"v2::lu_dog_vec_tracy-object-store-methods"}}} + /// Inter (insert) [`Argument`] into the store. + /// + #[inline] + pub fn inter_argument(&mut self, argument: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.argument_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.argument.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.argument.push(None); + _index + }; + + let argument = argument(_index); + + if let Some(Some(argument)) = self.argument.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *argument.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {argument:?}."); + self.argument_free_list.push(_index); + argument.clone() + } else { + log::debug!(target: "store", "interring {argument:?}."); + self.argument[_index] = Some(argument.clone()); + argument + } + } + + /// Exhume (get) [`Argument`] from the store. + /// + #[inline] + pub fn exhume_argument(&self, id: &usize) -> Option>> { + match self.argument.get(*id) { + Some(argument) => argument.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Argument`] from the store. + /// + #[inline] + pub fn exorcise_argument(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising argument slot: {id}."); + let result = self.argument[*id].take(); + self.argument_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Argument>`. + /// + #[inline] + pub fn iter_argument(&self) -> impl Iterator>> + '_ { + let len = self.argument.len(); + (0..len) + .filter(|i| self.argument[*i].is_some()) + .map(move |i| { + self.argument[i] + .as_ref() + .map(|argument| argument.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`AWait`] into the store. + /// + #[inline] + pub fn inter_a_wait(&mut self, a_wait: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.a_wait_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.a_wait.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.a_wait.push(None); + _index + }; + + let a_wait = a_wait(_index); + + if let Some(Some(a_wait)) = self.a_wait.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *a_wait.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {a_wait:?}."); + self.a_wait_free_list.push(_index); + a_wait.clone() + } else { + log::debug!(target: "store", "interring {a_wait:?}."); + self.a_wait[_index] = Some(a_wait.clone()); + a_wait + } + } + + /// Exhume (get) [`AWait`] from the store. + /// + #[inline] + pub fn exhume_a_wait(&self, id: &usize) -> Option>> { + match self.a_wait.get(*id) { + Some(a_wait) => a_wait.clone(), + None => None, + } + } + + /// Exorcise (remove) [`AWait`] from the store. + /// + #[inline] + pub fn exorcise_a_wait(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising a_wait slot: {id}."); + let result = self.a_wait[*id].take(); + self.a_wait_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, AWait>`. + /// + #[inline] + pub fn iter_a_wait(&self) -> impl Iterator>> + '_ { + let len = self.a_wait.len(); + (0..len) + .filter(|i| self.a_wait[*i].is_some()) + .map(move |i| { + self.a_wait[i] + .as_ref() + .map(|a_wait| a_wait.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Binary`] into the store. + /// + #[inline] + pub fn inter_binary(&mut self, binary: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.binary_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.binary.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.binary.push(None); + _index + }; + + let binary = binary(_index); + + if let Some(Some(binary)) = self.binary.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *binary.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {binary:?}."); + self.binary_free_list.push(_index); + binary.clone() + } else { + log::debug!(target: "store", "interring {binary:?}."); + self.binary[_index] = Some(binary.clone()); + binary + } + } + + /// Exhume (get) [`Binary`] from the store. + /// + #[inline] + pub fn exhume_binary(&self, id: &usize) -> Option>> { + match self.binary.get(*id) { + Some(binary) => binary.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Binary`] from the store. + /// + #[inline] + pub fn exorcise_binary(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising binary slot: {id}."); + let result = self.binary[*id].take(); + self.binary_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Binary>`. + /// + #[inline] + pub fn iter_binary(&self) -> impl Iterator>> + '_ { + let len = self.binary.len(); + (0..len) + .filter(|i| self.binary[*i].is_some()) + .map(move |i| { + self.binary[i] + .as_ref() + .map(|binary| binary.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Block`] into the store. + /// + #[inline] + pub fn inter_block(&mut self, block: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.block_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.block.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.block.push(None); + _index + }; + + let block = block(_index); + + if let Some(Some(block)) = self.block.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *block.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {block:?}."); + self.block_free_list.push(_index); + block.clone() + } else { + log::debug!(target: "store", "interring {block:?}."); + self.block[_index] = Some(block.clone()); + block + } + } + + /// Exhume (get) [`Block`] from the store. + /// + #[inline] + pub fn exhume_block(&self, id: &usize) -> Option>> { + match self.block.get(*id) { + Some(block) => block.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Block`] from the store. + /// + #[inline] + pub fn exorcise_block(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising block slot: {id}."); + let result = self.block[*id].take(); + self.block_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Block>`. + /// + #[inline] + pub fn iter_block(&self) -> impl Iterator>> + '_ { + let len = self.block.len(); + (0..len) + .filter(|i| self.block[*i].is_some()) + .map(move |i| self.block[i].as_ref().map(|block| block.clone()).unwrap()) + } + + /// Inter (insert) [`Body`] into the store. + /// + #[inline] + pub fn inter_body(&mut self, body: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.body_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.body.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.body.push(None); + _index + }; + + let body = body(_index); + + if let Some(Some(body)) = self.body.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *body.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {body:?}."); + self.body_free_list.push(_index); + body.clone() + } else { + log::debug!(target: "store", "interring {body:?}."); + self.body[_index] = Some(body.clone()); + body + } + } + + /// Exhume (get) [`Body`] from the store. + /// + #[inline] + pub fn exhume_body(&self, id: &usize) -> Option>> { + match self.body.get(*id) { + Some(body) => body.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Body`] from the store. + /// + #[inline] + pub fn exorcise_body(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising body slot: {id}."); + let result = self.body[*id].take(); + self.body_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Body>`. + /// + #[inline] + pub fn iter_body(&self) -> impl Iterator>> + '_ { + let len = self.body.len(); + (0..len) + .filter(|i| self.body[*i].is_some()) + .map(move |i| self.body[i].as_ref().map(|body| body.clone()).unwrap()) + } + + /// Inter (insert) [`BooleanLiteral`] into the store. + /// + #[inline] + pub fn inter_boolean_literal(&mut self, boolean_literal: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.boolean_literal_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.boolean_literal.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.boolean_literal.push(None); + _index + }; + + let boolean_literal = boolean_literal(_index); + + if let Some(Some(boolean_literal)) = self.boolean_literal.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *boolean_literal.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {boolean_literal:?}."); + self.boolean_literal_free_list.push(_index); + boolean_literal.clone() + } else { + log::debug!(target: "store", "interring {boolean_literal:?}."); + self.boolean_literal[_index] = Some(boolean_literal.clone()); + boolean_literal + } + } + + /// Exhume (get) [`BooleanLiteral`] from the store. + /// + #[inline] + pub fn exhume_boolean_literal(&self, id: &usize) -> Option>> { + match self.boolean_literal.get(*id) { + Some(boolean_literal) => boolean_literal.clone(), + None => None, + } + } + + /// Exorcise (remove) [`BooleanLiteral`] from the store. + /// + #[inline] + pub fn exorcise_boolean_literal(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising boolean_literal slot: {id}."); + let result = self.boolean_literal[*id].take(); + self.boolean_literal_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, BooleanLiteral>`. + /// + #[inline] + pub fn iter_boolean_literal(&self) -> impl Iterator>> + '_ { + let len = self.boolean_literal.len(); + (0..len) + .filter(|i| self.boolean_literal[*i].is_some()) + .map(move |i| { + self.boolean_literal[i] + .as_ref() + .map(|boolean_literal| boolean_literal.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`BooleanOperator`] into the store. + /// + #[inline] + pub fn inter_boolean_operator(&mut self, boolean_operator: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.boolean_operator_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.boolean_operator.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.boolean_operator.push(None); + _index + }; + + let boolean_operator = boolean_operator(_index); + + if let Some(Some(boolean_operator)) = self.boolean_operator.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *boolean_operator.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {boolean_operator:?}."); + self.boolean_operator_free_list.push(_index); + boolean_operator.clone() + } else { + log::debug!(target: "store", "interring {boolean_operator:?}."); + self.boolean_operator[_index] = Some(boolean_operator.clone()); + boolean_operator + } + } + + /// Exhume (get) [`BooleanOperator`] from the store. + /// + #[inline] + pub fn exhume_boolean_operator(&self, id: &usize) -> Option>> { + match self.boolean_operator.get(*id) { + Some(boolean_operator) => boolean_operator.clone(), + None => None, + } + } + + /// Exorcise (remove) [`BooleanOperator`] from the store. + /// + #[inline] + pub fn exorcise_boolean_operator( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising boolean_operator slot: {id}."); + let result = self.boolean_operator[*id].take(); + self.boolean_operator_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, BooleanOperator>`. + /// + #[inline] + pub fn iter_boolean_operator(&self) -> impl Iterator>> + '_ { + let len = self.boolean_operator.len(); + (0..len) + .filter(|i| self.boolean_operator[*i].is_some()) + .map(move |i| { + self.boolean_operator[i] + .as_ref() + .map(|boolean_operator| boolean_operator.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Call`] into the store. + /// + #[inline] + pub fn inter_call(&mut self, call: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.call_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.call.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.call.push(None); + _index + }; + + let call = call(_index); + + if let Some(Some(call)) = self.call.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *call.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {call:?}."); + self.call_free_list.push(_index); + call.clone() + } else { + log::debug!(target: "store", "interring {call:?}."); + self.call[_index] = Some(call.clone()); + call + } + } + + /// Exhume (get) [`Call`] from the store. + /// + #[inline] + pub fn exhume_call(&self, id: &usize) -> Option>> { + match self.call.get(*id) { + Some(call) => call.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Call`] from the store. + /// + #[inline] + pub fn exorcise_call(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising call slot: {id}."); + let result = self.call[*id].take(); + self.call_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Call>`. + /// + #[inline] + pub fn iter_call(&self) -> impl Iterator>> + '_ { + let len = self.call.len(); + (0..len) + .filter(|i| self.call[*i].is_some()) + .map(move |i| self.call[i].as_ref().map(|call| call.clone()).unwrap()) + } + + /// Inter (insert) [`Comparison`] into the store. + /// + #[inline] + pub fn inter_comparison(&mut self, comparison: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.comparison_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.comparison.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.comparison.push(None); + _index + }; + + let comparison = comparison(_index); + + if let Some(Some(comparison)) = self.comparison.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *comparison.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {comparison:?}."); + self.comparison_free_list.push(_index); + comparison.clone() + } else { + log::debug!(target: "store", "interring {comparison:?}."); + self.comparison[_index] = Some(comparison.clone()); + comparison + } + } + + /// Exhume (get) [`Comparison`] from the store. + /// + #[inline] + pub fn exhume_comparison(&self, id: &usize) -> Option>> { + match self.comparison.get(*id) { + Some(comparison) => comparison.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Comparison`] from the store. + /// + #[inline] + pub fn exorcise_comparison(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising comparison slot: {id}."); + let result = self.comparison[*id].take(); + self.comparison_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Comparison>`. + /// + #[inline] + pub fn iter_comparison(&self) -> impl Iterator>> + '_ { + let len = self.comparison.len(); + (0..len) + .filter(|i| self.comparison[*i].is_some()) + .map(move |i| { + self.comparison[i] + .as_ref() + .map(|comparison| comparison.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`DataStructure`] into the store. + /// + #[inline] + pub fn inter_data_structure(&mut self, data_structure: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.data_structure_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.data_structure.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.data_structure.push(None); + _index + }; + + let data_structure = data_structure(_index); + + if let Some(Some(data_structure)) = self.data_structure.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *data_structure.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {data_structure:?}."); + self.data_structure_free_list.push(_index); + data_structure.clone() + } else { + log::debug!(target: "store", "interring {data_structure:?}."); + self.data_structure[_index] = Some(data_structure.clone()); + data_structure + } + } + + /// Exhume (get) [`DataStructure`] from the store. + /// + #[inline] + pub fn exhume_data_structure(&self, id: &usize) -> Option>> { + match self.data_structure.get(*id) { + Some(data_structure) => data_structure.clone(), + None => None, + } + } + + /// Exorcise (remove) [`DataStructure`] from the store. + /// + #[inline] + pub fn exorcise_data_structure(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising data_structure slot: {id}."); + let result = self.data_structure[*id].take(); + self.data_structure_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, DataStructure>`. + /// + #[inline] + pub fn iter_data_structure(&self) -> impl Iterator>> + '_ { + let len = self.data_structure.len(); + (0..len) + .filter(|i| self.data_structure[*i].is_some()) + .map(move |i| { + self.data_structure[i] + .as_ref() + .map(|data_structure| data_structure.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`DwarfSourceFile`] into the store. + /// + #[inline] + pub fn inter_dwarf_source_file( + &mut self, + dwarf_source_file: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.dwarf_source_file_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.dwarf_source_file.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.dwarf_source_file.push(None); + _index + }; + + let dwarf_source_file = dwarf_source_file(_index); + + if let Some(Some(dwarf_source_file)) = self.dwarf_source_file.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *dwarf_source_file.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {dwarf_source_file:?}."); + self.dwarf_source_file_free_list.push(_index); + dwarf_source_file.clone() + } else { + log::debug!(target: "store", "interring {dwarf_source_file:?}."); + self.dwarf_source_file[_index] = Some(dwarf_source_file.clone()); + dwarf_source_file + } + } + + /// Exhume (get) [`DwarfSourceFile`] from the store. + /// + #[inline] + pub fn exhume_dwarf_source_file(&self, id: &usize) -> Option>> { + match self.dwarf_source_file.get(*id) { + Some(dwarf_source_file) => dwarf_source_file.clone(), + None => None, + } + } + + /// Exorcise (remove) [`DwarfSourceFile`] from the store. + /// + #[inline] + pub fn exorcise_dwarf_source_file( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising dwarf_source_file slot: {id}."); + let result = self.dwarf_source_file[*id].take(); + self.dwarf_source_file_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, DwarfSourceFile>`. + /// + #[inline] + pub fn iter_dwarf_source_file( + &self, + ) -> impl Iterator>> + '_ { + let len = self.dwarf_source_file.len(); + (0..len) + .filter(|i| self.dwarf_source_file[*i].is_some()) + .map(move |i| { + self.dwarf_source_file[i] + .as_ref() + .map(|dwarf_source_file| dwarf_source_file.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`EnumField`] into the store. + /// + #[inline] + pub fn inter_enum_field(&mut self, enum_field: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.enum_field_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.enum_field.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.enum_field.push(None); + _index + }; + + let enum_field = enum_field(_index); + + if let Some(Some(enum_field)) = self.enum_field.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *enum_field.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {enum_field:?}."); + self.enum_field_free_list.push(_index); + enum_field.clone() + } else { + log::debug!(target: "store", "interring {enum_field:?}."); + self.enum_field[_index] = Some(enum_field.clone()); + enum_field + } + } + + /// Exhume (get) [`EnumField`] from the store. + /// + #[inline] + pub fn exhume_enum_field(&self, id: &usize) -> Option>> { + match self.enum_field.get(*id) { + Some(enum_field) => enum_field.clone(), + None => None, + } + } + + /// Exorcise (remove) [`EnumField`] from the store. + /// + #[inline] + pub fn exorcise_enum_field(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising enum_field slot: {id}."); + let result = self.enum_field[*id].take(); + self.enum_field_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, EnumField>`. + /// + #[inline] + pub fn iter_enum_field(&self) -> impl Iterator>> + '_ { + let len = self.enum_field.len(); + (0..len) + .filter(|i| self.enum_field[*i].is_some()) + .map(move |i| { + self.enum_field[i] + .as_ref() + .map(|enum_field| enum_field.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Enumeration`] into the store. + /// + #[inline] + pub fn inter_enumeration(&mut self, enumeration: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.enumeration_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.enumeration.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.enumeration.push(None); + _index + }; + + let enumeration = enumeration(_index); + + let enumeration = if let Some(Some(enumeration)) = self.enumeration.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *enumeration.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {enumeration:?}."); + self.enumeration_free_list.push(_index); + enumeration.clone() + } else { + log::debug!(target: "store", "interring {enumeration:?}."); + self.enumeration[_index] = Some(enumeration.clone()); + enumeration + }; + self.enumeration_id_by_name.insert( + enumeration.borrow().name.to_owned(), + enumeration.borrow().id, + ); + enumeration + } + + /// Exhume (get) [`Enumeration`] from the store. + /// + #[inline] + pub fn exhume_enumeration(&self, id: &usize) -> Option>> { + match self.enumeration.get(*id) { + Some(enumeration) => enumeration.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Enumeration`] from the store. + /// + #[inline] + pub fn exorcise_enumeration(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising enumeration slot: {id}."); + let result = self.enumeration[*id].take(); + self.enumeration_free_list.push(*id); + result + } + + /// Exorcise [`Enumeration`] id from the store by name. + /// + #[inline] + pub fn exhume_enumeration_id_by_name(&self, name: &str) -> Option { + self.enumeration_id_by_name + .get(name) + .map(|enumeration| *enumeration) + } + + /// Get an iterator over the internal `HashMap<&Uuid, Enumeration>`. + /// + #[inline] + pub fn iter_enumeration(&self) -> impl Iterator>> + '_ { + let len = self.enumeration.len(); + (0..len) + .filter(|i| self.enumeration[*i].is_some()) + .map(move |i| { + self.enumeration[i] + .as_ref() + .map(|enumeration| enumeration.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Expression`] into the store. + /// + #[inline] + pub fn inter_expression(&mut self, expression: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.expression_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.expression.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.expression.push(None); + _index + }; + + let expression = expression(_index); + + if let Some(Some(expression)) = self.expression.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *expression.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {expression:?}."); + self.expression_free_list.push(_index); + expression.clone() + } else { + log::debug!(target: "store", "interring {expression:?}."); + self.expression[_index] = Some(expression.clone()); + expression + } + } + + /// Exhume (get) [`Expression`] from the store. + /// + #[inline] + pub fn exhume_expression(&self, id: &usize) -> Option>> { + match self.expression.get(*id) { + Some(expression) => expression.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Expression`] from the store. + /// + #[inline] + pub fn exorcise_expression(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising expression slot: {id}."); + let result = self.expression[*id].take(); + self.expression_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Expression>`. + /// + #[inline] + pub fn iter_expression(&self) -> impl Iterator>> + '_ { + let len = self.expression.len(); + (0..len) + .filter(|i| self.expression[*i].is_some()) + .map(move |i| { + self.expression[i] + .as_ref() + .map(|expression| expression.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`ExpressionStatement`] into the store. + /// + #[inline] + pub fn inter_expression_statement( + &mut self, + expression_statement: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.expression_statement_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.expression_statement.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.expression_statement.push(None); + _index + }; + + let expression_statement = expression_statement(_index); + + if let Some(Some(expression_statement)) = self.expression_statement.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *expression_statement.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {expression_statement:?}."); + self.expression_statement_free_list.push(_index); + expression_statement.clone() + } else { + log::debug!(target: "store", "interring {expression_statement:?}."); + self.expression_statement[_index] = Some(expression_statement.clone()); + expression_statement + } + } + + /// Exhume (get) [`ExpressionStatement`] from the store. + /// + #[inline] + pub fn exhume_expression_statement( + &self, + id: &usize, + ) -> Option>> { + match self.expression_statement.get(*id) { + Some(expression_statement) => expression_statement.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ExpressionStatement`] from the store. + /// + #[inline] + pub fn exorcise_expression_statement( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising expression_statement slot: {id}."); + let result = self.expression_statement[*id].take(); + self.expression_statement_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ExpressionStatement>`. + /// + #[inline] + pub fn iter_expression_statement( + &self, + ) -> impl Iterator>> + '_ { + let len = self.expression_statement.len(); + (0..len) + .filter(|i| self.expression_statement[*i].is_some()) + .map(move |i| { + self.expression_statement[i] + .as_ref() + .map(|expression_statement| expression_statement.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`ExternalImplementation`] into the store. + /// + #[inline] + pub fn inter_external_implementation( + &mut self, + external_implementation: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.external_implementation_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.external_implementation.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.external_implementation.push(None); + _index + }; + + let external_implementation = external_implementation(_index); + + if let Some(Some(external_implementation)) = + self.external_implementation.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *external_implementation.borrow() + } else { + false + } + }) + { + log::debug!(target: "store", "found duplicate {external_implementation:?}."); + self.external_implementation_free_list.push(_index); + external_implementation.clone() + } else { + log::debug!(target: "store", "interring {external_implementation:?}."); + self.external_implementation[_index] = Some(external_implementation.clone()); + external_implementation + } + } + + /// Exhume (get) [`ExternalImplementation`] from the store. + /// + #[inline] + pub fn exhume_external_implementation( + &self, + id: &usize, + ) -> Option>> { + match self.external_implementation.get(*id) { + Some(external_implementation) => external_implementation.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ExternalImplementation`] from the store. + /// + #[inline] + pub fn exorcise_external_implementation( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising external_implementation slot: {id}."); + let result = self.external_implementation[*id].take(); + self.external_implementation_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ExternalImplementation>`. + /// + #[inline] + pub fn iter_external_implementation( + &self, + ) -> impl Iterator>> + '_ { + let len = self.external_implementation.len(); + (0..len) + .filter(|i| self.external_implementation[*i].is_some()) + .map(move |i| { + self.external_implementation[i] + .as_ref() + .map(|external_implementation| external_implementation.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Field`] into the store. + /// + #[inline] + pub fn inter_field(&mut self, field: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.field_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.field.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.field.push(None); + _index + }; + + let field = field(_index); + + let field = if let Some(Some(field)) = self.field.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *field.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {field:?}."); + self.field_free_list.push(_index); + field.clone() + } else { + log::debug!(target: "store", "interring {field:?}."); + self.field[_index] = Some(field.clone()); + field + }; + self.field_id_by_name + .insert(field.borrow().name.to_owned(), field.borrow().id); + field + } + + /// Exhume (get) [`Field`] from the store. + /// + #[inline] + pub fn exhume_field(&self, id: &usize) -> Option>> { + match self.field.get(*id) { + Some(field) => field.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Field`] from the store. + /// + #[inline] + pub fn exorcise_field(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising field slot: {id}."); + let result = self.field[*id].take(); + self.field_free_list.push(*id); + result + } + + /// Exorcise [`Field`] id from the store by name. + /// + #[inline] + pub fn exhume_field_id_by_name(&self, name: &str) -> Option { + self.field_id_by_name.get(name).map(|field| *field) + } + + /// Get an iterator over the internal `HashMap<&Uuid, Field>`. + /// + #[inline] + pub fn iter_field(&self) -> impl Iterator>> + '_ { + let len = self.field.len(); + (0..len) + .filter(|i| self.field[*i].is_some()) + .map(move |i| self.field[i].as_ref().map(|field| field.clone()).unwrap()) + } + + /// Inter (insert) [`FieldAccess`] into the store. + /// + #[inline] + pub fn inter_field_access(&mut self, field_access: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.field_access_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.field_access.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.field_access.push(None); + _index + }; + + let field_access = field_access(_index); + + if let Some(Some(field_access)) = self.field_access.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *field_access.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {field_access:?}."); + self.field_access_free_list.push(_index); + field_access.clone() + } else { + log::debug!(target: "store", "interring {field_access:?}."); + self.field_access[_index] = Some(field_access.clone()); + field_access + } + } + + /// Exhume (get) [`FieldAccess`] from the store. + /// + #[inline] + pub fn exhume_field_access(&self, id: &usize) -> Option>> { + match self.field_access.get(*id) { + Some(field_access) => field_access.clone(), + None => None, + } + } + + /// Exorcise (remove) [`FieldAccess`] from the store. + /// + #[inline] + pub fn exorcise_field_access(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising field_access slot: {id}."); + let result = self.field_access[*id].take(); + self.field_access_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, FieldAccess>`. + /// + #[inline] + pub fn iter_field_access(&self) -> impl Iterator>> + '_ { + let len = self.field_access.len(); + (0..len) + .filter(|i| self.field_access[*i].is_some()) + .map(move |i| { + self.field_access[i] + .as_ref() + .map(|field_access| field_access.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`FieldAccessTarget`] into the store. + /// + #[inline] + pub fn inter_field_access_target( + &mut self, + field_access_target: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.field_access_target_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.field_access_target.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.field_access_target.push(None); + _index + }; + + let field_access_target = field_access_target(_index); + + if let Some(Some(field_access_target)) = self.field_access_target.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *field_access_target.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {field_access_target:?}."); + self.field_access_target_free_list.push(_index); + field_access_target.clone() + } else { + log::debug!(target: "store", "interring {field_access_target:?}."); + self.field_access_target[_index] = Some(field_access_target.clone()); + field_access_target + } + } + + /// Exhume (get) [`FieldAccessTarget`] from the store. + /// + #[inline] + pub fn exhume_field_access_target(&self, id: &usize) -> Option>> { + match self.field_access_target.get(*id) { + Some(field_access_target) => field_access_target.clone(), + None => None, + } + } + + /// Exorcise (remove) [`FieldAccessTarget`] from the store. + /// + #[inline] + pub fn exorcise_field_access_target( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising field_access_target slot: {id}."); + let result = self.field_access_target[*id].take(); + self.field_access_target_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, FieldAccessTarget>`. + /// + #[inline] + pub fn iter_field_access_target( + &self, + ) -> impl Iterator>> + '_ { + let len = self.field_access_target.len(); + (0..len) + .filter(|i| self.field_access_target[*i].is_some()) + .map(move |i| { + self.field_access_target[i] + .as_ref() + .map(|field_access_target| field_access_target.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`FieldExpression`] into the store. + /// + #[inline] + pub fn inter_field_expression(&mut self, field_expression: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.field_expression_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.field_expression.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.field_expression.push(None); + _index + }; + + let field_expression = field_expression(_index); + + if let Some(Some(field_expression)) = self.field_expression.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *field_expression.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {field_expression:?}."); + self.field_expression_free_list.push(_index); + field_expression.clone() + } else { + log::debug!(target: "store", "interring {field_expression:?}."); + self.field_expression[_index] = Some(field_expression.clone()); + field_expression + } + } + + /// Exhume (get) [`FieldExpression`] from the store. + /// + #[inline] + pub fn exhume_field_expression(&self, id: &usize) -> Option>> { + match self.field_expression.get(*id) { + Some(field_expression) => field_expression.clone(), + None => None, + } + } + + /// Exorcise (remove) [`FieldExpression`] from the store. + /// + #[inline] + pub fn exorcise_field_expression( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising field_expression slot: {id}."); + let result = self.field_expression[*id].take(); + self.field_expression_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, FieldExpression>`. + /// + #[inline] + pub fn iter_field_expression(&self) -> impl Iterator>> + '_ { + let len = self.field_expression.len(); + (0..len) + .filter(|i| self.field_expression[*i].is_some()) + .map(move |i| { + self.field_expression[i] + .as_ref() + .map(|field_expression| field_expression.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`FloatLiteral`] into the store. + /// + #[inline] + pub fn inter_float_literal(&mut self, float_literal: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.float_literal_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.float_literal.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.float_literal.push(None); + _index + }; + + let float_literal = float_literal(_index); + + if let Some(Some(float_literal)) = self.float_literal.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *float_literal.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {float_literal:?}."); + self.float_literal_free_list.push(_index); + float_literal.clone() + } else { + log::debug!(target: "store", "interring {float_literal:?}."); + self.float_literal[_index] = Some(float_literal.clone()); + float_literal + } + } + + /// Exhume (get) [`FloatLiteral`] from the store. + /// + #[inline] + pub fn exhume_float_literal(&self, id: &usize) -> Option>> { + match self.float_literal.get(*id) { + Some(float_literal) => float_literal.clone(), + None => None, + } + } + + /// Exorcise (remove) [`FloatLiteral`] from the store. + /// + #[inline] + pub fn exorcise_float_literal(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising float_literal slot: {id}."); + let result = self.float_literal[*id].take(); + self.float_literal_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, FloatLiteral>`. + /// + #[inline] + pub fn iter_float_literal(&self) -> impl Iterator>> + '_ { + let len = self.float_literal.len(); + (0..len) + .filter(|i| self.float_literal[*i].is_some()) + .map(move |i| { + self.float_literal[i] + .as_ref() + .map(|float_literal| float_literal.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`ForLoop`] into the store. + /// + #[inline] + pub fn inter_for_loop(&mut self, for_loop: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.for_loop_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.for_loop.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.for_loop.push(None); + _index + }; + + let for_loop = for_loop(_index); + + if let Some(Some(for_loop)) = self.for_loop.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *for_loop.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {for_loop:?}."); + self.for_loop_free_list.push(_index); + for_loop.clone() + } else { + log::debug!(target: "store", "interring {for_loop:?}."); + self.for_loop[_index] = Some(for_loop.clone()); + for_loop + } + } + + /// Exhume (get) [`ForLoop`] from the store. + /// + #[inline] + pub fn exhume_for_loop(&self, id: &usize) -> Option>> { + match self.for_loop.get(*id) { + Some(for_loop) => for_loop.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ForLoop`] from the store. + /// + #[inline] + pub fn exorcise_for_loop(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising for_loop slot: {id}."); + let result = self.for_loop[*id].take(); + self.for_loop_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ForLoop>`. + /// + #[inline] + pub fn iter_for_loop(&self) -> impl Iterator>> + '_ { + let len = self.for_loop.len(); + (0..len) + .filter(|i| self.for_loop[*i].is_some()) + .map(move |i| { + self.for_loop[i] + .as_ref() + .map(|for_loop| for_loop.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Function`] into the store. + /// + #[inline] + pub fn inter_function(&mut self, function: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.function_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.function.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.function.push(None); + _index + }; + + let function = function(_index); + + let function = if let Some(Some(function)) = self.function.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *function.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {function:?}."); + self.function_free_list.push(_index); + function.clone() + } else { + log::debug!(target: "store", "interring {function:?}."); + self.function[_index] = Some(function.clone()); + function + }; + self.function_id_by_name + .insert(function.borrow().name.to_owned(), function.borrow().id); + function + } + + /// Exhume (get) [`Function`] from the store. + /// + #[inline] + pub fn exhume_function(&self, id: &usize) -> Option>> { + match self.function.get(*id) { + Some(function) => function.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Function`] from the store. + /// + #[inline] + pub fn exorcise_function(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising function slot: {id}."); + let result = self.function[*id].take(); + self.function_free_list.push(*id); + result + } + + /// Exorcise [`Function`] id from the store by name. + /// + #[inline] + pub fn exhume_function_id_by_name(&self, name: &str) -> Option { + self.function_id_by_name.get(name).map(|function| *function) + } + + /// Get an iterator over the internal `HashMap<&Uuid, Function>`. + /// + #[inline] + pub fn iter_function(&self) -> impl Iterator>> + '_ { + let len = self.function.len(); + (0..len) + .filter(|i| self.function[*i].is_some()) + .map(move |i| { + self.function[i] + .as_ref() + .map(|function| function.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`XFuture`] into the store. + /// + #[inline] + pub fn inter_x_future(&mut self, x_future: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.x_future_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.x_future.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.x_future.push(None); + _index + }; + + let x_future = x_future(_index); + + if let Some(Some(x_future)) = self.x_future.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *x_future.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {x_future:?}."); + self.x_future_free_list.push(_index); + x_future.clone() + } else { + log::debug!(target: "store", "interring {x_future:?}."); + self.x_future[_index] = Some(x_future.clone()); + x_future + } + } + + /// Exhume (get) [`XFuture`] from the store. + /// + #[inline] + pub fn exhume_x_future(&self, id: &usize) -> Option>> { + match self.x_future.get(*id) { + Some(x_future) => x_future.clone(), + None => None, + } + } + + /// Exorcise (remove) [`XFuture`] from the store. + /// + #[inline] + pub fn exorcise_x_future(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising x_future slot: {id}."); + let result = self.x_future[*id].take(); + self.x_future_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, XFuture>`. + /// + #[inline] + pub fn iter_x_future(&self) -> impl Iterator>> + '_ { + let len = self.x_future.len(); + (0..len) + .filter(|i| self.x_future[*i].is_some()) + .map(move |i| { + self.x_future[i] + .as_ref() + .map(|x_future| x_future.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Generic`] into the store. + /// + #[inline] + pub fn inter_generic(&mut self, generic: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.generic_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.generic.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.generic.push(None); + _index + }; + + let generic = generic(_index); + + if let Some(Some(generic)) = self.generic.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *generic.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {generic:?}."); + self.generic_free_list.push(_index); + generic.clone() + } else { + log::debug!(target: "store", "interring {generic:?}."); + self.generic[_index] = Some(generic.clone()); + generic + } + } + + /// Exhume (get) [`Generic`] from the store. + /// + #[inline] + pub fn exhume_generic(&self, id: &usize) -> Option>> { + match self.generic.get(*id) { + Some(generic) => generic.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Generic`] from the store. + /// + #[inline] + pub fn exorcise_generic(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising generic slot: {id}."); + let result = self.generic[*id].take(); + self.generic_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Generic>`. + /// + #[inline] + pub fn iter_generic(&self) -> impl Iterator>> + '_ { + let len = self.generic.len(); + (0..len) + .filter(|i| self.generic[*i].is_some()) + .map(move |i| { + self.generic[i] + .as_ref() + .map(|generic| generic.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Grouped`] into the store. + /// + #[inline] + pub fn inter_grouped(&mut self, grouped: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.grouped_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.grouped.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.grouped.push(None); + _index + }; + + let grouped = grouped(_index); + + if let Some(Some(grouped)) = self.grouped.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *grouped.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {grouped:?}."); + self.grouped_free_list.push(_index); + grouped.clone() + } else { + log::debug!(target: "store", "interring {grouped:?}."); + self.grouped[_index] = Some(grouped.clone()); + grouped + } + } + + /// Exhume (get) [`Grouped`] from the store. + /// + #[inline] + pub fn exhume_grouped(&self, id: &usize) -> Option>> { + match self.grouped.get(*id) { + Some(grouped) => grouped.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Grouped`] from the store. + /// + #[inline] + pub fn exorcise_grouped(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising grouped slot: {id}."); + let result = self.grouped[*id].take(); + self.grouped_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Grouped>`. + /// + #[inline] + pub fn iter_grouped(&self) -> impl Iterator>> + '_ { + let len = self.grouped.len(); + (0..len) + .filter(|i| self.grouped[*i].is_some()) + .map(move |i| { + self.grouped[i] + .as_ref() + .map(|grouped| grouped.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`XIf`] into the store. + /// + #[inline] + pub fn inter_x_if(&mut self, x_if: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.x_if_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.x_if.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.x_if.push(None); + _index + }; + + let x_if = x_if(_index); + + if let Some(Some(x_if)) = self.x_if.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *x_if.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {x_if:?}."); + self.x_if_free_list.push(_index); + x_if.clone() + } else { + log::debug!(target: "store", "interring {x_if:?}."); + self.x_if[_index] = Some(x_if.clone()); + x_if + } + } + + /// Exhume (get) [`XIf`] from the store. + /// + #[inline] + pub fn exhume_x_if(&self, id: &usize) -> Option>> { + match self.x_if.get(*id) { + Some(x_if) => x_if.clone(), + None => None, + } + } + + /// Exorcise (remove) [`XIf`] from the store. + /// + #[inline] + pub fn exorcise_x_if(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising x_if slot: {id}."); + let result = self.x_if[*id].take(); + self.x_if_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, XIf>`. + /// + #[inline] + pub fn iter_x_if(&self) -> impl Iterator>> + '_ { + let len = self.x_if.len(); + (0..len) + .filter(|i| self.x_if[*i].is_some()) + .map(move |i| self.x_if[i].as_ref().map(|x_if| x_if.clone()).unwrap()) + } + + /// Inter (insert) [`ImplementationBlock`] into the store. + /// + #[inline] + pub fn inter_implementation_block( + &mut self, + implementation_block: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.implementation_block_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.implementation_block.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.implementation_block.push(None); + _index + }; + + let implementation_block = implementation_block(_index); + + if let Some(Some(implementation_block)) = self.implementation_block.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *implementation_block.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {implementation_block:?}."); + self.implementation_block_free_list.push(_index); + implementation_block.clone() + } else { + log::debug!(target: "store", "interring {implementation_block:?}."); + self.implementation_block[_index] = Some(implementation_block.clone()); + implementation_block + } + } + + /// Exhume (get) [`ImplementationBlock`] from the store. + /// + #[inline] + pub fn exhume_implementation_block( + &self, + id: &usize, + ) -> Option>> { + match self.implementation_block.get(*id) { + Some(implementation_block) => implementation_block.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ImplementationBlock`] from the store. + /// + #[inline] + pub fn exorcise_implementation_block( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising implementation_block slot: {id}."); + let result = self.implementation_block[*id].take(); + self.implementation_block_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ImplementationBlock>`. + /// + #[inline] + pub fn iter_implementation_block( + &self, + ) -> impl Iterator>> + '_ { + let len = self.implementation_block.len(); + (0..len) + .filter(|i| self.implementation_block[*i].is_some()) + .map(move |i| { + self.implementation_block[i] + .as_ref() + .map(|implementation_block| implementation_block.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Import`] into the store. + /// + #[inline] + pub fn inter_import(&mut self, import: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.import_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.import.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.import.push(None); + _index + }; + + let import = import(_index); + + if let Some(Some(import)) = self.import.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *import.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {import:?}."); + self.import_free_list.push(_index); + import.clone() + } else { + log::debug!(target: "store", "interring {import:?}."); + self.import[_index] = Some(import.clone()); + import + } + } + + /// Exhume (get) [`Import`] from the store. + /// + #[inline] + pub fn exhume_import(&self, id: &usize) -> Option>> { + match self.import.get(*id) { + Some(import) => import.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Import`] from the store. + /// + #[inline] + pub fn exorcise_import(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising import slot: {id}."); + let result = self.import[*id].take(); + self.import_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Import>`. + /// + #[inline] + pub fn iter_import(&self) -> impl Iterator>> + '_ { + let len = self.import.len(); + (0..len) + .filter(|i| self.import[*i].is_some()) + .map(move |i| { + self.import[i] + .as_ref() + .map(|import| import.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Index`] into the store. + /// + #[inline] + pub fn inter_index(&mut self, index: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.index_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.index.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.index.push(None); + _index + }; + + let index = index(_index); + + if let Some(Some(index)) = self.index.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *index.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {index:?}."); + self.index_free_list.push(_index); + index.clone() + } else { + log::debug!(target: "store", "interring {index:?}."); + self.index[_index] = Some(index.clone()); + index + } + } + + /// Exhume (get) [`Index`] from the store. + /// + #[inline] + pub fn exhume_index(&self, id: &usize) -> Option>> { + match self.index.get(*id) { + Some(index) => index.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Index`] from the store. + /// + #[inline] + pub fn exorcise_index(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising index slot: {id}."); + let result = self.index[*id].take(); + self.index_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Index>`. + /// + #[inline] + pub fn iter_index(&self) -> impl Iterator>> + '_ { + let len = self.index.len(); + (0..len) + .filter(|i| self.index[*i].is_some()) + .map(move |i| self.index[i].as_ref().map(|index| index.clone()).unwrap()) + } + + /// Inter (insert) [`IntegerLiteral`] into the store. + /// + #[inline] + pub fn inter_integer_literal(&mut self, integer_literal: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.integer_literal_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.integer_literal.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.integer_literal.push(None); + _index + }; + + let integer_literal = integer_literal(_index); + + if let Some(Some(integer_literal)) = self.integer_literal.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *integer_literal.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {integer_literal:?}."); + self.integer_literal_free_list.push(_index); + integer_literal.clone() + } else { + log::debug!(target: "store", "interring {integer_literal:?}."); + self.integer_literal[_index] = Some(integer_literal.clone()); + integer_literal + } + } + + /// Exhume (get) [`IntegerLiteral`] from the store. + /// + #[inline] + pub fn exhume_integer_literal(&self, id: &usize) -> Option>> { + match self.integer_literal.get(*id) { + Some(integer_literal) => integer_literal.clone(), + None => None, + } + } + + /// Exorcise (remove) [`IntegerLiteral`] from the store. + /// + #[inline] + pub fn exorcise_integer_literal(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising integer_literal slot: {id}."); + let result = self.integer_literal[*id].take(); + self.integer_literal_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, IntegerLiteral>`. + /// + #[inline] + pub fn iter_integer_literal(&self) -> impl Iterator>> + '_ { + let len = self.integer_literal.len(); + (0..len) + .filter(|i| self.integer_literal[*i].is_some()) + .map(move |i| { + self.integer_literal[i] + .as_ref() + .map(|integer_literal| integer_literal.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Item`] into the store. + /// + #[inline] + pub fn inter_item(&mut self, item: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.item_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.item.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.item.push(None); + _index + }; + + let item = item(_index); + + if let Some(Some(item)) = self.item.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *item.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {item:?}."); + self.item_free_list.push(_index); + item.clone() + } else { + log::debug!(target: "store", "interring {item:?}."); + self.item[_index] = Some(item.clone()); + item + } + } + + /// Exhume (get) [`Item`] from the store. + /// + #[inline] + pub fn exhume_item(&self, id: &usize) -> Option>> { + match self.item.get(*id) { + Some(item) => item.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Item`] from the store. + /// + #[inline] + pub fn exorcise_item(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising item slot: {id}."); + let result = self.item[*id].take(); + self.item_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Item>`. + /// + #[inline] + pub fn iter_item(&self) -> impl Iterator>> + '_ { + let len = self.item.len(); + (0..len) + .filter(|i| self.item[*i].is_some()) + .map(move |i| self.item[i].as_ref().map(|item| item.clone()).unwrap()) + } + + /// Inter (insert) [`Lambda`] into the store. + /// + #[inline] + pub fn inter_lambda(&mut self, lambda: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.lambda_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.lambda.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.lambda.push(None); + _index + }; + + let lambda = lambda(_index); + + if let Some(Some(lambda)) = self.lambda.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *lambda.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {lambda:?}."); + self.lambda_free_list.push(_index); + lambda.clone() + } else { + log::debug!(target: "store", "interring {lambda:?}."); + self.lambda[_index] = Some(lambda.clone()); + lambda + } + } + + /// Exhume (get) [`Lambda`] from the store. + /// + #[inline] + pub fn exhume_lambda(&self, id: &usize) -> Option>> { + match self.lambda.get(*id) { + Some(lambda) => lambda.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Lambda`] from the store. + /// + #[inline] + pub fn exorcise_lambda(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising lambda slot: {id}."); + let result = self.lambda[*id].take(); + self.lambda_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Lambda>`. + /// + #[inline] + pub fn iter_lambda(&self) -> impl Iterator>> + '_ { + let len = self.lambda.len(); + (0..len) + .filter(|i| self.lambda[*i].is_some()) + .map(move |i| { + self.lambda[i] + .as_ref() + .map(|lambda| lambda.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`LambdaParameter`] into the store. + /// + #[inline] + pub fn inter_lambda_parameter(&mut self, lambda_parameter: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.lambda_parameter_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.lambda_parameter.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.lambda_parameter.push(None); + _index + }; + + let lambda_parameter = lambda_parameter(_index); + + if let Some(Some(lambda_parameter)) = self.lambda_parameter.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *lambda_parameter.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {lambda_parameter:?}."); + self.lambda_parameter_free_list.push(_index); + lambda_parameter.clone() + } else { + log::debug!(target: "store", "interring {lambda_parameter:?}."); + self.lambda_parameter[_index] = Some(lambda_parameter.clone()); + lambda_parameter + } + } + + /// Exhume (get) [`LambdaParameter`] from the store. + /// + #[inline] + pub fn exhume_lambda_parameter(&self, id: &usize) -> Option>> { + match self.lambda_parameter.get(*id) { + Some(lambda_parameter) => lambda_parameter.clone(), + None => None, + } + } + + /// Exorcise (remove) [`LambdaParameter`] from the store. + /// + #[inline] + pub fn exorcise_lambda_parameter( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising lambda_parameter slot: {id}."); + let result = self.lambda_parameter[*id].take(); + self.lambda_parameter_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, LambdaParameter>`. + /// + #[inline] + pub fn iter_lambda_parameter(&self) -> impl Iterator>> + '_ { + let len = self.lambda_parameter.len(); + (0..len) + .filter(|i| self.lambda_parameter[*i].is_some()) + .map(move |i| { + self.lambda_parameter[i] + .as_ref() + .map(|lambda_parameter| lambda_parameter.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`LetStatement`] into the store. + /// + #[inline] + pub fn inter_let_statement(&mut self, let_statement: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.let_statement_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.let_statement.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.let_statement.push(None); + _index + }; + + let let_statement = let_statement(_index); + + if let Some(Some(let_statement)) = self.let_statement.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *let_statement.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {let_statement:?}."); + self.let_statement_free_list.push(_index); + let_statement.clone() + } else { + log::debug!(target: "store", "interring {let_statement:?}."); + self.let_statement[_index] = Some(let_statement.clone()); + let_statement + } + } + + /// Exhume (get) [`LetStatement`] from the store. + /// + #[inline] + pub fn exhume_let_statement(&self, id: &usize) -> Option>> { + match self.let_statement.get(*id) { + Some(let_statement) => let_statement.clone(), + None => None, + } + } + + /// Exorcise (remove) [`LetStatement`] from the store. + /// + #[inline] + pub fn exorcise_let_statement(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising let_statement slot: {id}."); + let result = self.let_statement[*id].take(); + self.let_statement_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, LetStatement>`. + /// + #[inline] + pub fn iter_let_statement(&self) -> impl Iterator>> + '_ { + let len = self.let_statement.len(); + (0..len) + .filter(|i| self.let_statement[*i].is_some()) + .map(move |i| { + self.let_statement[i] + .as_ref() + .map(|let_statement| let_statement.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`List`] into the store. + /// + #[inline] + pub fn inter_list(&mut self, list: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.list_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.list.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.list.push(None); + _index + }; + + let list = list(_index); + + if let Some(Some(list)) = self.list.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *list.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {list:?}."); + self.list_free_list.push(_index); + list.clone() + } else { + log::debug!(target: "store", "interring {list:?}."); + self.list[_index] = Some(list.clone()); + list + } + } + + /// Exhume (get) [`List`] from the store. + /// + #[inline] + pub fn exhume_list(&self, id: &usize) -> Option>> { + match self.list.get(*id) { + Some(list) => list.clone(), + None => None, + } + } + + /// Exorcise (remove) [`List`] from the store. + /// + #[inline] + pub fn exorcise_list(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising list slot: {id}."); + let result = self.list[*id].take(); + self.list_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, List>`. + /// + #[inline] + pub fn iter_list(&self) -> impl Iterator>> + '_ { + let len = self.list.len(); + (0..len) + .filter(|i| self.list[*i].is_some()) + .map(move |i| self.list[i].as_ref().map(|list| list.clone()).unwrap()) + } + + /// Inter (insert) [`ListElement`] into the store. + /// + #[inline] + pub fn inter_list_element(&mut self, list_element: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.list_element_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.list_element.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.list_element.push(None); + _index + }; + + let list_element = list_element(_index); + + if let Some(Some(list_element)) = self.list_element.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *list_element.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {list_element:?}."); + self.list_element_free_list.push(_index); + list_element.clone() + } else { + log::debug!(target: "store", "interring {list_element:?}."); + self.list_element[_index] = Some(list_element.clone()); + list_element + } + } + + /// Exhume (get) [`ListElement`] from the store. + /// + #[inline] + pub fn exhume_list_element(&self, id: &usize) -> Option>> { + match self.list_element.get(*id) { + Some(list_element) => list_element.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ListElement`] from the store. + /// + #[inline] + pub fn exorcise_list_element(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising list_element slot: {id}."); + let result = self.list_element[*id].take(); + self.list_element_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ListElement>`. + /// + #[inline] + pub fn iter_list_element(&self) -> impl Iterator>> + '_ { + let len = self.list_element.len(); + (0..len) + .filter(|i| self.list_element[*i].is_some()) + .map(move |i| { + self.list_element[i] + .as_ref() + .map(|list_element| list_element.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`ListExpression`] into the store. + /// + #[inline] + pub fn inter_list_expression(&mut self, list_expression: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.list_expression_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.list_expression.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.list_expression.push(None); + _index + }; + + let list_expression = list_expression(_index); + + if let Some(Some(list_expression)) = self.list_expression.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *list_expression.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {list_expression:?}."); + self.list_expression_free_list.push(_index); + list_expression.clone() + } else { + log::debug!(target: "store", "interring {list_expression:?}."); + self.list_expression[_index] = Some(list_expression.clone()); + list_expression + } + } + + /// Exhume (get) [`ListExpression`] from the store. + /// + #[inline] + pub fn exhume_list_expression(&self, id: &usize) -> Option>> { + match self.list_expression.get(*id) { + Some(list_expression) => list_expression.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ListExpression`] from the store. + /// + #[inline] + pub fn exorcise_list_expression(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising list_expression slot: {id}."); + let result = self.list_expression[*id].take(); + self.list_expression_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ListExpression>`. + /// + #[inline] + pub fn iter_list_expression(&self) -> impl Iterator>> + '_ { + let len = self.list_expression.len(); + (0..len) + .filter(|i| self.list_expression[*i].is_some()) + .map(move |i| { + self.list_expression[i] + .as_ref() + .map(|list_expression| list_expression.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Literal`] into the store. + /// + #[inline] + pub fn inter_literal(&mut self, literal: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.literal_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.literal.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.literal.push(None); + _index + }; + + let literal = literal(_index); + + if let Some(Some(literal)) = self.literal.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *literal.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {literal:?}."); + self.literal_free_list.push(_index); + literal.clone() + } else { + log::debug!(target: "store", "interring {literal:?}."); + self.literal[_index] = Some(literal.clone()); + literal + } + } + + /// Exhume (get) [`Literal`] from the store. + /// + #[inline] + pub fn exhume_literal(&self, id: &usize) -> Option>> { + match self.literal.get(*id) { + Some(literal) => literal.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Literal`] from the store. + /// + #[inline] + pub fn exorcise_literal(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising literal slot: {id}."); + let result = self.literal[*id].take(); + self.literal_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Literal>`. + /// + #[inline] + pub fn iter_literal(&self) -> impl Iterator>> + '_ { + let len = self.literal.len(); + (0..len) + .filter(|i| self.literal[*i].is_some()) + .map(move |i| { + self.literal[i] + .as_ref() + .map(|literal| literal.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`LocalVariable`] into the store. + /// + #[inline] + pub fn inter_local_variable(&mut self, local_variable: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.local_variable_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.local_variable.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.local_variable.push(None); + _index + }; + + let local_variable = local_variable(_index); + + if let Some(Some(local_variable)) = self.local_variable.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *local_variable.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {local_variable:?}."); + self.local_variable_free_list.push(_index); + local_variable.clone() + } else { + log::debug!(target: "store", "interring {local_variable:?}."); + self.local_variable[_index] = Some(local_variable.clone()); + local_variable + } + } + + /// Exhume (get) [`LocalVariable`] from the store. + /// + #[inline] + pub fn exhume_local_variable(&self, id: &usize) -> Option>> { + match self.local_variable.get(*id) { + Some(local_variable) => local_variable.clone(), + None => None, + } + } + + /// Exorcise (remove) [`LocalVariable`] from the store. + /// + #[inline] + pub fn exorcise_local_variable(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising local_variable slot: {id}."); + let result = self.local_variable[*id].take(); + self.local_variable_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, LocalVariable>`. + /// + #[inline] + pub fn iter_local_variable(&self) -> impl Iterator>> + '_ { + let len = self.local_variable.len(); + (0..len) + .filter(|i| self.local_variable[*i].is_some()) + .map(move |i| { + self.local_variable[i] + .as_ref() + .map(|local_variable| local_variable.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`XMacro`] into the store. + /// + #[inline] + pub fn inter_x_macro(&mut self, x_macro: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.x_macro_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.x_macro.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.x_macro.push(None); + _index + }; + + let x_macro = x_macro(_index); + + if let Some(Some(x_macro)) = self.x_macro.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *x_macro.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {x_macro:?}."); + self.x_macro_free_list.push(_index); + x_macro.clone() + } else { + log::debug!(target: "store", "interring {x_macro:?}."); + self.x_macro[_index] = Some(x_macro.clone()); + x_macro + } + } + + /// Exhume (get) [`XMacro`] from the store. + /// + #[inline] + pub fn exhume_x_macro(&self, id: &usize) -> Option>> { + match self.x_macro.get(*id) { + Some(x_macro) => x_macro.clone(), + None => None, + } + } + + /// Exorcise (remove) [`XMacro`] from the store. + /// + #[inline] + pub fn exorcise_x_macro(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising x_macro slot: {id}."); + let result = self.x_macro[*id].take(); + self.x_macro_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, XMacro>`. + /// + #[inline] + pub fn iter_x_macro(&self) -> impl Iterator>> + '_ { + let len = self.x_macro.len(); + (0..len) + .filter(|i| self.x_macro[*i].is_some()) + .map(move |i| { + self.x_macro[i] + .as_ref() + .map(|x_macro| x_macro.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`XMatch`] into the store. + /// + #[inline] + pub fn inter_x_match(&mut self, x_match: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.x_match_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.x_match.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.x_match.push(None); + _index + }; + + let x_match = x_match(_index); + + if let Some(Some(x_match)) = self.x_match.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *x_match.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {x_match:?}."); + self.x_match_free_list.push(_index); + x_match.clone() + } else { + log::debug!(target: "store", "interring {x_match:?}."); + self.x_match[_index] = Some(x_match.clone()); + x_match + } + } + + /// Exhume (get) [`XMatch`] from the store. + /// + #[inline] + pub fn exhume_x_match(&self, id: &usize) -> Option>> { + match self.x_match.get(*id) { + Some(x_match) => x_match.clone(), + None => None, + } + } + + /// Exorcise (remove) [`XMatch`] from the store. + /// + #[inline] + pub fn exorcise_x_match(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising x_match slot: {id}."); + let result = self.x_match[*id].take(); + self.x_match_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, XMatch>`. + /// + #[inline] + pub fn iter_x_match(&self) -> impl Iterator>> + '_ { + let len = self.x_match.len(); + (0..len) + .filter(|i| self.x_match[*i].is_some()) + .map(move |i| { + self.x_match[i] + .as_ref() + .map(|x_match| x_match.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`MethodCall`] into the store. + /// + #[inline] + pub fn inter_method_call(&mut self, method_call: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.method_call_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.method_call.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.method_call.push(None); + _index + }; + + let method_call = method_call(_index); + + if let Some(Some(method_call)) = self.method_call.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *method_call.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {method_call:?}."); + self.method_call_free_list.push(_index); + method_call.clone() + } else { + log::debug!(target: "store", "interring {method_call:?}."); + self.method_call[_index] = Some(method_call.clone()); + method_call + } + } + + /// Exhume (get) [`MethodCall`] from the store. + /// + #[inline] + pub fn exhume_method_call(&self, id: &usize) -> Option>> { + match self.method_call.get(*id) { + Some(method_call) => method_call.clone(), + None => None, + } + } + + /// Exorcise (remove) [`MethodCall`] from the store. + /// + #[inline] + pub fn exorcise_method_call(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising method_call slot: {id}."); + let result = self.method_call[*id].take(); + self.method_call_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, MethodCall>`. + /// + #[inline] + pub fn iter_method_call(&self) -> impl Iterator>> + '_ { + let len = self.method_call.len(); + (0..len) + .filter(|i| self.method_call[*i].is_some()) + .map(move |i| { + self.method_call[i] + .as_ref() + .map(|method_call| method_call.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`NamedFieldExpression`] into the store. + /// + #[inline] + pub fn inter_named_field_expression( + &mut self, + named_field_expression: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.named_field_expression_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.named_field_expression.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.named_field_expression.push(None); + _index + }; + + let named_field_expression = named_field_expression(_index); + + if let Some(Some(named_field_expression)) = + self.named_field_expression.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *named_field_expression.borrow() + } else { + false + } + }) + { + log::debug!(target: "store", "found duplicate {named_field_expression:?}."); + self.named_field_expression_free_list.push(_index); + named_field_expression.clone() + } else { + log::debug!(target: "store", "interring {named_field_expression:?}."); + self.named_field_expression[_index] = Some(named_field_expression.clone()); + named_field_expression + } + } + + /// Exhume (get) [`NamedFieldExpression`] from the store. + /// + #[inline] + pub fn exhume_named_field_expression( + &self, + id: &usize, + ) -> Option>> { + match self.named_field_expression.get(*id) { + Some(named_field_expression) => named_field_expression.clone(), + None => None, + } + } + + /// Exorcise (remove) [`NamedFieldExpression`] from the store. + /// + #[inline] + pub fn exorcise_named_field_expression( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising named_field_expression slot: {id}."); + let result = self.named_field_expression[*id].take(); + self.named_field_expression_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, NamedFieldExpression>`. + /// + #[inline] + pub fn iter_named_field_expression( + &self, + ) -> impl Iterator>> + '_ { + let len = self.named_field_expression.len(); + (0..len) + .filter(|i| self.named_field_expression[*i].is_some()) + .map(move |i| { + self.named_field_expression[i] + .as_ref() + .map(|named_field_expression| named_field_expression.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`ZObjectStore`] into the store. + /// + #[inline] + pub fn inter_z_object_store(&mut self, z_object_store: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.z_object_store_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.z_object_store.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.z_object_store.push(None); + _index + }; + + let z_object_store = z_object_store(_index); + + let z_object_store = if let Some(Some(z_object_store)) = + self.z_object_store.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *z_object_store.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {z_object_store:?}."); + self.z_object_store_free_list.push(_index); + z_object_store.clone() + } else { + log::debug!(target: "store", "interring {z_object_store:?}."); + self.z_object_store[_index] = Some(z_object_store.clone()); + z_object_store + }; + self.z_object_store_id_by_name.insert( + z_object_store.borrow().name.to_owned(), + z_object_store.borrow().id, + ); + z_object_store + } + + /// Exhume (get) [`ZObjectStore`] from the store. + /// + #[inline] + pub fn exhume_z_object_store(&self, id: &usize) -> Option>> { + match self.z_object_store.get(*id) { + Some(z_object_store) => z_object_store.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ZObjectStore`] from the store. + /// + #[inline] + pub fn exorcise_z_object_store(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising z_object_store slot: {id}."); + let result = self.z_object_store[*id].take(); + self.z_object_store_free_list.push(*id); + result + } + + /// Exorcise [`ZObjectStore`] id from the store by name. + /// + #[inline] + pub fn exhume_z_object_store_id_by_name(&self, name: &str) -> Option { + self.z_object_store_id_by_name + .get(name) + .map(|z_object_store| *z_object_store) + } + + /// Get an iterator over the internal `HashMap<&Uuid, ZObjectStore>`. + /// + #[inline] + pub fn iter_z_object_store(&self) -> impl Iterator>> + '_ { + let len = self.z_object_store.len(); + (0..len) + .filter(|i| self.z_object_store[*i].is_some()) + .map(move |i| { + self.z_object_store[i] + .as_ref() + .map(|z_object_store| z_object_store.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`ObjectWrapper`] into the store. + /// + #[inline] + pub fn inter_object_wrapper(&mut self, object_wrapper: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.object_wrapper_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.object_wrapper.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.object_wrapper.push(None); + _index + }; + + let object_wrapper = object_wrapper(_index); + + if let Some(Some(object_wrapper)) = self.object_wrapper.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *object_wrapper.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {object_wrapper:?}."); + self.object_wrapper_free_list.push(_index); + object_wrapper.clone() + } else { + log::debug!(target: "store", "interring {object_wrapper:?}."); + self.object_wrapper[_index] = Some(object_wrapper.clone()); + object_wrapper + } + } + + /// Exhume (get) [`ObjectWrapper`] from the store. + /// + #[inline] + pub fn exhume_object_wrapper(&self, id: &usize) -> Option>> { + match self.object_wrapper.get(*id) { + Some(object_wrapper) => object_wrapper.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ObjectWrapper`] from the store. + /// + #[inline] + pub fn exorcise_object_wrapper(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising object_wrapper slot: {id}."); + let result = self.object_wrapper[*id].take(); + self.object_wrapper_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ObjectWrapper>`. + /// + #[inline] + pub fn iter_object_wrapper(&self) -> impl Iterator>> + '_ { + let len = self.object_wrapper.len(); + (0..len) + .filter(|i| self.object_wrapper[*i].is_some()) + .map(move |i| { + self.object_wrapper[i] + .as_ref() + .map(|object_wrapper| object_wrapper.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Operator`] into the store. + /// + #[inline] + pub fn inter_operator(&mut self, operator: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.operator_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.operator.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.operator.push(None); + _index + }; + + let operator = operator(_index); + + if let Some(Some(operator)) = self.operator.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *operator.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {operator:?}."); + self.operator_free_list.push(_index); + operator.clone() + } else { + log::debug!(target: "store", "interring {operator:?}."); + self.operator[_index] = Some(operator.clone()); + operator + } + } + + /// Exhume (get) [`Operator`] from the store. + /// + #[inline] + pub fn exhume_operator(&self, id: &usize) -> Option>> { + match self.operator.get(*id) { + Some(operator) => operator.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Operator`] from the store. + /// + #[inline] + pub fn exorcise_operator(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising operator slot: {id}."); + let result = self.operator[*id].take(); + self.operator_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Operator>`. + /// + #[inline] + pub fn iter_operator(&self) -> impl Iterator>> + '_ { + let len = self.operator.len(); + (0..len) + .filter(|i| self.operator[*i].is_some()) + .map(move |i| { + self.operator[i] + .as_ref() + .map(|operator| operator.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Parameter`] into the store. + /// + #[inline] + pub fn inter_parameter(&mut self, parameter: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.parameter_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.parameter.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.parameter.push(None); + _index + }; + + let parameter = parameter(_index); + + if let Some(Some(parameter)) = self.parameter.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *parameter.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {parameter:?}."); + self.parameter_free_list.push(_index); + parameter.clone() + } else { + log::debug!(target: "store", "interring {parameter:?}."); + self.parameter[_index] = Some(parameter.clone()); + parameter + } + } + + /// Exhume (get) [`Parameter`] from the store. + /// + #[inline] + pub fn exhume_parameter(&self, id: &usize) -> Option>> { + match self.parameter.get(*id) { + Some(parameter) => parameter.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Parameter`] from the store. + /// + #[inline] + pub fn exorcise_parameter(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising parameter slot: {id}."); + let result = self.parameter[*id].take(); + self.parameter_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Parameter>`. + /// + #[inline] + pub fn iter_parameter(&self) -> impl Iterator>> + '_ { + let len = self.parameter.len(); + (0..len) + .filter(|i| self.parameter[*i].is_some()) + .map(move |i| { + self.parameter[i] + .as_ref() + .map(|parameter| parameter.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`XPath`] into the store. + /// + #[inline] + pub fn inter_x_path(&mut self, x_path: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.x_path_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.x_path.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.x_path.push(None); + _index + }; + + let x_path = x_path(_index); + + if let Some(Some(x_path)) = self.x_path.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *x_path.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {x_path:?}."); + self.x_path_free_list.push(_index); + x_path.clone() + } else { + log::debug!(target: "store", "interring {x_path:?}."); + self.x_path[_index] = Some(x_path.clone()); + x_path + } + } + + /// Exhume (get) [`XPath`] from the store. + /// + #[inline] + pub fn exhume_x_path(&self, id: &usize) -> Option>> { + match self.x_path.get(*id) { + Some(x_path) => x_path.clone(), + None => None, + } + } + + /// Exorcise (remove) [`XPath`] from the store. + /// + #[inline] + pub fn exorcise_x_path(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising x_path slot: {id}."); + let result = self.x_path[*id].take(); + self.x_path_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, XPath>`. + /// + #[inline] + pub fn iter_x_path(&self) -> impl Iterator>> + '_ { + let len = self.x_path.len(); + (0..len) + .filter(|i| self.x_path[*i].is_some()) + .map(move |i| { + self.x_path[i] + .as_ref() + .map(|x_path| x_path.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`PathElement`] into the store. + /// + #[inline] + pub fn inter_path_element(&mut self, path_element: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.path_element_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.path_element.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.path_element.push(None); + _index + }; + + let path_element = path_element(_index); + + if let Some(Some(path_element)) = self.path_element.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *path_element.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {path_element:?}."); + self.path_element_free_list.push(_index); + path_element.clone() + } else { + log::debug!(target: "store", "interring {path_element:?}."); + self.path_element[_index] = Some(path_element.clone()); + path_element + } + } + + /// Exhume (get) [`PathElement`] from the store. + /// + #[inline] + pub fn exhume_path_element(&self, id: &usize) -> Option>> { + match self.path_element.get(*id) { + Some(path_element) => path_element.clone(), + None => None, + } + } + + /// Exorcise (remove) [`PathElement`] from the store. + /// + #[inline] + pub fn exorcise_path_element(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising path_element slot: {id}."); + let result = self.path_element[*id].take(); + self.path_element_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, PathElement>`. + /// + #[inline] + pub fn iter_path_element(&self) -> impl Iterator>> + '_ { + let len = self.path_element.len(); + (0..len) + .filter(|i| self.path_element[*i].is_some()) + .map(move |i| { + self.path_element[i] + .as_ref() + .map(|path_element| path_element.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Pattern`] into the store. + /// + #[inline] + pub fn inter_pattern(&mut self, pattern: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.pattern_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.pattern.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.pattern.push(None); + _index + }; + + let pattern = pattern(_index); + + if let Some(Some(pattern)) = self.pattern.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *pattern.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {pattern:?}."); + self.pattern_free_list.push(_index); + pattern.clone() + } else { + log::debug!(target: "store", "interring {pattern:?}."); + self.pattern[_index] = Some(pattern.clone()); + pattern + } + } + + /// Exhume (get) [`Pattern`] from the store. + /// + #[inline] + pub fn exhume_pattern(&self, id: &usize) -> Option>> { + match self.pattern.get(*id) { + Some(pattern) => pattern.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Pattern`] from the store. + /// + #[inline] + pub fn exorcise_pattern(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising pattern slot: {id}."); + let result = self.pattern[*id].take(); + self.pattern_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Pattern>`. + /// + #[inline] + pub fn iter_pattern(&self) -> impl Iterator>> + '_ { + let len = self.pattern.len(); + (0..len) + .filter(|i| self.pattern[*i].is_some()) + .map(move |i| { + self.pattern[i] + .as_ref() + .map(|pattern| pattern.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Plugin`] into the store. + /// + #[inline] + pub fn inter_plugin(&mut self, plugin: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.plugin_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.plugin.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.plugin.push(None); + _index + }; + + let plugin = plugin(_index); + + if let Some(Some(plugin)) = self.plugin.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *plugin.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {plugin:?}."); + self.plugin_free_list.push(_index); + plugin.clone() + } else { + log::debug!(target: "store", "interring {plugin:?}."); + self.plugin[_index] = Some(plugin.clone()); + plugin + } + } + + /// Exhume (get) [`Plugin`] from the store. + /// + #[inline] + pub fn exhume_plugin(&self, id: &usize) -> Option>> { + match self.plugin.get(*id) { + Some(plugin) => plugin.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Plugin`] from the store. + /// + #[inline] + pub fn exorcise_plugin(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising plugin slot: {id}."); + let result = self.plugin[*id].take(); + self.plugin_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Plugin>`. + /// + #[inline] + pub fn iter_plugin(&self) -> impl Iterator>> + '_ { + let len = self.plugin.len(); + (0..len) + .filter(|i| self.plugin[*i].is_some()) + .map(move |i| { + self.plugin[i] + .as_ref() + .map(|plugin| plugin.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`XPrint`] into the store. + /// + #[inline] + pub fn inter_x_print(&mut self, x_print: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.x_print_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.x_print.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.x_print.push(None); + _index + }; + + let x_print = x_print(_index); + + if let Some(Some(x_print)) = self.x_print.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *x_print.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {x_print:?}."); + self.x_print_free_list.push(_index); + x_print.clone() + } else { + log::debug!(target: "store", "interring {x_print:?}."); + self.x_print[_index] = Some(x_print.clone()); + x_print + } + } + + /// Exhume (get) [`XPrint`] from the store. + /// + #[inline] + pub fn exhume_x_print(&self, id: &usize) -> Option>> { + match self.x_print.get(*id) { + Some(x_print) => x_print.clone(), + None => None, + } + } + + /// Exorcise (remove) [`XPrint`] from the store. + /// + #[inline] + pub fn exorcise_x_print(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising x_print slot: {id}."); + let result = self.x_print[*id].take(); + self.x_print_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, XPrint>`. + /// + #[inline] + pub fn iter_x_print(&self) -> impl Iterator>> + '_ { + let len = self.x_print.len(); + (0..len) + .filter(|i| self.x_print[*i].is_some()) + .map(move |i| { + self.x_print[i] + .as_ref() + .map(|x_print| x_print.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`RangeExpression`] into the store. + /// + #[inline] + pub fn inter_range_expression(&mut self, range_expression: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.range_expression_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.range_expression.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.range_expression.push(None); + _index + }; + + let range_expression = range_expression(_index); + + if let Some(Some(range_expression)) = self.range_expression.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *range_expression.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {range_expression:?}."); + self.range_expression_free_list.push(_index); + range_expression.clone() + } else { + log::debug!(target: "store", "interring {range_expression:?}."); + self.range_expression[_index] = Some(range_expression.clone()); + range_expression + } + } + + /// Exhume (get) [`RangeExpression`] from the store. + /// + #[inline] + pub fn exhume_range_expression(&self, id: &usize) -> Option>> { + match self.range_expression.get(*id) { + Some(range_expression) => range_expression.clone(), + None => None, + } + } + + /// Exorcise (remove) [`RangeExpression`] from the store. + /// + #[inline] + pub fn exorcise_range_expression( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising range_expression slot: {id}."); + let result = self.range_expression[*id].take(); + self.range_expression_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, RangeExpression>`. + /// + #[inline] + pub fn iter_range_expression(&self) -> impl Iterator>> + '_ { + let len = self.range_expression.len(); + (0..len) + .filter(|i| self.range_expression[*i].is_some()) + .map(move |i| { + self.range_expression[i] + .as_ref() + .map(|range_expression| range_expression.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`ResultStatement`] into the store. + /// + #[inline] + pub fn inter_result_statement(&mut self, result_statement: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.result_statement_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.result_statement.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.result_statement.push(None); + _index + }; + + let result_statement = result_statement(_index); + + if let Some(Some(result_statement)) = self.result_statement.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *result_statement.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {result_statement:?}."); + self.result_statement_free_list.push(_index); + result_statement.clone() + } else { + log::debug!(target: "store", "interring {result_statement:?}."); + self.result_statement[_index] = Some(result_statement.clone()); + result_statement + } + } + + /// Exhume (get) [`ResultStatement`] from the store. + /// + #[inline] + pub fn exhume_result_statement(&self, id: &usize) -> Option>> { + match self.result_statement.get(*id) { + Some(result_statement) => result_statement.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ResultStatement`] from the store. + /// + #[inline] + pub fn exorcise_result_statement( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising result_statement slot: {id}."); + let result = self.result_statement[*id].take(); + self.result_statement_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ResultStatement>`. + /// + #[inline] + pub fn iter_result_statement(&self) -> impl Iterator>> + '_ { + let len = self.result_statement.len(); + (0..len) + .filter(|i| self.result_statement[*i].is_some()) + .map(move |i| { + self.result_statement[i] + .as_ref() + .map(|result_statement| result_statement.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`XReturn`] into the store. + /// + #[inline] + pub fn inter_x_return(&mut self, x_return: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.x_return_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.x_return.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.x_return.push(None); + _index + }; + + let x_return = x_return(_index); + + if let Some(Some(x_return)) = self.x_return.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *x_return.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {x_return:?}."); + self.x_return_free_list.push(_index); + x_return.clone() + } else { + log::debug!(target: "store", "interring {x_return:?}."); + self.x_return[_index] = Some(x_return.clone()); + x_return + } + } + + /// Exhume (get) [`XReturn`] from the store. + /// + #[inline] + pub fn exhume_x_return(&self, id: &usize) -> Option>> { + match self.x_return.get(*id) { + Some(x_return) => x_return.clone(), + None => None, + } + } + + /// Exorcise (remove) [`XReturn`] from the store. + /// + #[inline] + pub fn exorcise_x_return(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising x_return slot: {id}."); + let result = self.x_return[*id].take(); + self.x_return_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, XReturn>`. + /// + #[inline] + pub fn iter_x_return(&self) -> impl Iterator>> + '_ { + let len = self.x_return.len(); + (0..len) + .filter(|i| self.x_return[*i].is_some()) + .map(move |i| { + self.x_return[i] + .as_ref() + .map(|x_return| x_return.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Span`] into the store. + /// + #[inline] + pub fn inter_span(&mut self, span: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.span_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.span.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.span.push(None); + _index + }; + + let span = span(_index); + + if let Some(Some(span)) = self.span.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *span.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {span:?}."); + self.span_free_list.push(_index); + span.clone() + } else { + log::debug!(target: "store", "interring {span:?}."); + self.span[_index] = Some(span.clone()); + span + } + } + + /// Exhume (get) [`Span`] from the store. + /// + #[inline] + pub fn exhume_span(&self, id: &usize) -> Option>> { + match self.span.get(*id) { + Some(span) => span.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Span`] from the store. + /// + #[inline] + pub fn exorcise_span(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising span slot: {id}."); + let result = self.span[*id].take(); + self.span_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Span>`. + /// + #[inline] + pub fn iter_span(&self) -> impl Iterator>> + '_ { + let len = self.span.len(); + (0..len) + .filter(|i| self.span[*i].is_some()) + .map(move |i| self.span[i].as_ref().map(|span| span.clone()).unwrap()) + } + + /// Inter (insert) [`Statement`] into the store. + /// + #[inline] + pub fn inter_statement(&mut self, statement: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.statement_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.statement.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.statement.push(None); + _index + }; + + let statement = statement(_index); + + if let Some(Some(statement)) = self.statement.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *statement.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {statement:?}."); + self.statement_free_list.push(_index); + statement.clone() + } else { + log::debug!(target: "store", "interring {statement:?}."); + self.statement[_index] = Some(statement.clone()); + statement + } + } + + /// Exhume (get) [`Statement`] from the store. + /// + #[inline] + pub fn exhume_statement(&self, id: &usize) -> Option>> { + match self.statement.get(*id) { + Some(statement) => statement.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Statement`] from the store. + /// + #[inline] + pub fn exorcise_statement(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising statement slot: {id}."); + let result = self.statement[*id].take(); + self.statement_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Statement>`. + /// + #[inline] + pub fn iter_statement(&self) -> impl Iterator>> + '_ { + let len = self.statement.len(); + (0..len) + .filter(|i| self.statement[*i].is_some()) + .map(move |i| { + self.statement[i] + .as_ref() + .map(|statement| statement.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`StaticMethodCall`] into the store. + /// + #[inline] + pub fn inter_static_method_call( + &mut self, + static_method_call: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.static_method_call_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.static_method_call.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.static_method_call.push(None); + _index + }; + + let static_method_call = static_method_call(_index); + + if let Some(Some(static_method_call)) = self.static_method_call.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *static_method_call.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {static_method_call:?}."); + self.static_method_call_free_list.push(_index); + static_method_call.clone() + } else { + log::debug!(target: "store", "interring {static_method_call:?}."); + self.static_method_call[_index] = Some(static_method_call.clone()); + static_method_call + } + } + + /// Exhume (get) [`StaticMethodCall`] from the store. + /// + #[inline] + pub fn exhume_static_method_call(&self, id: &usize) -> Option>> { + match self.static_method_call.get(*id) { + Some(static_method_call) => static_method_call.clone(), + None => None, + } + } + + /// Exorcise (remove) [`StaticMethodCall`] from the store. + /// + #[inline] + pub fn exorcise_static_method_call( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising static_method_call slot: {id}."); + let result = self.static_method_call[*id].take(); + self.static_method_call_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, StaticMethodCall>`. + /// + #[inline] + pub fn iter_static_method_call( + &self, + ) -> impl Iterator>> + '_ { + let len = self.static_method_call.len(); + (0..len) + .filter(|i| self.static_method_call[*i].is_some()) + .map(move |i| { + self.static_method_call[i] + .as_ref() + .map(|static_method_call| static_method_call.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`StringLiteral`] into the store. + /// + #[inline] + pub fn inter_string_literal(&mut self, string_literal: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.string_literal_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.string_literal.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.string_literal.push(None); + _index + }; + + let string_literal = string_literal(_index); + + if let Some(Some(string_literal)) = self.string_literal.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *string_literal.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {string_literal:?}."); + self.string_literal_free_list.push(_index); + string_literal.clone() + } else { + log::debug!(target: "store", "interring {string_literal:?}."); + self.string_literal[_index] = Some(string_literal.clone()); + string_literal + } + } + + /// Exhume (get) [`StringLiteral`] from the store. + /// + #[inline] + pub fn exhume_string_literal(&self, id: &usize) -> Option>> { + match self.string_literal.get(*id) { + Some(string_literal) => string_literal.clone(), + None => None, + } + } + + /// Exorcise (remove) [`StringLiteral`] from the store. + /// + #[inline] + pub fn exorcise_string_literal(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising string_literal slot: {id}."); + let result = self.string_literal[*id].take(); + self.string_literal_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, StringLiteral>`. + /// + #[inline] + pub fn iter_string_literal(&self) -> impl Iterator>> + '_ { + let len = self.string_literal.len(); + (0..len) + .filter(|i| self.string_literal[*i].is_some()) + .map(move |i| { + self.string_literal[i] + .as_ref() + .map(|string_literal| string_literal.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`WoogStruct`] into the store. + /// + #[inline] + pub fn inter_woog_struct(&mut self, woog_struct: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.woog_struct_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.woog_struct.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.woog_struct.push(None); + _index + }; + + let woog_struct = woog_struct(_index); + + let woog_struct = if let Some(Some(woog_struct)) = self.woog_struct.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *woog_struct.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {woog_struct:?}."); + self.woog_struct_free_list.push(_index); + woog_struct.clone() + } else { + log::debug!(target: "store", "interring {woog_struct:?}."); + self.woog_struct[_index] = Some(woog_struct.clone()); + woog_struct + }; + self.woog_struct_id_by_name.insert( + woog_struct.borrow().name.to_owned(), + woog_struct.borrow().id, + ); + woog_struct + } + + /// Exhume (get) [`WoogStruct`] from the store. + /// + #[inline] + pub fn exhume_woog_struct(&self, id: &usize) -> Option>> { + match self.woog_struct.get(*id) { + Some(woog_struct) => woog_struct.clone(), + None => None, + } + } + + /// Exorcise (remove) [`WoogStruct`] from the store. + /// + #[inline] + pub fn exorcise_woog_struct(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising woog_struct slot: {id}."); + let result = self.woog_struct[*id].take(); + self.woog_struct_free_list.push(*id); + result + } + + /// Exorcise [`WoogStruct`] id from the store by name. + /// + #[inline] + pub fn exhume_woog_struct_id_by_name(&self, name: &str) -> Option { + self.woog_struct_id_by_name + .get(name) + .map(|woog_struct| *woog_struct) + } + + /// Get an iterator over the internal `HashMap<&Uuid, WoogStruct>`. + /// + #[inline] + pub fn iter_woog_struct(&self) -> impl Iterator>> + '_ { + let len = self.woog_struct.len(); + (0..len) + .filter(|i| self.woog_struct[*i].is_some()) + .map(move |i| { + self.woog_struct[i] + .as_ref() + .map(|woog_struct| woog_struct.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`StructExpression`] into the store. + /// + #[inline] + pub fn inter_struct_expression( + &mut self, + struct_expression: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.struct_expression_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.struct_expression.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.struct_expression.push(None); + _index + }; + + let struct_expression = struct_expression(_index); + + if let Some(Some(struct_expression)) = self.struct_expression.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *struct_expression.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {struct_expression:?}."); + self.struct_expression_free_list.push(_index); + struct_expression.clone() + } else { + log::debug!(target: "store", "interring {struct_expression:?}."); + self.struct_expression[_index] = Some(struct_expression.clone()); + struct_expression + } + } + + /// Exhume (get) [`StructExpression`] from the store. + /// + #[inline] + pub fn exhume_struct_expression(&self, id: &usize) -> Option>> { + match self.struct_expression.get(*id) { + Some(struct_expression) => struct_expression.clone(), + None => None, + } + } + + /// Exorcise (remove) [`StructExpression`] from the store. + /// + #[inline] + pub fn exorcise_struct_expression( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising struct_expression slot: {id}."); + let result = self.struct_expression[*id].take(); + self.struct_expression_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, StructExpression>`. + /// + #[inline] + pub fn iter_struct_expression( + &self, + ) -> impl Iterator>> + '_ { + let len = self.struct_expression.len(); + (0..len) + .filter(|i| self.struct_expression[*i].is_some()) + .map(move |i| { + self.struct_expression[i] + .as_ref() + .map(|struct_expression| struct_expression.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`StructField`] into the store. + /// + #[inline] + pub fn inter_struct_field(&mut self, struct_field: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.struct_field_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.struct_field.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.struct_field.push(None); + _index + }; + + let struct_field = struct_field(_index); + + if let Some(Some(struct_field)) = self.struct_field.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *struct_field.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {struct_field:?}."); + self.struct_field_free_list.push(_index); + struct_field.clone() + } else { + log::debug!(target: "store", "interring {struct_field:?}."); + self.struct_field[_index] = Some(struct_field.clone()); + struct_field + } + } + + /// Exhume (get) [`StructField`] from the store. + /// + #[inline] + pub fn exhume_struct_field(&self, id: &usize) -> Option>> { + match self.struct_field.get(*id) { + Some(struct_field) => struct_field.clone(), + None => None, + } + } + + /// Exorcise (remove) [`StructField`] from the store. + /// + #[inline] + pub fn exorcise_struct_field(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising struct_field slot: {id}."); + let result = self.struct_field[*id].take(); + self.struct_field_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, StructField>`. + /// + #[inline] + pub fn iter_struct_field(&self) -> impl Iterator>> + '_ { + let len = self.struct_field.len(); + (0..len) + .filter(|i| self.struct_field[*i].is_some()) + .map(move |i| { + self.struct_field[i] + .as_ref() + .map(|struct_field| struct_field.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`StructGeneric`] into the store. + /// + #[inline] + pub fn inter_struct_generic(&mut self, struct_generic: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.struct_generic_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.struct_generic.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.struct_generic.push(None); + _index + }; + + let struct_generic = struct_generic(_index); + + if let Some(Some(struct_generic)) = self.struct_generic.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *struct_generic.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {struct_generic:?}."); + self.struct_generic_free_list.push(_index); + struct_generic.clone() + } else { + log::debug!(target: "store", "interring {struct_generic:?}."); + self.struct_generic[_index] = Some(struct_generic.clone()); + struct_generic + } + } + + /// Exhume (get) [`StructGeneric`] from the store. + /// + #[inline] + pub fn exhume_struct_generic(&self, id: &usize) -> Option>> { + match self.struct_generic.get(*id) { + Some(struct_generic) => struct_generic.clone(), + None => None, + } + } + + /// Exorcise (remove) [`StructGeneric`] from the store. + /// + #[inline] + pub fn exorcise_struct_generic(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising struct_generic slot: {id}."); + let result = self.struct_generic[*id].take(); + self.struct_generic_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, StructGeneric>`. + /// + #[inline] + pub fn iter_struct_generic(&self) -> impl Iterator>> + '_ { + let len = self.struct_generic.len(); + (0..len) + .filter(|i| self.struct_generic[*i].is_some()) + .map(move |i| { + self.struct_generic[i] + .as_ref() + .map(|struct_generic| struct_generic.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`TupleField`] into the store. + /// + #[inline] + pub fn inter_tuple_field(&mut self, tuple_field: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.tuple_field_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.tuple_field.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.tuple_field.push(None); + _index + }; + + let tuple_field = tuple_field(_index); + + if let Some(Some(tuple_field)) = self.tuple_field.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *tuple_field.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {tuple_field:?}."); + self.tuple_field_free_list.push(_index); + tuple_field.clone() + } else { + log::debug!(target: "store", "interring {tuple_field:?}."); + self.tuple_field[_index] = Some(tuple_field.clone()); + tuple_field + } + } + + /// Exhume (get) [`TupleField`] from the store. + /// + #[inline] + pub fn exhume_tuple_field(&self, id: &usize) -> Option>> { + match self.tuple_field.get(*id) { + Some(tuple_field) => tuple_field.clone(), + None => None, + } + } + + /// Exorcise (remove) [`TupleField`] from the store. + /// + #[inline] + pub fn exorcise_tuple_field(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising tuple_field slot: {id}."); + let result = self.tuple_field[*id].take(); + self.tuple_field_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, TupleField>`. + /// + #[inline] + pub fn iter_tuple_field(&self) -> impl Iterator>> + '_ { + let len = self.tuple_field.len(); + (0..len) + .filter(|i| self.tuple_field[*i].is_some()) + .map(move |i| { + self.tuple_field[i] + .as_ref() + .map(|tuple_field| tuple_field.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`TypeCast`] into the store. + /// + #[inline] + pub fn inter_type_cast(&mut self, type_cast: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.type_cast_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.type_cast.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.type_cast.push(None); + _index + }; + + let type_cast = type_cast(_index); + + if let Some(Some(type_cast)) = self.type_cast.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *type_cast.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {type_cast:?}."); + self.type_cast_free_list.push(_index); + type_cast.clone() + } else { + log::debug!(target: "store", "interring {type_cast:?}."); + self.type_cast[_index] = Some(type_cast.clone()); + type_cast + } + } + + /// Exhume (get) [`TypeCast`] from the store. + /// + #[inline] + pub fn exhume_type_cast(&self, id: &usize) -> Option>> { + match self.type_cast.get(*id) { + Some(type_cast) => type_cast.clone(), + None => None, + } + } + + /// Exorcise (remove) [`TypeCast`] from the store. + /// + #[inline] + pub fn exorcise_type_cast(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising type_cast slot: {id}."); + let result = self.type_cast[*id].take(); + self.type_cast_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, TypeCast>`. + /// + #[inline] + pub fn iter_type_cast(&self) -> impl Iterator>> + '_ { + let len = self.type_cast.len(); + (0..len) + .filter(|i| self.type_cast[*i].is_some()) + .map(move |i| { + self.type_cast[i] + .as_ref() + .map(|type_cast| type_cast.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Unary`] into the store. + /// + #[inline] + pub fn inter_unary(&mut self, unary: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.unary_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.unary.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.unary.push(None); + _index + }; + + let unary = unary(_index); + + if let Some(Some(unary)) = self.unary.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *unary.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {unary:?}."); + self.unary_free_list.push(_index); + unary.clone() + } else { + log::debug!(target: "store", "interring {unary:?}."); + self.unary[_index] = Some(unary.clone()); + unary + } + } + + /// Exhume (get) [`Unary`] from the store. + /// + #[inline] + pub fn exhume_unary(&self, id: &usize) -> Option>> { + match self.unary.get(*id) { + Some(unary) => unary.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Unary`] from the store. + /// + #[inline] + pub fn exorcise_unary(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising unary slot: {id}."); + let result = self.unary[*id].take(); + self.unary_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Unary>`. + /// + #[inline] + pub fn iter_unary(&self) -> impl Iterator>> + '_ { + let len = self.unary.len(); + (0..len) + .filter(|i| self.unary[*i].is_some()) + .map(move |i| self.unary[i].as_ref().map(|unary| unary.clone()).unwrap()) + } + + /// Inter (insert) [`Unit`] into the store. + /// + #[inline] + pub fn inter_unit(&mut self, unit: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.unit_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.unit.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.unit.push(None); + _index + }; + + let unit = unit(_index); + + if let Some(Some(unit)) = self.unit.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *unit.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {unit:?}."); + self.unit_free_list.push(_index); + unit.clone() + } else { + log::debug!(target: "store", "interring {unit:?}."); + self.unit[_index] = Some(unit.clone()); + unit + } + } + + /// Exhume (get) [`Unit`] from the store. + /// + #[inline] + pub fn exhume_unit(&self, id: &usize) -> Option>> { + match self.unit.get(*id) { + Some(unit) => unit.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Unit`] from the store. + /// + #[inline] + pub fn exorcise_unit(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising unit slot: {id}."); + let result = self.unit[*id].take(); + self.unit_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Unit>`. + /// + #[inline] + pub fn iter_unit(&self) -> impl Iterator>> + '_ { + let len = self.unit.len(); + (0..len) + .filter(|i| self.unit[*i].is_some()) + .map(move |i| self.unit[i].as_ref().map(|unit| unit.clone()).unwrap()) + } + + /// Inter (insert) [`UnnamedFieldExpression`] into the store. + /// + #[inline] + pub fn inter_unnamed_field_expression( + &mut self, + unnamed_field_expression: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.unnamed_field_expression_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.unnamed_field_expression.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.unnamed_field_expression.push(None); + _index + }; + + let unnamed_field_expression = unnamed_field_expression(_index); + + if let Some(Some(unnamed_field_expression)) = + self.unnamed_field_expression.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *unnamed_field_expression.borrow() + } else { + false + } + }) + { + log::debug!(target: "store", "found duplicate {unnamed_field_expression:?}."); + self.unnamed_field_expression_free_list.push(_index); + unnamed_field_expression.clone() + } else { + log::debug!(target: "store", "interring {unnamed_field_expression:?}."); + self.unnamed_field_expression[_index] = Some(unnamed_field_expression.clone()); + unnamed_field_expression + } + } + + /// Exhume (get) [`UnnamedFieldExpression`] from the store. + /// + #[inline] + pub fn exhume_unnamed_field_expression( + &self, + id: &usize, + ) -> Option>> { + match self.unnamed_field_expression.get(*id) { + Some(unnamed_field_expression) => unnamed_field_expression.clone(), + None => None, + } + } + + /// Exorcise (remove) [`UnnamedFieldExpression`] from the store. + /// + #[inline] + pub fn exorcise_unnamed_field_expression( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising unnamed_field_expression slot: {id}."); + let result = self.unnamed_field_expression[*id].take(); + self.unnamed_field_expression_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, UnnamedFieldExpression>`. + /// + #[inline] + pub fn iter_unnamed_field_expression( + &self, + ) -> impl Iterator>> + '_ { + let len = self.unnamed_field_expression.len(); + (0..len) + .filter(|i| self.unnamed_field_expression[*i].is_some()) + .map(move |i| { + self.unnamed_field_expression[i] + .as_ref() + .map(|unnamed_field_expression| unnamed_field_expression.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`XValue`] into the store. + /// + #[inline] + pub fn inter_x_value(&mut self, x_value: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.x_value_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.x_value.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.x_value.push(None); + _index + }; + + let x_value = x_value(_index); + + if let Some(Some(x_value)) = self.x_value.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *x_value.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {x_value:?}."); + self.x_value_free_list.push(_index); + x_value.clone() + } else { + log::debug!(target: "store", "interring {x_value:?}."); + self.x_value[_index] = Some(x_value.clone()); + x_value + } + } + + /// Exhume (get) [`XValue`] from the store. + /// + #[inline] + pub fn exhume_x_value(&self, id: &usize) -> Option>> { + match self.x_value.get(*id) { + Some(x_value) => x_value.clone(), + None => None, + } + } + + /// Exorcise (remove) [`XValue`] from the store. + /// + #[inline] + pub fn exorcise_x_value(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising x_value slot: {id}."); + let result = self.x_value[*id].take(); + self.x_value_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, XValue>`. + /// + #[inline] + pub fn iter_x_value(&self) -> impl Iterator>> + '_ { + let len = self.x_value.len(); + (0..len) + .filter(|i| self.x_value[*i].is_some()) + .map(move |i| { + self.x_value[i] + .as_ref() + .map(|x_value| x_value.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`ValueType`] into the store. + /// + #[inline] + pub fn inter_value_type(&mut self, value_type: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.value_type_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.value_type.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.value_type.push(None); + _index + }; + + let value_type = value_type(_index); + + if let Some(Some(value_type)) = self.value_type.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *value_type.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {value_type:?}."); + self.value_type_free_list.push(_index); + value_type.clone() + } else { + log::debug!(target: "store", "interring {value_type:?}."); + self.value_type[_index] = Some(value_type.clone()); + value_type + } + } + + /// Exhume (get) [`ValueType`] from the store. + /// + #[inline] + pub fn exhume_value_type(&self, id: &usize) -> Option>> { + match self.value_type.get(*id) { + Some(value_type) => value_type.clone(), + None => None, + } + } + + /// Exorcise (remove) [`ValueType`] from the store. + /// + #[inline] + pub fn exorcise_value_type(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising value_type slot: {id}."); + let result = self.value_type[*id].take(); + self.value_type_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, ValueType>`. + /// + #[inline] + pub fn iter_value_type(&self) -> impl Iterator>> + '_ { + let len = self.value_type.len(); + (0..len) + .filter(|i| self.value_type[*i].is_some()) + .map(move |i| { + self.value_type[i] + .as_ref() + .map(|value_type| value_type.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`Variable`] into the store. + /// + #[inline] + pub fn inter_variable(&mut self, variable: F) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.variable_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.variable.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.variable.push(None); + _index + }; + + let variable = variable(_index); + + if let Some(Some(variable)) = self.variable.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *variable.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {variable:?}."); + self.variable_free_list.push(_index); + variable.clone() + } else { + log::debug!(target: "store", "interring {variable:?}."); + self.variable[_index] = Some(variable.clone()); + variable + } + } + + /// Exhume (get) [`Variable`] from the store. + /// + #[inline] + pub fn exhume_variable(&self, id: &usize) -> Option>> { + match self.variable.get(*id) { + Some(variable) => variable.clone(), + None => None, + } + } + + /// Exorcise (remove) [`Variable`] from the store. + /// + #[inline] + pub fn exorcise_variable(&mut self, id: &usize) -> Option>> { + log::debug!(target: "store", "exorcising variable slot: {id}."); + let result = self.variable[*id].take(); + self.variable_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, Variable>`. + /// + #[inline] + pub fn iter_variable(&self) -> impl Iterator>> + '_ { + let len = self.variable.len(); + (0..len) + .filter(|i| self.variable[*i].is_some()) + .map(move |i| { + self.variable[i] + .as_ref() + .map(|variable| variable.clone()) + .unwrap() + }) + } + + /// Inter (insert) [`VariableExpression`] into the store. + /// + #[inline] + pub fn inter_variable_expression( + &mut self, + variable_expression: F, + ) -> Rc> + where + F: Fn(usize) -> Rc>, + { + let _index = if let Some(_index) = self.variable_expression_free_list.pop() { + log::trace!(target: "store", "recycling block {_index}."); + _index + } else { + let _index = self.variable_expression.len(); + log::trace!(target: "store", "allocating block {_index}."); + self.variable_expression.push(None); + _index + }; + + let variable_expression = variable_expression(_index); + + if let Some(Some(variable_expression)) = self.variable_expression.iter().find(|stored| { + if let Some(stored) = stored { + *stored.borrow() == *variable_expression.borrow() + } else { + false + } + }) { + log::debug!(target: "store", "found duplicate {variable_expression:?}."); + self.variable_expression_free_list.push(_index); + variable_expression.clone() + } else { + log::debug!(target: "store", "interring {variable_expression:?}."); + self.variable_expression[_index] = Some(variable_expression.clone()); + variable_expression + } + } + + /// Exhume (get) [`VariableExpression`] from the store. + /// + #[inline] + pub fn exhume_variable_expression( + &self, + id: &usize, + ) -> Option>> { + match self.variable_expression.get(*id) { + Some(variable_expression) => variable_expression.clone(), + None => None, + } + } + + /// Exorcise (remove) [`VariableExpression`] from the store. + /// + #[inline] + pub fn exorcise_variable_expression( + &mut self, + id: &usize, + ) -> Option>> { + log::debug!(target: "store", "exorcising variable_expression slot: {id}."); + let result = self.variable_expression[*id].take(); + self.variable_expression_free_list.push(*id); + result + } + + /// Get an iterator over the internal `HashMap<&Uuid, VariableExpression>`. + /// + #[inline] + pub fn iter_variable_expression( + &self, + ) -> impl Iterator>> + '_ { + let len = self.variable_expression.len(); + (0..len) + .filter(|i| self.variable_expression[*i].is_some()) + .map(move |i| { + self.variable_expression[i] + .as_ref() + .map(|variable_expression| variable_expression.clone()) + .unwrap() + }) + } + + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"v2::lu_dog_vec_tracy-object-store-persistence"}}} + /// Persist the store. + /// + /// The store is persisted as a a bincode file. + pub fn persist_bincode>(&self, path: P) -> io::Result<()> { + let path = path.as_ref(); + let mut bin_file = fs::File::create(path)?; + let encoded: Vec = bincode::serialize(&self).unwrap(); + bin_file.write_all(&encoded)?; + Ok(()) + } + + /// Persist the store. + /// + /// The store is persisted as a directory of JSON files. The intention + /// is that this directory can be checked into version control. + /// In fact, I intend to add automagic git integration as an option. + pub fn persist>(&self, path: P) -> io::Result<()> { + let path = path.as_ref(); + fs::create_dir_all(path)?; + + let path = path.join("lu_dog.json"); + fs::create_dir_all(&path)?; + + // Persist Argument. + { + let path = path.join("argument"); + fs::create_dir_all(&path)?; + for argument in &self.argument { + if let Some(argument) = argument { + let path = path.join(format!("{}.json", argument.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &argument)?; + } + } + } + + // Persist Await. + { + let path = path.join("a_wait"); + fs::create_dir_all(&path)?; + for a_wait in &self.a_wait { + if let Some(a_wait) = a_wait { + let path = path.join(format!("{}.json", a_wait.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &a_wait)?; + } + } + } + + // Persist Binary. + { + let path = path.join("binary"); + fs::create_dir_all(&path)?; + for binary in &self.binary { + if let Some(binary) = binary { + let path = path.join(format!("{}.json", binary.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &binary)?; + } + } + } + + // Persist Block. + { + let path = path.join("block"); + fs::create_dir_all(&path)?; + for block in &self.block { + if let Some(block) = block { + let path = path.join(format!("{}.json", block.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &block)?; + } + } + } + + // Persist Body. + { + let path = path.join("body"); + fs::create_dir_all(&path)?; + for body in &self.body { + if let Some(body) = body { + let path = path.join(format!("{}.json", body.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &body)?; + } + } + } + + // Persist Boolean Literal. + { + let path = path.join("boolean_literal"); + fs::create_dir_all(&path)?; + for boolean_literal in &self.boolean_literal { + if let Some(boolean_literal) = boolean_literal { + let path = path.join(format!("{}.json", boolean_literal.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &boolean_literal)?; + } + } + } + + // Persist Boolean Operator. + { + let path = path.join("boolean_operator"); + fs::create_dir_all(&path)?; + for boolean_operator in &self.boolean_operator { + if let Some(boolean_operator) = boolean_operator { + let path = path.join(format!("{}.json", boolean_operator.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &boolean_operator)?; + } + } + } + + // Persist Call. + { + let path = path.join("call"); + fs::create_dir_all(&path)?; + for call in &self.call { + if let Some(call) = call { + let path = path.join(format!("{}.json", call.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &call)?; + } + } + } + + // Persist Comparison. + { + let path = path.join("comparison"); + fs::create_dir_all(&path)?; + for comparison in &self.comparison { + if let Some(comparison) = comparison { + let path = path.join(format!("{}.json", comparison.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &comparison)?; + } + } + } + + // Persist Data Structure. + { + let path = path.join("data_structure"); + fs::create_dir_all(&path)?; + for data_structure in &self.data_structure { + if let Some(data_structure) = data_structure { + let path = path.join(format!("{}.json", data_structure.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &data_structure)?; + } + } + } + + // Persist Dwarf Source File. + { + let path = path.join("dwarf_source_file"); + fs::create_dir_all(&path)?; + for dwarf_source_file in &self.dwarf_source_file { + if let Some(dwarf_source_file) = dwarf_source_file { + let path = path.join(format!("{}.json", dwarf_source_file.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &dwarf_source_file)?; + } + } + } + + // Persist Enum Field. + { + let path = path.join("enum_field"); + fs::create_dir_all(&path)?; + for enum_field in &self.enum_field { + if let Some(enum_field) = enum_field { + let path = path.join(format!("{}.json", enum_field.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &enum_field)?; + } + } + } + + // Persist Enumeration. + { + let path = path.join("enumeration"); + fs::create_dir_all(&path)?; + for enumeration in &self.enumeration { + if let Some(enumeration) = enumeration { + let path = path.join(format!("{}.json", enumeration.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &enumeration)?; + } + } + } + + // Persist Expression. + { + let path = path.join("expression"); + fs::create_dir_all(&path)?; + for expression in &self.expression { + if let Some(expression) = expression { + let path = path.join(format!("{}.json", expression.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &expression)?; + } + } + } + + // Persist Expression Statement. + { + let path = path.join("expression_statement"); + fs::create_dir_all(&path)?; + for expression_statement in &self.expression_statement { + if let Some(expression_statement) = expression_statement { + let path = path.join(format!("{}.json", expression_statement.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &expression_statement)?; + } + } + } + + // Persist External Implementation. + { + let path = path.join("external_implementation"); + fs::create_dir_all(&path)?; + for external_implementation in &self.external_implementation { + if let Some(external_implementation) = external_implementation { + let path = path.join(format!("{}.json", external_implementation.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &external_implementation)?; + } + } + } + + // Persist Field. + { + let path = path.join("field"); + fs::create_dir_all(&path)?; + for field in &self.field { + if let Some(field) = field { + let path = path.join(format!("{}.json", field.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &field)?; + } + } + } + + // Persist Field Access. + { + let path = path.join("field_access"); + fs::create_dir_all(&path)?; + for field_access in &self.field_access { + if let Some(field_access) = field_access { + let path = path.join(format!("{}.json", field_access.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &field_access)?; + } + } + } + + // Persist Field Access Target. + { + let path = path.join("field_access_target"); + fs::create_dir_all(&path)?; + for field_access_target in &self.field_access_target { + if let Some(field_access_target) = field_access_target { + let path = path.join(format!("{}.json", field_access_target.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &field_access_target)?; + } + } + } + + // Persist Field Expression. + { + let path = path.join("field_expression"); + fs::create_dir_all(&path)?; + for field_expression in &self.field_expression { + if let Some(field_expression) = field_expression { + let path = path.join(format!("{}.json", field_expression.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &field_expression)?; + } + } + } + + // Persist Float Literal. + { + let path = path.join("float_literal"); + fs::create_dir_all(&path)?; + for float_literal in &self.float_literal { + if let Some(float_literal) = float_literal { + let path = path.join(format!("{}.json", float_literal.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &float_literal)?; + } + } + } + + // Persist For Loop. + { + let path = path.join("for_loop"); + fs::create_dir_all(&path)?; + for for_loop in &self.for_loop { + if let Some(for_loop) = for_loop { + let path = path.join(format!("{}.json", for_loop.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &for_loop)?; + } + } + } + + // Persist Function. + { + let path = path.join("function"); + fs::create_dir_all(&path)?; + for function in &self.function { + if let Some(function) = function { + let path = path.join(format!("{}.json", function.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &function)?; + } + } + } + + // Persist Future. + { + let path = path.join("x_future"); + fs::create_dir_all(&path)?; + for x_future in &self.x_future { + if let Some(x_future) = x_future { + let path = path.join(format!("{}.json", x_future.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &x_future)?; + } + } + } + + // Persist Generic. + { + let path = path.join("generic"); + fs::create_dir_all(&path)?; + for generic in &self.generic { + if let Some(generic) = generic { + let path = path.join(format!("{}.json", generic.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &generic)?; + } + } + } + + // Persist Grouped. + { + let path = path.join("grouped"); + fs::create_dir_all(&path)?; + for grouped in &self.grouped { + if let Some(grouped) = grouped { + let path = path.join(format!("{}.json", grouped.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &grouped)?; + } + } + } + + // Persist If. + { + let path = path.join("x_if"); + fs::create_dir_all(&path)?; + for x_if in &self.x_if { + if let Some(x_if) = x_if { + let path = path.join(format!("{}.json", x_if.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &x_if)?; + } + } + } + + // Persist Implementation Block. + { + let path = path.join("implementation_block"); + fs::create_dir_all(&path)?; + for implementation_block in &self.implementation_block { + if let Some(implementation_block) = implementation_block { + let path = path.join(format!("{}.json", implementation_block.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &implementation_block)?; + } + } + } + + // Persist Import. + { + let path = path.join("import"); + fs::create_dir_all(&path)?; + for import in &self.import { + if let Some(import) = import { + let path = path.join(format!("{}.json", import.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &import)?; + } + } + } + + // Persist Index. + { + let path = path.join("index"); + fs::create_dir_all(&path)?; + for index in &self.index { + if let Some(index) = index { + let path = path.join(format!("{}.json", index.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &index)?; + } + } + } + + // Persist Integer Literal. + { + let path = path.join("integer_literal"); + fs::create_dir_all(&path)?; + for integer_literal in &self.integer_literal { + if let Some(integer_literal) = integer_literal { + let path = path.join(format!("{}.json", integer_literal.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &integer_literal)?; + } + } + } + + // Persist Item. + { + let path = path.join("item"); + fs::create_dir_all(&path)?; + for item in &self.item { + if let Some(item) = item { + let path = path.join(format!("{}.json", item.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &item)?; + } + } + } + + // Persist Lambda. + { + let path = path.join("lambda"); + fs::create_dir_all(&path)?; + for lambda in &self.lambda { + if let Some(lambda) = lambda { + let path = path.join(format!("{}.json", lambda.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &lambda)?; + } + } + } + + // Persist Lambda Parameter. + { + let path = path.join("lambda_parameter"); + fs::create_dir_all(&path)?; + for lambda_parameter in &self.lambda_parameter { + if let Some(lambda_parameter) = lambda_parameter { + let path = path.join(format!("{}.json", lambda_parameter.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &lambda_parameter)?; + } + } + } + + // Persist Let Statement. + { + let path = path.join("let_statement"); + fs::create_dir_all(&path)?; + for let_statement in &self.let_statement { + if let Some(let_statement) = let_statement { + let path = path.join(format!("{}.json", let_statement.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &let_statement)?; + } + } + } + + // Persist List. + { + let path = path.join("list"); + fs::create_dir_all(&path)?; + for list in &self.list { + if let Some(list) = list { + let path = path.join(format!("{}.json", list.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &list)?; + } + } + } + + // Persist List Element. + { + let path = path.join("list_element"); + fs::create_dir_all(&path)?; + for list_element in &self.list_element { + if let Some(list_element) = list_element { + let path = path.join(format!("{}.json", list_element.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &list_element)?; + } + } + } + + // Persist List Expression. + { + let path = path.join("list_expression"); + fs::create_dir_all(&path)?; + for list_expression in &self.list_expression { + if let Some(list_expression) = list_expression { + let path = path.join(format!("{}.json", list_expression.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &list_expression)?; + } + } + } + + // Persist Literal. + { + let path = path.join("literal"); + fs::create_dir_all(&path)?; + for literal in &self.literal { + if let Some(literal) = literal { + let path = path.join(format!("{}.json", literal.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &literal)?; + } + } + } + + // Persist Local Variable. + { + let path = path.join("local_variable"); + fs::create_dir_all(&path)?; + for local_variable in &self.local_variable { + if let Some(local_variable) = local_variable { + let path = path.join(format!("{}.json", local_variable.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &local_variable)?; + } + } + } + + // Persist Macro. + { + let path = path.join("x_macro"); + fs::create_dir_all(&path)?; + for x_macro in &self.x_macro { + if let Some(x_macro) = x_macro { + let path = path.join(format!("{}.json", x_macro.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &x_macro)?; + } + } + } + + // Persist Match. + { + let path = path.join("x_match"); + fs::create_dir_all(&path)?; + for x_match in &self.x_match { + if let Some(x_match) = x_match { + let path = path.join(format!("{}.json", x_match.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &x_match)?; + } + } + } + + // Persist Method Call. + { + let path = path.join("method_call"); + fs::create_dir_all(&path)?; + for method_call in &self.method_call { + if let Some(method_call) = method_call { + let path = path.join(format!("{}.json", method_call.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &method_call)?; + } + } + } + + // Persist Named Field Expression. + { + let path = path.join("named_field_expression"); + fs::create_dir_all(&path)?; + for named_field_expression in &self.named_field_expression { + if let Some(named_field_expression) = named_field_expression { + let path = path.join(format!("{}.json", named_field_expression.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &named_field_expression)?; + } + } + } + + // Persist Object Store. + { + let path = path.join("z_object_store"); + fs::create_dir_all(&path)?; + for z_object_store in &self.z_object_store { + if let Some(z_object_store) = z_object_store { + let path = path.join(format!("{}.json", z_object_store.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &z_object_store)?; + } + } + } + + // Persist Object Wrapper. + { + let path = path.join("object_wrapper"); + fs::create_dir_all(&path)?; + for object_wrapper in &self.object_wrapper { + if let Some(object_wrapper) = object_wrapper { + let path = path.join(format!("{}.json", object_wrapper.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &object_wrapper)?; + } + } + } + + // Persist Operator. + { + let path = path.join("operator"); + fs::create_dir_all(&path)?; + for operator in &self.operator { + if let Some(operator) = operator { + let path = path.join(format!("{}.json", operator.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &operator)?; + } + } + } + + // Persist Parameter. + { + let path = path.join("parameter"); + fs::create_dir_all(&path)?; + for parameter in &self.parameter { + if let Some(parameter) = parameter { + let path = path.join(format!("{}.json", parameter.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, ¶meter)?; + } + } + } + + // Persist Path. + { + let path = path.join("x_path"); + fs::create_dir_all(&path)?; + for x_path in &self.x_path { + if let Some(x_path) = x_path { + let path = path.join(format!("{}.json", x_path.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &x_path)?; + } + } + } + + // Persist Path Element. + { + let path = path.join("path_element"); + fs::create_dir_all(&path)?; + for path_element in &self.path_element { + if let Some(path_element) = path_element { + let path = path.join(format!("{}.json", path_element.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &path_element)?; + } + } + } + + // Persist Pattern. + { + let path = path.join("pattern"); + fs::create_dir_all(&path)?; + for pattern in &self.pattern { + if let Some(pattern) = pattern { + let path = path.join(format!("{}.json", pattern.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &pattern)?; + } + } + } + + // Persist Plugin. + { + let path = path.join("plugin"); + fs::create_dir_all(&path)?; + for plugin in &self.plugin { + if let Some(plugin) = plugin { + let path = path.join(format!("{}.json", plugin.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &plugin)?; + } + } + } + + // Persist Print. + { + let path = path.join("x_print"); + fs::create_dir_all(&path)?; + for x_print in &self.x_print { + if let Some(x_print) = x_print { + let path = path.join(format!("{}.json", x_print.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &x_print)?; + } + } + } + + // Persist Range Expression. + { + let path = path.join("range_expression"); + fs::create_dir_all(&path)?; + for range_expression in &self.range_expression { + if let Some(range_expression) = range_expression { + let path = path.join(format!("{}.json", range_expression.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &range_expression)?; + } + } + } + + // Persist Result Statement. + { + let path = path.join("result_statement"); + fs::create_dir_all(&path)?; + for result_statement in &self.result_statement { + if let Some(result_statement) = result_statement { + let path = path.join(format!("{}.json", result_statement.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &result_statement)?; + } + } + } + + // Persist Return. + { + let path = path.join("x_return"); + fs::create_dir_all(&path)?; + for x_return in &self.x_return { + if let Some(x_return) = x_return { + let path = path.join(format!("{}.json", x_return.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &x_return)?; + } + } + } + + // Persist Span. + { + let path = path.join("span"); + fs::create_dir_all(&path)?; + for span in &self.span { + if let Some(span) = span { + let path = path.join(format!("{}.json", span.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &span)?; + } + } + } + + // Persist Statement. + { + let path = path.join("statement"); + fs::create_dir_all(&path)?; + for statement in &self.statement { + if let Some(statement) = statement { + let path = path.join(format!("{}.json", statement.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &statement)?; + } + } + } + + // Persist Static Method Call. + { + let path = path.join("static_method_call"); + fs::create_dir_all(&path)?; + for static_method_call in &self.static_method_call { + if let Some(static_method_call) = static_method_call { + let path = path.join(format!("{}.json", static_method_call.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &static_method_call)?; + } + } + } + + // Persist String Literal. + { + let path = path.join("string_literal"); + fs::create_dir_all(&path)?; + for string_literal in &self.string_literal { + if let Some(string_literal) = string_literal { + let path = path.join(format!("{}.json", string_literal.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &string_literal)?; + } + } + } + + // Persist Struct. + { + let path = path.join("woog_struct"); + fs::create_dir_all(&path)?; + for woog_struct in &self.woog_struct { + if let Some(woog_struct) = woog_struct { + let path = path.join(format!("{}.json", woog_struct.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &woog_struct)?; + } + } + } + + // Persist Struct Expression. + { + let path = path.join("struct_expression"); + fs::create_dir_all(&path)?; + for struct_expression in &self.struct_expression { + if let Some(struct_expression) = struct_expression { + let path = path.join(format!("{}.json", struct_expression.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &struct_expression)?; + } + } + } + + // Persist Struct Field. + { + let path = path.join("struct_field"); + fs::create_dir_all(&path)?; + for struct_field in &self.struct_field { + if let Some(struct_field) = struct_field { + let path = path.join(format!("{}.json", struct_field.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &struct_field)?; + } + } + } + + // Persist Struct Generic. + { + let path = path.join("struct_generic"); + fs::create_dir_all(&path)?; + for struct_generic in &self.struct_generic { + if let Some(struct_generic) = struct_generic { + let path = path.join(format!("{}.json", struct_generic.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &struct_generic)?; + } + } + } + + // Persist Tuple Field. + { + let path = path.join("tuple_field"); + fs::create_dir_all(&path)?; + for tuple_field in &self.tuple_field { + if let Some(tuple_field) = tuple_field { + let path = path.join(format!("{}.json", tuple_field.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &tuple_field)?; + } + } + } + + // Persist Type Cast. + { + let path = path.join("type_cast"); + fs::create_dir_all(&path)?; + for type_cast in &self.type_cast { + if let Some(type_cast) = type_cast { + let path = path.join(format!("{}.json", type_cast.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &type_cast)?; + } + } + } + + // Persist Unary. + { + let path = path.join("unary"); + fs::create_dir_all(&path)?; + for unary in &self.unary { + if let Some(unary) = unary { + let path = path.join(format!("{}.json", unary.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &unary)?; + } + } + } + + // Persist Unit. + { + let path = path.join("unit"); + fs::create_dir_all(&path)?; + for unit in &self.unit { + if let Some(unit) = unit { + let path = path.join(format!("{}.json", unit.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &unit)?; + } + } + } + + // Persist Unnamed Field Expression. + { + let path = path.join("unnamed_field_expression"); + fs::create_dir_all(&path)?; + for unnamed_field_expression in &self.unnamed_field_expression { + if let Some(unnamed_field_expression) = unnamed_field_expression { + let path = path.join(format!("{}.json", unnamed_field_expression.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &unnamed_field_expression)?; + } + } + } + + // Persist Value. + { + let path = path.join("x_value"); + fs::create_dir_all(&path)?; + for x_value in &self.x_value { + if let Some(x_value) = x_value { + let path = path.join(format!("{}.json", x_value.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &x_value)?; + } + } + } + + // Persist Value Type. + { + let path = path.join("value_type"); + fs::create_dir_all(&path)?; + for value_type in &self.value_type { + if let Some(value_type) = value_type { + let path = path.join(format!("{}.json", value_type.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &value_type)?; + } + } + } + + // Persist Variable. + { + let path = path.join("variable"); + fs::create_dir_all(&path)?; + for variable in &self.variable { + if let Some(variable) = variable { + let path = path.join(format!("{}.json", variable.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &variable)?; + } + } + } + + // Persist Variable Expression. + { + let path = path.join("variable_expression"); + fs::create_dir_all(&path)?; + for variable_expression in &self.variable_expression { + if let Some(variable_expression) = variable_expression { + let path = path.join(format!("{}.json", variable_expression.borrow().id)); + let file = fs::File::create(path)?; + let mut writer = io::BufWriter::new(file); + serde_json::to_writer_pretty(&mut writer, &variable_expression)?; + } + } + } + + Ok(()) + } + + /// Load the store. + /// + pub fn from_bincode(code: &[u8]) -> io::Result { + Ok(bincode::deserialize(code).unwrap()) + } + + /// The store is as a bincode file. + pub fn load_bincode>(path: P) -> io::Result { + let path = path.as_ref(); + let bin_file = fs::File::open(path)?; + Ok(bincode::deserialize_from(bin_file).unwrap()) + } + + /// Load the store. + /// + /// The store is persisted as a directory of JSON files. The intention + /// is that this directory can be checked into version control. + /// In fact, I intend to add automagic git integration as an option. + pub fn load>(path: P) -> io::Result { + let path = path.as_ref(); + let path = path.join("lu_dog.json"); + + let mut store = Self::new(); + + // Load Argument. + { + let path = path.join("argument"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let argument: Rc> = serde_json::from_reader(reader)?; + store + .argument + .insert(argument.borrow().id, Some(argument.clone())); + } + } + + // Load Await. + { + let path = path.join("a_wait"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let a_wait: Rc> = serde_json::from_reader(reader)?; + store + .a_wait + .insert(a_wait.borrow().id, Some(a_wait.clone())); + } + } + + // Load Binary. + { + let path = path.join("binary"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let binary: Rc> = serde_json::from_reader(reader)?; + store + .binary + .insert(binary.borrow().id, Some(binary.clone())); + } + } + + // Load Block. + { + let path = path.join("block"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let block: Rc> = serde_json::from_reader(reader)?; + store.block.insert(block.borrow().id, Some(block.clone())); + } + } + + // Load Body. + { + let path = path.join("body"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let body: Rc> = serde_json::from_reader(reader)?; + store.body.insert(body.borrow().id, Some(body.clone())); + } + } + + // Load Boolean Literal. + { + let path = path.join("boolean_literal"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let boolean_literal: Rc> = serde_json::from_reader(reader)?; + store + .boolean_literal + .insert(boolean_literal.borrow().id, Some(boolean_literal.clone())); + } + } + + // Load Boolean Operator. + { + let path = path.join("boolean_operator"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let boolean_operator: Rc> = + serde_json::from_reader(reader)?; + store + .boolean_operator + .insert(boolean_operator.borrow().id, Some(boolean_operator.clone())); + } + } + + // Load Call. + { + let path = path.join("call"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let call: Rc> = serde_json::from_reader(reader)?; + store.call.insert(call.borrow().id, Some(call.clone())); + } + } + + // Load Comparison. + { + let path = path.join("comparison"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let comparison: Rc> = serde_json::from_reader(reader)?; + store + .comparison + .insert(comparison.borrow().id, Some(comparison.clone())); + } + } + + // Load Data Structure. + { + let path = path.join("data_structure"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let data_structure: Rc> = serde_json::from_reader(reader)?; + store + .data_structure + .insert(data_structure.borrow().id, Some(data_structure.clone())); + } + } + + // Load Dwarf Source File. + { + let path = path.join("dwarf_source_file"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let dwarf_source_file: Rc> = + serde_json::from_reader(reader)?; + store.dwarf_source_file.insert( + dwarf_source_file.borrow().id, + Some(dwarf_source_file.clone()), + ); + } + } + + // Load Enum Field. + { + let path = path.join("enum_field"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let enum_field: Rc> = serde_json::from_reader(reader)?; + store + .enum_field + .insert(enum_field.borrow().id, Some(enum_field.clone())); + } + } + + // Load Enumeration. + { + let path = path.join("enumeration"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let enumeration: Rc> = serde_json::from_reader(reader)?; + store.enumeration_id_by_name.insert( + enumeration.borrow().name.to_owned(), + enumeration.borrow().id, + ); + store + .enumeration + .insert(enumeration.borrow().id, Some(enumeration.clone())); + } + } + + // Load Expression. + { + let path = path.join("expression"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let expression: Rc> = serde_json::from_reader(reader)?; + store + .expression + .insert(expression.borrow().id, Some(expression.clone())); + } + } + + // Load Expression Statement. + { + let path = path.join("expression_statement"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let expression_statement: Rc> = + serde_json::from_reader(reader)?; + store.expression_statement.insert( + expression_statement.borrow().id, + Some(expression_statement.clone()), + ); + } + } + + // Load External Implementation. + { + let path = path.join("external_implementation"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let external_implementation: Rc> = + serde_json::from_reader(reader)?; + store.external_implementation.insert( + external_implementation.borrow().id, + Some(external_implementation.clone()), + ); + } + } + + // Load Field. + { + let path = path.join("field"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let field: Rc> = serde_json::from_reader(reader)?; + store + .field_id_by_name + .insert(field.borrow().name.to_owned(), field.borrow().id); + store.field.insert(field.borrow().id, Some(field.clone())); + } + } + + // Load Field Access. + { + let path = path.join("field_access"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let field_access: Rc> = serde_json::from_reader(reader)?; + store + .field_access + .insert(field_access.borrow().id, Some(field_access.clone())); + } + } + + // Load Field Access Target. + { + let path = path.join("field_access_target"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let field_access_target: Rc> = + serde_json::from_reader(reader)?; + store.field_access_target.insert( + field_access_target.borrow().id, + Some(field_access_target.clone()), + ); + } + } + + // Load Field Expression. + { + let path = path.join("field_expression"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let field_expression: Rc> = + serde_json::from_reader(reader)?; + store + .field_expression + .insert(field_expression.borrow().id, Some(field_expression.clone())); + } + } + + // Load Float Literal. + { + let path = path.join("float_literal"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let float_literal: Rc> = serde_json::from_reader(reader)?; + store + .float_literal + .insert(float_literal.borrow().id, Some(float_literal.clone())); + } + } + + // Load For Loop. + { + let path = path.join("for_loop"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let for_loop: Rc> = serde_json::from_reader(reader)?; + store + .for_loop + .insert(for_loop.borrow().id, Some(for_loop.clone())); + } + } + + // Load Function. + { + let path = path.join("function"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let function: Rc> = serde_json::from_reader(reader)?; + store + .function_id_by_name + .insert(function.borrow().name.to_owned(), function.borrow().id); + store + .function + .insert(function.borrow().id, Some(function.clone())); + } + } + + // Load Future. + { + let path = path.join("x_future"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let x_future: Rc> = serde_json::from_reader(reader)?; + store + .x_future + .insert(x_future.borrow().id, Some(x_future.clone())); + } + } + + // Load Generic. + { + let path = path.join("generic"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let generic: Rc> = serde_json::from_reader(reader)?; + store + .generic + .insert(generic.borrow().id, Some(generic.clone())); + } + } + + // Load Grouped. + { + let path = path.join("grouped"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let grouped: Rc> = serde_json::from_reader(reader)?; + store + .grouped + .insert(grouped.borrow().id, Some(grouped.clone())); + } + } + + // Load If. + { + let path = path.join("x_if"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let x_if: Rc> = serde_json::from_reader(reader)?; + store.x_if.insert(x_if.borrow().id, Some(x_if.clone())); + } + } + + // Load Implementation Block. + { + let path = path.join("implementation_block"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let implementation_block: Rc> = + serde_json::from_reader(reader)?; + store.implementation_block.insert( + implementation_block.borrow().id, + Some(implementation_block.clone()), + ); + } + } + + // Load Import. + { + let path = path.join("import"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let import: Rc> = serde_json::from_reader(reader)?; + store + .import + .insert(import.borrow().id, Some(import.clone())); + } + } + + // Load Index. + { + let path = path.join("index"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let index: Rc> = serde_json::from_reader(reader)?; + store.index.insert(index.borrow().id, Some(index.clone())); + } + } + + // Load Integer Literal. + { + let path = path.join("integer_literal"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let integer_literal: Rc> = serde_json::from_reader(reader)?; + store + .integer_literal + .insert(integer_literal.borrow().id, Some(integer_literal.clone())); + } + } + + // Load Item. + { + let path = path.join("item"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let item: Rc> = serde_json::from_reader(reader)?; + store.item.insert(item.borrow().id, Some(item.clone())); + } + } + + // Load Lambda. + { + let path = path.join("lambda"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let lambda: Rc> = serde_json::from_reader(reader)?; + store + .lambda + .insert(lambda.borrow().id, Some(lambda.clone())); + } + } + + // Load Lambda Parameter. + { + let path = path.join("lambda_parameter"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let lambda_parameter: Rc> = + serde_json::from_reader(reader)?; + store + .lambda_parameter + .insert(lambda_parameter.borrow().id, Some(lambda_parameter.clone())); + } + } + + // Load Let Statement. + { + let path = path.join("let_statement"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let let_statement: Rc> = serde_json::from_reader(reader)?; + store + .let_statement + .insert(let_statement.borrow().id, Some(let_statement.clone())); + } + } + + // Load List. + { + let path = path.join("list"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let list: Rc> = serde_json::from_reader(reader)?; + store.list.insert(list.borrow().id, Some(list.clone())); + } + } + + // Load List Element. + { + let path = path.join("list_element"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let list_element: Rc> = serde_json::from_reader(reader)?; + store + .list_element + .insert(list_element.borrow().id, Some(list_element.clone())); + } + } + + // Load List Expression. + { + let path = path.join("list_expression"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let list_expression: Rc> = serde_json::from_reader(reader)?; + store + .list_expression + .insert(list_expression.borrow().id, Some(list_expression.clone())); + } + } + + // Load Literal. + { + let path = path.join("literal"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let literal: Rc> = serde_json::from_reader(reader)?; + store + .literal + .insert(literal.borrow().id, Some(literal.clone())); + } + } + + // Load Local Variable. + { + let path = path.join("local_variable"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let local_variable: Rc> = serde_json::from_reader(reader)?; + store + .local_variable + .insert(local_variable.borrow().id, Some(local_variable.clone())); + } + } + + // Load Macro. + { + let path = path.join("x_macro"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let x_macro: Rc> = serde_json::from_reader(reader)?; + store + .x_macro + .insert(x_macro.borrow().id, Some(x_macro.clone())); + } + } + + // Load Match. + { + let path = path.join("x_match"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let x_match: Rc> = serde_json::from_reader(reader)?; + store + .x_match + .insert(x_match.borrow().id, Some(x_match.clone())); + } + } + + // Load Method Call. + { + let path = path.join("method_call"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let method_call: Rc> = serde_json::from_reader(reader)?; + store + .method_call + .insert(method_call.borrow().id, Some(method_call.clone())); + } + } + + // Load Named Field Expression. + { + let path = path.join("named_field_expression"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let named_field_expression: Rc> = + serde_json::from_reader(reader)?; + store.named_field_expression.insert( + named_field_expression.borrow().id, + Some(named_field_expression.clone()), + ); + } + } + + // Load Object Store. + { + let path = path.join("z_object_store"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let z_object_store: Rc> = serde_json::from_reader(reader)?; + store.z_object_store_id_by_name.insert( + z_object_store.borrow().name.to_owned(), + z_object_store.borrow().id, + ); + store + .z_object_store + .insert(z_object_store.borrow().id, Some(z_object_store.clone())); + } + } + + // Load Object Wrapper. + { + let path = path.join("object_wrapper"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let object_wrapper: Rc> = serde_json::from_reader(reader)?; + store + .object_wrapper + .insert(object_wrapper.borrow().id, Some(object_wrapper.clone())); + } + } + + // Load Operator. + { + let path = path.join("operator"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let operator: Rc> = serde_json::from_reader(reader)?; + store + .operator + .insert(operator.borrow().id, Some(operator.clone())); + } + } + + // Load Parameter. + { + let path = path.join("parameter"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let parameter: Rc> = serde_json::from_reader(reader)?; + store + .parameter + .insert(parameter.borrow().id, Some(parameter.clone())); + } + } + + // Load Path. + { + let path = path.join("x_path"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let x_path: Rc> = serde_json::from_reader(reader)?; + store + .x_path + .insert(x_path.borrow().id, Some(x_path.clone())); + } + } + + // Load Path Element. + { + let path = path.join("path_element"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let path_element: Rc> = serde_json::from_reader(reader)?; + store + .path_element + .insert(path_element.borrow().id, Some(path_element.clone())); + } + } + + // Load Pattern. + { + let path = path.join("pattern"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let pattern: Rc> = serde_json::from_reader(reader)?; + store + .pattern + .insert(pattern.borrow().id, Some(pattern.clone())); + } + } + + // Load Plugin. + { + let path = path.join("plugin"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let plugin: Rc> = serde_json::from_reader(reader)?; + store + .plugin + .insert(plugin.borrow().id, Some(plugin.clone())); + } + } + + // Load Print. + { + let path = path.join("x_print"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let x_print: Rc> = serde_json::from_reader(reader)?; + store + .x_print + .insert(x_print.borrow().id, Some(x_print.clone())); + } + } + + // Load Range Expression. + { + let path = path.join("range_expression"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let range_expression: Rc> = + serde_json::from_reader(reader)?; + store + .range_expression + .insert(range_expression.borrow().id, Some(range_expression.clone())); + } + } + + // Load Result Statement. + { + let path = path.join("result_statement"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let result_statement: Rc> = + serde_json::from_reader(reader)?; + store + .result_statement + .insert(result_statement.borrow().id, Some(result_statement.clone())); + } + } + + // Load Return. + { + let path = path.join("x_return"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let x_return: Rc> = serde_json::from_reader(reader)?; + store + .x_return + .insert(x_return.borrow().id, Some(x_return.clone())); + } + } + + // Load Span. + { + let path = path.join("span"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let span: Rc> = serde_json::from_reader(reader)?; + store.span.insert(span.borrow().id, Some(span.clone())); + } + } + + // Load Statement. + { + let path = path.join("statement"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let statement: Rc> = serde_json::from_reader(reader)?; + store + .statement + .insert(statement.borrow().id, Some(statement.clone())); + } + } + + // Load Static Method Call. + { + let path = path.join("static_method_call"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let static_method_call: Rc> = + serde_json::from_reader(reader)?; + store.static_method_call.insert( + static_method_call.borrow().id, + Some(static_method_call.clone()), + ); + } + } + + // Load String Literal. + { + let path = path.join("string_literal"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let string_literal: Rc> = serde_json::from_reader(reader)?; + store + .string_literal + .insert(string_literal.borrow().id, Some(string_literal.clone())); + } + } + + // Load Struct. + { + let path = path.join("woog_struct"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let woog_struct: Rc> = serde_json::from_reader(reader)?; + store.woog_struct_id_by_name.insert( + woog_struct.borrow().name.to_owned(), + woog_struct.borrow().id, + ); + store + .woog_struct + .insert(woog_struct.borrow().id, Some(woog_struct.clone())); + } + } + + // Load Struct Expression. + { + let path = path.join("struct_expression"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let struct_expression: Rc> = + serde_json::from_reader(reader)?; + store.struct_expression.insert( + struct_expression.borrow().id, + Some(struct_expression.clone()), + ); + } + } + + // Load Struct Field. + { + let path = path.join("struct_field"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let struct_field: Rc> = serde_json::from_reader(reader)?; + store + .struct_field + .insert(struct_field.borrow().id, Some(struct_field.clone())); + } + } + + // Load Struct Generic. + { + let path = path.join("struct_generic"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let struct_generic: Rc> = serde_json::from_reader(reader)?; + store + .struct_generic + .insert(struct_generic.borrow().id, Some(struct_generic.clone())); + } + } + + // Load Tuple Field. + { + let path = path.join("tuple_field"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let tuple_field: Rc> = serde_json::from_reader(reader)?; + store + .tuple_field + .insert(tuple_field.borrow().id, Some(tuple_field.clone())); + } + } + + // Load Type Cast. + { + let path = path.join("type_cast"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let type_cast: Rc> = serde_json::from_reader(reader)?; + store + .type_cast + .insert(type_cast.borrow().id, Some(type_cast.clone())); + } + } + + // Load Unary. + { + let path = path.join("unary"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let unary: Rc> = serde_json::from_reader(reader)?; + store.unary.insert(unary.borrow().id, Some(unary.clone())); + } + } + + // Load Unit. + { + let path = path.join("unit"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let unit: Rc> = serde_json::from_reader(reader)?; + store.unit.insert(unit.borrow().id, Some(unit.clone())); + } + } + + // Load Unnamed Field Expression. + { + let path = path.join("unnamed_field_expression"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let unnamed_field_expression: Rc> = + serde_json::from_reader(reader)?; + store.unnamed_field_expression.insert( + unnamed_field_expression.borrow().id, + Some(unnamed_field_expression.clone()), + ); + } + } + + // Load Value. + { + let path = path.join("x_value"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let x_value: Rc> = serde_json::from_reader(reader)?; + store + .x_value + .insert(x_value.borrow().id, Some(x_value.clone())); + } + } + + // Load Value Type. + { + let path = path.join("value_type"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let value_type: Rc> = serde_json::from_reader(reader)?; + store + .value_type + .insert(value_type.borrow().id, Some(value_type.clone())); + } + } + + // Load Variable. + { + let path = path.join("variable"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let variable: Rc> = serde_json::from_reader(reader)?; + store + .variable + .insert(variable.borrow().id, Some(variable.clone())); + } + } + + // Load Variable Expression. + { + let path = path.join("variable_expression"); + let entries = fs::read_dir(path)?; + for entry in entries { + let entry = entry?; + let path = entry.path(); + let file = fs::File::open(path)?; + let reader = io::BufReader::new(file); + let variable_expression: Rc> = + serde_json::from_reader(reader)?; + store.variable_expression.insert( + variable_expression.borrow().id, + Some(variable_expression.clone()), + ); + } + } + + Ok(store) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} diff --git a/src/v2/lu_dog_vec_tracy/types.rs b/src/v2/lu_dog_vec_tracy/types.rs new file mode 100644 index 00000000..1e3a070d --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types.rs @@ -0,0 +1,266 @@ +//! A blank domain +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"v2::lu_dog_vec_tracy-module-definition-file"}}} +pub mod a_wait; +pub mod addition; +pub mod and; +pub mod argument; +pub mod assignment; +pub mod binary; +pub mod block; +pub mod body; +pub mod boolean_literal; +pub mod boolean_operator; +pub mod call; +pub mod char; +pub mod comparison; +pub mod data_structure; +pub mod debugger; +pub mod division; +pub mod dwarf_source_file; +pub mod empty; +pub mod empty_expression; +pub mod enum_field; +pub mod enumeration; +pub mod equal; +pub mod expression; +pub mod expression_statement; +pub mod external_implementation; +pub mod false_literal; +pub mod field; +pub mod field_access; +pub mod field_access_target; +pub mod field_expression; +pub mod float_literal; +pub mod for_loop; +pub mod from; +pub mod full; +pub mod function; +pub mod function_call; +pub mod generic; +pub mod greater_than; +pub mod greater_than_or_equal; +pub mod grouped; +pub mod implementation_block; +pub mod import; +pub mod inclusive; +pub mod index; +pub mod integer_literal; +pub mod item; +pub mod item_statement; +pub mod lambda; +pub mod lambda_parameter; +pub mod less_than; +pub mod less_than_or_equal; +pub mod let_statement; +pub mod list; +pub mod list_element; +pub mod list_expression; +pub mod literal; +pub mod local_variable; +pub mod macro_call; +pub mod method_call; +pub mod multiplication; +pub mod named_field_expression; +pub mod negation; +pub mod not; +pub mod not_equal; +pub mod object_wrapper; +pub mod operator; +pub mod or; +pub mod parameter; +pub mod path_element; +pub mod pattern; +pub mod plugin; +pub mod range; +pub mod range_expression; +pub mod result_statement; +pub mod span; +pub mod statement; +pub mod static_method_call; +pub mod string_literal; +pub mod struct_expression; +pub mod struct_field; +pub mod struct_generic; +pub mod subtraction; +pub mod task; +pub mod to; +pub mod to_inclusive; +pub mod true_literal; +pub mod tuple_field; +pub mod type_cast; +pub mod unary; +pub mod unit; +pub mod unknown; +pub mod unnamed_field_expression; +pub mod value_type; +pub mod variable; +pub mod variable_expression; +pub mod woog_struct; +pub mod x_future; +pub mod x_if; +pub mod x_macro; +pub mod x_match; +pub mod x_path; +pub mod x_print; +pub mod x_return; +pub mod x_value; +pub mod z_object_store; + +pub use crate::v2::lu_dog_vec_tracy::a_wait::AWait; +pub use crate::v2::lu_dog_vec_tracy::addition::Addition; +pub use crate::v2::lu_dog_vec_tracy::addition::ADDITION; +pub use crate::v2::lu_dog_vec_tracy::and::And; +pub use crate::v2::lu_dog_vec_tracy::and::AND; +pub use crate::v2::lu_dog_vec_tracy::argument::Argument; +pub use crate::v2::lu_dog_vec_tracy::assignment::Assignment; +pub use crate::v2::lu_dog_vec_tracy::assignment::ASSIGNMENT; +pub use crate::v2::lu_dog_vec_tracy::binary::Binary; +pub use crate::v2::lu_dog_vec_tracy::binary::BinaryEnum; +pub use crate::v2::lu_dog_vec_tracy::block::Block; +pub use crate::v2::lu_dog_vec_tracy::body::Body; +pub use crate::v2::lu_dog_vec_tracy::body::BodyEnum; +pub use crate::v2::lu_dog_vec_tracy::boolean_literal::BooleanLiteral; +pub use crate::v2::lu_dog_vec_tracy::boolean_literal::BooleanLiteralEnum; +pub use crate::v2::lu_dog_vec_tracy::boolean_operator::BooleanOperator; +pub use crate::v2::lu_dog_vec_tracy::boolean_operator::BooleanOperatorEnum; +pub use crate::v2::lu_dog_vec_tracy::call::Call; +pub use crate::v2::lu_dog_vec_tracy::call::CallEnum; +pub use crate::v2::lu_dog_vec_tracy::char::Char; +pub use crate::v2::lu_dog_vec_tracy::char::CHAR; +pub use crate::v2::lu_dog_vec_tracy::comparison::Comparison; +pub use crate::v2::lu_dog_vec_tracy::comparison::ComparisonEnum; +pub use crate::v2::lu_dog_vec_tracy::data_structure::DataStructure; +pub use crate::v2::lu_dog_vec_tracy::data_structure::DataStructureEnum; +pub use crate::v2::lu_dog_vec_tracy::debugger::Debugger; +pub use crate::v2::lu_dog_vec_tracy::debugger::DEBUGGER; +pub use crate::v2::lu_dog_vec_tracy::division::Division; +pub use crate::v2::lu_dog_vec_tracy::division::DIVISION; +pub use crate::v2::lu_dog_vec_tracy::dwarf_source_file::DwarfSourceFile; +pub use crate::v2::lu_dog_vec_tracy::empty::Empty; +pub use crate::v2::lu_dog_vec_tracy::empty::EMPTY; +pub use crate::v2::lu_dog_vec_tracy::empty_expression::EmptyExpression; +pub use crate::v2::lu_dog_vec_tracy::empty_expression::EMPTY_EXPRESSION; +pub use crate::v2::lu_dog_vec_tracy::enum_field::EnumField; +pub use crate::v2::lu_dog_vec_tracy::enum_field::EnumFieldEnum; +pub use crate::v2::lu_dog_vec_tracy::enumeration::Enumeration; +pub use crate::v2::lu_dog_vec_tracy::equal::Equal; +pub use crate::v2::lu_dog_vec_tracy::equal::EQUAL; +pub use crate::v2::lu_dog_vec_tracy::expression::Expression; +pub use crate::v2::lu_dog_vec_tracy::expression::ExpressionEnum; +pub use crate::v2::lu_dog_vec_tracy::expression_statement::ExpressionStatement; +pub use crate::v2::lu_dog_vec_tracy::external_implementation::ExternalImplementation; +pub use crate::v2::lu_dog_vec_tracy::false_literal::FalseLiteral; +pub use crate::v2::lu_dog_vec_tracy::false_literal::FALSE_LITERAL; +pub use crate::v2::lu_dog_vec_tracy::field::Field; +pub use crate::v2::lu_dog_vec_tracy::field_access::FieldAccess; +pub use crate::v2::lu_dog_vec_tracy::field_access_target::FieldAccessTarget; +pub use crate::v2::lu_dog_vec_tracy::field_access_target::FieldAccessTargetEnum; +pub use crate::v2::lu_dog_vec_tracy::field_expression::FieldExpression; +pub use crate::v2::lu_dog_vec_tracy::field_expression::FieldExpressionEnum; +pub use crate::v2::lu_dog_vec_tracy::float_literal::FloatLiteral; +pub use crate::v2::lu_dog_vec_tracy::for_loop::ForLoop; +pub use crate::v2::lu_dog_vec_tracy::from::From; +pub use crate::v2::lu_dog_vec_tracy::from::FROM; +pub use crate::v2::lu_dog_vec_tracy::full::Full; +pub use crate::v2::lu_dog_vec_tracy::full::FULL; +pub use crate::v2::lu_dog_vec_tracy::function::Function; +pub use crate::v2::lu_dog_vec_tracy::function_call::FunctionCall; +pub use crate::v2::lu_dog_vec_tracy::function_call::FUNCTION_CALL; +pub use crate::v2::lu_dog_vec_tracy::generic::Generic; +pub use crate::v2::lu_dog_vec_tracy::greater_than::GreaterThan; +pub use crate::v2::lu_dog_vec_tracy::greater_than::GREATER_THAN; +pub use crate::v2::lu_dog_vec_tracy::greater_than_or_equal::GreaterThanOrEqual; +pub use crate::v2::lu_dog_vec_tracy::greater_than_or_equal::GREATER_THAN_OR_EQUAL; +pub use crate::v2::lu_dog_vec_tracy::grouped::Grouped; +pub use crate::v2::lu_dog_vec_tracy::implementation_block::ImplementationBlock; +pub use crate::v2::lu_dog_vec_tracy::import::Import; +pub use crate::v2::lu_dog_vec_tracy::inclusive::Inclusive; +pub use crate::v2::lu_dog_vec_tracy::inclusive::INCLUSIVE; +pub use crate::v2::lu_dog_vec_tracy::index::Index; +pub use crate::v2::lu_dog_vec_tracy::integer_literal::IntegerLiteral; +pub use crate::v2::lu_dog_vec_tracy::item::Item; +pub use crate::v2::lu_dog_vec_tracy::item::ItemEnum; +pub use crate::v2::lu_dog_vec_tracy::item_statement::ItemStatement; +pub use crate::v2::lu_dog_vec_tracy::item_statement::ITEM_STATEMENT; +pub use crate::v2::lu_dog_vec_tracy::lambda::Lambda; +pub use crate::v2::lu_dog_vec_tracy::lambda_parameter::LambdaParameter; +pub use crate::v2::lu_dog_vec_tracy::less_than::LessThan; +pub use crate::v2::lu_dog_vec_tracy::less_than::LESS_THAN; +pub use crate::v2::lu_dog_vec_tracy::less_than_or_equal::LessThanOrEqual; +pub use crate::v2::lu_dog_vec_tracy::less_than_or_equal::LESS_THAN_OR_EQUAL; +pub use crate::v2::lu_dog_vec_tracy::let_statement::LetStatement; +pub use crate::v2::lu_dog_vec_tracy::list::List; +pub use crate::v2::lu_dog_vec_tracy::list_element::ListElement; +pub use crate::v2::lu_dog_vec_tracy::list_expression::ListExpression; +pub use crate::v2::lu_dog_vec_tracy::literal::Literal; +pub use crate::v2::lu_dog_vec_tracy::literal::LiteralEnum; +pub use crate::v2::lu_dog_vec_tracy::local_variable::LocalVariable; +pub use crate::v2::lu_dog_vec_tracy::macro_call::MacroCall; +pub use crate::v2::lu_dog_vec_tracy::macro_call::MACRO_CALL; +pub use crate::v2::lu_dog_vec_tracy::method_call::MethodCall; +pub use crate::v2::lu_dog_vec_tracy::multiplication::Multiplication; +pub use crate::v2::lu_dog_vec_tracy::multiplication::MULTIPLICATION; +pub use crate::v2::lu_dog_vec_tracy::named_field_expression::NamedFieldExpression; +pub use crate::v2::lu_dog_vec_tracy::negation::Negation; +pub use crate::v2::lu_dog_vec_tracy::negation::NEGATION; +pub use crate::v2::lu_dog_vec_tracy::not::Not; +pub use crate::v2::lu_dog_vec_tracy::not::NOT; +pub use crate::v2::lu_dog_vec_tracy::not_equal::NotEqual; +pub use crate::v2::lu_dog_vec_tracy::not_equal::NOT_EQUAL; +pub use crate::v2::lu_dog_vec_tracy::object_wrapper::ObjectWrapper; +pub use crate::v2::lu_dog_vec_tracy::operator::Operator; +pub use crate::v2::lu_dog_vec_tracy::operator::OperatorEnum; +pub use crate::v2::lu_dog_vec_tracy::or::Or; +pub use crate::v2::lu_dog_vec_tracy::or::OR; +pub use crate::v2::lu_dog_vec_tracy::parameter::Parameter; +pub use crate::v2::lu_dog_vec_tracy::path_element::PathElement; +pub use crate::v2::lu_dog_vec_tracy::pattern::Pattern; +pub use crate::v2::lu_dog_vec_tracy::plugin::Plugin; +pub use crate::v2::lu_dog_vec_tracy::range::Range; +pub use crate::v2::lu_dog_vec_tracy::range::RANGE; +pub use crate::v2::lu_dog_vec_tracy::range_expression::RangeExpression; +pub use crate::v2::lu_dog_vec_tracy::range_expression::RangeExpressionEnum; +pub use crate::v2::lu_dog_vec_tracy::result_statement::ResultStatement; +pub use crate::v2::lu_dog_vec_tracy::span::Span; +pub use crate::v2::lu_dog_vec_tracy::statement::Statement; +pub use crate::v2::lu_dog_vec_tracy::statement::StatementEnum; +pub use crate::v2::lu_dog_vec_tracy::static_method_call::StaticMethodCall; +pub use crate::v2::lu_dog_vec_tracy::string_literal::StringLiteral; +pub use crate::v2::lu_dog_vec_tracy::struct_expression::StructExpression; +pub use crate::v2::lu_dog_vec_tracy::struct_field::StructField; +pub use crate::v2::lu_dog_vec_tracy::struct_generic::StructGeneric; +pub use crate::v2::lu_dog_vec_tracy::subtraction::Subtraction; +pub use crate::v2::lu_dog_vec_tracy::subtraction::SUBTRACTION; +pub use crate::v2::lu_dog_vec_tracy::task::Task; +pub use crate::v2::lu_dog_vec_tracy::task::TASK; +pub use crate::v2::lu_dog_vec_tracy::to::To; +pub use crate::v2::lu_dog_vec_tracy::to::TO; +pub use crate::v2::lu_dog_vec_tracy::to_inclusive::ToInclusive; +pub use crate::v2::lu_dog_vec_tracy::to_inclusive::TO_INCLUSIVE; +pub use crate::v2::lu_dog_vec_tracy::true_literal::TrueLiteral; +pub use crate::v2::lu_dog_vec_tracy::true_literal::TRUE_LITERAL; +pub use crate::v2::lu_dog_vec_tracy::tuple_field::TupleField; +pub use crate::v2::lu_dog_vec_tracy::type_cast::TypeCast; +pub use crate::v2::lu_dog_vec_tracy::unary::Unary; +pub use crate::v2::lu_dog_vec_tracy::unary::UnaryEnum; +pub use crate::v2::lu_dog_vec_tracy::unit::Unit; +pub use crate::v2::lu_dog_vec_tracy::unknown::Unknown; +pub use crate::v2::lu_dog_vec_tracy::unknown::UNKNOWN; +pub use crate::v2::lu_dog_vec_tracy::unnamed_field_expression::UnnamedFieldExpression; +pub use crate::v2::lu_dog_vec_tracy::value_type::ValueType; +pub use crate::v2::lu_dog_vec_tracy::value_type::ValueTypeEnum; +pub use crate::v2::lu_dog_vec_tracy::variable::Variable; +pub use crate::v2::lu_dog_vec_tracy::variable::VariableEnum; +pub use crate::v2::lu_dog_vec_tracy::variable_expression::VariableExpression; +pub use crate::v2::lu_dog_vec_tracy::woog_struct::WoogStruct; +pub use crate::v2::lu_dog_vec_tracy::x_future::XFuture; +pub use crate::v2::lu_dog_vec_tracy::x_if::XIf; +pub use crate::v2::lu_dog_vec_tracy::x_macro::XMacro; +pub use crate::v2::lu_dog_vec_tracy::x_match::XMatch; +pub use crate::v2::lu_dog_vec_tracy::x_path::XPath; +pub use crate::v2::lu_dog_vec_tracy::x_print::XPrint; +pub use crate::v2::lu_dog_vec_tracy::x_return::XReturn; +pub use crate::v2::lu_dog_vec_tracy::x_value::XValue; +pub use crate::v2::lu_dog_vec_tracy::x_value::XValueEnum; +pub use crate::v2::lu_dog_vec_tracy::z_object_store::ZObjectStore; +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/a_wait.rs b/src/v2/lu_dog_vec_tracy/types/a_wait.rs new file mode 100644 index 00000000..9db5719d --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/a_wait.rs @@ -0,0 +1,77 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"a_wait-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"a_wait-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"a_wait-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct AWait { + pub id: usize, + /// R98: [`AWait`] 'awaits' [`Expression`] + pub x_future: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"a_wait-implementation"}}} +impl AWait { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"a_wait-struct-impl-new"}}} + /// Inter a new 'Await' in the store, and return it's `id`. + pub fn new( + x_future: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_a_wait(|id| { + Rc::new(RefCell::new(AWait { + id, + x_future: x_future.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"a_wait-struct-impl-nav-forward-to-x_future"}}} + /// Navigate to [`Expression`] across R98(1-*) + pub fn r98_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r98_expression"); + vec![store.exhume_expression(&self.x_future).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"a_wait-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::AWait(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"a_wait-implementation"}}} +impl PartialEq for AWait { + fn eq(&self, other: &Self) -> bool { + self.x_future == other.x_future + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/addition.rs b/src/v2/lu_dog_vec_tracy/types/addition.rs new file mode 100644 index 00000000..80bb39dc --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/addition.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"addition-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"addition-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"addition-const-documentation"}}} +/// The addition operator: `+`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"addition-const-definition"}}} +pub const ADDITION: Uuid = uuid!["82056c56-acb4-590c-a0f6-895876f1dc19"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Addition; + +impl Addition { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ADDITION + } +} + +impl Default for Addition { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/and.rs b/src/v2/lu_dog_vec_tracy/types/and.rs new file mode 100644 index 00000000..31db4ce5 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/and.rs @@ -0,0 +1,35 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"and-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"and-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"and-const-documentation"}}} +/// The Boolean And Operator +/// +/// And, aka, `&&`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"and-const-definition"}}} +pub const AND: Uuid = uuid!["bd9bf026-a7db-59e2-a44a-0e88124b8ec6"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct And; + +impl And { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + AND + } +} + +impl Default for And { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/argument.rs b/src/v2/lu_dog_vec_tracy/types/argument.rs new file mode 100644 index 00000000..aad440c0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/argument.rs @@ -0,0 +1,122 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"argument-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::call::Call; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-struct-documentation"}}} +/// An Argument to a Function Call +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Argument { + pub id: usize, + pub position: i64, + /// R37: [`Argument`] '' [`Expression`] + pub expression: usize, + /// R28: [`Argument`] 'is part of a' [`Call`] + pub function: usize, + /// R27: [`Argument`] 'follows' [`Argument`] + pub next: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-implementation"}}} +impl Argument { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-struct-impl-new"}}} + /// Inter a new 'Argument' in the store, and return it's `id`. + pub fn new( + position: i64, + expression: &Rc>, + function: &Rc>, + next: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_argument(|id| { + Rc::new(RefCell::new(Argument { + id, + position, + expression: expression.borrow().id, + function: function.borrow().id, + next: next.map(|argument| argument.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R37(1-*) + pub fn r37_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r37_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-struct-impl-nav-forward-to-function"}}} + /// Navigate to [`Call`] across R28(1-*) + pub fn r28_call<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r28_call"); + vec![store.exhume_call(&self.function).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-struct-impl-nav-forward-cond-to-next"}}} + /// Navigate to [`Argument`] across R27(1-*c) + pub fn r27_argument<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r27_argument"); + match self.next { + Some(ref next) => vec![store.exhume_argument(&next).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-struct-impl-nav-backward-one-bi-cond-to-argument"}}} + /// Navigate to [`Argument`] across R27(1c-1c) + pub fn r27c_argument<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r27_argument"); + let argument = store + .iter_argument() + .find(|argument| argument.borrow().next == Some(self.id)); + match argument { + Some(ref argument) => vec![argument.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-struct-impl-nav-backward-one-bi-cond-to-call"}}} + /// Navigate to [`Call`] across R81(1c-1c) + pub fn r81c_call<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r81_call"); + let call = store + .iter_call() + .find(|call| call.borrow().argument == Some(self.id)); + match call { + Some(ref call) => vec![call.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"argument-implementation"}}} +impl PartialEq for Argument { + fn eq(&self, other: &Self) -> bool { + self.position == other.position + && self.expression == other.expression + && self.function == other.function + && self.next == other.next + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/assignment.rs b/src/v2/lu_dog_vec_tracy/types/assignment.rs new file mode 100644 index 00000000..ce308951 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/assignment.rs @@ -0,0 +1,35 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"assignment-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"assignment-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"assignment-const-documentation"}}} +/// Assignment to a storage location +/// +/// E.g., `a = b`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"assignment-const-definition"}}} +pub const ASSIGNMENT: Uuid = uuid!["f0e3fca1-6a53-53da-9048-83f8a0da060d"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Assignment; + +impl Assignment { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ASSIGNMENT + } +} + +impl Default for Assignment { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/binary.rs b/src/v2/lu_dog_vec_tracy/types/binary.rs new file mode 100644 index 00000000..8c14ceb6 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/binary.rs @@ -0,0 +1,141 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"binary-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::addition::ADDITION; +use crate::v2::lu_dog_vec_tracy::types::assignment::ASSIGNMENT; +use crate::v2::lu_dog_vec_tracy::types::boolean_operator::BooleanOperator; +use crate::v2::lu_dog_vec_tracy::types::division::DIVISION; +use crate::v2::lu_dog_vec_tracy::types::multiplication::MULTIPLICATION; +use crate::v2::lu_dog_vec_tracy::types::operator::Operator; +use crate::v2::lu_dog_vec_tracy::types::operator::OperatorEnum; +use crate::v2::lu_dog_vec_tracy::types::subtraction::SUBTRACTION; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-hybrid-documentation"}}} +/// Binary Operators +/// +/// +, -, etc. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Binary { + pub subtype: BinaryEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum BinaryEnum { + Addition(Uuid), + Assignment(Uuid), + BooleanOperator(usize), + Division(Uuid), + Multiplication(Uuid), + Subtraction(Uuid), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-implementation"}}} +impl Binary { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-struct-impl-new_addition"}}} + /// Inter a new Binary in the store, and return it's `id`. + pub fn new_addition(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: BinaryEnum::Addition(ADDITION), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-struct-impl-new_assignment"}}} + /// Inter a new Binary in the store, and return it's `id`. + pub fn new_assignment(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: BinaryEnum::Assignment(ASSIGNMENT), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-struct-impl-new_boolean_operator"}}} + /// Inter a new Binary in the store, and return it's `id`. + pub fn new_boolean_operator( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: BinaryEnum::BooleanOperator(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-struct-impl-new_division"}}} + /// Inter a new Binary in the store, and return it's `id`. + pub fn new_division(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: BinaryEnum::Division(DIVISION), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-struct-impl-new_multiplication"}}} + /// Inter a new Binary in the store, and return it's `id`. + pub fn new_multiplication(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: BinaryEnum::Multiplication(MULTIPLICATION), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-struct-impl-new_subtraction"}}} + /// Inter a new Binary in the store, and return it's `id`. + pub fn new_subtraction(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_binary(|id| { + Rc::new(RefCell::new(Binary { + subtype: BinaryEnum::Subtraction(SUBTRACTION), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-impl-nav-subtype-to-supertype-operator"}}} + // Navigate to [`Operator`] across R47(isa) + pub fn r47_operator<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r47_operator"); + vec![store + .iter_operator() + .find(|operator| { + if let OperatorEnum::Binary(id) = operator.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"binary-implementation"}}} +impl PartialEq for Binary { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/block.rs b/src/v2/lu_dog_vec_tracy/types/block.rs new file mode 100644 index 00000000..b41d2761 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/block.rs @@ -0,0 +1,206 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"block-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::body::Body; +use crate::v2::lu_dog_vec_tracy::types::body::BodyEnum; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::for_loop::ForLoop; +use crate::v2::lu_dog_vec_tracy::types::statement::Statement; +use crate::v2::lu_dog_vec_tracy::types::x_if::XIf; +use crate::v2::lu_dog_vec_tracy::types::x_value::XValue; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-documentation"}}} +/// A Block Expression +/// +/// A block expression is an expression that consists of an ordered set of statements, living +/// between an opening `{`, and a closing `}`. +/// +/// Given that it's an expression it has a Type. The type is the value of the last expression +/// in the block, if it's not closed by a `;`. If the last statement is termintat thusly, then +/// the value is `[Empty]`, or `()`. +/// +/// The `bug` attribute is there to force the compiler to generate code. Apparently there's +/// some bug in grace that's causing this to be generated as a const. I don't want to get into +/// it, and this is the most expedient solution. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Block { + pub a_sink: bool, + pub bug: Uuid, + pub id: usize, + /// R93: [`Block`] '' [`Block`] + pub parent: Option, + /// R71: [`Block`] '' [`Statement`] + pub statement: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-implementation"}}} +impl Block { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-new"}}} + /// Inter a new 'Block' in the store, and return it's `id`. + pub fn new( + a_sink: bool, + bug: Uuid, + parent: Option<&Rc>>, + statement: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_block(|id| { + Rc::new(RefCell::new(Block { + a_sink, + bug, + id, + parent: parent.map(|block| block.borrow().id), + statement: statement.map(|statement| statement.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-nav-forward-cond-to-parent"}}} + /// Navigate to [`Block`] across R93(1-*c) + pub fn r93_block<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r93_block"); + match self.parent { + Some(ref parent) => vec![store.exhume_block(&parent).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-nav-forward-cond-to-statement"}}} + /// Navigate to [`Statement`] across R71(1-*c) + pub fn r71_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r71_statement"); + match self.statement { + Some(ref statement) => vec![store.exhume_statement(&statement).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-nav-backward-one-bi-cond-to-block"}}} + /// Navigate to [`Block`] across R93(1c-1c) + pub fn r93c_block<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r93_block"); + let block = store + .iter_block() + .find(|block| block.borrow().parent == Some(self.id)); + match block { + Some(ref block) => vec![block.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-nav-backward-1_M-to-for_loop"}}} + /// Navigate to [`ForLoop`] across R43(1-M) + pub fn r43_for_loop<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r43_for_loop"); + store + .iter_for_loop() + .filter(|for_loop| for_loop.borrow().block == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-nav-backward-1_M-to-x_if"}}} + /// Navigate to [`XIf`] across R46(1-M) + pub fn r46_x_if<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r46_x_if"); + store + .iter_x_if() + .filter(|x_if| x_if.borrow().true_block == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-nav-backward-1_Mc-to-x_if"}}} + /// Navigate to [`XIf`] across R52(1-Mc) + pub fn r52_x_if<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r52_x_if"); + store + .iter_x_if() + .filter(|x_if| x_if.borrow().false_block == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-nav-backward-1_M-to-statement"}}} + /// Navigate to [`Statement`] across R18(1-M) + pub fn r18_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r18_statement"); + store + .iter_statement() + .filter(|statement| statement.borrow().block == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-struct-impl-nav-backward-1_M-to-x_value"}}} + /// Navigate to [`XValue`] across R33(1-M) + pub fn r33_x_value<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r33_x_value"); + store + .iter_x_value() + .filter(|x_value| x_value.borrow().block == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-impl-nav-subtype-to-supertype-body"}}} + // Navigate to [`Body`] across R80(isa) + pub fn r80_body<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r80_body"); + vec![store + .iter_body() + .find(|body| { + if let BodyEnum::Block(id) = body.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::Block(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"block-implementation"}}} +impl PartialEq for Block { + fn eq(&self, other: &Self) -> bool { + self.a_sink == other.a_sink + && self.bug == other.bug + && self.parent == other.parent + && self.statement == other.statement + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/body.rs b/src/v2/lu_dog_vec_tracy/types/body.rs new file mode 100644 index 00000000..cbf502f7 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/body.rs @@ -0,0 +1,109 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"body-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::block::Block; +use crate::v2::lu_dog_vec_tracy::types::external_implementation::ExternalImplementation; +use crate::v2::lu_dog_vec_tracy::types::function::Function; +use crate::v2::lu_dog_vec_tracy::types::lambda::Lambda; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-hybrid-documentation"}}} +/// The function body. Generally contains statements, but may point to some other implementation +/// . +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Body { + pub subtype: BodyEnum, + pub a_sink: bool, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum BodyEnum { + Block(usize), + ExternalImplementation(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-implementation"}}} +impl Body { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-struct-impl-new_block"}}} + /// Inter a new Body in the store, and return it's `id`. + pub fn new_block( + a_sink: bool, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_body(|id| { + Rc::new(RefCell::new(Body { + a_sink: a_sink, + subtype: BodyEnum::Block(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-struct-impl-new_external_implementation"}}} + /// Inter a new Body in the store, and return it's `id`. + pub fn new_external_implementation( + a_sink: bool, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_body(|id| { + Rc::new(RefCell::new(Body { + a_sink: a_sink, + subtype: BodyEnum::ExternalImplementation(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-struct-impl-nav-backward-cond-to-function"}}} + /// Navigate to [`Function`] across R19(1-1c) + pub fn r19c_function<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r19_function"); + let function = store + .iter_function() + .find(|function| function.borrow().body == self.id); + match function { + Some(ref function) => vec![function.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-struct-impl-nav-backward-one-bi-cond-to-lambda"}}} + /// Navigate to [`Lambda`] across R73(1c-1c) + pub fn r73c_lambda<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r73_lambda"); + let lambda = store + .iter_lambda() + .find(|lambda| lambda.borrow().body == Some(self.id)); + match lambda { + Some(ref lambda) => vec![lambda.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"body-implementation"}}} +impl PartialEq for Body { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype && self.a_sink == other.a_sink + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/boolean_literal.rs b/src/v2/lu_dog_vec_tracy/types/boolean_literal.rs new file mode 100644 index 00000000..e54615df --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/boolean_literal.rs @@ -0,0 +1,86 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"boolean_literal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::false_literal::FALSE_LITERAL; +use crate::v2::lu_dog_vec_tracy::types::literal::Literal; +use crate::v2::lu_dog_vec_tracy::types::literal::LiteralEnum; +use crate::v2::lu_dog_vec_tracy::types::true_literal::TRUE_LITERAL; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-hybrid-documentation"}}} +/// A Boolean +/// +/// It's either `true` or `false`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct BooleanLiteral { + pub subtype: BooleanLiteralEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum BooleanLiteralEnum { + FalseLiteral(Uuid), + TrueLiteral(Uuid), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-implementation"}}} +impl BooleanLiteral { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-struct-impl-new_false_literal"}}} + /// Inter a new BooleanLiteral in the store, and return it's `id`. + pub fn new_false_literal(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_boolean_literal(|id| { + Rc::new(RefCell::new(BooleanLiteral { + subtype: BooleanLiteralEnum::FalseLiteral(FALSE_LITERAL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-struct-impl-new_true_literal"}}} + /// Inter a new BooleanLiteral in the store, and return it's `id`. + pub fn new_true_literal(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_boolean_literal(|id| { + Rc::new(RefCell::new(BooleanLiteral { + subtype: BooleanLiteralEnum::TrueLiteral(TRUE_LITERAL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-impl-nav-subtype-to-supertype-literal"}}} + // Navigate to [`Literal`] across R22(isa) + pub fn r22_literal<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r22_literal"); + vec![store + .iter_literal() + .find(|literal| { + if let LiteralEnum::BooleanLiteral(id) = literal.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_literal-implementation"}}} +impl PartialEq for BooleanLiteral { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/boolean_operator.rs b/src/v2/lu_dog_vec_tracy/types/boolean_operator.rs new file mode 100644 index 00000000..93b0cc52 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/boolean_operator.rs @@ -0,0 +1,86 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"boolean_operator-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::and::AND; +use crate::v2::lu_dog_vec_tracy::types::binary::Binary; +use crate::v2::lu_dog_vec_tracy::types::binary::BinaryEnum; +use crate::v2::lu_dog_vec_tracy::types::or::OR; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-hybrid-documentation"}}} +/// A Boolean Operaator +/// +/// There are two — || and &&. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct BooleanOperator { + pub subtype: BooleanOperatorEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum BooleanOperatorEnum { + And(Uuid), + Or(Uuid), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-implementation"}}} +impl BooleanOperator { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-struct-impl-new_and"}}} + /// Inter a new BooleanOperator in the store, and return it's `id`. + pub fn new_and(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_boolean_operator(|id| { + Rc::new(RefCell::new(BooleanOperator { + subtype: BooleanOperatorEnum::And(AND), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-struct-impl-new_or"}}} + /// Inter a new BooleanOperator in the store, and return it's `id`. + pub fn new_or(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_boolean_operator(|id| { + Rc::new(RefCell::new(BooleanOperator { + subtype: BooleanOperatorEnum::Or(OR), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-impl-nav-subtype-to-supertype-binary"}}} + // Navigate to [`Binary`] across R48(isa) + pub fn r48_binary<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r48_binary"); + vec![store + .iter_binary() + .find(|binary| { + if let BinaryEnum::BooleanOperator(id) = binary.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"boolean_operator-implementation"}}} +impl PartialEq for BooleanOperator { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/call.rs b/src/v2/lu_dog_vec_tracy/types/call.rs new file mode 100644 index 00000000..2fc9f77a --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/call.rs @@ -0,0 +1,190 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"call-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::argument::Argument; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::function_call::FUNCTION_CALL; +use crate::v2::lu_dog_vec_tracy::types::macro_call::MACRO_CALL; +use crate::v2::lu_dog_vec_tracy::types::method_call::MethodCall; +use crate::v2::lu_dog_vec_tracy::types::static_method_call::StaticMethodCall; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-hybrid-documentation"}}} +/// A Call, of some sort +/// +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Call { + pub subtype: CallEnum, + pub arg_check: bool, + pub id: usize, + /// R81: [`Call`] 'may have a first' [`Argument`] + pub argument: Option, + /// R29: [`Call`] 'may be an' [`Expression`] + pub expression: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum CallEnum { + FunctionCall(Uuid), + MacroCall(Uuid), + MethodCall(usize), + StaticMethodCall(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-implementation"}}} +impl Call { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-struct-impl-new_function_call"}}} + /// Inter a new Call in the store, and return it's `id`. + pub fn new_function_call( + arg_check: bool, + argument: Option<&Rc>>, + expression: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_call(|id| { + Rc::new(RefCell::new(Call { + arg_check: arg_check, + argument: argument.map(|argument| argument.borrow().id), + expression: expression.map(|expression| expression.borrow().id), + subtype: CallEnum::FunctionCall(FUNCTION_CALL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-struct-impl-new_macro_call"}}} + /// Inter a new Call in the store, and return it's `id`. + pub fn new_macro_call( + arg_check: bool, + argument: Option<&Rc>>, + expression: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_call(|id| { + Rc::new(RefCell::new(Call { + arg_check: arg_check, + argument: argument.map(|argument| argument.borrow().id), + expression: expression.map(|expression| expression.borrow().id), + subtype: CallEnum::MacroCall(MACRO_CALL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-struct-impl-new_method_call"}}} + /// Inter a new Call in the store, and return it's `id`. + pub fn new_method_call( + arg_check: bool, + argument: Option<&Rc>>, + expression: Option<&Rc>>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_call(|id| { + Rc::new(RefCell::new(Call { + arg_check: arg_check, + argument: argument.map(|argument| argument.borrow().id), + expression: expression.map(|expression| expression.borrow().id), + subtype: CallEnum::MethodCall(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-struct-impl-new_static_method_call"}}} + /// Inter a new Call in the store, and return it's `id`. + pub fn new_static_method_call( + arg_check: bool, + argument: Option<&Rc>>, + expression: Option<&Rc>>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_call(|id| { + Rc::new(RefCell::new(Call { + arg_check: arg_check, + argument: argument.map(|argument| argument.borrow().id), + expression: expression.map(|expression| expression.borrow().id), + subtype: CallEnum::StaticMethodCall(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-struct-impl-nav-forward-cond-to-argument"}}} + /// Navigate to [`Argument`] across R81(1-*c) + pub fn r81_argument<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r81_argument"); + match self.argument { + Some(ref argument) => vec![store.exhume_argument(&argument).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-struct-impl-nav-forward-cond-to-expression"}}} + /// Navigate to [`Expression`] across R29(1-*c) + pub fn r29_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r29_expression"); + match self.expression { + Some(ref expression) => vec![store.exhume_expression(&expression).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-struct-impl-nav-backward-1_M-to-argument"}}} + /// Navigate to [`Argument`] across R28(1-M) + pub fn r28_argument<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r28_argument"); + store + .iter_argument() + .filter(|argument| argument.borrow().function == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::Call(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"call-implementation"}}} +impl PartialEq for Call { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + && self.arg_check == other.arg_check + && self.argument == other.argument + && self.expression == other.expression + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/char.rs b/src/v2/lu_dog_vec_tracy/types/char.rs new file mode 100644 index 00000000..34378f91 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/char.rs @@ -0,0 +1,35 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"char-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"char-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"char-const-documentation"}}} +/// A char +/// +/// I char is a single printable UNICODE character. It may contain multiple bytes. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"char-const-definition"}}} +pub const CHAR: Uuid = uuid!["9fe96a25-33bd-55cf-b227-fea54afbcc70"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Char; + +impl Char { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + CHAR + } +} + +impl Default for Char { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/comparison.rs b/src/v2/lu_dog_vec_tracy/types/comparison.rs new file mode 100644 index 00000000..8a1a53a3 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/comparison.rs @@ -0,0 +1,138 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"comparison-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::equal::EQUAL; +use crate::v2::lu_dog_vec_tracy::types::greater_than::GREATER_THAN; +use crate::v2::lu_dog_vec_tracy::types::greater_than_or_equal::GREATER_THAN_OR_EQUAL; +use crate::v2::lu_dog_vec_tracy::types::less_than::LESS_THAN; +use crate::v2::lu_dog_vec_tracy::types::less_than_or_equal::LESS_THAN_OR_EQUAL; +use crate::v2::lu_dog_vec_tracy::types::not_equal::NOT_EQUAL; +use crate::v2::lu_dog_vec_tracy::types::operator::Operator; +use crate::v2::lu_dog_vec_tracy::types::operator::OperatorEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-hybrid-documentation"}}} +/// Comparison Operators +/// +/// Things like == and !=, etc. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Comparison { + pub subtype: ComparisonEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum ComparisonEnum { + Equal(Uuid), + GreaterThan(Uuid), + GreaterThanOrEqual(Uuid), + LessThan(Uuid), + LessThanOrEqual(Uuid), + NotEqual(Uuid), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-implementation"}}} +impl Comparison { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-struct-impl-new_equal"}}} + /// Inter a new Comparison in the store, and return it's `id`. + pub fn new_equal(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: ComparisonEnum::Equal(EQUAL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-struct-impl-new_greater_than"}}} + /// Inter a new Comparison in the store, and return it's `id`. + pub fn new_greater_than(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: ComparisonEnum::GreaterThan(GREATER_THAN), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-struct-impl-new_greater_than_or_equal"}}} + /// Inter a new Comparison in the store, and return it's `id`. + pub fn new_greater_than_or_equal(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: ComparisonEnum::GreaterThanOrEqual(GREATER_THAN_OR_EQUAL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-struct-impl-new_less_than"}}} + /// Inter a new Comparison in the store, and return it's `id`. + pub fn new_less_than(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: ComparisonEnum::LessThan(LESS_THAN), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-struct-impl-new_less_than_or_equal"}}} + /// Inter a new Comparison in the store, and return it's `id`. + pub fn new_less_than_or_equal(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: ComparisonEnum::LessThanOrEqual(LESS_THAN_OR_EQUAL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-struct-impl-new_not_equal"}}} + /// Inter a new Comparison in the store, and return it's `id`. + pub fn new_not_equal(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_comparison(|id| { + Rc::new(RefCell::new(Comparison { + subtype: ComparisonEnum::NotEqual(NOT_EQUAL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-impl-nav-subtype-to-supertype-operator"}}} + // Navigate to [`Operator`] across R47(isa) + pub fn r47_operator<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r47_operator"); + vec![store + .iter_operator() + .find(|operator| { + if let OperatorEnum::Comparison(id) = operator.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"comparison-implementation"}}} +impl PartialEq for Comparison { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/data_structure.rs b/src/v2/lu_dog_vec_tracy/types/data_structure.rs new file mode 100644 index 00000000..880c2125 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/data_structure.rs @@ -0,0 +1,82 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"data_structure-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"data_structure-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::enumeration::Enumeration; +use crate::v2::lu_dog_vec_tracy::types::struct_expression::StructExpression; +use crate::v2::lu_dog_vec_tracy::types::woog_struct::WoogStruct; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"data_structure-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct DataStructure { + pub subtype: DataStructureEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"data_structure-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum DataStructureEnum { + Enumeration(usize), + WoogStruct(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"data_structure-implementation"}}} +impl DataStructure { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"data_structure-struct-impl-new_enumeration"}}} + /// Inter a new DataStructure in the store, and return it's `id`. + pub fn new_enumeration( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_data_structure(|id| { + Rc::new(RefCell::new(DataStructure { + subtype: DataStructureEnum::Enumeration(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"data_structure-struct-impl-new_woog_struct"}}} + /// Inter a new DataStructure in the store, and return it's `id`. + pub fn new_woog_struct( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_data_structure(|id| { + Rc::new(RefCell::new(DataStructure { + subtype: DataStructureEnum::WoogStruct(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"data_structure-struct-impl-nav-backward-1_M-to-struct_expression"}}} + /// Navigate to [`StructExpression`] across R39(1-M) + pub fn r39_struct_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r39_struct_expression"); + store + .iter_struct_expression() + .filter(|struct_expression| struct_expression.borrow().data == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"data_structure-implementation"}}} +impl PartialEq for DataStructure { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/debugger.rs b/src/v2/lu_dog_vec_tracy/types/debugger.rs new file mode 100644 index 00000000..5a5cf7e8 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/debugger.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"debugger-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"debugger-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"debugger-const-documentation"}}} +/// An expresision to invoke the debugger; +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"debugger-const-definition"}}} +pub const DEBUGGER: Uuid = uuid!["0a02fb20-b343-530c-9467-1cb2d6957339"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Debugger; + +impl Debugger { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + DEBUGGER + } +} + +impl Default for Debugger { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/division.rs b/src/v2/lu_dog_vec_tracy/types/division.rs new file mode 100644 index 00000000..04f1c279 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/division.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"division-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"division-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"division-const-definition"}}} +pub const DIVISION: Uuid = uuid!["9bdbeed5-5e34-53a7-bc76-5ebf19a39481"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Division; + +impl Division { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + DIVISION + } +} + +impl Default for Division { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/dwarf_source_file.rs b/src/v2/lu_dog_vec_tracy/types/dwarf_source_file.rs new file mode 100644 index 00000000..0c3437db --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/dwarf_source_file.rs @@ -0,0 +1,72 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"dwarf_source_file-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"dwarf_source_file-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::item::Item; +use crate::v2::lu_dog_vec_tracy::types::span::Span; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"dwarf_source_file-struct-documentation"}}} +/// The Source Code +/// +/// The main purpose of this object is to capture the source code that contains the definitions +/// that will be parsed. This allows us to do better error reporting in the interpreter. We +/// may also be able to do something about displaying compiled functions, maybe. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"dwarf_source_file-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct DwarfSourceFile { + pub id: usize, + pub source: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"dwarf_source_file-implementation"}}} +impl DwarfSourceFile { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"dwarf_source_file-struct-impl-new"}}} + /// Inter a new 'Dwarf Source File' in the store, and return it's `id`. + pub fn new(source: String, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_dwarf_source_file(|id| { + Rc::new(RefCell::new(DwarfSourceFile { + id, + source: source.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"dwarf_source_file-struct-impl-nav-backward-1_M-to-item"}}} + /// Navigate to [`Item`] across R25(1-M) + pub fn r25_item<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r25_item"); + store + .iter_item() + .filter(|item| item.borrow().source == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"dwarf_source_file-struct-impl-nav-backward-1_M-to-span"}}} + /// Navigate to [`Span`] across R64(1-M) + pub fn r64_span<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r64_span"); + store + .iter_span() + .filter(|span| span.borrow().source == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"dwarf_source_file-implementation"}}} +impl PartialEq for DwarfSourceFile { + fn eq(&self, other: &Self) -> bool { + self.source == other.source + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/empty.rs b/src/v2/lu_dog_vec_tracy/types/empty.rs new file mode 100644 index 00000000..df5bb383 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/empty.rs @@ -0,0 +1,36 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"empty-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"empty-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"empty-const-documentation"}}} +/// The Empty Type +/// +/// This type represents the lack of a type. It's actually sort of a werid construct, because +/// it also implies the lack of a value. How can you have a value without a type? +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"empty-const-definition"}}} +pub const EMPTY: Uuid = uuid!["ea81f072-96fe-5426-9bc3-c0419e448fe5"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Empty; + +impl Empty { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + EMPTY + } +} + +impl Default for Empty { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/empty_expression.rs b/src/v2/lu_dog_vec_tracy/types/empty_expression.rs new file mode 100644 index 00000000..e1012913 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/empty_expression.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"empty_expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"empty_expression-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"empty_expression-const-definition"}}} +pub const EMPTY_EXPRESSION: Uuid = uuid!["631f47b1-f98b-54f2-886c-b4ed4c7ad909"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct EmptyExpression; + +impl EmptyExpression { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + EMPTY_EXPRESSION + } +} + +impl Default for EmptyExpression { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/enum_field.rs b/src/v2/lu_dog_vec_tracy/types/enum_field.rs new file mode 100644 index 00000000..4d36b498 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/enum_field.rs @@ -0,0 +1,139 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"enum_field-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::enumeration::Enumeration; +use crate::v2::lu_dog_vec_tracy::types::field_access_target::FieldAccessTarget; +use crate::v2::lu_dog_vec_tracy::types::field_access_target::FieldAccessTargetEnum; +use crate::v2::lu_dog_vec_tracy::types::struct_field::StructField; +use crate::v2::lu_dog_vec_tracy::types::tuple_field::TupleField; +use crate::v2::lu_dog_vec_tracy::types::unit::Unit; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-hybrid-documentation"}}} +/// A field on an Enumeration +/// +/// Note that there are three sorts of fields. Tuple, Struct, and “plain?”. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct EnumField { + pub subtype: EnumFieldEnum, + pub id: usize, + pub name: String, + /// R88: [`EnumField`] 'belongs to an' [`Enumeration`] + pub woog_enum: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum EnumFieldEnum { + StructField(usize), + TupleField(usize), + Unit(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-implementation"}}} +impl EnumField { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-struct-impl-new_struct_field"}}} + /// Inter a new EnumField in the store, and return it's `id`. + pub fn new_struct_field( + name: String, + woog_enum: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_enum_field(|id| { + Rc::new(RefCell::new(EnumField { + name: name.to_owned(), + woog_enum: woog_enum.borrow().id, + subtype: EnumFieldEnum::StructField(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-struct-impl-new_tuple_field"}}} + /// Inter a new EnumField in the store, and return it's `id`. + pub fn new_tuple_field( + name: String, + woog_enum: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_enum_field(|id| { + Rc::new(RefCell::new(EnumField { + name: name.to_owned(), + woog_enum: woog_enum.borrow().id, + subtype: EnumFieldEnum::TupleField(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-struct-impl-new_unit"}}} + /// Inter a new EnumField in the store, and return it's `id`. + pub fn new_unit( + name: String, + woog_enum: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_enum_field(|id| { + Rc::new(RefCell::new(EnumField { + name: name.to_owned(), + woog_enum: woog_enum.borrow().id, + subtype: EnumFieldEnum::Unit(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-struct-impl-nav-forward-to-woog_enum"}}} + /// Navigate to [`Enumeration`] across R88(1-*) + pub fn r88_enumeration<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r88_enumeration"); + vec![store.exhume_enumeration(&self.woog_enum).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-impl-nav-subtype-to-supertype-field_access_target"}}} + // Navigate to [`FieldAccessTarget`] across R67(isa) + pub fn r67_field_access_target<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r67_field_access_target"); + vec![store + .iter_field_access_target() + .find(|field_access_target| { + if let FieldAccessTargetEnum::EnumField(id) = field_access_target.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enum_field-implementation"}}} +impl PartialEq for EnumField { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + && self.name == other.name + && self.woog_enum == other.woog_enum + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/enumeration.rs b/src/v2/lu_dog_vec_tracy/types/enumeration.rs new file mode 100644 index 00000000..de03934c --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/enumeration.rs @@ -0,0 +1,147 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"enumeration-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::data_structure::DataStructure; +use crate::v2::lu_dog_vec_tracy::types::data_structure::DataStructureEnum; +use crate::v2::lu_dog_vec_tracy::types::enum_field::EnumField; +use crate::v2::lu_dog_vec_tracy::types::implementation_block::ImplementationBlock; +use crate::v2::lu_dog_vec_tracy::types::item::Item; +use crate::v2::lu_dog_vec_tracy::types::item::ItemEnum; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-struct-documentation"}}} +/// An Enumeration +/// +/// An enumeration is an algebraic type that takes on one if it’s fielsd, another type. as +/// it’s value. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Enumeration { + pub id: usize, + pub name: String, + /// R84: [`Enumeration`] 'may have an' [`ImplementationBlock`] + pub implementation: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-implementation"}}} +impl Enumeration { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-struct-impl-new"}}} + /// Inter a new 'Enumeration' in the store, and return it's `id`. + pub fn new( + name: String, + implementation: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_enumeration(|id| { + Rc::new(RefCell::new(Enumeration { + id, + name: name.to_owned(), + implementation: implementation + .map(|implementation_block| implementation_block.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-struct-impl-nav-forward-cond-to-implementation"}}} + /// Navigate to [`ImplementationBlock`] across R84(1-*c) + pub fn r84_implementation_block<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r84_implementation_block"); + match self.implementation { + Some(ref implementation) => { + vec![store.exhume_implementation_block(&implementation).unwrap()] + } + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-struct-impl-nav-backward-1_M-to-enum_field"}}} + /// Navigate to [`EnumField`] across R88(1-M) + pub fn r88_enum_field<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r88_enum_field"); + store + .iter_enum_field() + .filter(|enum_field| enum_field.borrow().woog_enum == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-impl-nav-subtype-to-supertype-data_structure"}}} + // Navigate to [`DataStructure`] across R95(isa) + pub fn r95_data_structure<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r95_data_structure"); + vec![store + .iter_data_structure() + .find(|data_structure| { + if let DataStructureEnum::Enumeration(id) = data_structure.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-impl-nav-subtype-to-supertype-item"}}} + // Navigate to [`Item`] across R6(isa) + pub fn r6_item<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r6_item"); + vec![store + .iter_item() + .find(|item| { + if let ItemEnum::Enumeration(id) = item.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::Enumeration(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"enumeration-implementation"}}} +impl PartialEq for Enumeration { + fn eq(&self, other: &Self) -> bool { + self.name == other.name && self.implementation == other.implementation + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/equal.rs b/src/v2/lu_dog_vec_tracy/types/equal.rs new file mode 100644 index 00000000..ef040840 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/equal.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"equal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"equal-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"equal-const-definition"}}} +pub const EQUAL: Uuid = uuid!["afd5efd2-654b-532a-b1b8-296adeac03e8"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Equal; + +impl Equal { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + EQUAL + } +} + +impl Default for Equal { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/expression.rs b/src/v2/lu_dog_vec_tracy/types/expression.rs new file mode 100644 index 00000000..6add0c97 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/expression.rs @@ -0,0 +1,716 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::a_wait::AWait; +use crate::v2::lu_dog_vec_tracy::types::argument::Argument; +use crate::v2::lu_dog_vec_tracy::types::block::Block; +use crate::v2::lu_dog_vec_tracy::types::call::Call; +use crate::v2::lu_dog_vec_tracy::types::debugger::DEBUGGER; +use crate::v2::lu_dog_vec_tracy::types::empty_expression::EMPTY_EXPRESSION; +use crate::v2::lu_dog_vec_tracy::types::expression_statement::ExpressionStatement; +use crate::v2::lu_dog_vec_tracy::types::field_access::FieldAccess; +use crate::v2::lu_dog_vec_tracy::types::field_expression::FieldExpression; +use crate::v2::lu_dog_vec_tracy::types::for_loop::ForLoop; +use crate::v2::lu_dog_vec_tracy::types::grouped::Grouped; +use crate::v2::lu_dog_vec_tracy::types::index::Index; +use crate::v2::lu_dog_vec_tracy::types::lambda::Lambda; +use crate::v2::lu_dog_vec_tracy::types::let_statement::LetStatement; +use crate::v2::lu_dog_vec_tracy::types::list_element::ListElement; +use crate::v2::lu_dog_vec_tracy::types::list_expression::ListExpression; +use crate::v2::lu_dog_vec_tracy::types::literal::Literal; +use crate::v2::lu_dog_vec_tracy::types::operator::Operator; +use crate::v2::lu_dog_vec_tracy::types::pattern::Pattern; +use crate::v2::lu_dog_vec_tracy::types::range_expression::RangeExpression; +use crate::v2::lu_dog_vec_tracy::types::result_statement::ResultStatement; +use crate::v2::lu_dog_vec_tracy::types::struct_expression::StructExpression; +use crate::v2::lu_dog_vec_tracy::types::type_cast::TypeCast; +use crate::v2::lu_dog_vec_tracy::types::variable_expression::VariableExpression; +use crate::v2::lu_dog_vec_tracy::types::x_if::XIf; +use crate::v2::lu_dog_vec_tracy::types::x_match::XMatch; +use crate::v2::lu_dog_vec_tracy::types::x_path::XPath; +use crate::v2::lu_dog_vec_tracy::types::x_print::XPrint; +use crate::v2::lu_dog_vec_tracy::types::x_return::XReturn; +use crate::v2::lu_dog_vec_tracy::types::x_value::XValue; +use crate::v2::lu_dog_vec_tracy::types::x_value::XValueEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-hybrid-documentation"}}} +/// An Expression +/// +/// Expressions are calculations that render values. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Expression { + pub subtype: ExpressionEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum ExpressionEnum { + AWait(usize), + Block(usize), + Call(usize), + Debugger(Uuid), + EmptyExpression(Uuid), + FieldAccess(usize), + FieldExpression(usize), + ForLoop(usize), + Grouped(usize), + XIf(usize), + Index(usize), + Lambda(usize), + ListElement(usize), + ListExpression(usize), + Literal(usize), + XMatch(usize), + Operator(usize), + XPath(usize), + XPrint(usize), + RangeExpression(usize), + XReturn(usize), + StructExpression(usize), + TypeCast(usize), + VariableExpression(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-implementation"}}} +impl Expression { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_a_wait"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_a_wait( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::AWait(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_block"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_block( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::Block(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_call"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_call( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::Call(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_debugger"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_debugger(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::Debugger(DEBUGGER), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_empty_expression"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_empty_expression(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::EmptyExpression(EMPTY_EXPRESSION), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_field_access"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_field_access( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::FieldAccess(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_field_expression"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_field_expression( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::FieldExpression(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_for_loop"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_for_loop( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::ForLoop(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_grouped"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_grouped( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::Grouped(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_x_if"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_x_if( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::XIf(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_index"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_index( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::Index(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_lambda"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_lambda( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::Lambda(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_list_element"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_list_element( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::ListElement(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_list_expression"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_list_expression( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::ListExpression(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_literal"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_literal( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::Literal(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_x_match"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_x_match( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::XMatch(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_operator"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_operator( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::Operator(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_x_path"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_x_path( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::XPath(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_x_print"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_x_print( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::XPrint(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_range_expression"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_range_expression( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::RangeExpression(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_x_return"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_x_return( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::XReturn(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_struct_expression"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_struct_expression( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::StructExpression(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_type_cast"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_type_cast( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::TypeCast(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-new_variable_expression"}}} + /// Inter a new Expression in the store, and return it's `id`. + pub fn new_variable_expression( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression(|id| { + Rc::new(RefCell::new(Expression { + subtype: ExpressionEnum::VariableExpression(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-argument"}}} + /// Navigate to [`Argument`] across R37(1-M) + pub fn r37_argument<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r37_argument"); + store + .iter_argument() + .filter(|argument| argument.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-cond-to-a_wait"}}} + /// Navigate to [`AWait`] across R98(1-1c) + pub fn r98c_a_wait<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r98_a_wait"); + let a_wait = store + .iter_a_wait() + .find(|a_wait| a_wait.borrow().x_future == self.id); + match a_wait { + Some(ref a_wait) => vec![a_wait.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_Mc-to-call"}}} + /// Navigate to [`Call`] across R29(1-Mc) + pub fn r29_call<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r29_call"); + store + .iter_call() + .filter(|call| call.borrow().expression == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-expression_statement"}}} + /// Navigate to [`ExpressionStatement`] across R31(1-M) + pub fn r31_expression_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r31_expression_statement"); + store + .iter_expression_statement() + .filter(|expression_statement| expression_statement.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-field_access"}}} + /// Navigate to [`FieldAccess`] across R27(1-M) + pub fn r27_field_access<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r27_field_access"); + store + .iter_field_access() + .filter(|field_access| field_access.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-field_expression"}}} + /// Navigate to [`FieldExpression`] across R38(1-M) + pub fn r38_field_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r38_field_expression"); + store + .iter_field_expression() + .filter(|field_expression| field_expression.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-for_loop"}}} + /// Navigate to [`ForLoop`] across R42(1-M) + pub fn r42_for_loop<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r42_for_loop"); + store + .iter_for_loop() + .filter(|for_loop| for_loop.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-grouped"}}} + /// Navigate to [`Grouped`] across R61(1-M) + pub fn r61_grouped<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r61_grouped"); + store + .iter_grouped() + .filter(|grouped| grouped.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-x_if"}}} + /// Navigate to [`XIf`] across R44(1-M) + pub fn r44_x_if<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r44_x_if"); + store + .iter_x_if() + .filter(|x_if| x_if.borrow().test == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-index"}}} + /// Navigate to [`Index`] across R56(1-M) + pub fn r56_index<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r56_index"); + store + .iter_index() + .filter(|index| index.borrow().index == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-index"}}} + /// Navigate to [`Index`] across R57(1-M) + pub fn r57_index<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r57_index"); + store + .iter_index() + .filter(|index| index.borrow().target == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-cond-to-let_statement"}}} + /// Navigate to [`LetStatement`] across R20(1-1c) + pub fn r20c_let_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r20_let_statement"); + let let_statement = store + .iter_let_statement() + .find(|let_statement| let_statement.borrow().expression == self.id); + match let_statement { + Some(ref let_statement) => vec![let_statement.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-list_element"}}} + /// Navigate to [`ListElement`] across R55(1-M) + pub fn r55_list_element<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r55_list_element"); + store + .iter_list_element() + .filter(|list_element| list_element.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-x_match"}}} + /// Navigate to [`XMatch`] across R91(1-M) + pub fn r91_x_match<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r91_x_match"); + store + .iter_x_match() + .filter(|x_match| x_match.borrow().scrutinee == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_Mc-to-operator"}}} + /// Navigate to [`Operator`] across R51(1-Mc) + pub fn r51_operator<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r51_operator"); + store + .iter_operator() + .filter(|operator| operator.borrow().rhs == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-operator"}}} + /// Navigate to [`Operator`] across R50(1-M) + pub fn r50_operator<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r50_operator"); + store + .iter_operator() + .filter(|operator| operator.borrow().lhs == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-pattern"}}} + /// Navigate to [`Pattern`] across R92(1-M) + pub fn r92_pattern<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r92_pattern"); + store + .iter_pattern() + .filter(|pattern| pattern.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-x_print"}}} + /// Navigate to [`XPrint`] across R32(1-M) + pub fn r32_x_print<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r32_x_print"); + store + .iter_x_print() + .filter(|x_print| x_print.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_Mc-to-range_expression"}}} + /// Navigate to [`RangeExpression`] across R58(1-Mc) + pub fn r58_range_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r58_range_expression"); + store + .iter_range_expression() + .filter(|range_expression| range_expression.borrow().lhs == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_Mc-to-range_expression"}}} + /// Navigate to [`RangeExpression`] across R59(1-Mc) + pub fn r59_range_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r59_range_expression"); + store + .iter_range_expression() + .filter(|range_expression| range_expression.borrow().rhs == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-result_statement"}}} + /// Navigate to [`ResultStatement`] across R41(1-M) + pub fn r41_result_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r41_result_statement"); + store + .iter_result_statement() + .filter(|result_statement| result_statement.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-x_return"}}} + /// Navigate to [`XReturn`] across R45(1-M) + pub fn r45_x_return<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r45_x_return"); + store + .iter_x_return() + .filter(|x_return| x_return.borrow().expression == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-1_M-to-type_cast"}}} + /// Navigate to [`TypeCast`] across R68(1-M) + pub fn r68_type_cast<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r68_type_cast"); + store + .iter_type_cast() + .filter(|type_cast| type_cast.borrow().lhs == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-struct-impl-nav-backward-assoc-many-to-pattern"}}} + /// Navigate to [`Pattern`] across R87(1-M) + pub fn r87_pattern<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r87_pattern"); + store + .iter_pattern() + .filter(|pattern| pattern.borrow().match_expr == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-impl-nav-subtype-to-supertype-x_value"}}} + // Navigate to [`XValue`] across R11(isa) + pub fn r11_x_value<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r11_x_value"); + vec![store + .iter_x_value() + .find(|x_value| { + if let XValueEnum::Expression(id) = x_value.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression-implementation"}}} +impl PartialEq for Expression { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/expression_statement.rs b/src/v2/lu_dog_vec_tracy/types/expression_statement.rs new file mode 100644 index 00000000..20428124 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/expression_statement.rs @@ -0,0 +1,82 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"expression_statement-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression_statement-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::statement::Statement; +use crate::v2::lu_dog_vec_tracy::types::statement::StatementEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression_statement-struct-documentation"}}} +/// A statement that consists of just an expression. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression_statement-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ExpressionStatement { + pub id: usize, + /// R31: [`ExpressionStatement`] '' [`Expression`] + pub expression: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression_statement-implementation"}}} +impl ExpressionStatement { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression_statement-struct-impl-new"}}} + /// Inter a new 'Expression Statement' in the store, and return it's `id`. + pub fn new( + expression: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_expression_statement(|id| { + Rc::new(RefCell::new(ExpressionStatement { + id, + expression: expression.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression_statement-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R31(1-*) + pub fn r31_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r31_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression_statement-impl-nav-subtype-to-supertype-statement"}}} + // Navigate to [`Statement`] across R16(isa) + pub fn r16_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r16_statement"); + vec![store + .iter_statement() + .find(|statement| { + if let StatementEnum::ExpressionStatement(id) = statement.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"expression_statement-implementation"}}} +impl PartialEq for ExpressionStatement { + fn eq(&self, other: &Self) -> bool { + self.expression == other.expression + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/external_implementation.rs b/src/v2/lu_dog_vec_tracy/types/external_implementation.rs new file mode 100644 index 00000000..7fd4c4da --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/external_implementation.rs @@ -0,0 +1,75 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"external_implementation-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"external_implementation-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::body::Body; +use crate::v2::lu_dog_vec_tracy::types::body::BodyEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"external_implementation-struct-documentation"}}} +/// Some extern source of the function’s body. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"external_implementation-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ExternalImplementation { + pub function: String, + pub id: usize, + pub x_model: String, + pub object: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"external_implementation-implementation"}}} +impl ExternalImplementation { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"external_implementation-struct-impl-new"}}} + /// Inter a new 'External Implementation' in the store, and return it's `id`. + pub fn new( + function: String, + x_model: String, + object: String, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_external_implementation(|id| { + Rc::new(RefCell::new(ExternalImplementation { + function: function.to_owned(), + id, + x_model: x_model.to_owned(), + object: object.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"external_implementation-impl-nav-subtype-to-supertype-body"}}} + // Navigate to [`Body`] across R80(isa) + pub fn r80_body<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r80_body"); + vec![store + .iter_body() + .find(|body| { + if let BodyEnum::ExternalImplementation(id) = body.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"external_implementation-implementation"}}} +impl PartialEq for ExternalImplementation { + fn eq(&self, other: &Self) -> bool { + self.function == other.function + && self.x_model == other.x_model + && self.object == other.object + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/false_literal.rs b/src/v2/lu_dog_vec_tracy/types/false_literal.rs new file mode 100644 index 00000000..bf732022 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/false_literal.rs @@ -0,0 +1,35 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"false_literal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"false_literal-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"false_literal-const-documentation"}}} +/// False Literal +/// +/// The literal `false`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"false_literal-const-definition"}}} +pub const FALSE_LITERAL: Uuid = uuid!["a904e4be-d9ae-568d-9767-1098b31aba7f"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct FalseLiteral; + +impl FalseLiteral { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + FALSE_LITERAL + } +} + +impl Default for FalseLiteral { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/field.rs b/src/v2/lu_dog_vec_tracy/types/field.rs new file mode 100644 index 00000000..731559f0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/field.rs @@ -0,0 +1,102 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"field-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::field_access_target::FieldAccessTarget; +use crate::v2::lu_dog_vec_tracy::types::field_access_target::FieldAccessTargetEnum; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::woog_struct::WoogStruct; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-struct-documentation"}}} +/// A Field in a data structure +/// +/// A field has a name, and a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Field { + pub id: usize, + pub name: String, + /// R7: [`Field`] 'comprises a' [`WoogStruct`] + pub x_model: usize, + /// R5: [`Field`] 'has a' [`ValueType`] + pub ty: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-implementation"}}} +impl Field { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-struct-impl-new"}}} + /// Inter a new 'Field' in the store, and return it's `id`. + pub fn new( + name: String, + x_model: &Rc>, + ty: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_field(|id| { + Rc::new(RefCell::new(Field { + id, + name: name.to_owned(), + x_model: x_model.borrow().id, + ty: ty.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-struct-impl-nav-forward-to-x_model"}}} + /// Navigate to [`WoogStruct`] across R7(1-*) + pub fn r7_woog_struct<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r7_woog_struct"); + vec![store.exhume_woog_struct(&self.x_model).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-struct-impl-nav-forward-to-ty"}}} + /// Navigate to [`ValueType`] across R5(1-*) + pub fn r5_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r5_value_type"); + vec![store.exhume_value_type(&self.ty).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-impl-nav-subtype-to-supertype-field_access_target"}}} + // Navigate to [`FieldAccessTarget`] across R67(isa) + pub fn r67_field_access_target<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r67_field_access_target"); + vec![store + .iter_field_access_target() + .find(|field_access_target| { + if let FieldAccessTargetEnum::Field(id) = field_access_target.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field-implementation"}}} +impl PartialEq for Field { + fn eq(&self, other: &Self) -> bool { + self.name == other.name && self.x_model == other.x_model && self.ty == other.ty + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/field_access.rs b/src/v2/lu_dog_vec_tracy/types/field_access.rs new file mode 100644 index 00000000..ea357ddf --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/field_access.rs @@ -0,0 +1,115 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"field_access-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::field_access_target::FieldAccessTarget; +use crate::v2::lu_dog_vec_tracy::types::woog_struct::WoogStruct; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-struct-documentation"}}} +/// A Struct Field Access +/// +/// Think dotted notation. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct FieldAccess { + pub id: usize, + /// R27: [`FieldAccess`] 'contains an' [`Expression`] + pub expression: usize, + /// R65: [`FieldAccess`] '' [`FieldAccessTarget`] + pub field: usize, + /// R66: [`FieldAccess`] '' [`WoogStruct`] + pub woog_struct: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-implementation"}}} +impl FieldAccess { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-struct-impl-new"}}} + /// Inter a new 'Field Access' in the store, and return it's `id`. + pub fn new( + expression: &Rc>, + field: &Rc>, + woog_struct: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_field_access(|id| { + Rc::new(RefCell::new(FieldAccess { + id, + expression: expression.borrow().id, + field: field.borrow().id, + woog_struct: woog_struct.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R27(1-*) + pub fn r27_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r27_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-struct-impl-nav-forward-to-field"}}} + /// Navigate to [`FieldAccessTarget`] across R65(1-*) + pub fn r65_field_access_target<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r65_field_access_target"); + vec![store.exhume_field_access_target(&self.field).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-struct-impl-nav-forward-to-woog_struct"}}} + /// Navigate to [`WoogStruct`] across R66(1-*) + pub fn r66_woog_struct<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r66_woog_struct"); + vec![store.exhume_woog_struct(&self.woog_struct).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::FieldAccess(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access-implementation"}}} +impl PartialEq for FieldAccess { + fn eq(&self, other: &Self) -> bool { + self.expression == other.expression + && self.field == other.field + && self.woog_struct == other.woog_struct + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/field_access_target.rs b/src/v2/lu_dog_vec_tracy/types/field_access_target.rs new file mode 100644 index 00000000..054fc3bb --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/field_access_target.rs @@ -0,0 +1,104 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"field_access_target-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::enum_field::EnumField; +use crate::v2::lu_dog_vec_tracy::types::field::Field; +use crate::v2::lu_dog_vec_tracy::types::field_access::FieldAccess; +use crate::v2::lu_dog_vec_tracy::types::function::Function; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-hybrid-documentation"}}} +/// The target of a field access. +/// +/// It may be either a [`Field`] or a [`Function`]. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct FieldAccessTarget { + pub subtype: FieldAccessTargetEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum FieldAccessTargetEnum { + EnumField(usize), + Field(usize), + Function(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-implementation"}}} +impl FieldAccessTarget { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-struct-impl-new_enum_field"}}} + /// Inter a new FieldAccessTarget in the store, and return it's `id`. + pub fn new_enum_field( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_field_access_target(|id| { + Rc::new(RefCell::new(FieldAccessTarget { + subtype: FieldAccessTargetEnum::EnumField(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-struct-impl-new_field"}}} + /// Inter a new FieldAccessTarget in the store, and return it's `id`. + pub fn new_field( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_field_access_target(|id| { + Rc::new(RefCell::new(FieldAccessTarget { + subtype: FieldAccessTargetEnum::Field(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-struct-impl-new_function"}}} + /// Inter a new FieldAccessTarget in the store, and return it's `id`. + pub fn new_function( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_field_access_target(|id| { + Rc::new(RefCell::new(FieldAccessTarget { + subtype: FieldAccessTargetEnum::Function(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-struct-impl-nav-backward-1_M-to-field_access"}}} + /// Navigate to [`FieldAccess`] across R65(1-M) + pub fn r65_field_access<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r65_field_access"); + store + .iter_field_access() + .filter(|field_access| field_access.borrow().field == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_access_target-implementation"}}} +impl PartialEq for FieldAccessTarget { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/field_expression.rs b/src/v2/lu_dog_vec_tracy/types/field_expression.rs new file mode 100644 index 00000000..a5233b78 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/field_expression.rs @@ -0,0 +1,130 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"field_expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::named_field_expression::NamedFieldExpression; +use crate::v2::lu_dog_vec_tracy::types::struct_expression::StructExpression; +use crate::v2::lu_dog_vec_tracy::types::unnamed_field_expression::UnnamedFieldExpression; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-hybrid-documentation"}}} +/// A Struct Field Expression +/// +/// This assigns a value to a field in a structure. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct FieldExpression { + pub subtype: FieldExpressionEnum, + pub id: usize, + /// R38: [`FieldExpression`] '' [`Expression`] + pub expression: usize, + /// R26: [`FieldExpression`] 'belongs to a' [`StructExpression`] + pub woog_struct: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum FieldExpressionEnum { + NamedFieldExpression(usize), + UnnamedFieldExpression(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-implementation"}}} +impl FieldExpression { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-struct-impl-new_named_field_expression"}}} + /// Inter a new FieldExpression in the store, and return it's `id`. + pub fn new_named_field_expression( + expression: &Rc>, + woog_struct: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_field_expression(|id| { + Rc::new(RefCell::new(FieldExpression { + expression: expression.borrow().id, + woog_struct: woog_struct.borrow().id, + subtype: FieldExpressionEnum::NamedFieldExpression(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-struct-impl-new_unnamed_field_expression"}}} + /// Inter a new FieldExpression in the store, and return it's `id`. + pub fn new_unnamed_field_expression( + expression: &Rc>, + woog_struct: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_field_expression(|id| { + Rc::new(RefCell::new(FieldExpression { + expression: expression.borrow().id, + woog_struct: woog_struct.borrow().id, + subtype: FieldExpressionEnum::UnnamedFieldExpression(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R38(1-*) + pub fn r38_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r38_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-struct-impl-nav-forward-to-woog_struct"}}} + /// Navigate to [`StructExpression`] across R26(1-*) + pub fn r26_struct_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r26_struct_expression"); + vec![store.exhume_struct_expression(&self.woog_struct).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::FieldExpression(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"field_expression-implementation"}}} +impl PartialEq for FieldExpression { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + && self.expression == other.expression + && self.woog_struct == other.woog_struct + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/float_literal.rs b/src/v2/lu_dog_vec_tracy/types/float_literal.rs new file mode 100644 index 00000000..455321b2 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/float_literal.rs @@ -0,0 +1,61 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"float_literal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"float_literal-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::literal::Literal; +use crate::v2::lu_dog_vec_tracy::types::literal::LiteralEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"float_literal-struct-documentation"}}} +/// A Floating Point Literal +/// +/// Nothing fancy. No scientific notation. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"float_literal-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct FloatLiteral { + pub id: usize, + pub x_value: f64, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"float_literal-implementation"}}} +impl FloatLiteral { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"float_literal-struct-impl-new"}}} + /// Inter a new 'Float Literal' in the store, and return it's `id`. + pub fn new(x_value: f64, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_float_literal(|id| Rc::new(RefCell::new(FloatLiteral { id, x_value }))) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"float_literal-impl-nav-subtype-to-supertype-literal"}}} + // Navigate to [`Literal`] across R22(isa) + pub fn r22_literal<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r22_literal"); + vec![store + .iter_literal() + .find(|literal| { + if let LiteralEnum::FloatLiteral(id) = literal.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"float_literal-implementation"}}} +impl PartialEq for FloatLiteral { + fn eq(&self, other: &Self) -> bool { + self.x_value == other.x_value + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/for_loop.rs b/src/v2/lu_dog_vec_tracy/types/for_loop.rs new file mode 100644 index 00000000..34c6f021 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/for_loop.rs @@ -0,0 +1,100 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"for_loop-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::block::Block; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-struct-documentation"}}} +/// A For Loop Expression +/// +/// An expression that matches for IDENT in EXPRESSION BLOCK. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ForLoop { + pub id: usize, + pub ident: String, + /// R43: [`ForLoop`] 'executes a' [`Block`] + pub block: usize, + /// R42: [`ForLoop`] 'iterates over an' [`Expression`] + pub expression: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-implementation"}}} +impl ForLoop { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-struct-impl-new"}}} + /// Inter a new 'For Loop' in the store, and return it's `id`. + pub fn new( + ident: String, + block: &Rc>, + expression: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_for_loop(|id| { + Rc::new(RefCell::new(ForLoop { + id, + ident: ident.to_owned(), + block: block.borrow().id, + expression: expression.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-struct-impl-nav-forward-to-block"}}} + /// Navigate to [`Block`] across R43(1-*) + pub fn r43_block<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r43_block"); + vec![store.exhume_block(&self.block).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R42(1-*) + pub fn r42_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r42_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::ForLoop(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"for_loop-implementation"}}} +impl PartialEq for ForLoop { + fn eq(&self, other: &Self) -> bool { + self.ident == other.ident + && self.block == other.block + && self.expression == other.expression + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/from.rs b/src/v2/lu_dog_vec_tracy/types/from.rs new file mode 100644 index 00000000..ff1c437d --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/from.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"from-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"from-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"from-const-definition"}}} +pub const FROM: Uuid = uuid!["5285c810-0e61-535f-b961-a43471f21357"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct From; + +impl From { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + FROM + } +} + +impl Default for From { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/full.rs b/src/v2/lu_dog_vec_tracy/types/full.rs new file mode 100644 index 00000000..390a5fe2 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/full.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"full-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"full-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"full-const-definition"}}} +pub const FULL: Uuid = uuid!["3f2af943-5322-5ea2-a261-1e4626a1123a"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Full; + +impl Full { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + FULL + } +} + +impl Default for Full { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/function.rs b/src/v2/lu_dog_vec_tracy/types/function.rs new file mode 100644 index 00000000..532befc9 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/function.rs @@ -0,0 +1,190 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"function-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::body::Body; +use crate::v2::lu_dog_vec_tracy::types::field_access_target::FieldAccessTarget; +use crate::v2::lu_dog_vec_tracy::types::field_access_target::FieldAccessTargetEnum; +use crate::v2::lu_dog_vec_tracy::types::implementation_block::ImplementationBlock; +use crate::v2::lu_dog_vec_tracy::types::item::Item; +use crate::v2::lu_dog_vec_tracy::types::item::ItemEnum; +use crate::v2::lu_dog_vec_tracy::types::parameter::Parameter; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-struct-documentation"}}} +/// A Function +/// +/// Inputs, outputs. Stuff happens. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Function { + pub id: usize, + pub name: String, + /// R19: [`Function`] 'executes statements in a' [`Body`] + pub body: usize, + /// R82: [`Function`] 'may have a first parameter' [`Parameter`] + pub first_param: Option, + /// R9: [`Function`] 'may be contained in an' [`ImplementationBlock`] + pub impl_block: Option, + /// R10: [`Function`] 'returns' [`ValueType`] + pub return_type: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-implementation"}}} +impl Function { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-struct-impl-new"}}} + /// Inter a new 'Function' in the store, and return it's `id`. + pub fn new( + name: String, + body: &Rc>, + first_param: Option<&Rc>>, + impl_block: Option<&Rc>>, + return_type: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_function(|id| { + Rc::new(RefCell::new(Function { + id, + name: name.to_owned(), + body: body.borrow().id, + first_param: first_param.map(|parameter| parameter.borrow().id), + impl_block: impl_block.map(|implementation_block| implementation_block.borrow().id), + return_type: return_type.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-struct-impl-nav-forward-to-body"}}} + /// Navigate to [`Body`] across R19(1-*) + pub fn r19_body<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r19_body"); + vec![store.exhume_body(&self.body).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-struct-impl-nav-forward-cond-to-first_param"}}} + /// Navigate to [`Parameter`] across R82(1-*c) + pub fn r82_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r82_parameter"); + match self.first_param { + Some(ref first_param) => vec![store.exhume_parameter(&first_param).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-struct-impl-nav-forward-cond-to-impl_block"}}} + /// Navigate to [`ImplementationBlock`] across R9(1-*c) + pub fn r9_implementation_block<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r9_implementation_block"); + match self.impl_block { + Some(ref impl_block) => vec![store.exhume_implementation_block(&impl_block).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-struct-impl-nav-forward-to-return_type"}}} + /// Navigate to [`ValueType`] across R10(1-*) + pub fn r10_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r10_value_type"); + vec![store.exhume_value_type(&self.return_type).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-struct-impl-nav-backward-1_M-to-parameter"}}} + /// Navigate to [`Parameter`] across R13(1-M) + pub fn r13_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r13_parameter"); + store + .iter_parameter() + .filter(|parameter| parameter.borrow().function == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-impl-nav-subtype-to-supertype-field_access_target"}}} + // Navigate to [`FieldAccessTarget`] across R67(isa) + pub fn r67_field_access_target<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r67_field_access_target"); + vec![store + .iter_field_access_target() + .find(|field_access_target| { + if let FieldAccessTargetEnum::Function(id) = field_access_target.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-impl-nav-subtype-to-supertype-item"}}} + // Navigate to [`Item`] across R6(isa) + pub fn r6_item<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r6_item"); + vec![store + .iter_item() + .find(|item| { + if let ItemEnum::Function(id) = item.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::Function(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function-implementation"}}} +impl PartialEq for Function { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + && self.body == other.body + && self.first_param == other.first_param + && self.impl_block == other.impl_block + && self.return_type == other.return_type + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/function_call.rs b/src/v2/lu_dog_vec_tracy/types/function_call.rs new file mode 100644 index 00000000..bc15395e --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/function_call.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"function_call-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function_call-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"function_call-const-definition"}}} +pub const FUNCTION_CALL: Uuid = uuid!["e6133810-843b-5dab-90a4-c424232d5205"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct FunctionCall; + +impl FunctionCall { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + FUNCTION_CALL + } +} + +impl Default for FunctionCall { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/generic.rs b/src/v2/lu_dog_vec_tracy/types/generic.rs new file mode 100644 index 00000000..b9b65d71 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/generic.rs @@ -0,0 +1,117 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"generic-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-struct-documentation"}}} +/// This is a generic “type”. +/// +/// It’s really a placeholder in the extruder/compiler. We’ll use it as a type declaration +/// , and then define a new type for each use. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Generic { + pub id: usize, + pub name: String, + /// R3: [`Generic`] 'next' [`Generic`] + pub next: Option, + /// R99: [`Generic`] 'has an inner' [`ValueType`] + pub ty: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-implementation"}}} +impl Generic { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-struct-impl-new"}}} + /// Inter a new 'Generic' in the store, and return it's `id`. + pub fn new( + name: String, + next: Option<&Rc>>, + ty: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_generic(|id| { + Rc::new(RefCell::new(Generic { + id, + name: name.to_owned(), + next: next.map(|generic| generic.borrow().id), + ty: ty.map(|value_type| value_type.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-struct-impl-nav-forward-cond-to-next"}}} + /// Navigate to [`Generic`] across R3(1-*c) + pub fn r3_generic<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r3_generic"); + match self.next { + Some(ref next) => vec![store.exhume_generic(&next).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-struct-impl-nav-forward-cond-to-ty"}}} + /// Navigate to [`ValueType`] across R99(1-*c) + pub fn r99_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r99_value_type"); + match self.ty { + Some(ref ty) => vec![store.exhume_value_type(&ty).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-struct-impl-nav-backward-one-bi-cond-to-generic"}}} + /// Navigate to [`Generic`] across R3(1c-1c) + pub fn r3c_generic<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r3_generic"); + let generic = store + .iter_generic() + .find(|generic| generic.borrow().next == Some(self.id)); + match generic { + Some(ref generic) => vec![generic.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::Generic(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"generic-implementation"}}} +impl PartialEq for Generic { + fn eq(&self, other: &Self) -> bool { + self.name == other.name && self.next == other.next && self.ty == other.ty + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/greater_than.rs b/src/v2/lu_dog_vec_tracy/types/greater_than.rs new file mode 100644 index 00000000..b1c99b86 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/greater_than.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"greater_than-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"greater_than-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"greater_than-const-definition"}}} +pub const GREATER_THAN: Uuid = uuid!["b712aab1-95c2-5342-8494-d35bf3c161fe"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct GreaterThan; + +impl GreaterThan { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + GREATER_THAN + } +} + +impl Default for GreaterThan { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/greater_than_or_equal.rs b/src/v2/lu_dog_vec_tracy/types/greater_than_or_equal.rs new file mode 100644 index 00000000..d815774d --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/greater_than_or_equal.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"greater_than_or_equal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"greater_than_or_equal-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"greater_than_or_equal-const-definition"}}} +pub const GREATER_THAN_OR_EQUAL: Uuid = uuid!["4f5675c8-9119-51c7-8ede-5639aebb3f19"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct GreaterThanOrEqual; + +impl GreaterThanOrEqual { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + GREATER_THAN_OR_EQUAL + } +} + +impl Default for GreaterThanOrEqual { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/grouped.rs b/src/v2/lu_dog_vec_tracy/types/grouped.rs new file mode 100644 index 00000000..868fac9a --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/grouped.rs @@ -0,0 +1,81 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"grouped-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"grouped-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"grouped-struct-documentation"}}} +/// Parens +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"grouped-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Grouped { + pub id: usize, + /// R61: [`Grouped`] '' [`Expression`] + pub expression: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"grouped-implementation"}}} +impl Grouped { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"grouped-struct-impl-new"}}} + /// Inter a new 'Grouped' in the store, and return it's `id`. + pub fn new( + expression: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_grouped(|id| { + Rc::new(RefCell::new(Grouped { + id, + expression: expression.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"grouped-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R61(1-*) + pub fn r61_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r61_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"grouped-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::Grouped(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"grouped-implementation"}}} +impl PartialEq for Grouped { + fn eq(&self, other: &Self) -> bool { + self.expression == other.expression + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/implementation_block.rs b/src/v2/lu_dog_vec_tracy/types/implementation_block.rs new file mode 100644 index 00000000..847f1a41 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/implementation_block.rs @@ -0,0 +1,130 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"implementation_block-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::enumeration::Enumeration; +use crate::v2::lu_dog_vec_tracy::types::function::Function; +use crate::v2::lu_dog_vec_tracy::types::item::Item; +use crate::v2::lu_dog_vec_tracy::types::item::ItemEnum; +use crate::v2::lu_dog_vec_tracy::types::woog_struct::WoogStruct; +use crate::v2::lu_dog_vec_tracy::types::z_object_store::ZObjectStore; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-struct-documentation"}}} +/// An Implementation Block +/// +/// Inside this block functions are defined on a [`ModellType`]. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ImplementationBlock { + pub id: usize, + /// R8: [`ImplementationBlock`] 'adds functions to a' [`WoogStruct`] + pub model_type: Option, + /// R83: [`ImplementationBlock`] 'may refer to an' [`ZObjectStore`] + pub object_store: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-implementation"}}} +impl ImplementationBlock { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-struct-impl-new"}}} + /// Inter a new 'Implementation Block' in the store, and return it's `id`. + pub fn new( + model_type: Option<&Rc>>, + object_store: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_implementation_block(|id| { + Rc::new(RefCell::new(ImplementationBlock { + id, + model_type: model_type.map(|woog_struct| woog_struct.borrow().id), + object_store: object_store.map(|z_object_store| z_object_store.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-struct-impl-nav-forward-cond-to-model_type"}}} + /// Navigate to [`WoogStruct`] across R8(1-*c) + pub fn r8_woog_struct<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r8_woog_struct"); + match self.model_type { + Some(ref model_type) => vec![store.exhume_woog_struct(&model_type).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-struct-impl-nav-forward-cond-to-object_store"}}} + /// Navigate to [`ZObjectStore`] across R83(1-*c) + pub fn r83_z_object_store<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r83_z_object_store"); + match self.object_store { + Some(ref object_store) => vec![store.exhume_z_object_store(&object_store).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-struct-impl-nav-backward-one-bi-cond-to-enumeration"}}} + /// Navigate to [`Enumeration`] across R84(1c-1c) + pub fn r84c_enumeration<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r84_enumeration"); + let enumeration = store + .iter_enumeration() + .find(|enumeration| enumeration.borrow().implementation == Some(self.id)); + match enumeration { + Some(ref enumeration) => vec![enumeration.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-struct-impl-nav-backward-1_Mc-to-function"}}} + /// Navigate to [`Function`] across R9(1-Mc) + pub fn r9_function<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r9_function"); + store + .iter_function() + .filter(|function| function.borrow().impl_block == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-impl-nav-subtype-to-supertype-item"}}} + // Navigate to [`Item`] across R6(isa) + pub fn r6_item<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r6_item"); + vec![store + .iter_item() + .find(|item| { + if let ItemEnum::ImplementationBlock(id) = item.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"implementation_block-implementation"}}} +impl PartialEq for ImplementationBlock { + fn eq(&self, other: &Self) -> bool { + self.model_type == other.model_type && self.object_store == other.object_store + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/import.rs b/src/v2/lu_dog_vec_tracy/types/import.rs new file mode 100644 index 00000000..baf7c658 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/import.rs @@ -0,0 +1,131 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"import-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::item::Item; +use crate::v2::lu_dog_vec_tracy::types::item::ItemEnum; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use crate::v2::sarzak::types::object::Object; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +use crate::v2::sarzak::store::ObjectStore as SarzakStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-struct-documentation"}}} +/// An Import of a foreign ObjectStore +/// +/// This indicates to the downstream model compiler that it needs to emit code to load the imported +/// ObjectStore. +/// +/// I've got this has_alias boolean here because I don't have `Option`. I never needed +/// it until now, because you get an option with a 1c relationship. Not proud of this, but it's +/// the best alternative. Makes me wonder about adding an `Option` type to the primitives though +/// . +/// +/// I suppose if there were a way to signify a null string. Or I could check if it's length +/// is 0. I think adding the bool is cleaner. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Import { + pub alias: String, + pub has_alias: bool, + pub id: usize, + pub name: String, + pub x_path: String, + /// R40: [`Import`] '' [`Object`] + pub object: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-implementation"}}} +impl Import { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-struct-impl-new"}}} + /// Inter a new 'Import' in the store, and return it's `id`. + pub fn new( + alias: String, + has_alias: bool, + name: String, + x_path: String, + object: Option<&Object>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_import(|id| { + Rc::new(RefCell::new(Import { + alias: alias.to_owned(), + has_alias, + id, + name: name.to_owned(), + x_path: x_path.to_owned(), + object: object.as_ref().map(|object| object.id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-struct-impl-nav-forward-cond-to-object"}}} + /// Navigate to [`Object`] across R40(1-*c) + pub fn r40_object<'a>( + &'a self, + store: &'a SarzakStore, + ) -> Vec>> { + span!("r40_object"); + match self.object { + Some(ref object) => vec![store.exhume_object(&object).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-impl-nav-subtype-to-supertype-item"}}} + // Navigate to [`Item`] across R6(isa) + pub fn r6_item<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r6_item"); + vec![store + .iter_item() + .find(|item| { + if let ItemEnum::Import(id) = item.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::Import(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"import-implementation"}}} +impl PartialEq for Import { + fn eq(&self, other: &Self) -> bool { + self.alias == other.alias + && self.has_alias == other.has_alias + && self.name == other.name + && self.x_path == other.x_path + && self.object == other.object + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/inclusive.rs b/src/v2/lu_dog_vec_tracy/types/inclusive.rs new file mode 100644 index 00000000..424cf6a0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/inclusive.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"inclusive-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"inclusive-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"inclusive-const-definition"}}} +pub const INCLUSIVE: Uuid = uuid!["25e8e986-5a74-5da1-b4d1-496e9f126860"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Inclusive; + +impl Inclusive { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + INCLUSIVE + } +} + +impl Default for Inclusive { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/index.rs b/src/v2/lu_dog_vec_tracy/types/index.rs new file mode 100644 index 00000000..4bdd0461 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/index.rs @@ -0,0 +1,95 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"index-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-struct-documentation"}}} +/// An index expression +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Index { + pub id: usize, + /// R56: [`Index`] '' [`Expression`] + pub index: usize, + /// R57: [`Index`] '' [`Expression`] + pub target: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-implementation"}}} +impl Index { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-struct-impl-new"}}} + /// Inter a new 'Index' in the store, and return it's `id`. + pub fn new( + index: &Rc>, + target: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_index(|id| { + Rc::new(RefCell::new(Index { + id, + index: index.borrow().id, + target: target.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-struct-impl-nav-forward-to-index"}}} + /// Navigate to [`Expression`] across R56(1-*) + pub fn r56_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r56_expression"); + vec![store.exhume_expression(&self.index).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-struct-impl-nav-forward-to-target"}}} + /// Navigate to [`Expression`] across R57(1-*) + pub fn r57_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r57_expression"); + vec![store.exhume_expression(&self.target).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::Index(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"index-implementation"}}} +impl PartialEq for Index { + fn eq(&self, other: &Self) -> bool { + self.index == other.index && self.target == other.target + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/integer_literal.rs b/src/v2/lu_dog_vec_tracy/types/integer_literal.rs new file mode 100644 index 00000000..e0501c46 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/integer_literal.rs @@ -0,0 +1,61 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"integer_literal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"integer_literal-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::literal::Literal; +use crate::v2::lu_dog_vec_tracy::types::literal::LiteralEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"integer_literal-struct-documentation"}}} +/// An Integer +/// +/// I'm not sure what to do about width. I think I coded it as an i64 in the parser. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"integer_literal-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct IntegerLiteral { + pub id: usize, + pub x_value: i64, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"integer_literal-implementation"}}} +impl IntegerLiteral { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"integer_literal-struct-impl-new"}}} + /// Inter a new 'Integer Literal' in the store, and return it's `id`. + pub fn new(x_value: i64, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_integer_literal(|id| Rc::new(RefCell::new(IntegerLiteral { id, x_value }))) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"integer_literal-impl-nav-subtype-to-supertype-literal"}}} + // Navigate to [`Literal`] across R22(isa) + pub fn r22_literal<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r22_literal"); + vec![store + .iter_literal() + .find(|literal| { + if let LiteralEnum::IntegerLiteral(id) = literal.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"integer_literal-implementation"}}} +impl PartialEq for IntegerLiteral { + fn eq(&self, other: &Self) -> bool { + self.x_value == other.x_value + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/item.rs b/src/v2/lu_dog_vec_tracy/types/item.rs new file mode 100644 index 00000000..4080a91b --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/item.rs @@ -0,0 +1,157 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"item-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::dwarf_source_file::DwarfSourceFile; +use crate::v2::lu_dog_vec_tracy::types::enumeration::Enumeration; +use crate::v2::lu_dog_vec_tracy::types::function::Function; +use crate::v2::lu_dog_vec_tracy::types::implementation_block::ImplementationBlock; +use crate::v2::lu_dog_vec_tracy::types::import::Import; +use crate::v2::lu_dog_vec_tracy::types::woog_struct::WoogStruct; +use crate::v2::lu_dog_vec_tracy::types::x_macro::XMacro; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Item { + pub subtype: ItemEnum, + pub id: usize, + /// R25: [`Item`] '' [`DwarfSourceFile`] + pub source: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum ItemEnum { + Enumeration(usize), + Function(usize), + ImplementationBlock(usize), + Import(usize), + XMacro(usize), + WoogStruct(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-implementation"}}} +impl Item { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-struct-impl-new_enumeration"}}} + /// Inter a new Item in the store, and return it's `id`. + pub fn new_enumeration( + source: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_item(|id| { + Rc::new(RefCell::new(Item { + source: source.borrow().id, + subtype: ItemEnum::Enumeration(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-struct-impl-new_function"}}} + /// Inter a new Item in the store, and return it's `id`. + pub fn new_function( + source: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_item(|id| { + Rc::new(RefCell::new(Item { + source: source.borrow().id, + subtype: ItemEnum::Function(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-struct-impl-new_implementation_block"}}} + /// Inter a new Item in the store, and return it's `id`. + pub fn new_implementation_block( + source: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_item(|id| { + Rc::new(RefCell::new(Item { + source: source.borrow().id, + subtype: ItemEnum::ImplementationBlock(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-struct-impl-new_import"}}} + /// Inter a new Item in the store, and return it's `id`. + pub fn new_import( + source: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_item(|id| { + Rc::new(RefCell::new(Item { + source: source.borrow().id, + subtype: ItemEnum::Import(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-struct-impl-new_x_macro"}}} + /// Inter a new Item in the store, and return it's `id`. + pub fn new_x_macro( + source: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_item(|id| { + Rc::new(RefCell::new(Item { + source: source.borrow().id, + subtype: ItemEnum::XMacro(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-struct-impl-new_woog_struct"}}} + /// Inter a new Item in the store, and return it's `id`. + pub fn new_woog_struct( + source: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_item(|id| { + Rc::new(RefCell::new(Item { + source: source.borrow().id, + subtype: ItemEnum::WoogStruct(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-struct-impl-nav-forward-to-source"}}} + /// Navigate to [`DwarfSourceFile`] across R25(1-*) + pub fn r25_dwarf_source_file<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r25_dwarf_source_file"); + vec![store.exhume_dwarf_source_file(&self.source).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item-implementation"}}} +impl PartialEq for Item { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype && self.source == other.source + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/item_statement.rs b/src/v2/lu_dog_vec_tracy/types/item_statement.rs new file mode 100644 index 00000000..5dea8849 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/item_statement.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"item_statement-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item_statement-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item_statement-const-documentation"}}} +/// An Item in statement position, i.e., inside of a block. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"item_statement-const-definition"}}} +pub const ITEM_STATEMENT: Uuid = uuid!["309ad411-ef8c-5b27-9d1d-e4e37a5806de"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ItemStatement; + +impl ItemStatement { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ITEM_STATEMENT + } +} + +impl Default for ItemStatement { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/lambda.rs b/src/v2/lu_dog_vec_tracy/types/lambda.rs new file mode 100644 index 00000000..0b498a59 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/lambda.rs @@ -0,0 +1,155 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"lambda-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::body::Body; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::lambda_parameter::LambdaParameter; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-documentation"}}} +/// Lambda Function +/// +/// It’s a function, it has a type, parameters, etc. It does not have a name, which is problematic +/// with Function having one. It’s also an Expression, unlike a Function. +/// +/// I should think about creating another function subtype that contains just the name... +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Lambda { + pub id: usize, + /// R73: [`Lambda`] 'contains a' [`Body`] + pub body: Option, + /// R103: [`Lambda`] 'may have a' [`LambdaParameter`] + pub first_param: Option, + /// R74: [`Lambda`] 'has a' [`ValueType`] + pub return_type: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-implementation"}}} +impl Lambda { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-new"}}} + /// Inter a new 'Lambda' in the store, and return it's `id`. + pub fn new( + body: Option<&Rc>>, + first_param: Option<&Rc>>, + return_type: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_lambda(|id| { + Rc::new(RefCell::new(Lambda { + id, + body: body.map(|body| body.borrow().id), + first_param: first_param.map(|lambda_parameter| lambda_parameter.borrow().id), + return_type: return_type.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-cond-to-body"}}} + /// Navigate to [`Body`] across R73(1-*c) + pub fn r73_body<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r73_body"); + match self.body { + Some(ref body) => vec![store.exhume_body(&body).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-cond-to-first_param"}}} + /// Navigate to [`LambdaParameter`] across R103(1-*c) + pub fn r103_lambda_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r103_lambda_parameter"); + match self.first_param { + Some(ref first_param) => vec![store.exhume_lambda_parameter(&first_param).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-forward-to-return_type"}}} + /// Navigate to [`ValueType`] across R74(1-*) + pub fn r74_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r74_value_type"); + vec![store.exhume_value_type(&self.return_type).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-struct-impl-nav-backward-1_M-to-lambda_parameter"}}} + /// Navigate to [`LambdaParameter`] across R76(1-M) + pub fn r76_lambda_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r76_lambda_parameter"); + store + .iter_lambda_parameter() + .filter(|lambda_parameter| lambda_parameter.borrow().lambda == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::Lambda(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::Lambda(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda-implementation"}}} +impl PartialEq for Lambda { + fn eq(&self, other: &Self) -> bool { + self.body == other.body + && self.first_param == other.first_param + && self.return_type == other.return_type + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/lambda_parameter.rs b/src/v2/lu_dog_vec_tracy/types/lambda_parameter.rs new file mode 100644 index 00000000..e24b05f8 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/lambda_parameter.rs @@ -0,0 +1,143 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"lambda_parameter-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::lambda::Lambda; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::variable::Variable; +use crate::v2::lu_dog_vec_tracy::types::variable::VariableEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-documentation"}}} +/// id +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct LambdaParameter { + pub id: usize, + pub position: i64, + /// R76: [`LambdaParameter`] 'helps define a function signature' [`Lambda`] + pub lambda: usize, + /// R75: [`LambdaParameter`] '' [`LambdaParameter`] + pub next: Option, + /// R77: [`LambdaParameter`] 'may require a type' [`ValueType`] + pub ty: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-implementation"}}} +impl LambdaParameter { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-new"}}} + /// Inter a new 'Lambda Parameter' in the store, and return it's `id`. + pub fn new( + position: i64, + lambda: &Rc>, + next: Option<&Rc>>, + ty: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_lambda_parameter(|id| { + Rc::new(RefCell::new(LambdaParameter { + id, + position, + lambda: lambda.borrow().id, + next: next.map(|lambda_parameter| lambda_parameter.borrow().id), + ty: ty.map(|value_type| value_type.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-forward-to-lambda"}}} + /// Navigate to [`Lambda`] across R76(1-*) + pub fn r76_lambda<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r76_lambda"); + vec![store.exhume_lambda(&self.lambda).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-forward-cond-to-next"}}} + /// Navigate to [`LambdaParameter`] across R75(1-*c) + pub fn r75_lambda_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r75_lambda_parameter"); + match self.next { + Some(ref next) => vec![store.exhume_lambda_parameter(&next).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-forward-cond-to-ty"}}} + /// Navigate to [`ValueType`] across R77(1-*c) + pub fn r77_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r77_value_type"); + match self.ty { + Some(ref ty) => vec![store.exhume_value_type(&ty).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-backward-one-to-lambda"}}} + /// Navigate to [`Lambda`] across R103(1-1) + pub fn r103_lambda<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r103_lambda"); + vec![store + .iter_lambda() + .find(|lambda| lambda.borrow().first_param == Some(self.id)) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-struct-impl-nav-backward-one-bi-cond-to-lambda_parameter"}}} + /// Navigate to [`LambdaParameter`] across R75(1c-1c) + pub fn r75c_lambda_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r75_lambda_parameter"); + let lambda_parameter = store + .iter_lambda_parameter() + .find(|lambda_parameter| lambda_parameter.borrow().next == Some(self.id)); + match lambda_parameter { + Some(ref lambda_parameter) => vec![lambda_parameter.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-impl-nav-subtype-to-supertype-variable"}}} + // Navigate to [`Variable`] across R12(isa) + pub fn r12_variable<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r12_variable"); + vec![store + .iter_variable() + .find(|variable| { + if let VariableEnum::LambdaParameter(id) = variable.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"lambda_parameter-implementation"}}} +impl PartialEq for LambdaParameter { + fn eq(&self, other: &Self) -> bool { + self.position == other.position + && self.lambda == other.lambda + && self.next == other.next + && self.ty == other.ty + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/less_than.rs b/src/v2/lu_dog_vec_tracy/types/less_than.rs new file mode 100644 index 00000000..5f4ad311 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/less_than.rs @@ -0,0 +1,34 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"less_than-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"less_than-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"less_than-const-documentation"}}} +/// Less that operator `<` +/// +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"less_than-const-definition"}}} +pub const LESS_THAN: Uuid = uuid!["42ad4f7a-0828-519b-99b7-514577d12634"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct LessThan; + +impl LessThan { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + LESS_THAN + } +} + +impl Default for LessThan { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/less_than_or_equal.rs b/src/v2/lu_dog_vec_tracy/types/less_than_or_equal.rs new file mode 100644 index 00000000..e12d1ed3 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/less_than_or_equal.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"less_than_or_equal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"less_than_or_equal-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"less_than_or_equal-const-documentation"}}} +/// Less than or equal: `<=`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"less_than_or_equal-const-definition"}}} +pub const LESS_THAN_OR_EQUAL: Uuid = uuid!["1694c92e-07df-54a4-8279-b93918548a61"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct LessThanOrEqual; + +impl LessThanOrEqual { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + LESS_THAN_OR_EQUAL + } +} + +impl Default for LessThanOrEqual { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/let_statement.rs b/src/v2/lu_dog_vec_tracy/types/let_statement.rs new file mode 100644 index 00000000..72cdd569 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/let_statement.rs @@ -0,0 +1,99 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"let_statement-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::local_variable::LocalVariable; +use crate::v2::lu_dog_vec_tracy::types::statement::Statement; +use crate::v2::lu_dog_vec_tracy::types::statement::StatementEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-struct-documentation"}}} +/// A Let Statement +/// +/// This statement assigns a value from an expression to a local variable. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct LetStatement { + pub id: usize, + /// R20: [`LetStatement`] 'assigns the value of an' [`Expression`] + pub expression: usize, + /// R21: [`LetStatement`] 'assigns a value to a' [`LocalVariable`] + pub variable: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-implementation"}}} +impl LetStatement { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-struct-impl-new"}}} + /// Inter a new 'Let Statement' in the store, and return it's `id`. + pub fn new( + expression: &Rc>, + variable: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_let_statement(|id| { + Rc::new(RefCell::new(LetStatement { + id, + expression: expression.borrow().id, + variable: variable.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R20(1-*) + pub fn r20_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r20_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-struct-impl-nav-forward-to-variable"}}} + /// Navigate to [`LocalVariable`] across R21(1-*) + pub fn r21_local_variable<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r21_local_variable"); + vec![store.exhume_local_variable(&self.variable).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-impl-nav-subtype-to-supertype-statement"}}} + // Navigate to [`Statement`] across R16(isa) + pub fn r16_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r16_statement"); + vec![store + .iter_statement() + .find(|statement| { + if let StatementEnum::LetStatement(id) = statement.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"let_statement-implementation"}}} +impl PartialEq for LetStatement { + fn eq(&self, other: &Self) -> bool { + self.expression == other.expression && self.variable == other.variable + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/list.rs b/src/v2/lu_dog_vec_tracy/types/list.rs new file mode 100644 index 00000000..294f5590 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/list.rs @@ -0,0 +1,80 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"list-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list-struct-documentation"}}} +/// A List +/// +/// This is like an array, I guess. It's also like a `Vec`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct List { + pub id: usize, + /// R36: [`List`] '' [`ValueType`] + pub ty: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list-implementation"}}} +impl List { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list-struct-impl-new"}}} + /// Inter a new 'List' in the store, and return it's `id`. + pub fn new(ty: &Rc>, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_list(|id| { + Rc::new(RefCell::new(List { + id, + ty: ty.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list-struct-impl-nav-forward-to-ty"}}} + /// Navigate to [`ValueType`] across R36(1-*) + pub fn r36_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r36_value_type"); + vec![store.exhume_value_type(&self.ty).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::List(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list-implementation"}}} +impl PartialEq for List { + fn eq(&self, other: &Self) -> bool { + self.ty == other.ty + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/list_element.rs b/src/v2/lu_dog_vec_tracy/types/list_element.rs new file mode 100644 index 00000000..94e385f9 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/list_element.rs @@ -0,0 +1,129 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"list_element-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::list_expression::ListExpression; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ListElement { + pub id: usize, + pub position: i64, + /// R55: [`ListElement`] 'points at an' [`Expression`] + pub expression: usize, + /// R53: [`ListElement`] 'follows' [`ListElement`] + pub next: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-implementation"}}} +impl ListElement { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-struct-impl-new"}}} + /// Inter a new 'List Element' in the store, and return it's `id`. + pub fn new( + position: i64, + expression: &Rc>, + next: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_list_element(|id| { + Rc::new(RefCell::new(ListElement { + id, + position, + expression: expression.borrow().id, + next: next.map(|list_element| list_element.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R55(1-*) + pub fn r55_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r55_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-struct-impl-nav-forward-cond-to-next"}}} + /// Navigate to [`ListElement`] across R53(1-*c) + pub fn r53_list_element<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r53_list_element"); + match self.next { + Some(ref next) => vec![store.exhume_list_element(&next).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-struct-impl-nav-backward-one-bi-cond-to-list_element"}}} + /// Navigate to [`ListElement`] across R53(1c-1c) + pub fn r53c_list_element<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r53_list_element"); + let list_element = store + .iter_list_element() + .find(|list_element| list_element.borrow().next == Some(self.id)); + match list_element { + Some(ref list_element) => vec![list_element.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-struct-impl-nav-backward-one-to-list_expression"}}} + /// Navigate to [`ListExpression`] across R54(1-1) + pub fn r54_list_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r54_list_expression"); + vec![store + .iter_list_expression() + .find(|list_expression| list_expression.borrow().elements == Some(self.id)) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::ListElement(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_element-implementation"}}} +impl PartialEq for ListElement { + fn eq(&self, other: &Self) -> bool { + self.position == other.position + && self.expression == other.expression + && self.next == other.next + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/list_expression.rs b/src/v2/lu_dog_vec_tracy/types/list_expression.rs new file mode 100644 index 00000000..5d8a259a --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/list_expression.rs @@ -0,0 +1,87 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"list_expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_expression-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::list_element::ListElement; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_expression-struct-documentation"}}} +/// A list of expressions +/// +/// E.g., `let a = [0, 1, 2, 3];` +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_expression-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ListExpression { + pub id: usize, + /// R54: [`ListExpression`] 'contains' [`ListElement`] + pub elements: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_expression-implementation"}}} +impl ListExpression { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_expression-struct-impl-new"}}} + /// Inter a new 'List Expression' in the store, and return it's `id`. + pub fn new( + elements: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_list_expression(|id| { + Rc::new(RefCell::new(ListExpression { + id, + elements: elements.map(|list_element| list_element.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_expression-struct-impl-nav-forward-cond-to-elements"}}} + /// Navigate to [`ListElement`] across R54(1-*c) + pub fn r54_list_element<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r54_list_element"); + match self.elements { + Some(ref elements) => vec![store.exhume_list_element(&elements).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_expression-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::ListExpression(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"list_expression-implementation"}}} +impl PartialEq for ListExpression { + fn eq(&self, other: &Self) -> bool { + self.elements == other.elements + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/literal.rs b/src/v2/lu_dog_vec_tracy/types/literal.rs new file mode 100644 index 00000000..d09152dc --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/literal.rs @@ -0,0 +1,127 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"literal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::boolean_literal::BooleanLiteral; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::float_literal::FloatLiteral; +use crate::v2::lu_dog_vec_tracy::types::integer_literal::IntegerLiteral; +use crate::v2::lu_dog_vec_tracy::types::string_literal::StringLiteral; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-hybrid-documentation"}}} +/// A Literal Expression +/// +/// This is any literal value in the program. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Literal { + pub subtype: LiteralEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum LiteralEnum { + BooleanLiteral(usize), + FloatLiteral(usize), + IntegerLiteral(usize), + StringLiteral(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-implementation"}}} +impl Literal { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-struct-impl-new_boolean_literal"}}} + /// Inter a new Literal in the store, and return it's `id`. + pub fn new_boolean_literal( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_literal(|id| { + Rc::new(RefCell::new(Literal { + subtype: LiteralEnum::BooleanLiteral(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-struct-impl-new_float_literal"}}} + /// Inter a new Literal in the store, and return it's `id`. + pub fn new_float_literal( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_literal(|id| { + Rc::new(RefCell::new(Literal { + subtype: LiteralEnum::FloatLiteral(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-struct-impl-new_integer_literal"}}} + /// Inter a new Literal in the store, and return it's `id`. + pub fn new_integer_literal( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_literal(|id| { + Rc::new(RefCell::new(Literal { + subtype: LiteralEnum::IntegerLiteral(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-struct-impl-new_string_literal"}}} + /// Inter a new Literal in the store, and return it's `id`. + pub fn new_string_literal( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_literal(|id| { + Rc::new(RefCell::new(Literal { + subtype: LiteralEnum::StringLiteral(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::Literal(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"literal-implementation"}}} +impl PartialEq for Literal { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/local_variable.rs b/src/v2/lu_dog_vec_tracy/types/local_variable.rs new file mode 100644 index 00000000..c78dbf50 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/local_variable.rs @@ -0,0 +1,75 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"local_variable-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"local_variable-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::let_statement::LetStatement; +use crate::v2::lu_dog_vec_tracy::types::variable::Variable; +use crate::v2::lu_dog_vec_tracy::types::variable::VariableEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"local_variable-struct-documentation"}}} +/// A Local Variable in a Block +/// +/// Note that a variable is an "l-value", so it represents a specific memory location. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"local_variable-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct LocalVariable { + pub bug: Uuid, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"local_variable-implementation"}}} +impl LocalVariable { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"local_variable-struct-impl-new"}}} + /// Inter a new 'Local Variable' in the store, and return it's `id`. + pub fn new(bug: Uuid, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_local_variable(|id| Rc::new(RefCell::new(LocalVariable { bug, id }))) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"local_variable-struct-impl-nav-backward-one-to-let_statement"}}} + /// Navigate to [`LetStatement`] across R21(1-1) + pub fn r21_let_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r21_let_statement"); + vec![store + .iter_let_statement() + .find(|let_statement| let_statement.borrow().variable == self.id) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"local_variable-impl-nav-subtype-to-supertype-variable"}}} + // Navigate to [`Variable`] across R12(isa) + pub fn r12_variable<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r12_variable"); + vec![store + .iter_variable() + .find(|variable| { + if let VariableEnum::LocalVariable(id) = variable.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"local_variable-implementation"}}} +impl PartialEq for LocalVariable { + fn eq(&self, other: &Self) -> bool { + self.bug == other.bug + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/macro_call.rs b/src/v2/lu_dog_vec_tracy/types/macro_call.rs new file mode 100644 index 00000000..5fc5b0fd --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/macro_call.rs @@ -0,0 +1,36 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"macro_call-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"macro_call-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"macro_call-const-documentation"}}} +/// A macro invocation +/// +/// A macro invocation is a string, followed by a bang (`!`), followed by parens and arguments +/// . +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"macro_call-const-definition"}}} +pub const MACRO_CALL: Uuid = uuid!["e77de343-3d89-544c-a99c-8c7f3f392bb5"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct MacroCall; + +impl MacroCall { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + MACRO_CALL + } +} + +impl Default for MacroCall { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/method_call.rs b/src/v2/lu_dog_vec_tracy/types/method_call.rs new file mode 100644 index 00000000..6c147e50 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/method_call.rs @@ -0,0 +1,67 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"method_call-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"method_call-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::call::Call; +use crate::v2::lu_dog_vec_tracy::types::call::CallEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"method_call-struct-documentation"}}} +/// A Method Call +/// +/// This is when you call a function on an instance of a struct. The name attribute is the name +/// of the method. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"method_call-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct MethodCall { + pub id: usize, + pub name: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"method_call-implementation"}}} +impl MethodCall { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"method_call-struct-impl-new"}}} + /// Inter a new 'Method Call' in the store, and return it's `id`. + pub fn new(name: String, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_method_call(|id| { + Rc::new(RefCell::new(MethodCall { + id, + name: name.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"method_call-impl-nav-subtype-to-supertype-call"}}} + // Navigate to [`Call`] across R30(isa) + pub fn r30_call<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r30_call"); + vec![store + .iter_call() + .find(|call| { + if let CallEnum::MethodCall(id) = call.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"method_call-implementation"}}} +impl PartialEq for MethodCall { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/multiplication.rs b/src/v2/lu_dog_vec_tracy/types/multiplication.rs new file mode 100644 index 00000000..15140fe5 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/multiplication.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"multiplication-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"multiplication-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"multiplication-const-definition"}}} +pub const MULTIPLICATION: Uuid = uuid!["a645e709-1543-57a0-a731-15c288d6b14a"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Multiplication; + +impl Multiplication { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + MULTIPLICATION + } +} + +impl Default for Multiplication { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/named_field_expression.rs b/src/v2/lu_dog_vec_tracy/types/named_field_expression.rs new file mode 100644 index 00000000..a411fcfd --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/named_field_expression.rs @@ -0,0 +1,65 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"named_field_expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"named_field_expression-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::field_expression::FieldExpression; +use crate::v2::lu_dog_vec_tracy::types::field_expression::FieldExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"named_field_expression-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct NamedFieldExpression { + pub id: usize, + pub name: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"named_field_expression-implementation"}}} +impl NamedFieldExpression { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"named_field_expression-struct-impl-new"}}} + /// Inter a new 'Named Field Expression' in the store, and return it's `id`. + pub fn new(name: String, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_named_field_expression(|id| { + Rc::new(RefCell::new(NamedFieldExpression { + id, + name: name.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"named_field_expression-impl-nav-subtype-to-supertype-field_expression"}}} + // Navigate to [`FieldExpression`] across R94(isa) + pub fn r94_field_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r94_field_expression"); + vec![store + .iter_field_expression() + .find(|field_expression| { + if let FieldExpressionEnum::NamedFieldExpression(id) = + field_expression.borrow().subtype + { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"named_field_expression-implementation"}}} +impl PartialEq for NamedFieldExpression { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/negation.rs b/src/v2/lu_dog_vec_tracy/types/negation.rs new file mode 100644 index 00000000..aeb3fd60 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/negation.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"negation-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"negation-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"negation-const-documentation"}}} +/// The unary minus +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"negation-const-definition"}}} +pub const NEGATION: Uuid = uuid!["a4671940-9194-5585-84b4-4bd22b975f6f"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Negation; + +impl Negation { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + NEGATION + } +} + +impl Default for Negation { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/not.rs b/src/v2/lu_dog_vec_tracy/types/not.rs new file mode 100644 index 00000000..f052cf63 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/not.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"not-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"not-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"not-const-definition"}}} +pub const NOT: Uuid = uuid!["8b7cc57b-11d4-5fcb-b764-b99c76a8c327"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Not; + +impl Not { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + NOT + } +} + +impl Default for Not { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/not_equal.rs b/src/v2/lu_dog_vec_tracy/types/not_equal.rs new file mode 100644 index 00000000..9fb6f7a0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/not_equal.rs @@ -0,0 +1,35 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"not_equal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"not_equal-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"not_equal-const-documentation"}}} +/// The Not Equal Expression +/// +/// This is the `!=` operator expression. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"not_equal-const-definition"}}} +pub const NOT_EQUAL: Uuid = uuid!["3596966c-fab8-5a99-86b0-1820e6a19d3e"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct NotEqual; + +impl NotEqual { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + NOT_EQUAL + } +} + +impl Default for NotEqual { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/object_wrapper.rs b/src/v2/lu_dog_vec_tracy/types/object_wrapper.rs new file mode 100644 index 00000000..e690bb10 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/object_wrapper.rs @@ -0,0 +1,78 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"object_wrapper-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"object_wrapper-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::z_object_store::ZObjectStore; +use crate::v2::sarzak::types::object::Object; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +use crate::v2::sarzak::store::ObjectStore as SarzakStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"object_wrapper-struct-documentation"}}} +/// The purpose of this object is to wrap `Object`. We need to be able to store a referential +/// attribute to the `ObjectStore`, and we can’t/don’t want to add that to `Object`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"object_wrapper-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ObjectWrapper { + pub id: usize, + /// R78: [`Object`] '🚧 Comments are out of order — see sarzak#14.' [`Object`] + pub object: Uuid, + /// R78: [`ZObjectStore`] '🚧 Comments are out of order — see sarzak#14.' [`ZObjectStore`] + pub z_store: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"object_wrapper-implementation"}}} +impl ObjectWrapper { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"object_wrapper-struct-impl-new"}}} + /// Inter a new 'Object Wrapper' in the store, and return it's `id`. + pub fn new( + object: &Object, + z_store: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_object_wrapper(|id| { + Rc::new(RefCell::new(ObjectWrapper { + id, + object: object.id, + z_store: z_store.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"object_wrapper-struct-impl-nav-forward-assoc-to-object"}}} + /// Navigate to [`Object`] across R78(1-*) + pub fn r78_object<'a>( + &'a self, + store: &'a SarzakStore, + ) -> Vec>> { + span!("r78_object"); + vec![store.exhume_object(&self.object).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"object_wrapper-struct-impl-nav-forward-assoc-to-z_store"}}} + /// Navigate to [`ZObjectStore`] across R78(1-*) + pub fn r78_z_object_store<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r78_z_object_store"); + vec![store.exhume_z_object_store(&self.z_store).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"object_wrapper-implementation"}}} +impl PartialEq for ObjectWrapper { + fn eq(&self, other: &Self) -> bool { + self.object == other.object && self.z_store == other.z_store + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/operator.rs b/src/v2/lu_dog_vec_tracy/types/operator.rs new file mode 100644 index 00000000..7af3b852 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/operator.rs @@ -0,0 +1,150 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"operator-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::binary::Binary; +use crate::v2::lu_dog_vec_tracy::types::comparison::Comparison; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::unary::Unary; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-hybrid-documentation"}}} +/// Operator Expressions +/// +/// Basically anything you can do with an expression is a subtype of this beasty. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Operator { + pub subtype: OperatorEnum, + pub id: usize, + /// R50: [`Operator`] 'left hand side' [`Expression`] + pub lhs: usize, + /// R51: [`Operator`] 'right hand side' [`Expression`] + pub rhs: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum OperatorEnum { + Binary(usize), + Comparison(usize), + Unary(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-implementation"}}} +impl Operator { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-struct-impl-new_binary"}}} + /// Inter a new Operator in the store, and return it's `id`. + pub fn new_binary( + lhs: &Rc>, + rhs: Option<&Rc>>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_operator(|id| { + Rc::new(RefCell::new(Operator { + lhs: lhs.borrow().id, + rhs: rhs.map(|expression| expression.borrow().id), + subtype: OperatorEnum::Binary(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-struct-impl-new_comparison"}}} + /// Inter a new Operator in the store, and return it's `id`. + pub fn new_comparison( + lhs: &Rc>, + rhs: Option<&Rc>>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_operator(|id| { + Rc::new(RefCell::new(Operator { + lhs: lhs.borrow().id, + rhs: rhs.map(|expression| expression.borrow().id), + subtype: OperatorEnum::Comparison(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-struct-impl-new_unary"}}} + /// Inter a new Operator in the store, and return it's `id`. + pub fn new_unary( + lhs: &Rc>, + rhs: Option<&Rc>>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_operator(|id| { + Rc::new(RefCell::new(Operator { + lhs: lhs.borrow().id, + rhs: rhs.map(|expression| expression.borrow().id), + subtype: OperatorEnum::Unary(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-struct-impl-nav-forward-to-lhs"}}} + /// Navigate to [`Expression`] across R50(1-*) + pub fn r50_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r50_expression"); + vec![store.exhume_expression(&self.lhs).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-struct-impl-nav-forward-cond-to-rhs"}}} + /// Navigate to [`Expression`] across R51(1-*c) + pub fn r51_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r51_expression"); + match self.rhs { + Some(ref rhs) => vec![store.exhume_expression(&rhs).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::Operator(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"operator-implementation"}}} +impl PartialEq for Operator { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype && self.lhs == other.lhs && self.rhs == other.rhs + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/or.rs b/src/v2/lu_dog_vec_tracy/types/or.rs new file mode 100644 index 00000000..98508cbe --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/or.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"or-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"or-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"or-const-documentation"}}} +/// The or `||` operator +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"or-const-definition"}}} +pub const OR: Uuid = uuid!["8b39b94c-4e7f-5663-bc4d-7bcd8d5c77ce"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Or; + +impl Or { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + OR + } +} + +impl Default for Or { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/parameter.rs b/src/v2/lu_dog_vec_tracy/types/parameter.rs new file mode 100644 index 00000000..922498f7 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/parameter.rs @@ -0,0 +1,152 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"parameter-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::function::Function; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::variable::Variable; +use crate::v2::lu_dog_vec_tracy::types::variable::VariableEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-documentation"}}} +/// A Parameter to a Function +/// +/// From inside the function it's a parameter, from outside it's an argument. No idea why I +/// wrote that — just looking for content... I mean, what else do you say about a parameter +/// ? +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Parameter { + pub id: usize, + pub position: i64, + /// R13: [`Parameter`] 'is available to a' [`Function`] + pub function: usize, + /// R14: [`Parameter`] 'follows' [`Parameter`] + pub next: Option, + /// R79: [`Parameter`] 'requires a' [`ValueType`] + pub ty: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-implementation"}}} +impl Parameter { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-new"}}} + /// Inter a new 'Parameter' in the store, and return it's `id`. + pub fn new( + position: i64, + function: &Rc>, + next: Option<&Rc>>, + ty: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_parameter(|id| { + Rc::new(RefCell::new(Parameter { + id, + position, + function: function.borrow().id, + next: next.map(|parameter| parameter.borrow().id), + ty: ty.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-forward-to-function"}}} + /// Navigate to [`Function`] across R13(1-*) + pub fn r13_function<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r13_function"); + vec![store.exhume_function(&self.function).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-forward-cond-to-next"}}} + /// Navigate to [`Parameter`] across R14(1-*c) + pub fn r14_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r14_parameter"); + match self.next { + Some(ref next) => vec![store.exhume_parameter(&next).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-forward-to-ty"}}} + /// Navigate to [`ValueType`] across R79(1-*) + pub fn r79_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r79_value_type"); + vec![store.exhume_value_type(&self.ty).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-bi-cond-to-function"}}} + /// Navigate to [`Function`] across R82(1c-1c) + pub fn r82c_function<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r82_function"); + let function = store + .iter_function() + .find(|function| function.borrow().first_param == Some(self.id)); + match function { + Some(ref function) => vec![function.clone()], + None => Vec::new(), + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-to-lambda"}}} + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-struct-impl-nav-backward-one-bi-cond-to-parameter"}}} + /// Navigate to [`Parameter`] across R14(1c-1c) + pub fn r14c_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r14_parameter"); + let parameter = store + .iter_parameter() + .find(|parameter| parameter.borrow().next == Some(self.id)); + match parameter { + Some(ref parameter) => vec![parameter.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-impl-nav-subtype-to-supertype-variable"}}} + // Navigate to [`Variable`] across R12(isa) + pub fn r12_variable<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r12_variable"); + vec![store + .iter_variable() + .find(|variable| { + if let VariableEnum::Parameter(id) = variable.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"parameter-implementation"}}} +impl PartialEq for Parameter { + fn eq(&self, other: &Self) -> bool { + self.position == other.position + && self.function == other.function + && self.next == other.next + && self.ty == other.ty + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/path_element.rs b/src/v2/lu_dog_vec_tracy/types/path_element.rs new file mode 100644 index 00000000..481af134 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/path_element.rs @@ -0,0 +1,104 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"path_element-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::x_path::XPath; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-struct-documentation"}}} +/// 🖕🤣 +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct PathElement { + pub id: usize, + pub name: String, + /// R89: [`PathElement`] 'next' [`PathElement`] + pub next: Option, + /// R90: [`PathElement`] 'comprises' [`XPath`] + pub x_path: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-implementation"}}} +impl PathElement { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-struct-impl-new"}}} + /// Inter a new 'Path Element' in the store, and return it's `id`. + pub fn new( + name: String, + next: Option<&Rc>>, + x_path: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_path_element(|id| { + Rc::new(RefCell::new(PathElement { + id, + name: name.to_owned(), + next: next.map(|path_element| path_element.borrow().id), + x_path: x_path.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-struct-impl-nav-forward-cond-to-next"}}} + /// Navigate to [`PathElement`] across R89(1-*c) + pub fn r89_path_element<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r89_path_element"); + match self.next { + Some(ref next) => vec![store.exhume_path_element(&next).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-struct-impl-nav-forward-to-x_path"}}} + /// Navigate to [`XPath`] across R90(1-*) + pub fn r90_x_path<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r90_x_path"); + vec![store.exhume_x_path(&self.x_path).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-struct-impl-nav-backward-one-to-x_path"}}} + /// Navigate to [`XPath`] across R97(1-1) + pub fn r97_x_path<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r97_x_path"); + vec![store + .iter_x_path() + .find(|x_path| x_path.borrow().first == Some(self.id)) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-struct-impl-nav-backward-one-bi-cond-to-path_element"}}} + /// Navigate to [`PathElement`] across R89(1c-1c) + pub fn r89c_path_element<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r89_path_element"); + let path_element = store + .iter_path_element() + .find(|path_element| path_element.borrow().next == Some(self.id)); + match path_element { + Some(ref path_element) => vec![path_element.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"path_element-implementation"}}} +impl PartialEq for PathElement { + fn eq(&self, other: &Self) -> bool { + self.name == other.name && self.next == other.next && self.x_path == other.x_path + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/pattern.rs b/src/v2/lu_dog_vec_tracy/types/pattern.rs new file mode 100644 index 00000000..4fcc07ea --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/pattern.rs @@ -0,0 +1,103 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"pattern-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::x_match::XMatch; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-struct-documentation"}}} +/// The pattern is a specification for extracting data from a type. It’s sort of a reverse +/// impression of what you are looking for. If the shape of the impression matches the scrutinee +/// , then they “fit” and the pattern’s lvalues will be populated with data from the scrutinee +/// . +/// +/// There are a bunch of diffirent kinds of patterns. Literal, ident, struct, tuple, etc. Modeling +/// this will take a lot of room and time. +/// +/// Doing this I’m going to cheat a bit and store the code that does matching as a string +/// on this object during compilation. During runtime the string will be evaluated (either as +/// dwrf, or perhasps using a small VM. Or maybe use the built-in VM. It should be able to handle +/// all that we need. This way, I don’t have to model all the bits because they are encoded +/// in the code attribute. +/// +/// So I guess that means I’ll be writing assembly code... +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Pattern { + pub id: usize, + /// R92: [`Pattern`] 'executes' [`Expression`] + pub expression: usize, + /// R87: [`Expression`] '🚧 Comments are out of order — see sarzak#14.' [`Expression`] + pub match_expr: usize, + /// R87: [`XMatch`] '🚧 Comments are out of order — see sarzak#14.' [`XMatch`] + pub x_match: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-implementation"}}} +impl Pattern { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-struct-impl-new"}}} + /// Inter a new 'Pattern' in the store, and return it's `id`. + pub fn new( + expression: &Rc>, + match_expr: &Rc>, + x_match: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_pattern(|id| { + Rc::new(RefCell::new(Pattern { + id, + expression: expression.borrow().id, + match_expr: match_expr.borrow().id, + x_match: x_match.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R92(1-*) + pub fn r92_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r92_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-struct-impl-nav-forward-assoc-to-match_expr"}}} + /// Navigate to [`Expression`] across R87(1-*) + pub fn r87_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r87_expression"); + vec![store.exhume_expression(&self.match_expr).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-struct-impl-nav-forward-assoc-to-x_match"}}} + /// Navigate to [`XMatch`] across R87(1-*) + pub fn r87_x_match<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r87_x_match"); + vec![store.exhume_x_match(&self.x_match).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"pattern-implementation"}}} +impl PartialEq for Pattern { + fn eq(&self, other: &Self) -> bool { + self.expression == other.expression + && self.match_expr == other.match_expr + && self.x_match == other.x_match + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/plugin.rs b/src/v2/lu_dog_vec_tracy/types/plugin.rs new file mode 100644 index 00000000..1019cac0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/plugin.rs @@ -0,0 +1,67 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"plugin-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"plugin-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"plugin-struct-documentation"}}} +/// An external compilation unit that may be loaded at run time. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"plugin-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Plugin { + pub id: usize, + pub name: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"plugin-implementation"}}} +impl Plugin { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"plugin-struct-impl-new"}}} + /// Inter a new 'Plugin' in the store, and return it's `id`. + pub fn new(name: String, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_plugin(|id| { + Rc::new(RefCell::new(Plugin { + id, + name: name.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"plugin-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::Plugin(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"plugin-implementation"}}} +impl PartialEq for Plugin { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/range.rs b/src/v2/lu_dog_vec_tracy/types/range.rs new file mode 100644 index 00000000..f25d354f --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/range.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"range-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range-const-definition"}}} +pub const RANGE: Uuid = uuid!["50e24d8f-3739-5fd9-b5ca-f537eba4b21a"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Range; + +impl Range { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + RANGE + } +} + +impl Default for Range { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/range_expression.rs b/src/v2/lu_dog_vec_tracy/types/range_expression.rs new file mode 100644 index 00000000..9aeb217d --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/range_expression.rs @@ -0,0 +1,182 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"range_expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::from::FROM; +use crate::v2::lu_dog_vec_tracy::types::full::FULL; +use crate::v2::lu_dog_vec_tracy::types::inclusive::INCLUSIVE; +use crate::v2::lu_dog_vec_tracy::types::to::TO; +use crate::v2::lu_dog_vec_tracy::types::to_inclusive::TO_INCLUSIVE; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct RangeExpression { + pub subtype: RangeExpressionEnum, + pub id: usize, + /// R58: [`RangeExpression`] '' [`Expression`] + pub lhs: Option, + /// R59: [`RangeExpression`] '' [`Expression`] + pub rhs: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum RangeExpressionEnum { + From(Uuid), + Full(Uuid), + Inclusive(Uuid), + To(Uuid), + ToInclusive(Uuid), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-implementation"}}} +impl RangeExpression { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-struct-impl-new_from"}}} + /// Inter a new RangeExpression in the store, and return it's `id`. + pub fn new_from( + lhs: Option<&Rc>>, + rhs: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_range_expression(|id| { + Rc::new(RefCell::new(RangeExpression { + lhs: lhs.map(|expression| expression.borrow().id), + rhs: rhs.map(|expression| expression.borrow().id), + subtype: RangeExpressionEnum::From(FROM), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-struct-impl-new_full"}}} + /// Inter a new RangeExpression in the store, and return it's `id`. + pub fn new_full( + lhs: Option<&Rc>>, + rhs: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_range_expression(|id| { + Rc::new(RefCell::new(RangeExpression { + lhs: lhs.map(|expression| expression.borrow().id), + rhs: rhs.map(|expression| expression.borrow().id), + subtype: RangeExpressionEnum::Full(FULL), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-struct-impl-new_inclusive"}}} + /// Inter a new RangeExpression in the store, and return it's `id`. + pub fn new_inclusive( + lhs: Option<&Rc>>, + rhs: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_range_expression(|id| { + Rc::new(RefCell::new(RangeExpression { + lhs: lhs.map(|expression| expression.borrow().id), + rhs: rhs.map(|expression| expression.borrow().id), + subtype: RangeExpressionEnum::Inclusive(INCLUSIVE), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-struct-impl-new_to"}}} + /// Inter a new RangeExpression in the store, and return it's `id`. + pub fn new_to( + lhs: Option<&Rc>>, + rhs: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_range_expression(|id| { + Rc::new(RefCell::new(RangeExpression { + lhs: lhs.map(|expression| expression.borrow().id), + rhs: rhs.map(|expression| expression.borrow().id), + subtype: RangeExpressionEnum::To(TO), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-struct-impl-new_to_inclusive"}}} + /// Inter a new RangeExpression in the store, and return it's `id`. + pub fn new_to_inclusive( + lhs: Option<&Rc>>, + rhs: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_range_expression(|id| { + Rc::new(RefCell::new(RangeExpression { + lhs: lhs.map(|expression| expression.borrow().id), + rhs: rhs.map(|expression| expression.borrow().id), + subtype: RangeExpressionEnum::ToInclusive(TO_INCLUSIVE), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-struct-impl-nav-forward-cond-to-lhs"}}} + /// Navigate to [`Expression`] across R58(1-*c) + pub fn r58_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r58_expression"); + match self.lhs { + Some(ref lhs) => vec![store.exhume_expression(&lhs).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-struct-impl-nav-forward-cond-to-rhs"}}} + /// Navigate to [`Expression`] across R59(1-*c) + pub fn r59_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r59_expression"); + match self.rhs { + Some(ref rhs) => vec![store.exhume_expression(&rhs).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::RangeExpression(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"range_expression-implementation"}}} +impl PartialEq for RangeExpression { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype && self.lhs == other.lhs && self.rhs == other.rhs + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/result_statement.rs b/src/v2/lu_dog_vec_tracy/types/result_statement.rs new file mode 100644 index 00000000..4bd62034 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/result_statement.rs @@ -0,0 +1,83 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"result_statement-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"result_statement-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::statement::Statement; +use crate::v2::lu_dog_vec_tracy::types::statement::StatementEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"result_statement-struct-documentation"}}} +/// An Expression Statement that is not terminated by a semi-colon, and this yields a result +/// . This is only applicable if it's the last statement in a block. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"result_statement-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ResultStatement { + pub id: usize, + /// R41: [`ResultStatement`] '' [`Expression`] + pub expression: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"result_statement-implementation"}}} +impl ResultStatement { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"result_statement-struct-impl-new"}}} + /// Inter a new 'Result Statement' in the store, and return it's `id`. + pub fn new( + expression: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_result_statement(|id| { + Rc::new(RefCell::new(ResultStatement { + id, + expression: expression.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"result_statement-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R41(1-*) + pub fn r41_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r41_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"result_statement-impl-nav-subtype-to-supertype-statement"}}} + // Navigate to [`Statement`] across R16(isa) + pub fn r16_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r16_statement"); + vec![store + .iter_statement() + .find(|statement| { + if let StatementEnum::ResultStatement(id) = statement.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"result_statement-implementation"}}} +impl PartialEq for ResultStatement { + fn eq(&self, other: &Self) -> bool { + self.expression == other.expression + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/span.rs b/src/v2/lu_dog_vec_tracy/types/span.rs new file mode 100644 index 00000000..60c71e02 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/span.rs @@ -0,0 +1,108 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"span-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::dwarf_source_file::DwarfSourceFile; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::x_value::XValue; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-struct-documentation"}}} +/// A span is just a two-tuple that specifies the start and end locations, in the source code +/// , for an entitiy. +/// +/// Looking at this, I think that this should be a supertype, and then a subtype for each relationship +/// . I’m feeling lazy. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Span { + pub end: i64, + pub id: usize, + pub start: i64, + /// R64: [`Span`] '' [`DwarfSourceFile`] + pub source: usize, + /// R62: [`Span`] '' [`ValueType`] + pub ty: Option, + /// R63: [`Span`] '' [`XValue`] + pub x_value: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-implementation"}}} +impl Span { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-struct-impl-new"}}} + /// Inter a new 'Span' in the store, and return it's `id`. + pub fn new( + end: i64, + start: i64, + source: &Rc>, + ty: Option<&Rc>>, + x_value: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_span(|id| { + Rc::new(RefCell::new(Span { + end, + id, + start, + source: source.borrow().id, + ty: ty.map(|value_type| value_type.borrow().id), + x_value: x_value.map(|x_value| x_value.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-struct-impl-nav-forward-to-source"}}} + /// Navigate to [`DwarfSourceFile`] across R64(1-*) + pub fn r64_dwarf_source_file<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r64_dwarf_source_file"); + vec![store.exhume_dwarf_source_file(&self.source).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-struct-impl-nav-forward-cond-to-ty"}}} + /// Navigate to [`ValueType`] across R62(1-*c) + pub fn r62_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r62_value_type"); + match self.ty { + Some(ref ty) => vec![store.exhume_value_type(&ty).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-struct-impl-nav-forward-cond-to-x_value"}}} + /// Navigate to [`XValue`] across R63(1-*c) + pub fn r63_x_value<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r63_x_value"); + match self.x_value { + Some(ref x_value) => vec![store.exhume_x_value(&x_value).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"span-implementation"}}} +impl PartialEq for Span { + fn eq(&self, other: &Self) -> bool { + self.end == other.end + && self.start == other.start + && self.source == other.source + && self.ty == other.ty + && self.x_value == other.x_value + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/statement.rs b/src/v2/lu_dog_vec_tracy/types/statement.rs new file mode 100644 index 00000000..30b94b46 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/statement.rs @@ -0,0 +1,187 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"statement-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::block::Block; +use crate::v2::lu_dog_vec_tracy::types::expression_statement::ExpressionStatement; +use crate::v2::lu_dog_vec_tracy::types::item_statement::ITEM_STATEMENT; +use crate::v2::lu_dog_vec_tracy::types::let_statement::LetStatement; +use crate::v2::lu_dog_vec_tracy::types::result_statement::ResultStatement; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-hybrid-documentation"}}} +/// A Statement +/// +/// A statement is followed by a semi-colon (`;`), and in general yields no value. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Statement { + pub subtype: StatementEnum, + pub id: usize, + pub index: i64, + /// R18: [`Statement`] 'is contianed in a' [`Block`] + pub block: usize, + /// R17: [`Statement`] 'follows' [`Statement`] + pub next: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum StatementEnum { + ExpressionStatement(usize), + ItemStatement(Uuid), + LetStatement(usize), + ResultStatement(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-implementation"}}} +impl Statement { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-struct-impl-new_expression_statement"}}} + /// Inter a new Statement in the store, and return it's `id`. + pub fn new_expression_statement( + index: i64, + block: &Rc>, + next: Option<&Rc>>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_statement(|id| { + Rc::new(RefCell::new(Statement { + index: index, + block: block.borrow().id, + next: next.map(|statement| statement.borrow().id), + subtype: StatementEnum::ExpressionStatement(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-struct-impl-new_item_statement"}}} + /// Inter a new Statement in the store, and return it's `id`. + pub fn new_item_statement( + index: i64, + block: &Rc>, + next: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_statement(|id| { + Rc::new(RefCell::new(Statement { + index: index, + block: block.borrow().id, + next: next.map(|statement| statement.borrow().id), + subtype: StatementEnum::ItemStatement(ITEM_STATEMENT), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-struct-impl-new_let_statement"}}} + /// Inter a new Statement in the store, and return it's `id`. + pub fn new_let_statement( + index: i64, + block: &Rc>, + next: Option<&Rc>>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_statement(|id| { + Rc::new(RefCell::new(Statement { + index: index, + block: block.borrow().id, + next: next.map(|statement| statement.borrow().id), + subtype: StatementEnum::LetStatement(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-struct-impl-new_result_statement"}}} + /// Inter a new Statement in the store, and return it's `id`. + pub fn new_result_statement( + index: i64, + block: &Rc>, + next: Option<&Rc>>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_statement(|id| { + Rc::new(RefCell::new(Statement { + index: index, + block: block.borrow().id, + next: next.map(|statement| statement.borrow().id), + subtype: StatementEnum::ResultStatement(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-struct-impl-nav-forward-to-block"}}} + /// Navigate to [`Block`] across R18(1-*) + pub fn r18_block<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r18_block"); + vec![store.exhume_block(&self.block).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-struct-impl-nav-forward-cond-to-next"}}} + /// Navigate to [`Statement`] across R17(1-*c) + pub fn r17_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r17_statement"); + match self.next { + Some(ref next) => vec![store.exhume_statement(&next).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-struct-impl-nav-backward-one-bi-cond-to-block"}}} + /// Navigate to [`Block`] across R71(1c-1c) + pub fn r71c_block<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r71_block"); + let block = store + .iter_block() + .find(|block| block.borrow().statement == Some(self.id)); + match block { + Some(ref block) => vec![block.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-struct-impl-nav-backward-one-bi-cond-to-statement"}}} + /// Navigate to [`Statement`] across R17(1c-1c) + pub fn r17c_statement<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r17_statement"); + let statement = store + .iter_statement() + .find(|statement| statement.borrow().next == Some(self.id)); + match statement { + Some(ref statement) => vec![statement.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"statement-implementation"}}} +impl PartialEq for Statement { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + && self.index == other.index + && self.block == other.block + && self.next == other.next + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/static_method_call.rs b/src/v2/lu_dog_vec_tracy/types/static_method_call.rs new file mode 100644 index 00000000..908ac191 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/static_method_call.rs @@ -0,0 +1,78 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"static_method_call-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"static_method_call-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::call::Call; +use crate::v2::lu_dog_vec_tracy::types::call::CallEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"static_method_call-struct-documentation"}}} +/// A Static Method Call +/// +/// This is when you call a function on the type (struct) itself. There is no instance involved +/// in this, although it may return an instance. +/// +/// The name attribute is the name of the static method. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"static_method_call-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct StaticMethodCall { + pub func: String, + pub id: usize, + pub ty: String, + pub unique: Uuid, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"static_method_call-implementation"}}} +impl StaticMethodCall { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"static_method_call-struct-impl-new"}}} + /// Inter a new 'Static Method Call' in the store, and return it's `id`. + pub fn new( + func: String, + ty: String, + unique: Uuid, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_static_method_call(|id| { + Rc::new(RefCell::new(StaticMethodCall { + func: func.to_owned(), + id, + ty: ty.to_owned(), + unique, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"static_method_call-impl-nav-subtype-to-supertype-call"}}} + // Navigate to [`Call`] across R30(isa) + pub fn r30_call<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r30_call"); + vec![store + .iter_call() + .find(|call| { + if let CallEnum::StaticMethodCall(id) = call.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"static_method_call-implementation"}}} +impl PartialEq for StaticMethodCall { + fn eq(&self, other: &Self) -> bool { + self.func == other.func && self.ty == other.ty && self.unique == other.unique + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/string_literal.rs b/src/v2/lu_dog_vec_tracy/types/string_literal.rs new file mode 100644 index 00000000..f09e57a2 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/string_literal.rs @@ -0,0 +1,67 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"string_literal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"string_literal-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::literal::Literal; +use crate::v2::lu_dog_vec_tracy::types::literal::LiteralEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"string_literal-struct-documentation"}}} +/// A String +/// +/// A string is a set of characters enclosed in double quotes. Strings are unicode strings encoded +/// as UTF-8. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"string_literal-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct StringLiteral { + pub id: usize, + pub x_value: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"string_literal-implementation"}}} +impl StringLiteral { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"string_literal-struct-impl-new"}}} + /// Inter a new 'String Literal' in the store, and return it's `id`. + pub fn new(x_value: String, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_string_literal(|id| { + Rc::new(RefCell::new(StringLiteral { + id, + x_value: x_value.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"string_literal-impl-nav-subtype-to-supertype-literal"}}} + // Navigate to [`Literal`] across R22(isa) + pub fn r22_literal<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r22_literal"); + vec![store + .iter_literal() + .find(|literal| { + if let LiteralEnum::StringLiteral(id) = literal.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"string_literal-implementation"}}} +impl PartialEq for StringLiteral { + fn eq(&self, other: &Self) -> bool { + self.x_value == other.x_value + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/struct_expression.rs b/src/v2/lu_dog_vec_tracy/types/struct_expression.rs new file mode 100644 index 00000000..4c84a2f0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/struct_expression.rs @@ -0,0 +1,113 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"struct_expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::data_structure::DataStructure; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::field_expression::FieldExpression; +use crate::v2::lu_dog_vec_tracy::types::x_path::XPath; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-struct-documentation"}}} +/// A Structure Expression +/// +/// This is how we create instances in dwarf. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct StructExpression { + pub bug: Uuid, + pub id: usize, + /// R39: [`StructExpression`] '' [`DataStructure`] + pub data: usize, + /// R96: [`StructExpression`] 'has a' [`XPath`] + pub x_path: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-implementation"}}} +impl StructExpression { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-struct-impl-new"}}} + /// Inter a new 'Struct Expression' in the store, and return it's `id`. + pub fn new( + bug: Uuid, + data: &Rc>, + x_path: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_struct_expression(|id| { + Rc::new(RefCell::new(StructExpression { + bug, + id, + data: data.borrow().id, + x_path: x_path.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-struct-impl-nav-forward-to-data"}}} + /// Navigate to [`DataStructure`] across R39(1-*) + pub fn r39_data_structure<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r39_data_structure"); + vec![store.exhume_data_structure(&self.data).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-struct-impl-nav-forward-to-x_path"}}} + /// Navigate to [`XPath`] across R96(1-*) + pub fn r96_x_path<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r96_x_path"); + vec![store.exhume_x_path(&self.x_path).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-struct-impl-nav-backward-1_M-to-field_expression"}}} + /// Navigate to [`FieldExpression`] across R26(1-M) + pub fn r26_field_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r26_field_expression"); + store + .iter_field_expression() + .filter(|field_expression| field_expression.borrow().woog_struct == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::StructExpression(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_expression-implementation"}}} +impl PartialEq for StructExpression { + fn eq(&self, other: &Self) -> bool { + self.bug == other.bug && self.data == other.data && self.x_path == other.x_path + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/struct_field.rs b/src/v2/lu_dog_vec_tracy/types/struct_field.rs new file mode 100644 index 00000000..7a163c72 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/struct_field.rs @@ -0,0 +1,67 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"struct_field-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_field-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::enum_field::EnumField; +use crate::v2::lu_dog_vec_tracy::types::enum_field::EnumFieldEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_field-struct-documentation"}}} +/// A field that is a structure. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_field-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct StructField { + pub id: usize, + pub name: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_field-implementation"}}} +impl StructField { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_field-struct-impl-new"}}} + /// Inter a new 'Struct Field' in the store, and return it's `id`. + pub fn new(name: String, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_struct_field(|id| { + Rc::new(RefCell::new(StructField { + id, + name: name.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_field-impl-nav-subtype-to-supertype-enum_field"}}} + // Navigate to [`EnumField`] across R85(isa) + pub fn r85_enum_field<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r85_enum_field"); + vec![store + .iter_enum_field() + .find(|enum_field| { + if let EnumFieldEnum::StructField(id) = enum_field.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_field-implementation"}}} +impl PartialEq for StructField { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/struct_generic.rs b/src/v2/lu_dog_vec_tracy/types/struct_generic.rs new file mode 100644 index 00000000..2a0232e5 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/struct_generic.rs @@ -0,0 +1,110 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"struct_generic-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::woog_struct::WoogStruct; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-struct-documentation"}}} +/// A generic type applied to the struct. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct StructGeneric { + pub id: usize, + pub name: String, + /// R101: [`StructGeneric`] '' [`StructGeneric`] + pub next: Option, + /// R100: [`StructGeneric`] 'applies to a' [`WoogStruct`] + pub woog_struct: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-implementation"}}} +impl StructGeneric { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-struct-impl-new"}}} + /// Inter a new 'Struct Generic' in the store, and return it's `id`. + pub fn new( + name: String, + next: Option<&Rc>>, + woog_struct: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_struct_generic(|id| { + Rc::new(RefCell::new(StructGeneric { + id, + name: name.to_owned(), + next: next.map(|struct_generic| struct_generic.borrow().id), + woog_struct: woog_struct.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-struct-impl-nav-forward-cond-to-next"}}} + /// Navigate to [`StructGeneric`] across R101(1-*c) + pub fn r101_struct_generic<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r101_struct_generic"); + match self.next { + Some(ref next) => vec![store.exhume_struct_generic(&next).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-struct-impl-nav-forward-to-woog_struct"}}} + /// Navigate to [`WoogStruct`] across R100(1-*) + pub fn r100_woog_struct<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r100_woog_struct"); + vec![store.exhume_woog_struct(&self.woog_struct).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-struct-impl-nav-backward-one-to-woog_struct"}}} + /// Navigate to [`WoogStruct`] across R102(1-1) + pub fn r102_woog_struct<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r102_woog_struct"); + vec![store + .iter_woog_struct() + .find(|woog_struct| woog_struct.borrow().first_generic == Some(self.id)) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-struct-impl-nav-backward-one-bi-cond-to-struct_generic"}}} + /// Navigate to [`StructGeneric`] across R101(1c-1c) + pub fn r101c_struct_generic<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r101_struct_generic"); + let struct_generic = store + .iter_struct_generic() + .find(|struct_generic| struct_generic.borrow().next == Some(self.id)); + match struct_generic { + Some(ref struct_generic) => vec![struct_generic.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"struct_generic-implementation"}}} +impl PartialEq for StructGeneric { + fn eq(&self, other: &Self) -> bool { + self.name == other.name && self.next == other.next && self.woog_struct == other.woog_struct + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/subtraction.rs b/src/v2/lu_dog_vec_tracy/types/subtraction.rs new file mode 100644 index 00000000..a2cf70c0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/subtraction.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"subtraction-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"subtraction-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"subtraction-const-documentation"}}} +/// The subtraction operator: `-`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"subtraction-const-definition"}}} +pub const SUBTRACTION: Uuid = uuid!["f1f6f96b-31a8-5158-b940-b08b7241117d"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Subtraction; + +impl Subtraction { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + SUBTRACTION + } +} + +impl Default for Subtraction { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/task.rs b/src/v2/lu_dog_vec_tracy/types/task.rs new file mode 100644 index 00000000..19a1ae63 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/task.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"task-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"task-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"task-const-documentation"}}} +/// A type to contain a task. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"task-const-definition"}}} +pub const TASK: Uuid = uuid!["e6491493-a305-56aa-9d82-985393df6874"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Task; + +impl Task { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + TASK + } +} + +impl Default for Task { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/to.rs b/src/v2/lu_dog_vec_tracy/types/to.rs new file mode 100644 index 00000000..58a31d62 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/to.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"to-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"to-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"to-const-definition"}}} +pub const TO: Uuid = uuid!["f3610e2b-52b4-507b-812a-e1e13b493090"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct To; + +impl To { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + TO + } +} + +impl Default for To { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/to_inclusive.rs b/src/v2/lu_dog_vec_tracy/types/to_inclusive.rs new file mode 100644 index 00000000..d2610884 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/to_inclusive.rs @@ -0,0 +1,29 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"to_inclusive-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"to_inclusive-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"to_inclusive-const-definition"}}} +pub const TO_INCLUSIVE: Uuid = uuid!["df17de98-7148-580e-a61a-7fb4b9c7d5d1"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ToInclusive; + +impl ToInclusive { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + TO_INCLUSIVE + } +} + +impl Default for ToInclusive { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/true_literal.rs b/src/v2/lu_dog_vec_tracy/types/true_literal.rs new file mode 100644 index 00000000..e39fdcf0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/true_literal.rs @@ -0,0 +1,35 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"true_literal-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"true_literal-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"true_literal-const-documentation"}}} +/// True Literal +/// +/// The literal `true`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"true_literal-const-definition"}}} +pub const TRUE_LITERAL: Uuid = uuid!["acf0b446-36cc-5862-ba90-bf3fa3e6de05"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TrueLiteral; + +impl TrueLiteral { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + TRUE_LITERAL + } +} + +impl Default for TrueLiteral { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/tuple_field.rs b/src/v2/lu_dog_vec_tracy/types/tuple_field.rs new file mode 100644 index 00000000..572504ae --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/tuple_field.rs @@ -0,0 +1,98 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"tuple_field-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"tuple_field-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::enum_field::EnumField; +use crate::v2::lu_dog_vec_tracy::types::enum_field::EnumFieldEnum; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"tuple_field-struct-documentation"}}} +/// A field that is a tuple. +/// +/// Currently in this implementation we are cheating, as we don’t yet actually have tuples +/// . So this is limited to a single item. +/// +/// Note the `hack` attribute. What’s happening is that during generic substitution?, expansion +/// ?, whatever. During that we are cloning the enum, and it’s fields. This is to create a +/// new type. When we do this we don’t want the store optimizing away a duplicate Tuple Field +/// . +/// +/// I deb thee hack because I think the right thing to do is something else, I’m just not +/// sure what it is yet. +/// +/// I renamed it to `xyzzy`, because I think `hack` does magic in the compiler. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"tuple_field-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TupleField { + pub id: usize, + pub xyzzy: Uuid, + /// R86: [`TupleField`] 'must have a type' [`ValueType`] + pub ty: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"tuple_field-implementation"}}} +impl TupleField { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"tuple_field-struct-impl-new"}}} + /// Inter a new 'Tuple Field' in the store, and return it's `id`. + pub fn new( + xyzzy: Uuid, + ty: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_tuple_field(|id| { + Rc::new(RefCell::new(TupleField { + id, + xyzzy, + ty: ty.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"tuple_field-struct-impl-nav-forward-to-ty"}}} + /// Navigate to [`ValueType`] across R86(1-*) + pub fn r86_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r86_value_type"); + vec![store.exhume_value_type(&self.ty).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"tuple_field-impl-nav-subtype-to-supertype-enum_field"}}} + // Navigate to [`EnumField`] across R85(isa) + pub fn r85_enum_field<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r85_enum_field"); + vec![store + .iter_enum_field() + .find(|enum_field| { + if let EnumFieldEnum::TupleField(id) = enum_field.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"tuple_field-implementation"}}} +impl PartialEq for TupleField { + fn eq(&self, other: &Self) -> bool { + self.xyzzy == other.xyzzy && self.ty == other.ty + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/type_cast.rs b/src/v2/lu_dog_vec_tracy/types/type_cast.rs new file mode 100644 index 00000000..37106c90 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/type_cast.rs @@ -0,0 +1,98 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"type_cast-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-struct-documentation"}}} +/// Typecast Operator Expression +/// +/// This is the `as` operator. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TypeCast { + pub id: usize, + /// R68: [`TypeCast`] '' [`Expression`] + pub lhs: usize, + /// R69: [`TypeCast`] '' [`ValueType`] + pub ty: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-implementation"}}} +impl TypeCast { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-struct-impl-new"}}} + /// Inter a new 'Type Cast' in the store, and return it's `id`. + pub fn new( + lhs: &Rc>, + ty: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_type_cast(|id| { + Rc::new(RefCell::new(TypeCast { + id, + lhs: lhs.borrow().id, + ty: ty.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-struct-impl-nav-forward-to-lhs"}}} + /// Navigate to [`Expression`] across R68(1-*) + pub fn r68_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r68_expression"); + vec![store.exhume_expression(&self.lhs).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-struct-impl-nav-forward-to-ty"}}} + /// Navigate to [`ValueType`] across R69(1-*) + pub fn r69_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r69_value_type"); + vec![store.exhume_value_type(&self.ty).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::TypeCast(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"type_cast-implementation"}}} +impl PartialEq for TypeCast { + fn eq(&self, other: &Self) -> bool { + self.lhs == other.lhs && self.ty == other.ty + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/unary.rs b/src/v2/lu_dog_vec_tracy/types/unary.rs new file mode 100644 index 00000000..4b490af2 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/unary.rs @@ -0,0 +1,84 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"unary-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::negation::NEGATION; +use crate::v2::lu_dog_vec_tracy::types::not::NOT; +use crate::v2::lu_dog_vec_tracy::types::operator::Operator; +use crate::v2::lu_dog_vec_tracy::types::operator::OperatorEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-hybrid-documentation"}}} +/// Unary Operators +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Unary { + pub subtype: UnaryEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum UnaryEnum { + Negation(Uuid), + Not(Uuid), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-implementation"}}} +impl Unary { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-struct-impl-new_negation"}}} + /// Inter a new Unary in the store, and return it's `id`. + pub fn new_negation(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_unary(|id| { + Rc::new(RefCell::new(Unary { + subtype: UnaryEnum::Negation(NEGATION), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-struct-impl-new_not"}}} + /// Inter a new Unary in the store, and return it's `id`. + pub fn new_not(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_unary(|id| { + Rc::new(RefCell::new(Unary { + subtype: UnaryEnum::Not(NOT), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-impl-nav-subtype-to-supertype-operator"}}} + // Navigate to [`Operator`] across R47(isa) + pub fn r47_operator<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r47_operator"); + vec![store + .iter_operator() + .find(|operator| { + if let OperatorEnum::Unary(id) = operator.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unary-implementation"}}} +impl PartialEq for Unary { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/unit.rs b/src/v2/lu_dog_vec_tracy/types/unit.rs new file mode 100644 index 00000000..36bd8a9e --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/unit.rs @@ -0,0 +1,62 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"unit-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unit-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::enum_field::EnumField; +use crate::v2::lu_dog_vec_tracy::types::enum_field::EnumFieldEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unit-struct-documentation"}}} +/// Just a marker, no other value. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unit-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Unit { + pub id: usize, + pub x_value: i64, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unit-implementation"}}} +impl Unit { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unit-struct-impl-new"}}} + /// Inter a new 'Unit' in the store, and return it's `id`. + pub fn new(x_value: i64, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_unit(|id| Rc::new(RefCell::new(Unit { id, x_value }))) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unit-impl-nav-subtype-to-supertype-enum_field"}}} + // Navigate to [`EnumField`] across R85(isa) + pub fn r85_enum_field<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r85_enum_field"); + vec![store + .iter_enum_field() + .find(|enum_field| { + if let EnumFieldEnum::Unit(id) = enum_field.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unit-implementation"}}} +impl PartialEq for Unit { + fn eq(&self, other: &Self) -> bool { + self.x_value == other.x_value + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/unknown.rs b/src/v2/lu_dog_vec_tracy/types/unknown.rs new file mode 100644 index 00000000..949cc433 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/unknown.rs @@ -0,0 +1,35 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"unknown-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unknown-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unknown-const-documentation"}}} +/// Unknown Type +/// +/// The type is unknown. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unknown-const-definition"}}} +pub const UNKNOWN: Uuid = uuid!["351f1018-eae0-5fdb-920b-0528c8947138"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Unknown; + +impl Unknown { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + UNKNOWN + } +} + +impl Default for Unknown { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/unnamed_field_expression.rs b/src/v2/lu_dog_vec_tracy/types/unnamed_field_expression.rs new file mode 100644 index 00000000..b157c04c --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/unnamed_field_expression.rs @@ -0,0 +1,65 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"unnamed_field_expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unnamed_field_expression-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::field_expression::FieldExpression; +use crate::v2::lu_dog_vec_tracy::types::field_expression::FieldExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unnamed_field_expression-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct UnnamedFieldExpression { + pub id: usize, + pub position: i64, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unnamed_field_expression-implementation"}}} +impl UnnamedFieldExpression { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unnamed_field_expression-struct-impl-new"}}} + /// Inter a new 'Unnamed Field Expression' in the store, and return it's `id`. + pub fn new( + position: i64, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_unnamed_field_expression(|id| { + Rc::new(RefCell::new(UnnamedFieldExpression { id, position })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unnamed_field_expression-impl-nav-subtype-to-supertype-field_expression"}}} + // Navigate to [`FieldExpression`] across R94(isa) + pub fn r94_field_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r94_field_expression"); + vec![store + .iter_field_expression() + .find(|field_expression| { + if let FieldExpressionEnum::UnnamedFieldExpression(id) = + field_expression.borrow().subtype + { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"unnamed_field_expression-implementation"}}} +impl PartialEq for UnnamedFieldExpression { + fn eq(&self, other: &Self) -> bool { + self.position == other.position + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/value_type.rs b/src/v2/lu_dog_vec_tracy/types/value_type.rs new file mode 100644 index 00000000..0d0965c1 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/value_type.rs @@ -0,0 +1,436 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"value_type-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::char::CHAR; +use crate::v2::lu_dog_vec_tracy::types::empty::EMPTY; +use crate::v2::lu_dog_vec_tracy::types::enumeration::Enumeration; +use crate::v2::lu_dog_vec_tracy::types::field::Field; +use crate::v2::lu_dog_vec_tracy::types::function::Function; +use crate::v2::lu_dog_vec_tracy::types::generic::Generic; +use crate::v2::lu_dog_vec_tracy::types::import::Import; +use crate::v2::lu_dog_vec_tracy::types::lambda::Lambda; +use crate::v2::lu_dog_vec_tracy::types::lambda_parameter::LambdaParameter; +use crate::v2::lu_dog_vec_tracy::types::list::List; +use crate::v2::lu_dog_vec_tracy::types::parameter::Parameter; +use crate::v2::lu_dog_vec_tracy::types::plugin::Plugin; +use crate::v2::lu_dog_vec_tracy::types::range::RANGE; +use crate::v2::lu_dog_vec_tracy::types::span::Span; +use crate::v2::lu_dog_vec_tracy::types::task::TASK; +use crate::v2::lu_dog_vec_tracy::types::tuple_field::TupleField; +use crate::v2::lu_dog_vec_tracy::types::type_cast::TypeCast; +use crate::v2::lu_dog_vec_tracy::types::unknown::UNKNOWN; +use crate::v2::lu_dog_vec_tracy::types::woog_struct::WoogStruct; +use crate::v2::lu_dog_vec_tracy::types::x_future::XFuture; +use crate::v2::lu_dog_vec_tracy::types::x_value::XValue; +use crate::v2::lu_dog_vec_tracy::types::z_object_store::ZObjectStore; +use crate::v2::sarzak::types::ty::Ty; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-documentation"}}} +/// Value Type +/// +/// This is the main type abstraction used in Lu Dog. We mostly rely on what is available in +/// Sarzak, with two additions: ... +/// +/// Two? I know that I need an Option<>. I'm not so sure about a & though. Everything from the +/// store is going to be by UUID, so all of my references are really "pointers" underneath. +/// I want them to be typed in the code though. +/// +/// So how will the code work? We could store the type next to the pointer: (type, uuid). Huh +/// . This is the eventual output domain. How does that affect my thinking? +/// +/// This should end up looking like woog, but simpler. Woog was for generating rust. I want +/// to generate dwarf. Dwarf needs to be typed? If so, when are they resolved to uuid's eventually +/// ? +/// +/// Option for now. We'll see later... +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ValueType { + pub subtype: ValueTypeEnum, + pub id: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum ValueTypeEnum { + Char(Uuid), + Empty(Uuid), + Enumeration(usize), + Function(usize), + XFuture(usize), + Generic(usize), + Import(usize), + Lambda(usize), + List(usize), + ZObjectStore(usize), + Plugin(usize), + Range(Uuid), + WoogStruct(usize), + Task(Uuid), + Ty(Uuid), + Unknown(Uuid), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} +impl ValueType { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_char"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_char(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Char(CHAR), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_empty"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_empty(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Empty(EMPTY), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_enumeration"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_enumeration( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Enumeration(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_function"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_function( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Function(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_x_future"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_x_future( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::XFuture(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_generic"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_generic( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Generic(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_import"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_import( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Import(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_lambda"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_lambda( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Lambda(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_list"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_list( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::List(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_z_object_store"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_z_object_store( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::ZObjectStore(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_plugin"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_plugin( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Plugin(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_range"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_range(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Range(RANGE), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_woog_struct"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_woog_struct( + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::WoogStruct(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_task"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_task(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Task(TASK), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_ty"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_ty( + subtype: &std::sync::Arc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Ty(subtype.read().unwrap().id()), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_unknown"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_unknown(store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + subtype: ValueTypeEnum::Unknown(UNKNOWN), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-field"}}} + /// Navigate to [`Field`] across R5(1-M) + pub fn r5_field<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r5_field"); + store + .iter_field() + .filter(|field| field.borrow().ty == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-function"}}} + /// Navigate to [`Function`] across R10(1-M) + pub fn r10_function<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r10_function"); + store + .iter_function() + .filter(|function| function.borrow().return_type == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-x_future"}}} + /// Navigate to [`XFuture`] across R2(1-M) + pub fn r2_x_future<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r2_x_future"); + store + .iter_x_future() + .filter(|x_future| x_future.borrow().x_value == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_Mc-to-generic"}}} + /// Navigate to [`Generic`] across R99(1-Mc) + pub fn r99_generic<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r99_generic"); + store + .iter_generic() + .filter(|generic| generic.borrow().ty == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-lambda"}}} + /// Navigate to [`Lambda`] across R74(1-M) + pub fn r74_lambda<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r74_lambda"); + store + .iter_lambda() + .filter(|lambda| lambda.borrow().return_type == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_Mc-to-lambda_parameter"}}} + /// Navigate to [`LambdaParameter`] across R77(1-Mc) + pub fn r77_lambda_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r77_lambda_parameter"); + store + .iter_lambda_parameter() + .filter(|lambda_parameter| lambda_parameter.borrow().ty == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-list"}}} + /// Navigate to [`List`] across R36(1-M) + pub fn r36_list<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r36_list"); + store + .iter_list() + .filter(|list| list.borrow().ty == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-parameter"}}} + /// Navigate to [`Parameter`] across R79(1-M) + pub fn r79_parameter<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r79_parameter"); + store + .iter_parameter() + .filter(|parameter| parameter.borrow().ty == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_Mc-to-span"}}} + /// Navigate to [`Span`] across R62(1-Mc) + pub fn r62_span<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r62_span"); + store + .iter_span() + .filter(|span| span.borrow().ty == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-tuple_field"}}} + /// Navigate to [`TupleField`] across R86(1-M) + pub fn r86_tuple_field<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r86_tuple_field"); + store + .iter_tuple_field() + .filter(|tuple_field| tuple_field.borrow().ty == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-type_cast"}}} + /// Navigate to [`TypeCast`] across R69(1-M) + pub fn r69_type_cast<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r69_type_cast"); + store + .iter_type_cast() + .filter(|type_cast| type_cast.borrow().ty == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-nav-backward-1_M-to-x_value"}}} + /// Navigate to [`XValue`] across R24(1-M) + pub fn r24_x_value<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r24_x_value"); + store + .iter_x_value() + .filter(|x_value| x_value.borrow().ty == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} +impl PartialEq for ValueType { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/variable.rs b/src/v2/lu_dog_vec_tracy/types/variable.rs new file mode 100644 index 00000000..c964a7a2 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/variable.rs @@ -0,0 +1,117 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"variable-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::lambda_parameter::LambdaParameter; +use crate::v2::lu_dog_vec_tracy::types::local_variable::LocalVariable; +use crate::v2::lu_dog_vec_tracy::types::parameter::Parameter; +use crate::v2::lu_dog_vec_tracy::types::x_value::XValue; +use crate::v2::lu_dog_vec_tracy::types::x_value::XValueEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-hybrid-documentation"}}} +/// A Variable +/// +/// A variable in a function. It may be either a local variable or a parameter. +/// +/// A variable has a name, and and indirectly, via [`Value`], a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Variable { + pub subtype: VariableEnum, + pub id: usize, + pub name: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum VariableEnum { + LambdaParameter(usize), + LocalVariable(usize), + Parameter(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-implementation"}}} +impl Variable { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-struct-impl-new_lambda_parameter"}}} + /// Inter a new Variable in the store, and return it's `id`. + pub fn new_lambda_parameter( + name: String, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_variable(|id| { + Rc::new(RefCell::new(Variable { + name: name.to_owned(), + subtype: VariableEnum::LambdaParameter(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-struct-impl-new_local_variable"}}} + /// Inter a new Variable in the store, and return it's `id`. + pub fn new_local_variable( + name: String, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_variable(|id| { + Rc::new(RefCell::new(Variable { + name: name.to_owned(), + subtype: VariableEnum::LocalVariable(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-struct-impl-new_parameter"}}} + /// Inter a new Variable in the store, and return it's `id`. + pub fn new_parameter( + name: String, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_variable(|id| { + Rc::new(RefCell::new(Variable { + name: name.to_owned(), + subtype: VariableEnum::Parameter(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-impl-nav-subtype-to-supertype-x_value"}}} + // Navigate to [`XValue`] across R11(isa) + pub fn r11_x_value<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r11_x_value"); + vec![store + .iter_x_value() + .find(|x_value| { + if let XValueEnum::Variable(id) = x_value.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable-implementation"}}} +impl PartialEq for Variable { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype && self.name == other.name + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/variable_expression.rs b/src/v2/lu_dog_vec_tracy/types/variable_expression.rs new file mode 100644 index 00000000..eeacd503 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/variable_expression.rs @@ -0,0 +1,69 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"variable_expression-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable_expression-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable_expression-struct-documentation"}}} +/// A Local Variable Expression +/// +/// This is what happens when a variable is an r-value. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable_expression-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct VariableExpression { + pub id: usize, + pub name: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable_expression-implementation"}}} +impl VariableExpression { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable_expression-struct-impl-new"}}} + /// Inter a new 'Variable Expression' in the store, and return it's `id`. + pub fn new(name: String, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_variable_expression(|id| { + Rc::new(RefCell::new(VariableExpression { + id, + name: name.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable_expression-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::VariableExpression(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"variable_expression-implementation"}}} +impl PartialEq for VariableExpression { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/woog_struct.rs b/src/v2/lu_dog_vec_tracy/types/woog_struct.rs new file mode 100644 index 00000000..afa1ddc3 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/woog_struct.rs @@ -0,0 +1,205 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"woog_struct-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::data_structure::DataStructure; +use crate::v2::lu_dog_vec_tracy::types::data_structure::DataStructureEnum; +use crate::v2::lu_dog_vec_tracy::types::field::Field; +use crate::v2::lu_dog_vec_tracy::types::field_access::FieldAccess; +use crate::v2::lu_dog_vec_tracy::types::implementation_block::ImplementationBlock; +use crate::v2::lu_dog_vec_tracy::types::item::Item; +use crate::v2::lu_dog_vec_tracy::types::item::ItemEnum; +use crate::v2::lu_dog_vec_tracy::types::struct_generic::StructGeneric; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use crate::v2::sarzak::types::object::Object; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +use crate::v2::sarzak::store::ObjectStore as SarzakStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-documentation"}}} +/// A Type from the Model +/// +/// This is really just an alias for `[Object]`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct WoogStruct { + pub id: usize, + pub name: String, + /// R102: [`WoogStruct`] 'may have a ' [`StructGeneric`] + pub first_generic: Option, + /// R4: [`WoogStruct`] 'mirrors an' [`Object`] + pub object: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-implementation"}}} +impl WoogStruct { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-impl-new"}}} + /// Inter a new 'Struct' in the store, and return it's `id`. + pub fn new( + name: String, + first_generic: Option<&Rc>>, + object: Option<&Object>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_woog_struct(|id| { + Rc::new(RefCell::new(WoogStruct { + id, + name: name.to_owned(), + first_generic: first_generic.map(|struct_generic| struct_generic.borrow().id), + object: object.as_ref().map(|object| object.id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-impl-nav-forward-cond-to-first_generic"}}} + /// Navigate to [`StructGeneric`] across R102(1-*c) + pub fn r102_struct_generic<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r102_struct_generic"); + match self.first_generic { + Some(ref first_generic) => vec![store.exhume_struct_generic(&first_generic).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-impl-nav-forward-cond-to-object"}}} + /// Navigate to [`Object`] across R4(1-*c) + pub fn r4_object<'a>( + &'a self, + store: &'a SarzakStore, + ) -> Vec>> { + span!("r4_object"); + match self.object { + Some(ref object) => vec![store.exhume_object(&object).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-impl-nav-backward-1_M-to-field"}}} + /// Navigate to [`Field`] across R7(1-M) + pub fn r7_field<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r7_field"); + store + .iter_field() + .filter(|field| field.borrow().x_model == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-impl-nav-backward-1_M-to-field_access"}}} + /// Navigate to [`FieldAccess`] across R66(1-M) + pub fn r66_field_access<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r66_field_access"); + store + .iter_field_access() + .filter(|field_access| field_access.borrow().woog_struct == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-impl-nav-backward-one-bi-cond-to-implementation_block"}}} + /// Navigate to [`ImplementationBlock`] across R8(1c-1c) + pub fn r8c_implementation_block<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r8_implementation_block"); + let implementation_block = store + .iter_implementation_block() + .find(|implementation_block| implementation_block.borrow().model_type == Some(self.id)); + match implementation_block { + Some(ref implementation_block) => vec![implementation_block.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-struct-impl-nav-backward-1_M-to-struct_generic"}}} + /// Navigate to [`StructGeneric`] across R100(1-M) + pub fn r100_struct_generic<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r100_struct_generic"); + store + .iter_struct_generic() + .filter(|struct_generic| struct_generic.borrow().woog_struct == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-impl-nav-subtype-to-supertype-data_structure"}}} + // Navigate to [`DataStructure`] across R95(isa) + pub fn r95_data_structure<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r95_data_structure"); + vec![store + .iter_data_structure() + .find(|data_structure| { + if let DataStructureEnum::WoogStruct(id) = data_structure.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-impl-nav-subtype-to-supertype-item"}}} + // Navigate to [`Item`] across R6(isa) + pub fn r6_item<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r6_item"); + vec![store + .iter_item() + .find(|item| { + if let ItemEnum::WoogStruct(id) = item.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::WoogStruct(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"woog_struct-implementation"}}} +impl PartialEq for WoogStruct { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + && self.first_generic == other.first_generic + && self.object == other.object + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/x_future.rs b/src/v2/lu_dog_vec_tracy/types/x_future.rs new file mode 100644 index 00000000..5896cef7 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/x_future.rs @@ -0,0 +1,77 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"x_future-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_future-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_future-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct XFuture { + pub id: usize, + /// R2: [`XFuture`] 'contains' [`ValueType`] + pub x_value: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_future-implementation"}}} +impl XFuture { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_future-struct-impl-new"}}} + /// Inter a new 'Future' in the store, and return it's `id`. + pub fn new( + x_value: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_x_future(|id| { + Rc::new(RefCell::new(XFuture { + id, + x_value: x_value.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_future-struct-impl-nav-forward-to-x_value"}}} + /// Navigate to [`ValueType`] across R2(1-*) + pub fn r2_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r2_value_type"); + vec![store.exhume_value_type(&self.x_value).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_future-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::XFuture(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_future-implementation"}}} +impl PartialEq for XFuture { + fn eq(&self, other: &Self) -> bool { + self.x_value == other.x_value + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/x_if.rs b/src/v2/lu_dog_vec_tracy/types/x_if.rs new file mode 100644 index 00000000..fb6e109f --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/x_if.rs @@ -0,0 +1,111 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"x_if-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::block::Block; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-struct-documentation"}}} +/// The if Expression +/// +/// It does include an else, at no extra charge! +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct XIf { + pub id: usize, + /// R52: [`XIf`] 'false block' [`Block`] + pub false_block: Option, + /// R44: [`XIf`] 'branches based on' [`Expression`] + pub test: usize, + /// R46: [`XIf`] 'when true, evaluates' [`Block`] + pub true_block: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-implementation"}}} +impl XIf { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-struct-impl-new"}}} + /// Inter a new 'If' in the store, and return it's `id`. + pub fn new( + false_block: Option<&Rc>>, + test: &Rc>, + true_block: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_x_if(|id| { + Rc::new(RefCell::new(XIf { + id, + false_block: false_block.map(|block| block.borrow().id), + test: test.borrow().id, + true_block: true_block.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-struct-impl-nav-forward-cond-to-false_block"}}} + /// Navigate to [`Block`] across R52(1-*c) + pub fn r52_block<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r52_block"); + match self.false_block { + Some(ref false_block) => vec![store.exhume_block(&false_block).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-struct-impl-nav-forward-to-test"}}} + /// Navigate to [`Expression`] across R44(1-*) + pub fn r44_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r44_expression"); + vec![store.exhume_expression(&self.test).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-struct-impl-nav-forward-to-true_block"}}} + /// Navigate to [`Block`] across R46(1-*) + pub fn r46_block<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r46_block"); + vec![store.exhume_block(&self.true_block).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::XIf(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_if-implementation"}}} +impl PartialEq for XIf { + fn eq(&self, other: &Self) -> bool { + self.false_block == other.false_block + && self.test == other.test + && self.true_block == other.true_block + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/x_macro.rs b/src/v2/lu_dog_vec_tracy/types/x_macro.rs new file mode 100644 index 00000000..cdda0381 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/x_macro.rs @@ -0,0 +1,77 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"x_macro-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_macro-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::item::Item; +use crate::v2::lu_dog_vec_tracy::types::item::ItemEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_macro-struct-documentation"}}} +/// This is a macro +/// +/// It sort of interesting that the way that we create a new macro is with a macro. So it’s +/// nice and recursive like that. The macro in question, will be none other than `macro_rules +/// !`!. +/// +/// OK, so that means something like this: +/// +/// ```no-test +/// macro_rules! `ident` { +/// ($[ ( | `ident`]<,)*>[,$ident]*) => { +/// } +/// } +/// ``` +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_macro-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct XMacro { + pub id: usize, + pub name: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_macro-implementation"}}} +impl XMacro { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_macro-struct-impl-new"}}} + /// Inter a new 'Macro' in the store, and return it's `id`. + pub fn new(name: String, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_x_macro(|id| { + Rc::new(RefCell::new(XMacro { + id, + name: name.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_macro-impl-nav-subtype-to-supertype-item"}}} + // Navigate to [`Item`] across R6(isa) + pub fn r6_item<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r6_item"); + vec![store + .iter_item() + .find(|item| { + if let ItemEnum::XMacro(id) = item.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_macro-implementation"}}} +impl PartialEq for XMacro { + fn eq(&self, other: &Self) -> bool { + self.name == other.name + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/x_match.rs b/src/v2/lu_dog_vec_tracy/types/x_match.rs new file mode 100644 index 00000000..47643bd0 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/x_match.rs @@ -0,0 +1,95 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"x_match-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::pattern::Pattern; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-struct-documentation"}}} +/// Match a pattern to a scrutinee and evaluate a branch based on the results. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct XMatch { + pub id: usize, + pub uniqueness_generator: Uuid, + /// R91: [`XMatch`] 'deconstructs ' [`Expression`] + pub scrutinee: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-implementation"}}} +impl XMatch { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-struct-impl-new"}}} + /// Inter a new 'Match' in the store, and return it's `id`. + pub fn new( + uniqueness_generator: Uuid, + scrutinee: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_x_match(|id| { + Rc::new(RefCell::new(XMatch { + id, + uniqueness_generator, + scrutinee: scrutinee.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-struct-impl-nav-forward-to-scrutinee"}}} + /// Navigate to [`Expression`] across R91(1-*) + pub fn r91_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r91_expression"); + vec![store.exhume_expression(&self.scrutinee).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-struct-impl-nav-backward-assoc-many-to-pattern"}}} + /// Navigate to [`Pattern`] across R87(1-M) + pub fn r87_pattern<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r87_pattern"); + store + .iter_pattern() + .filter(|pattern| pattern.borrow().x_match == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::XMatch(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_match-implementation"}}} +impl PartialEq for XMatch { + fn eq(&self, other: &Self) -> bool { + self.uniqueness_generator == other.uniqueness_generator && self.scrutinee == other.scrutinee + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/x_path.rs b/src/v2/lu_dog_vec_tracy/types/x_path.rs new file mode 100644 index 00000000..2c071427 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/x_path.rs @@ -0,0 +1,116 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"x_path-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use crate::v2::lu_dog_vec_tracy::types::path_element::PathElement; +use crate::v2::lu_dog_vec_tracy::types::struct_expression::StructExpression; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-struct-documentation"}}} +/// This is a path to a local variable, or an item. It is made up of scopes, separated by ` +/// ::`. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct XPath { + pub id: usize, + pub unique: Uuid, + /// R97: [`XPath`] 'first element' [`PathElement`] + pub first: Option, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-implementation"}}} +impl XPath { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-struct-impl-new"}}} + /// Inter a new 'Path' in the store, and return it's `id`. + pub fn new( + unique: Uuid, + first: Option<&Rc>>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_x_path(|id| { + Rc::new(RefCell::new(XPath { + id, + unique, + first: first.map(|path_element| path_element.borrow().id), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-struct-impl-nav-forward-cond-to-first"}}} + /// Navigate to [`PathElement`] across R97(1-*c) + pub fn r97_path_element<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r97_path_element"); + match self.first { + Some(ref first) => vec![store.exhume_path_element(&first).unwrap()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-struct-impl-nav-backward-1_M-to-path_element"}}} + /// Navigate to [`PathElement`] across R90(1-M) + pub fn r90_path_element<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r90_path_element"); + store + .iter_path_element() + .filter(|path_element| path_element.borrow().x_path == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-struct-impl-nav-backward-1_M-to-struct_expression"}}} + /// Navigate to [`StructExpression`] across R96(1-M) + pub fn r96_struct_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r96_struct_expression"); + store + .iter_struct_expression() + .filter(|struct_expression| struct_expression.borrow().x_path == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::XPath(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_path-implementation"}}} +impl PartialEq for XPath { + fn eq(&self, other: &Self) -> bool { + self.unique == other.unique && self.first == other.first + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/x_print.rs b/src/v2/lu_dog_vec_tracy/types/x_print.rs new file mode 100644 index 00000000..1c6375b4 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/x_print.rs @@ -0,0 +1,83 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"x_print-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_print-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_print-struct-documentation"}}} +/// A Print Expression? +/// +/// Shold this be a statement? +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_print-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct XPrint { + pub id: usize, + /// R32: [`XPrint`] '' [`Expression`] + pub expression: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_print-implementation"}}} +impl XPrint { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_print-struct-impl-new"}}} + /// Inter a new 'Print' in the store, and return it's `id`. + pub fn new( + expression: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_x_print(|id| { + Rc::new(RefCell::new(XPrint { + id, + expression: expression.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_print-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R32(1-*) + pub fn r32_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r32_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_print-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::XPrint(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_print-implementation"}}} +impl PartialEq for XPrint { + fn eq(&self, other: &Self) -> bool { + self.expression == other.expression + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/x_return.rs b/src/v2/lu_dog_vec_tracy/types/x_return.rs new file mode 100644 index 00000000..90c8ab60 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/x_return.rs @@ -0,0 +1,83 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"x_return-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_return-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::expression::ExpressionEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_return-struct-documentation"}}} +/// The Return Expression +/// +/// It’s an expression, and not a statement. Isn’t that interesting? +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_return-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct XReturn { + pub id: usize, + /// R45: [`XReturn`] 'evaluates and returns' [`Expression`] + pub expression: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_return-implementation"}}} +impl XReturn { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_return-struct-impl-new"}}} + /// Inter a new 'Return' in the store, and return it's `id`. + pub fn new( + expression: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_x_return(|id| { + Rc::new(RefCell::new(XReturn { + id, + expression: expression.borrow().id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_return-struct-impl-nav-forward-to-expression"}}} + /// Navigate to [`Expression`] across R45(1-*) + pub fn r45_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r45_expression"); + vec![store.exhume_expression(&self.expression).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_return-impl-nav-subtype-to-supertype-expression"}}} + // Navigate to [`Expression`] across R15(isa) + pub fn r15_expression<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r15_expression"); + vec![store + .iter_expression() + .find(|expression| { + if let ExpressionEnum::XReturn(id) = expression.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_return-implementation"}}} +impl PartialEq for XReturn { + fn eq(&self, other: &Self) -> bool { + self.expression == other.expression + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/x_value.rs b/src/v2/lu_dog_vec_tracy/types/x_value.rs new file mode 100644 index 00000000..b9630072 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/x_value.rs @@ -0,0 +1,116 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"x_value-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::block::Block; +use crate::v2::lu_dog_vec_tracy::types::expression::Expression; +use crate::v2::lu_dog_vec_tracy::types::span::Span; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::variable::Variable; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-hybrid-documentation"}}} +/// A Value +/// +/// A value has a Type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-hybrid-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct XValue { + pub subtype: XValueEnum, + pub id: usize, + /// R33: [`XValue`] '' [`Block`] + pub block: usize, + /// R24: [`XValue`] 'is decoded by a' [`ValueType`] + pub ty: usize, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-hybrid-enum-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] +pub enum XValueEnum { + Expression(usize), + Variable(usize), +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-implementation"}}} +impl XValue { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-struct-impl-new_expression"}}} + /// Inter a new XValue in the store, and return it's `id`. + pub fn new_expression( + block: &Rc>, + ty: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_x_value(|id| { + Rc::new(RefCell::new(XValue { + block: block.borrow().id, + ty: ty.borrow().id, + subtype: XValueEnum::Expression(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-struct-impl-new_variable"}}} + /// Inter a new XValue in the store, and return it's `id`. + pub fn new_variable( + block: &Rc>, + ty: &Rc>, + subtype: &Rc>, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_x_value(|id| { + Rc::new(RefCell::new(XValue { + block: block.borrow().id, + ty: ty.borrow().id, + subtype: XValueEnum::Variable(subtype.borrow().id), // b + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-struct-impl-nav-forward-to-block"}}} + /// Navigate to [`Block`] across R33(1-*) + pub fn r33_block<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r33_block"); + vec![store.exhume_block(&self.block).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-struct-impl-nav-forward-to-ty"}}} + /// Navigate to [`ValueType`] across R24(1-*) + pub fn r24_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r24_value_type"); + vec![store.exhume_value_type(&self.ty).unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-struct-impl-nav-backward-1_Mc-to-span"}}} + /// Navigate to [`Span`] across R63(1-Mc) + pub fn r63_span<'a>(&'a self, store: &'a LuDogVecTracyStore) -> Vec>> { + span!("r63_span"); + store + .iter_span() + .filter(|span| span.borrow().x_value == Some(self.id)) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"x_value-implementation"}}} +impl PartialEq for XValue { + fn eq(&self, other: &Self) -> bool { + self.subtype == other.subtype && self.block == other.block && self.ty == other.ty + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/z_object_store.rs b/src/v2/lu_dog_vec_tracy/types/z_object_store.rs new file mode 100644 index 00000000..53047c28 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/z_object_store.rs @@ -0,0 +1,108 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"z_object_store-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-use-statements"}}} +use std::cell::RefCell; +use std::rc::Rc; +use tracy_client::span; +use uuid::Uuid; + +use crate::v2::lu_dog_vec_tracy::types::implementation_block::ImplementationBlock; +use crate::v2::lu_dog_vec_tracy::types::object_wrapper::ObjectWrapper; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueType; +use crate::v2::lu_dog_vec_tracy::types::value_type::ValueTypeEnum; +use serde::{Deserialize, Serialize}; + +use crate::v2::lu_dog_vec_tracy::store::ObjectStore as LuDogVecTracyStore; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-struct-documentation"}}} +/// A generated ObjectStore +/// +/// This is the backing store for the structs. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-struct-definition"}}} +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ZObjectStore { + pub domain: String, + pub id: usize, + pub name: String, +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-implementation"}}} +impl ZObjectStore { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-struct-impl-new"}}} + /// Inter a new 'Object Store' in the store, and return it's `id`. + pub fn new( + domain: String, + name: String, + store: &mut LuDogVecTracyStore, + ) -> Rc> { + store.inter_z_object_store(|id| { + Rc::new(RefCell::new(ZObjectStore { + domain: domain.to_owned(), + id, + name: name.to_owned(), + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-struct-impl-nav-backward-one-bi-cond-to-implementation_block"}}} + /// Navigate to [`ImplementationBlock`] across R83(1c-1c) + pub fn r83c_implementation_block<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r83_implementation_block"); + let implementation_block = store + .iter_implementation_block() + .find(|implementation_block| { + implementation_block.borrow().object_store == Some(self.id) + }); + match implementation_block { + Some(ref implementation_block) => vec![implementation_block.clone()], + None => Vec::new(), + } + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-struct-impl-nav-backward-assoc-many-to-object_wrapper"}}} + /// Navigate to [`ObjectWrapper`] across R78(1-M) + pub fn r78_object_wrapper<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r78_object_wrapper"); + store + .iter_object_wrapper() + .filter(|object_wrapper| object_wrapper.borrow().z_store == self.id) + .collect() + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-impl-nav-subtype-to-supertype-value_type"}}} + // Navigate to [`ValueType`] across R1(isa) + pub fn r1_value_type<'a>( + &'a self, + store: &'a LuDogVecTracyStore, + ) -> Vec>> { + span!("r1_value_type"); + vec![store + .iter_value_type() + .find(|value_type| { + if let ValueTypeEnum::ZObjectStore(id) = value_type.borrow().subtype { + id == self.id + } else { + false + } + }) + .unwrap()] + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"z_object_store-implementation"}}} +impl PartialEq for ZObjectStore { + fn eq(&self, other: &Self) -> bool { + self.domain == other.domain && self.name == other.name + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}}