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

Does connections function return {connection} or [connection]? #136

reteprelief opened this Issue May 30, 2018 · 1 comment


None yet
2 participants

reteprelief commented May 30, 2018

As part of the let assignment Resolute thinks the value is to be {connection}
As part of the comparison the value is [connection]
In the example below we get an error message when defining the variable type for list 2 as [connection]

In the comparison comparing against {} returns false while comparing against [] returns true, i.e., the value is a list.

package myresolutelib2
	system top
	end top;
	system implementation top.i
			s1: system s;
		annex Resolute {**
			prove hasConnections(this)
	end top.i;
	system s
	end s;
	annex Resolute {**
	hasConnections (comp : component) <=
	** "Component " comp " has connections" **
 		let set1 : {connection}= connections(comp); -- 
--		let list2 :[connection]= connections(); -- error msg: connections returns set
--		set1 <> {}  -- this condition returns false because set1 value is [] and is compared to {}
		set1 <> []  -- this condition returns true
end myresolutelib2;

This comment has been minimized.


kfhoech commented Jun 14, 2018

Fixed by Pull Request 140.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment