@cella-lang/python 0.1.202611021534 → 0.1.202611022105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGES.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## 未發佈
4
4
 
5
+ - 判決的每個問題多一個 `class`(放在 `kind` 之後),種類與 C 家族相同:`unsupported`、`indeterminate`(步數用完、等輸入)、
6
+ `termination`(未接住的例外)、`incomplete`(程式有洞)、`invalid`(程式的 JSON 不合法)。
7
+ ### ⚠️ 不相容
8
+
9
+ - 判決的 `assumes` 每一項改成物件 `{"implementation": "CPython", "choice": "object.address"}`,和 C 家族同一個形狀(之前是字串 `"object.address"`)。
10
+
5
11
  - `input(prompt)` 先把提示寫到輸出、再讀一行,兩個分開的步驟(CPython 的順序):除錯的工作階段停在等輸入時,提示已經在輸出裡;之前停下時輸出是空的。
6
12
  - 第一版:照 CPython 3.14 語意的 Python 模型。程式以語法樹(CPython `ast` 的子集,JSON)給;入口 `python.verdict`、`python.types` 與
7
13
  除錯器 `python.session`(停點同 CPython 追蹤器的 line 事件)。判決與 C 家族同一個形狀,`assumes` 列出依賴的實作選擇
package/README.md CHANGED
@@ -13,7 +13,10 @@ Depends on `@cella-lang/machine`.
13
13
  `{verdict, basis, exit, out, problems, assumes}` (the same shape as the C family's verdicts). An uncaught exception
14
14
  is defined behavior (`accept`, exit 1, the exception as a problem). Running out of steps, a construct the model does
15
15
  not take (`unsupported`, naming it) and an empty slot of the editor (`hole`, at its label) are `unknown`, never a
16
- guess. `assumes` lists the implementation's choices the run relied on: `random.seed` (an unseeded `random` starts as
16
+ guess. Each problem has a `class` as the C family's do (`termination` for an uncaught exception, `unsupported`,
17
+ `incomplete` for an empty slot, `indeterminate` for the step limit or waiting for input, `invalid` for JSON that is
18
+ not a program). `assumes` (always there) lists the implementation's choices the run relied on, each
19
+ `{"implementation": "CPython", "choice": …}`: `random.seed` (an unseeded `random` starts as
17
20
  `seed(0)`), `str.hash` (a set ordered by str hashes, as under `PYTHONHASHSEED=0`) and `object.address` (an object's
18
21
  address shown as text, or a set ordered by objects' hashes: the model places the object at heap position `a` at
19
22
  `0x1000 + 16a`, not where CPython's memory would). A verdict proved by the kernels:
package/index.json CHANGED
@@ -2546,6 +2546,10 @@
2546
2546
  "merkle": "73f764aa3163de3450ed238ba655e6229b09de719837a5ee9b0db91cc0f116ef",
2547
2547
  "own": "2521657cbf69064de1927d074939e2f21c977392dc4b5a6d10707b50598d322e"
2548
2548
  },
2549
+ "python.Lowering.choice": {
2550
+ "merkle": "4796ef1e5241e271dd117dacf5444ef49f25c36a5e0b17a75f5f6e8c7d493990",
2551
+ "own": "ffa8cb76b279ba05ae3aa60db1009fd31a88e1448e017327367c0187502de7c9"
2552
+ },
2549
2553
  "python.Lowering.classDefinition": {
2550
2554
  "merkle": "99185ce3df36f77c39c664790b631ee4e4ff32ca097a290e3630b78aba870fd6",
2551
2555
  "own": "2b6ca6f54b275a9ab41b0ec71a883cc883302fa08ee85b4e6893b07ed6d9845e"
@@ -2991,8 +2995,8 @@
2991
2995
  "own": "518da0b8b1cda8371454abc65a481fe9b6d20bbaf5eb3ddea18c792abb3d2523"
2992
2996
  },
2993
2997
  "python.Lowering.outcome": {
2994
- "merkle": "27be6a00c68573b5043142156e1af961481a2fa5df18e10cfb0b3cff85505e5c",
2995
- "own": "d067ab3c49f706a98eb6a158bd538a618c6389a8ba1fce03dac41661b9c1e7b6"
2998
+ "merkle": "c3b979316b081c4e1a1b329a229e4892eb098db2d8e58deb21f92c63201e0e7d",
2999
+ "own": "30dacf9129248b947049114ed7f07fbf0842b54df94daa4f4c7b9ef2ebc4596c"
2996
3000
  },
