-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove multiple occurrences of definition of DD as Data Definition #734
Comments
This is somewhat non-trivial. Surface-wise, it seems straightforward: the Fixing that properly may well intersect with the work on |
"DD" is used in Drasil/code/Language/Drasil/Document.hs Lines 178 to 185 in 8627a38
It can be seen in Drasil/code/Language/Drasil/HTML/Import.hs Lines 142 to 147 in 8627a38
And here: Drasil/code/Language/Drasil/Reference.hs Lines 227 to 231 in 8627a38
It is also the acronym for the
And is hardcoded in Drasil/code/Example/Drasil/DocumentLanguage/RefHelpers.hs Lines 42 to 44 in 8627a38
|
Report on the uses of the above-mentioned functions:
|
-- | Translates from Contents to the HTML Representation of LayoutObj. | |
-- Called internally by layout. | |
lay :: HasSymbolTable s => Contents -> s -> H.LayoutObj |
layout
Drasil/code/Language/Drasil/HTML/Import.hs
Lines 60 to 61 in 8627a38
-- | Translates from LayoutObj to the HTML representation of LayoutObj | |
layout :: HasSymbolTable s => Int -> SecCons -> s -> H.LayoutObj |
- no hardcoded "DD", although used by
layout
, which is used bysec
, which is used increateLayout
, which is used bymakeDocument
, which is not used anywhere! so it can be removed... - Tex uses the
makeDocument
discussed next
- no hardcoded "DD", although used by
layout
-->sec
-->createLayout
-->makeDocument
, which is used bygenTeX
andgenHTML
to produe the docs
refDD
- defined in RefHelpers.hs
- used in
modelTraceTable
Drasil/code/Example/Drasil/DocumentLanguage/TraceabilityMatrix.hs
Lines 7 to 12 in 8627a38
modelTraceTable :: ModelDB -> Contents modelTraceTable mdb = Table [ EmptyS : crossListItems ] where crossListItems = getRefs refTM tmDB ++ getRefs refGD gdDB ++ getRefs refDD ddDB ++ getRefs refIM imDB getRefs f db = map (f db) (modelsFromDB db) refDD
should probably not be used - SSP/DataDefs.hs uses it in its derivation sentences
Drasil/code/Example/Drasil/SSP/DataDefs.hs
Lines 35 to 37 in 8627a38
ddRef :: QDefinition -> Sentence ddRef = refDD (ddRefDB sspRefMDB) - SWHS/DataDefs.hs is used to define
ddRef
, used once in IMods for this example
dataDefn
CI
- actually not related to this issue
- used for lists of acronyms for the examples
- used to define the SRS' data defn section
- used in intros for assumptions and general definitions, etc.
Proposal
For now, can I remove the code that is not used in the Tex and HTML "Import" files, linking the work to issue #714? @szymczdm
Additionally, can the other bolded text above, also be worked on? @JacquesCarette
@niazim3 Are you sure layout isn't used in HTML import.hs? I did a grep and it shows up on line 73 (of the current master): https://github.com/JacquesCarette/Drasil/blob/master/code/Language/Drasil/HTML/Import.hs#L73 |
I just realized, if it's the same as the TeX one where it's used in a bunch of places and ultimately not called, then yeah, it can be removed. |
Since the merge of #754, the only main hardcoded "DD" instance that this issue should continue to track are from |
Ok, good. |
I just want to double-check that the comment above (regarding the status post-merge of #754) is still accurate? It seems like things have changed quite a bit around this area. |
So I've checked that this is almost fixed. There is still some duplication around this, but all the hard parts have been done. Seems that there are some silly things that have arisen in the meantime that need to be dealt with. |
This remains "almost fixed", but things have gotten a touch worse. There are now 3 occurrences of DD, where 2 seem to be duplicates, and the third (in
@samm82 can you track down the uses of all 3 of the above symbols? |
@JacquesCarette The Should I go ahead with this? |
Go ahead and delete The reason to have |
Not a huge deal, but do you prefer EDIT: Unless you feel strongly I'm going to go with |
Also, the duplicate (that I removed) used "theoretical model" as the definition, while the other used "theory model". For now I'm going to keep it as "theoretical model" to reduce the changes to stable, but I can change it if desired. |
I was going to say the opposite BUT I don't feel strongly about it! |
@JacquesCarette @szymczdm Hello Dr. Carette ad Dan, I saw this in the notes directory:
Drasil/notes/DrasilPotentialTasks.txt
Line 88 in 1e11a50
I was wondering if I could get clarification of this potential task?
The text was updated successfully, but these errors were encountered: