Closed deemp closed 1 month ago
We sometimes encounter programs with 0 or 1 formations where we can't reduce the number of formations (the formations metric).
formations
Example:
non-normalized:
{ ⟦ org ↦ ⟦ eolang ↦ ⟦ compares-two-bools ↦ ⟦ φ ↦ Φ.org.eolang.true.eq( α0 ↦ Φ.org.eolang.true ) ⟧, ... ⟧ ⟧ }
normalized:
{ ⟦ org ↦ ⟦ eolang ↦ ⟦ compares-two-bools ↦ ⟦ Δ ⤍ 01- ⟧, ... ⟧ ⟧ ⟧ }
The number of object formations decreases by 10% or more, compared to the test (not optimized) φ-expression.
@yegor256, @fizruk, there are the following options to deal with tests with 0 or 1 formations:
Which option should we choose?
@deemp the option 3 is the best. You calculate the metric as usual, but in the final result/summary take into account only the tests where the initial number of formations was >5 (for example)
Problem
We sometimes encounter programs with 0 or 1 formations where we can't reduce the number of formations (the
formations
metric).Example:
non-normalized:
normalized:
The requirement for the
formations
metric in the contractOptions
@yegor256, @fizruk, there are the following options to deal with tests with 0 or 1 formations:
formations
metric definition for such tests.Question
Which option should we choose?