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

Introduce SafeDivision and SafeLinearArith #56

Merged
merged 7 commits into from Mar 2, 2023
Merged

Introduce SafeDivision and SafeLinearArith #56

merged 7 commits into from Mar 2, 2023

Conversation

lsrcz
Copy link
Owner

@lsrcz lsrcz commented Feb 18, 2023

The SafeDivision class provides safe variant of div, mod, quot, rem, divMod and quotRem. They would handle overflow and division by zero errors.

The SafeLinearArith class provides safe variant of +, - and negate. The would handle overflow errors.

@codecov
Copy link

codecov bot commented Feb 18, 2023

Codecov Report

Base: 34.51% // Head: 33.84% // Decreases project coverage by -0.68% ⚠️

Coverage data is based on head (a1bffac) compared to base (73157a1).
Patch coverage: 27.72% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
- Coverage   34.51%   33.84%   -0.68%     
==========================================
  Files          48       49       +1     
  Lines        4598     4926     +328     
  Branches      227      245      +18     
==========================================
+ Hits         1587     1667      +80     
- Misses       2784     3014     +230     
- Partials      227      245      +18     
Impacted Files Coverage Δ
src/Grisette/Core/Data/Class/Error.hs 16.66% <0.00%> (-23.34%) ⬇️
src/Grisette/Core/Data/Class/SafeArith.hs 0.00% <0.00%> (ø)
...SymPrim/Data/Prim/InternedTerm/TermSubstitution.hs 29.16% <0.00%> (-4.17%) ⬇️
src/Grisette/IR/SymPrim/Data/Prim/Model.hs 45.50% <0.00%> (-1.41%) ⬇️
src/Grisette/Core/Data/BV.hs 34.11% <1.85%> (-1.30%) ⬇️
...tte/IR/SymPrim/Data/Prim/InternedTerm/TermUtils.hs 29.73% <18.36%> (-8.43%) ⬇️
src/Grisette/Backend/SBV/Data/SMT/Lowering.hs 50.32% <40.42%> (-0.81%) ⬇️
src/Grisette/IR/SymPrim/Data/SymPrim.hs 24.67% <42.04%> (+3.82%) ⬆️
src/Grisette/Core/Data/Class/Mergeable.hs 16.42% <45.45%> (+1.21%) ⬆️
...Grisette/IR/SymPrim/Data/Prim/InternedTerm/Term.hs 52.55% <66.66%> (+1.60%) ⬆️
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lsrcz lsrcz merged commit 1d2fab8 into main Mar 2, 2023
@lsrcz lsrcz deleted the feat-safe-op branch March 2, 2023 02:53
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.

None yet

1 participant