When a verification plan refers to a component implementation in the same file, the reference is not resolvable. In the following example, the reference to SimplePlan::s.i cannot be resolved:
package SimplePlan
public
annex contract {**
verification plan simplePlan {
component s: SimplePlan::s.i;
}
**};
system s
end s;
system implementation s.i
annex contract {**
verify SimplePlan::simplePlan;
**};
end s.i;
end SimplePlan;
I did a little investigating and found that the issue is related to the method ContractImportedNamespaceAwareLocalScopeProvider.getAllDescriptions(Resource) which overrides ImportedNamespaceAwareLocalScopeProvider.getAllDescriptions(Resource). If I remove the override, then the reference becomes resolvable.
Unfortunately, I can't remember the reason why this override with the contract specific cache key was added. I seem to remember that it had something to do with getting cross references to work for files that contain both EMV2 and the contract annex, but I can't remember the details.
We should experiment and figure out why the custom cache key was added in the first place and then make local file references from contract to AADL work.
When a verification plan refers to a component implementation in the same file, the reference is not resolvable. In the following example, the reference to
SimplePlan::s.icannot be resolved:I did a little investigating and found that the issue is related to the method
ContractImportedNamespaceAwareLocalScopeProvider.getAllDescriptions(Resource)which overridesImportedNamespaceAwareLocalScopeProvider.getAllDescriptions(Resource). If I remove the override, then the reference becomes resolvable.Unfortunately, I can't remember the reason why this override with the contract specific cache key was added. I seem to remember that it had something to do with getting cross references to work for files that contain both EMV2 and the contract annex, but I can't remember the details.
We should experiment and figure out why the custom cache key was added in the first place and then make local file references from contract to AADL work.