fmidue / logic-tasks

0 stars 1 forks source link

Refactoring of several config types #79

Closed jvoigtlaender closed 7 months ago

jvoigtlaender commented 8 months ago

The SynTreeConfig type now (well, after merging #74) has the fields extraText and extraHintsOnSemanticEquivalence. That is fine when SynTreeConfig is being used as "its own task type" (namely, for TreeToFormula), but actually SynTreeConfig also appears as subpart of other task types' config types. For example, in LegalPropositionConfig. There, it doesn't make sense to specify extraHintsOnSemanticEquivalence. And having extraText via SynTreeConfig there is also quite strange, since any extra text to give there from the lecturer'S perspective would more reasonably be associated with LegalProposition (as a task type), rather than with SynTree (which only happens to be part of the specification of LegalProposition).

This all comes down to a previously reasonable - but now not so much anymore - double role of SynTreeConfig. It would probably be better to separate these roles, by introducing a dedicated config type for TreeToFormula, and sharing SynTreeConfig (minus the extra fields) between TreeToFormulaConfig and LegalPropositionConfig etc.

Originally posted by @jvoigtlaender in https://github.com/fmidue/logic-tasks/issues/74#issuecomment-1879030447

jvoigtlaender commented 8 months ago

This has some interplay with other open issues/pull requests. At least #74. Probably also #73. Maybe further ones.

So, some stragegy is needed to make progress without introducing too many source code conflicts.

jvoigtlaender commented 7 months ago

Being worked on in #91.