Opened 8 years ago
Closed 8 years ago
#2685 closed defect (done)
SymbolicExpressionGrammars calculate the min length and depth of expression wrong
Reported by: | mkommend | Owned by: | mkommend |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.15 |
Component: | Encodings.SymbolicExpressionTreeEncoding | Version: | 3.3.14 |
Keywords: | Cc: |
Description (last modified by mkommend)
The calculation for the minimum and maximum expression length and depth based on the restrictions of the grammar (allowed child symbols) returns wrong results if the symbols are nested recursively.
The attached script reproduces the problem. Thanks to sforsten for reporting this problem.
Attachments (2)
Change History (17)
comment:1 Changed 8 years ago by mkommend
- Status changed from new to accepted
Changed 8 years ago by mkommend
comment:2 Changed 8 years ago by mkommend
- Description modified (diff)
comment:3 Changed 8 years ago by mkommend
r14340: Added ctor to simple symbol.
comment:4 Changed 8 years ago by mkommend
r14341: Added unit test for min expression length and depth of configured grammars.
comment:5 Changed 8 years ago by mkommend
r14342: Refactored calculation of minimum expression length and depth into an separate class. Removed separate initialization code for the grammar caches in the ctor.
comment:6 Changed 8 years ago by bburlacu
- Owner changed from mkommend to bburlacu
- Status changed from accepted to assigned
comment:7 Changed 8 years ago by bburlacu
- Status changed from assigned to accepted
comment:8 Changed 8 years ago by bburlacu
- Owner changed from bburlacu to mkommend
- Status changed from accepted to reviewing
r14352: Refactored length and depth calculation and updated unit tests.
comment:9 Changed 8 years ago by bburlacu
- Owner changed from mkommend to bburlacu
- Status changed from reviewing to assigned
comment:10 Changed 8 years ago by bburlacu
- Owner changed from bburlacu to mkommend
- Status changed from assigned to reviewing
comment:11 Changed 8 years ago by bburlacu
r14356: Fix exception with symbols with no children (sequence contains no elements), factor out common code in separate methods.
comment:12 Changed 8 years ago by bburlacu
r14357: Minor refactor.
comment:13 Changed 8 years ago by mkommend
- Status changed from reviewing to readytorelease
comment:14 Changed 8 years ago by mkommend
comment:15 Changed 8 years ago by mkommend
- Resolution set to done
- Status changed from readytorelease to closed
Visualization of the grammar