Skip to content

Automatically collect abbreviations from generated DocDescs#4363

Open
sarrasoussia wants to merge 85 commits intomainfrom
tableAccAbbS
Open

Automatically collect abbreviations from generated DocDescs#4363
sarrasoussia wants to merge 85 commits intomainfrom
tableAccAbbS

Conversation

@sarrasoussia
Copy link
Copy Markdown
Collaborator

@sarrasoussia sarrasoussia commented Sep 7, 2025

Closes #4299
Closes #1235

Builds on #4323
Builds on #4695
Builds on #4843

@sarrasoussia

This comment was marked as outdated.

@balacij

This comment was marked as outdated.

@sarrasoussia

This comment was marked as outdated.

balacij

This comment was marked as outdated.

JacquesCarette

This comment was marked as outdated.

mis = commonIdeaWithDict "mis" (fterms compoundPhrase moduleInterface specification) "MIS" [softEng]
mg = commonIdeaWithDict "mg" (fterms compoundPhrase module_ guide) "MG" [softEng]
typUnc = commonIdeaWithDict "typUnc" (cn' "typical uncertainty") "Uncert." [softEng]
typUnc = commonIdeaWithDict "typUnc" (cnIES "typical uncertainty") "Uncert." [softEng]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a separate PR.

assumpBC = cic "assumpBC" boundaryConditionsDesc "boundaryConditions" Doc.assumpDom
assumpRT = cic "assumpRT" responseTypeDesc "responseType" Doc.assumpDom
assumpLDFC = cic "assumpLDFC" (ldfConstantDesc loadDF) "ldfConstant" Doc.assumpDom
assumpLDFC = cic "assumpLDFC" ldfConstantDesc "ldfConstant" Doc.assumpDom
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember why this was necessary, but I also don't see why ldfConstantDesc was parameterized about the "mainConcept". Good change, but separate PR.


acronyms :: [CI]
acronyms = [oneD, twoD, assumption, dataDefn, genDefn, goalStmt, inModel,
physSyst, requirement, srs, refBy, refName, thModel, typUnc]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little bit surprised that this means that acronyms is dead code now. We should double-check the other case studies if their "acronyms" lists are used/unused. But, this is also a good reminder that minimal export lists are good for these.

Comment on lines +458 to +461
<tr>
<td>GD</td>
<td>General Definition</td>
</tr>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it makes sense why this was added. We added a hack in this PR that forces some short-forms to appear in the ToAA. It happens that GlassBR has no GDs and so "GD" never appears at all (which makes sense). Future work.

balacij added a commit that referenced this pull request Mar 28, 2026
balacij added a commit that referenced this pull request Mar 28, 2026
sentence to be optional via `Maybe` rather than abusing `EmptyS`.

Split off from #4363.
balacij added a commit that referenced this pull request Mar 28, 2026
`Sentence`.

Split off from #4363.

This does not change much, but it is good, regardless.
balacij added a commit that referenced this pull request Mar 28, 2026
balacij added a commit that referenced this pull request Mar 28, 2026
`refByDom` and `refNameDom` are removed. Neither are really "domains."
ldfConstantDesc = foldlSent [S "With", phrase reference, S "to",
refS assumpSV `sC` D.toSent (phraseNP (NP.the (value `of_`
mainConcept))), sParen (ch mainConcept) `S.is` D.toSent (phraseNP (a_ constant))
loadDF))), sParen (short loadDF) `S.is` D.toSent (phraseNP (a_ constant))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change? I'm not so sure. LDF is actually meant to be a variable here, not an acronym. So rendering it in math mode is appropriate (see the later stable diff that makes it plain text).

Why was it changed? Operational purposes to avoid stable/ changes. Because without the reference to LDF as an acronym here, LDF won't be picked up as being a referenced acronym, and hence won't appear in the ToAA otherwise (as it currently does).

That being said, within the symbol is reference to the acronym. Or is it that it reuses the acronym for LDF? It's the same to me. One is just known to be usable in "math" contexts and when appropriate, is shown in an italicized font.

Should LDF appear in the both the table of symbols and the ToAA? Should Symbol support carrying references to textual abbreviations/acronyms?

In GlassBR, GTF is in boh the ToS and the ToAA, so it does seem there was thought on this in the past, but I don't see anything on the issue tracker.

@smiths @JacquesCarette Do you have any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically collect abbreviations for SRS Table of Acronyms includes unused acronyms

4 participants