Issue588

Title option parser refactoring
Priority meta Status chatting
Superseder Nosy List florian, haz, jendrik, malte, manuel
Assigned To Keywords
Optional summary
High-level goals:
- Decouple the external interface from the implementation better.
  Perhaps reduce the external interface to a single #include.
- Make the option parser code planner-independent.

Some details:
- Split the code into smaller parts with clearly defined responsibilities.
- Reduce internal dependencies in option parser code.
- Avoid special case for Heuristics and ScalarEvaluators (issue718).
- Avoid special case for plugin types that support predefinition.
- Get rid of need to list plugin types manually for get_help_templ.
  (This should also fix issue619.)

Plans for detecting plugin name collisions:
- Put the test that no two plug-ins have the same name in a more central place
  of the option parser code rather than in the DocStore.
- Change option parser design to do a two-phase registration of plug-ins, so
  that we can first collect all of them, then do global checks against duplicates
  etc., and then proceed with the later parts of registration at a stage where we
  know that all plug-ins (including type plug-ins) have been initialized.
- Report name collisions of plug-ins in a well-defined order, e.g.
  alphabetically by name and for each name alphabetically listing the types.

Specific issues:
- ~~issue481: avoid special case for open lists.~~
- ~~issue606: move the code to a directory~~
- ~~issue608: split code into more files~~
- ~~issue626: introduce a namespace.~~

Created on 2015-10-31.18:43:36 by malte, last changed by jendrik.

Summary
High-level goals:
- Decouple the external interface from the implementation better.
  Perhaps reduce the external interface to a single #include.
- Make the option parser code planner-independent.

Some details:
- Split the code into smaller parts with clearly defined responsibilities.
- Reduce internal dependencies in option parser code.
- Avoid special case for Heuristics and ScalarEvaluators (issue718).
- Avoid special case for plugin types that support predefinition.
- Get rid of need to list plugin types manually for get_help_templ.
  (This should also fix issue619.)

Plans for detecting plugin name collisions:
- Put the test that no two plug-ins have the same name in a more central place
  of the option parser code rather than in the DocStore.
- Change option parser design to do a two-phase registration of plug-ins, so
  that we can first collect all of them, then do global checks against duplicates
  etc., and then proceed with the later parts of registration at a stage where we
  know that all plug-ins (including type plug-ins) have been initialized.
- Report name collisions of plug-ins in a well-defined order, e.g.
  alphabetically by name and for each name alphabetically listing the types.

Specific issues:
- issue481: avoid special case for open lists.
- issue606: move the code to a directory
- issue608: split code into more files
- issue626: introduce a namespace.
Files
File name Uploaded Type Edit Remove
option-dependencies.png florian, 2015-12-10.11:27:15 image/png
Messages
msg6385 (view) Author: jendrik Date: 2017-05-22.11:47:43
Copy plans for detecting plugin name collisions from issue729.
msg6270 (view) Author: malte Date: 2017-04-28.14:00:32
We should only strike these things through once the code is merged. In the
current master repository, the special case for Heuristic and Evaluator is still
present. Hence, I'm putting it back in, but adding a reference to issue718 there.
msg6268 (view) Author: manuel Date: 2017-04-28.13:53:33
Updated summary by striking item "Avoid special case for Heuristics and
ScalarEvaluators". This item was resolved with issue718.
msg5995 (view) Author: malte Date: 2016-12-31.15:52:16
Testing the tracker after server maintenance.
msg5110 (view) Author: florian Date: 2016-01-19.10:54:12
updated summary to show that issue626 is merged.
msg5092 (view) Author: florian Date: 2016-01-15.22:01:31
Split off issue626 to introduce a namespace.
msg4933 (view) Author: florian Date: 2015-12-10.11:27:15
Attached a graph showing the current header dependencies.
msg4913 (view) Author: malte Date: 2015-12-09.02:38:21
Made the summary a bit more structured.
msg4912 (view) Author: malte Date: 2015-12-09.02:35:03
Updated summary to take into account issue608 is done.
msg4910 (view) Author: malte Date: 2015-12-09.00:48:20
Added issue608 for splitting the option parser code into more files.
msg4907 (view) Author: malte Date: 2015-12-09.00:27:23
Updated summary.
msg4902 (view) Author: florian Date: 2015-12-08.16:44:38
issue606 will move the code to a subdirectory.
msg4723 (view) Author: malte Date: 2015-10-31.18:43:36
This is a followup to issue586.

The plugin support in the option parser still has a few gaps:

- All plugin types still need to be manually listed in two places in
option_parser.cc
  (calls to get_help_templ).
- Heuristics and ScalarEvaluators need special-casing in a few places because
  of their inheritance relationship. The suggestion made in issue586 for this
  was to get rid of the plugin inheritance feature and unify Heuristics and
  ScalarEvaluators from the UI perspective.
- Open lists need special-casing because they are templated. This is issue481.
- Plugin types that support predefinition still need special-cased code, e.g. to
  define the command-line option name. Currently, the only such options are
  --heuristic for Heuristic and --landmarks for LandmarkGraph.

Additionally, there are other things in the option parser that could be refactored:
- The code should be moved to a directory and use a namespace.
- If possible, the compile-time dependencies should be reduced: currently all users
  of plugins and/or options drag in a lot of code, mainly because of the extensive
  use of templates. Perhaps we can decouple the external interface from the
  implementation better.

