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

EMV2 doesn't check legality of type products #1222

AaronGreenhouse opened this issue May 4, 2018 · 0 comments · Fixed by #1795

EMV2 doesn't check legality of type products #1222

AaronGreenhouse opened this issue May 4, 2018 · 0 comments · Fixed by #1795


Copy link

AaronGreenhouse commented May 4, 2018

The legality of type products is not checked. Consider:

package testing
	annex EMV2 {**
		error types
			flintstone : type;
			fred : type extends flintstone;
			wilma : type extends flintstone;
			pebbles: type extends flintstone;
			rubble : type;
			barney : type extends rubble;
			betty : type extends rubble;
			bambam : type extends rubble;
			s1 : type set { fred, wilma } ;
			s2 : type set { barney, s1 };
			s3 : type set { flintstone * rubble };
			s4 : type set { fred * barney, fred * barney }; -- bad
			s5 : type set { fred * wilma }; -- bad
		end types ;
end testing;

In type set s5, the product fred * wilma should be flagged with an error because fred and wilma are in the same type hierarchy.

Section E.5 paragraph (18) says

Note that different elements of an error type product cannot be from the same type hierarchy.

Furthermore, type set s4 is erroneous because the type type products it contains are not disjoint. That is, it violates Section E.5 paragraph (L7):

If two elements of an error type set are error type products with the same number of
element types and whose element types are from the same type hierarchies, then the
element type of one must not be a subtype of the

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

Successfully merging a pull request may close this issue.

3 participants