2997
3001
  "python.Lowering.ownName": {
2998
3002
  "merkle": "7307e92ca488e8c377403b7475e743e086707855b992b12038401530cc2b9bfe",
@@ -3023,8 +3027,8 @@
3023
3027
  "own": "42d575475e07b0354988ab352e960d650e7ab4aa084d98211fdea600554cf335"
3024
3028
  },
3025
3029
  "python.Lowering.problem": {
3026
- "merkle": "84b0bd3b02df7bc64394e6be2320850e5aa12620f0cf0f78593a03d7d34d966d",
3027
- "own": "139826b9a1a55dfb5532922b17708bf8593c59bd74f2ed77f87388e7c2cd2288"
3030
+ "merkle": "d0969a9b90b2e76ca1181066148f5b8c4ab9c72d4d054a6bf11c187107cd3c16",
3031
+ "own": "8e612ab4067cdd64f476308352271685c4e1659357e9e92e4466bc1812478f84"
3028
3032
  },
3029
3033
  "python.Lowering.program": {
3030
3034
  "merkle": "2f95ae3f625f7c1d1259f01fba3a5a5f58357d4adb929e38ff271d2f46815364",
@@ -3059,8 +3063,8 @@
3059
3063
  "own": "51fc07b5720734bfb7d4373a2c3f186228e99a0b1e18febf296addae707ac446"
3060
3064
  },
3061
3065
  "python.Lowering.rendered": {
3062
- "merkle": "4799a40a9a5396c8e15faefb2082c8926706205dc48f8d0d5644211349d474f2",
3063
- "own": "ee0dd0bed40463f7b6c0bf8e7ea2a4983d975551f41c6cd112c308269b563765"
3066
+ "merkle": "7651d68f17dc6b476f0ed33b21552c830e2c9fb85f2140a8bee95e2e866ac297",
3067
+ "own": "84ee9234fd3c3807497f506c3f57c6e631e758af01d079a746f41435d059f188"
3064
3068
  },
3065
3069
  "python.Lowering.reported": {
3066
3070
  "merkle": "4411e94263a0f11644d9f0ff557fa6bb269eca9280fafd7bc80333ec9252ae3a",
@@ -3175,8 +3179,8 @@
3175
3179
  "own": "3e43872d9ebabdebd7243bd5e0907674ae301f64c7ede549622888a760d44d7a"
3176
3180
  },
3177
3181
  "python.Lowering.thrown": {
3178
- "merkle": "8aa0e1b0ebd4c2759f317cff69ab0d05d67e7b8a6227eb3a4eb96e3f0f6b2597",
3179
- "own": "6b4f03ea3c3c37a757c724843567e042a7501ee9a8d42259f7f9d0bf82854b3b"
3182
+ "merkle": "d94078e141bb9ecaf16119a28a8483424beca1f491b3536dfa222f2cb9011894",
3183
+ "own": "68d3ee3f576d8c5242ca4940816e43ed5708caf9fe6ab6604857073b9e0ed626"
3180
3184
  },
3181
3185
  "python.Lowering.tracebackReaders": {
3182
3186
  "merkle": "135dea4b4e1e8f543dfb649ba2ae3607461991c0d614446f3d87fd1f2adec84c",
@@ -3211,16 +3215,16 @@
3211
3215
  "own": "e628324d9edded78d429fa88666bad843a0ef3b4e9660a9a80ec492869195f98"
3212
3216
  },
3213
3217
  "python.Lowering.untaken": {
3214
- "merkle": "5c5e84acaf84269936c6b061e9d829da5a317383decabf6930f38b344b28ebd6",
3215
- "own": "e3a0ecf66c6e30b30bb0d5b362c3e6ba95b875be77b9f479a79075d206c7c870"
3218
+ "merkle": "2601d8af2950d122e6352b0d3bba974db097037e166bc257b6199933d05c0261",
3219
+ "own": "1b3843ae0dab61a0e4f6e37f82f1da38449e14dda439b7ad8d030a5199a0525f"
3216
3220
  },
3217
3221
  "python.Lowering.updated": {
3218
3222
  "merkle": "496a180765d23987a07ada2c13824d478c347d0bf7db25657ad9d2b39377f856",
3219
3223
  "own": "b43bc458cbbbe58a0d1e6be12e447fbf50bfbefdfb1c3048f5d51d30815b3a74"
3220
3224
  },
