Opened 10 years ago
Closed 10 years ago
#2485 closed defect (done)
CSharp formatter for symbolic data analysis expressions does not produce correct expressions in all cases
| Reported by: | gkronber | Owned by: | gkronber |
|---|---|---|---|
| Priority: | medium | Milestone: | HeuristicLab 3.3.13 |
| Component: | Problems.DataAnalysis.Symbolic | Version: | 3.3.12 |
| Keywords: | Cc: |
Description (last modified by gkronber)
The HL interpreter also allows Boolean operators with real-valued arguments. This is not yet handled correctly by the formatter.
There also seems to be a problem when using only arithmetic operators: Ich vermute, dass der TreeInterpreter ein anderes Ergebnis produziert als der Code den der C# Formatter ausgibt. Ich habe bei mir in einem Testscript einmal die Policy Function als C# Code eingebettet und einmal unter Verwendung des TreeInterpreter. Als C# Code kommt Qualität 0 heraus mit dem TreeInterpreter Qualtät 10. Als Grammatik habe ich nur die ArithmeticExpressionGrammar verwendet.
Attachments (1)
Change History (16)
comment:1 Changed 10 years ago by gkronber
- Owner set to gkronber
- Status changed from new to assigned
comment:2 Changed 10 years ago by gkronber
- Milestone changed from HeuristicLab 3.3.13 to HeuristicLab 4.0.x Backlog
comment:3 Changed 10 years ago by gkronber
- Description modified (diff)
Changed 10 years ago by gkronber
comment:4 Changed 10 years ago by gkronber
comment:5 Changed 10 years ago by mkommend
- Owner changed from gkronber to mkommend
- Status changed from assigned to accepted
comment:6 Changed 10 years ago by mkommend
r13116: Corrected C# formatter for SymbolicExpressionTrees to handle subtractions correctly.
comment:7 Changed 10 years ago by mkommend
- Owner changed from mkommend to gkronber
- Status changed from accepted to assigned
r13116 should fix the issue that could be reproduced with the attached script. The error was related to the handling of unary subtractions (rare corner case). However, bool operations are still not supported.
Maybe a unit test would be useful to guarantee that the interpreter returns the same results as a function compiled from the tree formatter.
comment:8 Changed 10 years ago by mkommend
- Milestone changed from HeuristicLab 4.0.x Backlog to HeuristicLab 3.3.13
comment:9 Changed 10 years ago by gkronber
Reviewed r13116 thanks for the fix.
comment:10 Changed 10 years ago by gkronber
Boolean expressions are still not handled correctly by the C# formatter and also by the Mathematica formatter. A new ticket has been created to track that bug (#2514).
comment:11 Changed 10 years ago by gkronber
comment:12 Changed 10 years ago by gkronber
- Status changed from assigned to accepted
comment:13 Changed 10 years ago by gkronber
- Status changed from accepted to reviewing
comment:14 Changed 10 years ago by gkronber
- Status changed from reviewing to readytorelease
comment:15 Changed 10 years ago by gkronber
- Resolution set to done
- Status changed from readytorelease to closed



See attached script to reproduce the problem