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

Float: Refactor bool == false into not function #623

Merged

Conversation

Incarnation-p-lee
Copy link
Contributor

  • Add new function not (bool) -> bool.
  • Leverage not (bool) function in float lib.

* Add new function not (bool) -> bool.
* Leverage not (bool) function in float lib.

Signed-off-by: Pan Li <pan2.li@intel.com>
Copy link

github-actions bot commented Jul 6, 2024

Test Results

    9 files  ±0     20 suites  ±0   0s ⏱️ ±0s
  654 tests +1    654 ✅ +1  0 💤 ±0  0 ❌ ±0 
2 091 runs  +1  2 090 ✅ +1  1 💤 ±0  0 ❌ ±0 

Results for commit 2233a1b. ± Comparison against base commit 155d567.

♻️ This comment has been updated with latest results.

@@ -86,4 +86,13 @@ function float_decompose(op) = {
}
}

val not : bool -> bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a not_bool function in flow.sail: https://github.com/rems-project/sail/blob/sail2/lib/flow.sail

sail-riscv has the following to add not():

// not_bool alias.
val not : forall ('p : Bool). bool('p) -> bool(not('p))
function not(b) = not_bool(b)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Looks we can alias this similar to sail-riscv, let me update it.

Signed-off-by: Pan Li <pan2.li@intel.com>
@Alasdair Alasdair merged commit d8c5322 into rems-project:sail2 Jul 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants