Drasil icon indicating copy to clipboard operation
Drasil copied to clipboard

SglPend: Broken Code Gen.

Open balacij opened this issue 3 months ago • 3 comments

This PR highlights some bizarre behaviour. This is not a PR that is intended to be merged anytime soon. It is a PR meant to highlight issues. Once SglPend's code generation works, then we can merge this PR (or a PR that replaces this one).

balacij avatar Oct 07 '25 21:10 balacij

Do single pendulum and double pendulum take advantage of sharing any code, the way that SWHS and noPCM share code?

smiths avatar Oct 10 '25 14:10 smiths

There is a bit of sharing in the SglPend -> DblPend direction, and some common sharing from drasil-data, similar to the other examples.

drasil-example/sglpend/lib/Drasil/SglPend/Goals.hs
13: import Drasil.DblPend.Concepts (rod)

drasil-example/sglpend/lib/Drasil/SglPend/Assumptions.hs
5:import Drasil.DblPend.Assumptions (assumpBasic)

drasil-example/sglpend/lib/Drasil/SglPend/Unitals.hs
17:import Drasil.DblPend.Concepts (rod)
18:import Drasil.DblPend.Unitals (lRod)

drasil-example/sglpend/lib/Drasil/SglPend/Body.hs
22:import Drasil.DblPend.Body (justification, externalLinkRef, charsOfReader,
26:import Drasil.DblPend.Concepts (concepts, rod)
27:import Drasil.DblPend.Requirements (nonFuncReqs)
28:import Drasil.DblPend.Unitals (acronyms)
29:import Drasil.DblPend.References (citations)

drasil-example/sglpend/lib/Drasil/SglPend/Requirements.hs
9:import Drasil.DblPend.Requirements(verifyInptValsDesc)

drasil-example/sglpend/lib/Drasil/SglPend/GenDefs.hs
32:import Drasil.DblPend.Concepts (arcLen, horizontalPos,

drasil-example/sglpend/lib/Drasil/SglPend/DataDefs.hs
15:import Drasil.DblPend.Concepts (horizontalPos, verticalPos)

It looks like it's primarily sharing English definitions and a few quantities (the .Unitals imports). Do you want me to dissect this further?

balacij avatar Oct 10 '25 20:10 balacij

@balacij, don't investigate further. You have enough on your plate right now. :smile: Thank you for starting the process of getting SglPend working properly. This might be a good task for a future summer research assistant. :smile:

smiths avatar Oct 21 '25 21:10 smiths