Skip to content
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

Capture modules/functions not specified in the SRS #372

Closed
3 of 5 tasks
palmerst opened this issue Aug 3, 2017 · 5 comments
Closed
3 of 5 tasks

Capture modules/functions not specified in the SRS #372

palmerst opened this issue Aug 3, 2017 · 5 comments

Comments

@palmerst
Copy link
Collaborator

palmerst commented Aug 3, 2017

Look through your implementations for code that doesn't "come from" the SRS and define them using the data types in https://github.com/JacquesCarette/literate-scientific-software/blob/master/code/Language/Drasil/CodeSpec.hs (lines 152 - 181). This will probably need to be extended as I only implemented what was needed for glassbr.

As an example see https://github.com/JacquesCarette/literate-scientific-software/blob/master/CaseStudies/glass/Implementations/Python_Simplified/Implementation/interp.py. This code is for functions that perform linear interpolation on input data in glassbr. If you look at the glassbr SRS, some of the data definitions and instance models refer to interpolation in their descriptions, but there is no way to get to code from this. See https://github.com/JacquesCarette/literate-scientific-software/blob/master/code/Example/Drasil/GlassBR/Interpolation.hs. This is the interpolation module for glassbr defined in terms of Drasil chunks.

You can add these modules to the generated code using the addModDefs functions -- see glassbr Body.hs line 120.

  • SSP
  • GamePhys
  • GlassBR
  • NoPCM
  • SWHS
@hmadej
Copy link
Collaborator

hmadej commented Aug 3, 2017

is there currently a way to define a record or class?

@palmerst
Copy link
Collaborator Author

palmerst commented Aug 3, 2017

@hmadej Not yet. This will be added soon. For simplicity, I will start with records. (I assume records will be sufficient for your example since it is written in C?)

@hmadej
Copy link
Collaborator

hmadej commented Aug 3, 2017

Ya, I think records should be enough.

@AKM11
Copy link
Collaborator

AKM11 commented Aug 10, 2017

Short of the ODE, there does not seem to be much that SWHS and NoPCM can pull in terms of non-SRS related code. Checking them off for now but keep in mind the ODE calculation has not been pulled out.

@JacquesCarette
Copy link
Owner

I am going to go ahead and close this issue. Not because it is all implemented, but because we'll naturally get back here once we dive into code generation again. [on wiki]

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

No branches or pull requests

7 participants