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

Cycle in hierarchy causes property resolution to never complete #1842

Closed
philip-alldredge opened this issue Jun 14, 2019 · 1 comment
Closed

Cycle in hierarchy causes property resolution to never complete #1842

philip-alldredge opened this issue Jun 14, 2019 · 1 comment

Comments

@philip-alldredge
Copy link
Collaborator

@philip-alldredge philip-alldredge commented Jun 14, 2019

Summary

OSATE can enter an infinite loop when looking up properties on component types that have a cycle in the hierarchy. This is because ComponentTypeImpl.getPropertyVlaueInternal only detects loops if the "this" component type is part of the cycle as opposed to a cycle in other parts of the hierarchy.

Expected and Current Behavior

Should break out of cycle in property resolution.

Steps to Reproduce

  1. Open model
  2. Open AADL Properties View
  3. Right click on "A" in the outline.

It can also be triggered by using the graphical editor or anything else that may cause a property lookup.

package cycle_example
public
	system A extends B
	end A;
	
	system B extends C
	end B;
	
	system C extends B
	end C;	
end cycle_example;
@AaronGreenhouse
Copy link
Contributor

@AaronGreenhouse AaronGreenhouse commented Jun 24, 2019

Updated getProperytValueInternal in ComponentTypeImpl and ComponentImplementationImpl to use a set to track all the visited ancestors instead of just checking against the original receiver object.

Loading

@lwrage lwrage closed this in #1861 Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants