JacquesCarette / Drasil

Generate all the things (focusing on research software)
https://jacquescarette.github.io/Drasil
BSD 2-Clause "Simplified" License
142 stars 26 forks source link

Inconsistencies in SRS Non-Functional Requirements #3753

Closed BilalM04 closed 5 months ago

BilalM04 commented 5 months ago

The Non-Functional Requirements (NFRs) seem to have small inconsistencies across several examples, as well as examples not including some NFRs. Additionally, for some examples, the NFR labels end in "-able". Ex. maintainable, understandable, usable, etc. While for others, it ends in "-ability". Ex. maintainability, understandability, usability, etc. @balacij pointed out that the NFRs in the examples should be fairly consistent and should include the same NFRs and labels, apart from the descriptions which are generally example specific. For example:

Single Pendulum: SglPend

Game Physics: gamephysics

PD Controller PDController

Is this something that is intentional, or does it need to be fixed?

JacquesCarette commented 5 months ago

This is definitely something for @smiths .

smiths commented 5 months ago

@BilalM04 you are correct that the NFRs have inconsistencies. Actually, many of the NFRs aren't particularly good. There are two reasons for this: 1) we've prioritized functional requirements; 2) NFRs are challenging.

The challenge for NFRs is that they should be abstract, verifiable, and unambiguous. This is challenging for all software but particularly challenging for scientific software. For instance, for the quality of correctness, how do we really guarantee this for scientific software? Let's say we are trying to solve an ordinary differential equation for which there is no closed-form (analytical) solution available. How do we know we have the right answer? Making it more challenging, what do we even mean by the right answer? We are nearly always using floating point numbers, which are VERY different from real numbers. If we somehow know the right answer is 1.0 and we calculate 0.9999999. Are we close enough? How do we define the error (relative error? absolute error?)? What if the calculated result is a multi-dimensional vector? How do we define the error? (We would normally use different norms of the residual vector, but that in itself involves making decisions that are potentially arbitrary.) I could go on with the challenges. :smile: My solution in my grad class on developing scientific computing software is for projects to write a verification and validation plan. Drasil does not currently generate any documents related to verification and validation. (@samm82's work will hopefully make a contribution in that direction.)

@BilalM04, if we hit a roadblock with your Haskell coding and you need another task to fill your time, we could discuss working on manual versions of a VnV plan for our various examples. (There is some initial work on this in the case studies repo.) I don't think right now is the right time for this though. You are making progress with writing Drasil code, and a VnV plan would be a big tangent at this time.

Instead of trying to fix the NFRs at this time, let's work on incremental improvement, like you did with the maintainability example. @BilalM04 please create some issues for things we can fix with the NFRs. You should put the issues in a project board so that we can more easily track them. Here are some issues that we can start with, feel free to add your own:

smiths commented 5 months ago

The original question has been answered, but let's leave the issue open until @BilalM04 has had a chance to create some associated issues. @BilalM04 please close this issue once the others are created. You should trace back to this issue in those other issues.

BilalM04 commented 5 months ago

@smiths the performance requirement only appears in the Game Physics example. Is it worth creating a function and parametrizing the competitor if it only appears in one example? Additionally, if future examples have this requirement, can the performance metric vary, or will it always be execution time?

BilalM04 commented 5 months ago

I cannot create and link a project board to this repository. The repository owner, @JacquesCarette, will have to create a project board, then I can add the related issues.

smiths commented 5 months ago

I haven't created a project in a while, so I'm not 100% sure if this is good advice, but the instructions I found have a category of User Projects.

Ideally we don't want the constraint that @JacquesCarette has to create every project. Others have created projects before and I don't believe that @JacquesCarette had to do something, but I might be wrong. @balacij or @samm82 might have some thoughts on the best way to create new projects.

JacquesCarette commented 5 months ago

Projects have changed (I liked the 'classic' ones better...) So now individuals can create projects for themselves, and then I have to link them in.

BilalM04 commented 5 months ago

@JacquesCarette I created the project and have invited you to be an Admin. Apologies for taking so long, got caught up in my work with mdBook.

BilalM04 commented 5 months ago

@smiths You may have missed my previous comment, but I had a question about your point on the performance NFR:

the performance requirement only appears in the Game Physics example. Is it worth creating a function and parametrizing the competitor if it only appears in one example? Additionally, if future examples have this requirement, can the performance metric vary, or will it always be execution time?

I understand your point about tightening up the language; however, looking back, I may have misunderstood your point about parameterizing the competitor. How does this structure for the performance NFR sound:

"The (metric) for (feature) shall be comparable to (competitor)."

Where the item in the parenthesis will be parameterized.

JacquesCarette commented 5 months ago

Sigh - it looks like I can't. For repos created by an individual, as far as I can tell, only projects by that person can be linked to a repo. So it looks like I'll have to create it.

JacquesCarette commented 5 months ago

Ok, done.

BilalM04 commented 5 months ago

@JacquesCarette I am unable to see the project on the repo. It might be the case that it is private, as all projects are private by default and need to be changed to public.

JacquesCarette commented 5 months ago

Should be public now.

smiths commented 5 months ago

@smiths You may have missed my previous comment, but I had a question about your point on the performance NFR:

the performance requirement only appears in the Game Physics example. Is it worth creating a function and parametrizing the competitor if it only appears in one example? Additionally, if future examples have this requirement, can the performance metric vary, or will it always be execution time?

I understand your point about tightening up the language; however, looking back, I may have misunderstood your point about parameterizing the competitor. How does this structure for the performance NFR sound:

"The (metric) for (feature) shall be comparable to (competitor)."

Where the item in the parenthesis will be parameterized.

@BilalM04 you are right that this question was lost in the mix of different conversations. I almost like your parameterized performance requirement. I don't think the second parameter should be characterized as feature, but rather task. The task might use a feature, but the performance is measured by doing something (the task). We also want to quantify the comparison. It is still ambiguous if we say "comparable to".

"The (metric) for (task) shall be within (target)% of (competitor)."

Although game physics is the only example that currently uses a requirement of this form, I could easily see more like this in the future, even with the current examples. Remember, we didn't pay that much attention to the NFRs. There is room for improvement in all of them.

The challenge with parametrizing is coming up with the English to put around it that will work for all cases. I don't think we'll be able to do that, especially without having a long list of potential performance requirements we could use to deduce the pattern. Anything you do in this direction will be an improvement at this time.

BilalM04 commented 5 months ago

@JacquesCarette Could I get edit permissions for the NFR Project, I am unable to link new issues.

JacquesCarette commented 5 months ago

Done - I hate these new-style projects, the old ones were way better!

smiths commented 5 months ago

@BilalM04 when you close an issue, please give an explanation of why it is being closed. I believe in this case you are closing the issue because there are more recent issues that supersede it. If that is the case, you should explicitly point to those issues.

BilalM04 commented 5 months ago

Question has been answered. New issues have been created for the problems in the current NFRs, as discussed in this ticket. The new issues are #3807, #3756, and #3757. These issues are grouped together under a new project: Fix Inconsistencies in SRS Non-Functional Requirements