-
Notifications
You must be signed in to change notification settings - Fork 381
Audit preparedness: test binary operations #5426
Copy link
Copy link
Closed
Description
Problem
Part of #5362
// "kind" in binary::Binary (op)
pub(crate) enum BinaryOp {- Sanity-check that behavior of these match for example inputs
0..8(or are None):get_field_function, get_u128_function, get_i128_function
Magmas:
- Test associativity
- Test (anti-)commutativity (
add_subandsub_addtests implicitly do so) - Test identity
-
Add -
Sub -
Mul -
Div -
Mod -
And -
Or -
Xor -
Shl -
Shr
Comparisons:
- Test (anti-)reflexivity
- Test transitivity
- Test (anti-)commutativity
-
Eq -
Lt
pub enum BlackBoxFunc {-
AND -
XOR -
EmbeddedCurveAdd -
BigIntAdd -
BigIntSub -
BigIntMul -
BigIntDiv
Happy Case
Test all listed binary operations
Project Impact
None
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels