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

Add API to count term size for a complex type #48

Merged
merged 1 commit into from
Feb 8, 2023
Merged

Conversation

lsrcz
Copy link
Owner

@lsrcz lsrcz commented Feb 8, 2023

This pull request adds the API to count term size for complex types.

For example,

>>> allSymsSize ("a" :: SymInteger, "a" + "b" :: SymInteger, ("a" + "b") * "c" :: SymInteger)
5

Here the result is 5 as the same subterm will be counted for only once, and there are 5 distinct subterms:

  • a
  • b
  • c
  • (+ a b)
  • (* (+ a b) c)

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 32.99% // Head: 32.57% // Decreases project coverage by -0.42% ⚠️

Coverage data is based on head (e9c9b09) compared to base (a6de4ac).
Patch coverage: 5.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
- Coverage   32.99%   32.57%   -0.42%     
==========================================
  Files          47       47              
  Lines        4364     4423      +59     
  Branches      214      215       +1     
==========================================
+ Hits         1440     1441       +1     
- Misses       2710     2767      +57     
- Partials      214      215       +1     
Impacted Files Coverage Δ
src/Grisette/Core/Control/Monad/UnionM.hs 9.71% <0.00%> (-0.06%) ⬇️
src/Grisette/Core/Data/Union.hs 45.16% <0.00%> (-1.00%) ⬇️
src/Grisette/IR/SymPrim/Data/SymPrim.hs 20.00% <0.00%> (-4.21%) ⬇️
...tte/IR/SymPrim/Data/Prim/InternedTerm/TermUtils.hs 37.02% <75.00%> (+0.34%) ⬆️
.../Grisette/IR/SymPrim/Data/Prim/PartialEval/Bool.hs 86.66% <0.00%> (-0.45%) ⬇️

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 b8d6079 into main Feb 8, 2023
@lsrcz lsrcz deleted the feat-term-size branch February 8, 2023 19:55
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