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

Assurance View does not correctly render subclaims #2381

Closed
dvanbrug opened this issue Jul 10, 2020 · 1 comment
Closed

Assurance View does not correctly render subclaims #2381

dvanbrug opened this issue Jul 10, 2020 · 1 comment

Comments

@dvanbrug
Copy link
Contributor

dvanbrug commented Jul 10, 2020

Summary

When creating a Verification Plan with nested subclaims, the “Assurance View” does not correctly render the Evidence or Description fields for the subclaims. All of the subclaims inherit the parent’s name / description instead of their own.

Expected and Current Behavior

Define a reqspec top level claim C1 and two nested claims C2 and C3 in the following structure:

  • C1 – Claim 1

    • C2 – Claim 2

    • C3 – Claim 3

I would expect the “Assurance View” to display the Assurance Plan in a similar structure. Instead, it outputs the following:

  • C1 – Claim 1

    • C1 – Claim 1

    • C1 – Claim 1

Steps to Reproduce

1.) Start with the following Alisa example: SimpleControlSystem (https://github.com/osate/alisa-examples/blob/master/SimpleControlSystem)

2.) However, this verification plan is not used in an Assurance Case. If we modify the SCSCase (SCSVerification.alisa) by adding the following assurance plan entry, we can cause these to be evaluated.


assurance plan DualSCSPlan for SimpleControlSystem::SCSDualPower.impl [
		assure DualSCSvplan
	]

3.) Add implementation to SimpleControlSystem.aadl


system implementation SCSDualPower.impl
end SCSDualPower.impl;


4.) Open the "Assurance View" and select the SCSCase Assurance Case. You should see something similar to the following image:

OSATE_bugfix

However, instead it should look the the next message:

OSATE_bugfix_2

Environment

  • OSATE Version: 2.7.1
  • Operating System: All

Proposed Fix

The following method constructClaimReferencePath is responsible for building the NestedClaimReference object that is used by the Assurance View. It appears that the method never adds the subclaim object.

Lines 490-498 in AssureConstructor.xtend

def NestedClaimReference constructClaimReferencePath(Claim claim, NestedClaimReference ncr) {
val parent = claim.eContainer
if (parent instanceof Claim) {
val NestedClaimReference parentNcr = factory.createNestedClaimReference
parentNcr.requirement = parent.requirement
return constructClaimReferencePath(parent, parentNcr)
}
return ncr
}

If we add the following line after the creation of parentNcr (line 495), the subclaims are correctly added to the parent object.


parentNcr.sub = ncr


I will submit a pull request with this change as a possible fix.

@lwrage
Copy link
Contributor

lwrage commented Aug 28, 2020

fixed

@lwrage lwrage closed this as completed Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants