Skip to content

Commit d531b4d

Browse files
Fix fallback on bigIntSign (#289)
* `bigIntSign`: pattern match to lookup * Set Version: 0.1.81 * Set Version: 0.1.82 --------- Co-authored-by: devops <[email protected]>
1 parent 65628e8 commit d531b4d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

kmultiversx/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "kmultiversx"
7-
version = "0.1.81"
7+
version = "0.1.82"
88
description = "Python tools for Elrond semantics"
99
authors = [
1010
"Runtime Verification, Inc. <[email protected]>",

kmultiversx/src/kmultiversx/kdist/mx-semantics/vmhooks/bigIntOps.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,17 @@ module BIGINTOPS
341341
342342
// extern int32_t bigIntSign(void* context, int32_t op);
343343
rule <instrs> hostCall("env", "bigIntSign", [ i32 .ValTypes ] -> [ i32 .ValTypes ])
344-
=> i32.const #bigIntSign(V)
344+
=> i32.const #bigIntSign(HEAP{{IDX}} orDefault 0)
345345
...
346346
</instrs>
347347
<locals> 0 |-> <i32> IDX </locals>
348-
<bigIntHeap> ... wrap(IDX) Int2Int|-> wrap(V) </bigIntHeap>
349-
[preserves-definedness]
348+
<bigIntHeap> HEAP </bigIntHeap>
349+
requires IDX in_keys{{HEAP}}
350+
[preserves-definedness] // TODO maybe we don't need this anymore since everything is total
350351
// Preserving definedness:
351352
// - #bigIntSign is total
352353
// - in_keys is total
353-
// - _{{_ <- _}} is total
354+
// - _{{_}} orDefault _ is total
354355
355356
rule <instrs> hostCall("env", "bigIntSign", [ i32 .ValTypes ] -> [ i32 .ValTypes ])
356357
=> #throwException(ExecutionFailed, "no bigInt under the given handle")

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.81
1+
0.1.82

0 commit comments

Comments
 (0)