heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
38 stars 16 forks source link

Reduce the number of parentheses produced by the expression formatter for infix forms #3145

Closed HeuristicLab-Trac-Bot closed 2 years ago

HeuristicLab-Trac-Bot commented 2 years ago

Issue migrated from trac ticket # 3145

milestone: HeuristicLab 3.3.17 | component: Problems.DataAnalysis.Symbolic | priority: medium

2021-12-27 09:43:39: @gkronber created the issue


The formatter produces unnecessary parentheses for some expressions which makes the output harder to read than necessary.

HeuristicLab-Trac-Bot commented 2 years ago

2021-12-27 09:43:50: @gkronber changed status from new to accepted

HeuristicLab-Trac-Bot commented 2 years ago

2021-12-27 09:43:50: @gkronber set owner to @gkronber

HeuristicLab-Trac-Bot commented 2 years ago

2021-12-27 09:44:16: @gkronber edited the issue description

HeuristicLab-Trac-Bot commented 2 years ago

2021-12-27 09:44:16: @gkronber changed title from Reduce the number of parantheses produced by the expression formatter for infix forms to Reduce the number of parentheses produced by the expression formatter for infix forms

HeuristicLab-Trac-Bot commented 2 years ago

2021-12-27 09:58:00: @gkronber commented


r18170: changed unit tests to check new expected output (unnecessary parenthesis removed) --> unit tests fail

HeuristicLab-Trac-Bot commented 2 years ago

2021-12-27 10:59:20: @gkronber commented


r18172: removed unnecessary parenthesis in InfixExpressionFormatter (and adapted the unit tests slightly)

HeuristicLab-Trac-Bot commented 2 years ago

2022-01-17 21:35:07: @gkronber commented


r18203: fixed a bug in the infix formatter introduced in my earlier commit

HeuristicLab-Trac-Bot commented 2 years ago

2022-01-27 11:03:41: @gkronber commented


r18211: refactored infix formatter to improve output (less parenthesis) and added unit tests to test that the infix formatter works correctly.

HeuristicLab-Trac-Bot commented 2 years ago

2022-01-27 11:11:15: @gkronber commented


Similar changes should be applied to the LaTeX formatter.

gkronber commented 2 years ago

Changes are already in main. Creating a new ticket for reducing the number of parenthesis in the LaTeX formatter.