noir
noir copied to clipboard
Proptest arithmetic generics
Problem
Arithmetic generics have gotten more complex recently and we only have a handful of unit tests to check them.
This seems insufficient since we have 5 BinaryTypeOperator
's, rules involving pairs of operators, and at least two conditions for simplification (== 0
and divides_evenly
). This could result in appx. 5^2 * 2^2 = 100
potentially interesting cases, but we have far fewer than a hundred tests for them.
Happy Case
Property test canonicalize
and try_unify_by_moving_constant_terms
by:
- generating a single
InfixExpr
, canonicalizing it, instantiating all inputs in both terms, and asserting equality of the results - generating pairs of
InfixExpr
's, canonicalizing each, attempting to unify, and if they unify, instantiating all inputs in both terms, and asserting equality of the results
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
Nice-to-have
Blocker Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response