3221
3225
  "python.Lowering.verdict": {
3222
- "merkle": "8767443779168322c8470fe89879a00fe39657964dda039055488b81852ae1a9",
3223
- "own": "299a8f2ec45554f9a2452f710e1b1289e8838ee40bc510577c5c618920844aa1"
3226
+ "merkle": "42da20c96dd79af7da5d007aea63363d565206d4ad3b7555fa229e5652234d63",
3227
+ "own": "f1efa8c88de49af61504571f925b4154d2483cf540a41ae0d62479d52640b2ba"
3224
3228
  },
3225
3229
  "python.Lowering.whileStatement": {
3226
3230
  "merkle": "c55adc571554abb9f560387d3e0c7835816c066fbb0d4b405482e8e39c98c819",
@@ -7539,15 +7543,15 @@
7539
7543
  "own": "1abeee3bceaeffc4b83c8e0178368e0d4dd4dd1199129212d28931bac01e7b83"
7540
7544
  },
7541
7545
  "python.verdict": {
7542
- "merkle": "4af4c31ea622acf197567f7103fcf7d38b8c021d4a7a103a043b8c9e5a21aad5",
7546
+ "merkle": "90c35d5563e5e627f2923e17e13f40fac63dd7e8930734c68cbc63f17593312d",
7543
7547
  "own": "babf4ff64e288aec2c7e1c825da9248327b934ae160ca8a8deb061c86c02edff"
7544
7548
  }
7545
7549
  },
7546
7550
  "format": 1,
7547
- "inputs": "4388eabe91e7cc9f6c19ca205f3a6fae5af31bbd7e4002c537ee116845897398",
7551
+ "inputs": "27ad328362b833897569a24d051644aff63285723903c4365a7ed2ce6f4a5063",
7548
7552
  "modules": {
7549
7553
  "python": {
7550
- "bytes": 366388,
7554
+ "bytes": 366492,
7551
7555
  "deps": [
7552
7556
  "python.syntax",
7553
7557
  "python.values",
@@ -7627,7 +7631,7 @@
7627
7631
  ]
7628
7632
  },
7629
7633
  "python.debugging": {
7630
- "bytes": 410089,
7634
+ "bytes": 410214,
7631
7635
  "deps": [
7632
7636
  "python.syntax",
7633
7637
  "python.values",
@@ -7785,7 +7789,7 @@
7785
7789
  ]
7786
7790
  },
7787
7791
  "python.lowering": {
7788
- "bytes": 481880,
7792
+ "bytes": 482371,
7789
7793
  "deps": [
7790
7794
  "python.syntax",
7791
7795
  "python.values",
@@ -7881,7 +7885,7 @@
7881
7885
  ]
7882
7886
  },
7883
7887
  "python.querying": {
7884
- "bytes": 421538,
7888
+ "bytes": 421661,
7885
7889
  "deps": [
7886
7890
  "python.syntax",
7887
7891
  "python.values",
@@ -7929,7 +7933,7 @@
7929
7933
  ]
7930
7934
  },
7931
7935
  "python.session": {
7932
- "bytes": 406098,
7936
+ "bytes": 406219,
7933
7937
  "deps": [
7934
7938
  "python.syntax",
7935
7939
  "python.values",
@@ -8030,7 +8034,7 @@
8030
8034
  ]
8031
8035
  },
8032
8036
  "python.variables": {
8033
- "bytes": 405014,
8037
+ "bytes": 405139,
8034
8038
  "deps": [
8035
8039
  "python.syntax",
8036
8040
  "python.values",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cella-lang/python",
3
- "version": "0.1.202611021534",
3
+ "version": "0.1.202611022105",
4
4
  "description": "A Python model for Cella Lang: dynamically typed values (arbitrary-precision int, IEEE 754 float, str, tuple, list, dict, set on a heap), operations and printing that match CPython exactly, exceptions, and statements on @cella-lang/machine's small-step machine and debugger — compiled module pack.",
5
5
  "files": [
6
6
  "python.builtins.cell",
@@ -49,8 +49,8 @@
49
49
  "author": "SungYu Chang",
50
50
  "homepage": "https://cella-lang.org/",
51
51
  "peerDependencies": {
52
- "cella-lang": "0.1.202611021533",
53
- "@cella-lang/machine": "0.1.202611021533"
52
+ "cella-lang": "0.1.202611021901",
53
+ "@cella-lang/machine": "0.1.202611022104"
54
54
  },
55
55
  "cella": {
56
56
  "checkerHash": "eac27d7a51e5e48b",
@@ -58,6 +58,6 @@
58
58
  "modules": [
59
59
  "python"
60
60
  ],
61
- "packHash": "e4f3d5212b80ed65"
61
+ "packHash": "2d67cde1505a6534"
62
62
  }
63
63
  }
package/python.cell CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file