Repository navigation
Conversation
|
@arcuri82 : I think that the impact part of this PR should also be reviewed by @man-zhang |
d88b4bc to
b946a1e
Compare
man-zhang
left a comment
There was a problem hiding this comment.
thanks!
the impact collection for the HeterogeneousListGene looks good to me.
b946a1e to
2f01d51
Compare
2f01d51 to
95a73a5
Compare
| name: String, | ||
| elements: List<Gene>, | ||
| isFixed: Boolean = true, | ||
| val template: Gene? = null, |
There was a problem hiding this comment.
instead of a single template, shouldn't maybe pass an array of templates. when a new gene needs to be added, we could choose one of the provided templates at random
There was a problem hiding this comment.
Hi Andrea, this is because I'm just using ChoiceGene with the scalar values inside a list. I want Evomaster to just mutate leaves and not the structure. On the other hand I see the flexibility and benefits of your proposal, would you be ok with me adding a TODO here and once everything merges I can do A/B testing on your proposed solution and if it doesn't break any of my results I will adopt your cleaner solution. If it breaks something I will still adopt your solution but I might add some other feature to optionally protect the structure and avoid Evomaster adding nested collections.
There was a problem hiding this comment.
To be clear, when constructing this ListGene from existing data, nested lists are supported.
95a73a5 to
7b2c33b
Compare
Introduces
HeterogeneousListGene, supporting ordered lists of mixed-typeGeneelements in both fixed-size (isFixed = true) and variable-size (isFixed = false, backed by atemplategene) modes (needed for heterogeneous list structures such as DynamoDBLattributes). RefactorsTupleGeneas a fixed-size specialization ofHeterogeneousListGene, shares collection size-bound validation onCollectionGene, and incorporates the impact/comparison fixes from discarded PRs #1935 and #1936 to avoid merge conflicts.Changes
Adds
HeterogeneousListGeneImpact(tracking size and no-impact/impact counters viaCollectionImpactwithout assuming stable per-name child slots) and wiresImpactUtilsforHeterogeneousListGene.Refactors
TupleGeneto extendHeterogeneousListGene(name, elements, isFixed = true, template = null)while preserving tuple-specificlastElementTreatedSpeciallyformatting and per-element name-keyedTupleGeneImpacttracking.Hardens
TupleGene.containsSameValueAsandTupleGeneImpactagainst mismatched element sizes, names, and runtime types.Shared
CollectionGenesize-bound validation:CollectionGene.validateCollectionSizeBoundsand reuses it acrossHeterogeneousListGene,ArrayGene, andMapGeneTests:
HeterogeneousListGeneTestandImpactUtilsTest, extendsTupleGeneTest, and registersHeterogeneousListGeneinGeneSamplerForTestsandGeneNumberOfGenesTest.