Ideally, we would like the option parser code to be encapsulated to the extent
that it could be reused in a different project without changes.
History
Date User Action Args
2017-05-22 11:47:43jendriksetmessages: + msg6385
summary: High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators (issue718). - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - ~~issue626: introduce a namespace.~~ -> High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators (issue718). - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Plans for detecting plugin name collisions: - Put the test that no two plug-ins have the same name in a more central place of the option parser code rather than in the DocStore. - Change option parser design to do a two-phase registration of plug-ins, so that we can first collect all of them, then do global checks against duplicates etc., and then proceed with the later parts of registration at a stage where we know that all plug-ins (including type plug-ins) have been initialized. - Report name collisions of plug-ins in a well-defined order, e.g. alphabetically by name and for each name alphabetically listing the types. Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - ~~issue626: introduce a namespace.~~
2017-04-28 14:00:32maltesetmessages: + msg6270
summary: High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - ~~Avoid special case for Heuristics and ScalarEvaluators.~~ - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - ~~issue626: introduce a namespace.~~ -> High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators (issue718). - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - ~~issue626: introduce a namespace.~~
2017-04-28 13:53:33manuelsetnosy: + manuel
messages: + msg6268
summary: High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators. - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - ~~issue626: introduce a namespace.~~ -> High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - ~~Avoid special case for Heuristics and ScalarEvaluators.~~ - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - ~~issue626: introduce a namespace.~~
2016-12-31 15:52:17maltesetmessages: + msg5995
2016-12-29 18:24:07hazsetnosy: + haz
2016-01-19 10:54:12floriansetmessages: + msg5110
summary: High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators. - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - issue626: introduce a namespace. -> High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators. - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - ~~issue626: introduce a namespace.~~
2016-01-15 22:01:31floriansetmessages: + msg5092
summary: High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators. - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) - Introduce a namespace. Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ -> High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators. - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ - issue626: introduce a namespace.
2016-01-09 11:32:17floriansetsummary: High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators. - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. - Introduce a namespace. Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~ -> High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators. - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. (This should also fix issue619.) - Introduce a namespace. Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~
2015-12-10 11:27:15floriansetfiles: + option-dependencies.png
messages: + msg4933
2015-12-09 02:38:21maltesetmessages: + msg4913
summary: - no longer list plugin types manually for get_help_templ. - avoid special case for Heuristics and ScalarEvaluators. - ~~issue481: avoid special case for open lists.~~ - avoid special case for plugin types that support predefinition. - ~~issue606: move the code to a directory~~ - decouple the external interface from the implementation better. - introduce a namespace - ~~issue608: split code into more files~~ -> High-level goals: - Decouple the external interface from the implementation better. Perhaps reduce the external interface to a single #include. - Make the option parser code planner-independent. Some details: - Split the code into smaller parts with clearly defined responsibilities. - Reduce internal dependencies in option parser code. - Avoid special case for Heuristics and ScalarEvaluators. - Avoid special case for plugin types that support predefinition. - Get rid of need to list plugin types manually for get_help_templ. - Introduce a namespace. Specific issues: - ~~issue481: avoid special case for open lists.~~ - ~~issue606: move the code to a directory~~ - ~~issue608: split code into more files~~
2015-12-09 02:35:03maltesetmessages: + msg4912
summary: - no longer list plugin types manually for get_help_templ. - avoid special case for Heuristics and ScalarEvaluators. - ~~issue481: avoid special case for open lists.~~ - avoid special case for plugin types that support predefinition. - ~~issue606: move the code to a directory~~ - decouple the external interface from the implementation better. - introduce a namespace - issue608: split code into more files -> - no longer list plugin types manually for get_help_templ. - avoid special case for Heuristics and ScalarEvaluators. - ~~issue481: avoid special case for open lists.~~ - avoid special case for plugin types that support predefinition. - ~~issue606: move the code to a directory~~ - decouple the external interface from the implementation better. - introduce a namespace - ~~issue608: split code into more files~~
2015-12-09 00:48:20maltesetmessages: + msg4910
summary: - no longer list plugin types manually for get_help_templ. - avoid special case for Heuristics and ScalarEvaluators. - ~~issue481: avoid special case for open lists.~~ - avoid special case for plugin types that support predefinition. - ~~issue606: move the code to a directory~~ - decouple the external interface from the implementation better. - introduce a namespace - split code into multiple files -> - no longer list plugin types manually for get_help_templ. - avoid special case for Heuristics and ScalarEvaluators. - ~~issue481: avoid special case for open lists.~~ - avoid special case for plugin types that support predefinition. - ~~issue606: move the code to a directory~~ - decouple the external interface from the implementation better. - introduce a namespace - issue608: split code into more files
2015-12-09 00:27:23maltesetmessages: + msg4907
summary: - no longer list plugin types manually for get_help_templ. - avoid special case for Heuristics and ScalarEvaluators. - issue481: avoid special case for open lists. - avoid special case for plugin types that support predefinition. - issue606: move the code to a directory and use a namespace. - decouple the external interface from the implementation better. -> - no longer list plugin types manually for get_help_templ. - avoid special case for Heuristics and ScalarEvaluators. - ~~issue481: avoid special case for open lists.~~ - avoid special case for plugin types that support predefinition. - ~~issue606: move the code to a directory~~ - decouple the external interface from the implementation better. - introduce a namespace - split code into multiple files
2015-12-08 16:44:38floriansetnosy: + florian
messages: + msg4902
summary: - no longer list plugin types manually for get_help_templ. - avoid special case for Heuristics and ScalarEvaluators. - issue481: avoid special case for open lists. - avoid special case for plugin types that support predefinition. - issue606: move the code to a directory and use a namespace. - decouple the external interface from the implementation better.
2015-10-31 18:56:39jendriksetnosy: + jendrik
2015-10-31 18:43:36maltecreate