Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend integer comparison to support floats / Add additional magic methods to the allowed whitelist #182

Merged
merged 6 commits into from
Apr 25, 2024
Prev Previous commit
Next Next commit
Mirror changes to int type definition into SIF mode preamble.index file
  • Loading branch information
PascalDevenoge committed Mar 26, 2024
commit 16a1d06e69a6e5a6377f498f4c0807c94bf1099f
20 changes: 12 additions & 8 deletions src/nagini_translation/sif/resources/preamble.index
Original file line number Diff line number Diff line change
@@ -257,20 +257,24 @@
"type": "__prim__int"
},
"__ge__": {
"args": ["__prim__int", "__prim__int"],
"type": "__prim__bool"
"args": ["int", "float"],
"type": "__prim__bool",
"requires": ["int___unbox__", "float___ge__"]
},
"__gt__": {
"args": ["__prim__int", "__prim__int"],
"type": "__prim__bool"
"args": ["int", "float"],
"type": "__prim__bool",
"requires": ["int___unbox__", "float___gt__"]
},
"__lt__": {
"args": ["__prim__int", "__prim__int"],
"type": "__prim__bool"
"args": ["int", "float"],
"type": "__prim__bool",
"requires": ["int___unbox__", "float___lt__"]
},
"__le__": {
"args": ["__prim__int", "__prim__int"],
"type": "__prim__bool"
"args": ["int", "float"],
"type": "__prim__bool",
"requires": ["int___unbox__", "float___le__"]
},
"__int__": {
"args": ["int"],
Loading