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

Feat/fliparoos #56

Merged
merged 19 commits into from
Dec 5, 2023
Merged

Feat/fliparoos #56

merged 19 commits into from
Dec 5, 2023

Conversation

vojtechsu
Copy link
Collaborator

Add generation of formulas using fliparoos, switch_signs, partitions.

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Attention: 118 lines in your changes are missing coverage. Please review.

Comparison is base (67723ff) 83.42% compared to head (d1c36cd) 84.42%.

Files Patch % Lines
pyecsca/ec/formula/partitions.py 79.28% 48 Missing and 9 partials ⚠️
pyecsca/ec/formula/graph.py 86.26% 38 Missing and 2 partials ⚠️
pyecsca/ec/formula/fliparoo.py 96.80% 5 Missing and 3 partials ⚠️
pyecsca/ec/formula/metrics.py 90.77% 3 Missing and 3 partials ⚠️
pyecsca/ec/formula/switch_sign.py 94.26% 3 Missing and 2 partials ⚠️
pyecsca/ec/formula/efd.py 97.34% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   83.42%   84.42%   +1.01%     
==========================================
  Files          75       82       +7     
  Lines        6017     6975     +958     
  Branches     1117     1307     +190     
==========================================
+ Hits         5019     5888     +869     
- Misses        767      838      +71     
- Partials      231      249      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@J08nY J08nY self-assigned this Dec 4, 2023
@J08nY J08nY added the enhancement New feature or request label Dec 4, 2023
@J08nY
Copy link
Owner

J08nY commented Dec 4, 2023

Some notes for me to work on this:

  • Make pyecsca.ec.formula a package and include this stuff in there.
  • Unify formula metrics in the formula package (from structural re).
  • Move stuff into tests, have the library formulas as a test fixture (reused).
  • Figure out how to instantiate formula objects properly (out of the code data, not files).
  • Add function that does all of the transformations on a given formula (or a set of formulas), make it the public API.

@J08nY
Copy link
Owner

J08nY commented Dec 5, 2023

@vojtechsu Could you please have a look at the following typing warnings? I cannot properly evaluate whether they are identifying bugs or just mis-annotation:

  • pyecsca/ec/formula/fliparoo.py:120: error: Argument 1 to "is_subfliparoo" has incompatible type "Fliparoo"; expected "tuple[Node]" [arg-type]
  • pyecsca/ec/formula/switch_sign.py:39: error: Argument 3 to "switch_sign_propagate" has incompatible type "dict[str, int]"; expected "dict[Node, str]" [arg-type]
    Connected to that also:
    • pyecsca/ec/formula/switch_sign.py:73: error: Invalid index type "str" for "dict[Node, str]"; expected type "Node" [index]
    • pyecsca/ec/formula/switch_sign.py:82: error: Invalid index type "str" for "dict[Node, str]"; expected type "Node" [index]
    • pyecsca/ec/formula/switch_sign.py:93: error: Invalid index type "str" for "dict[Node, str]"; expected type "Node" [index]

@vojtechsu
Copy link
Collaborator Author

vojtechsu commented Dec 5, 2023

@vojtechsu Could you please have a look at the following typing warnings? I cannot properly evaluate whether they are identifying bugs or just mis-annotation:

* `pyecsca/ec/formula/fliparoo.py:120: error: Argument 1 to "is_subfliparoo" has incompatible type "Fliparoo"; expected "tuple[Node]"  [arg-type]`

* `pyecsca/ec/formula/switch_sign.py:39: error: Argument 3 to "switch_sign_propagate" has incompatible type "dict[str, int]"; expected "dict[Node, str]"  [arg-type]`
  Connected to that also:
  
  * `pyecsca/ec/formula/switch_sign.py:73: error: Invalid index type "str" for "dict[Node, str]"; expected type "Node"  [index]`
  * `pyecsca/ec/formula/switch_sign.py:82: error: Invalid index type "str" for "dict[Node, str]"; expected type "Node"  [index]`
  * `pyecsca/ec/formula/switch_sign.py:93: error: Invalid index type "str" for "dict[Node, str]"; expected type "Node"  [index]`

They are just mis-annotations. I will fix this.

@J08nY J08nY merged commit 537a267 into master Dec 5, 2023
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants