Created
May 24, 2012 15:33
-
-
Save abelhegedus/2782254 to your computer and use it in GitHub Desktop.
Small examples for EMF-IncQuery part 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pattern AtLeastThreeAttributes(Cls : EClass) = { | |
M == count find ClassAttributes(Cls,Attr); | |
check((M as Integer) > 2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pattern AttributeNotSet(Cls: MyClass) = { | |
MyClass(Cls); | |
neg find AttributeSetForMyClass(Cls); | |
} | |
pattern AttributeSetForMyClass(Cls: MyClass) = { | |
MyClass.someAttr(Cls,Attr); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pattern NumberOfAttributes(Cls : EClass, M) = { | |
M == count find ClassAttributes(Cls,Attr); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment