We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
parent
The following model
abstract FeatureModel abstract Feature [ parent in Feature, FeatureModel]
produces an error
Compile error at line 3 column 7... Function 'in' cannot be performed on TClafer {_hi = ["root"]} in TClafer {_hi = ["c0_Feature","c0_FeatureModel"]}
the type checker incorrectly assumes that the parent of an abstract clafer is the root.
The text was updated successfully, but these errors were encountered:
After fixing the compiler (commit), the following model
abstract FeatureModel abstract Feature [ parent in Feature, FeatureModel] FM : FeatureModel F1 : Feature F2 : Feature
produces a correct Choco output with a statement
c0_Feature.addConstraint($in(joinParent($this()), union(global(c0_Feature), global(c0_FeatureModel))));
for which Choco errors with
Exception in thread "main" org.clafer.ast.analysis.TypeException: Cannot join abstract c0_Feature . parent
Also, the model produces an incorrect Alloy output
abstract sig c0_Feature {} { (this.~@r_c0_Feature) in (c0_Feature + c0_FeatureModel) }
because r_c0_Feature is not defined. Actually, it should be a derived union of the parents of the concrete clafers:
r_c0_Feature
r_c0_Feature = r_c0_F1 + r_c0_F2
so, the correct Alloy code should be
abstract sig c0_Feature {} { (this.~@(r_c0_F1 + r_c0_F2) in (c0_Feature + c0_FeatureModel) }
Sorry, something went wrong.
mantkiew
No branches or pull requests
The following model
produces an error
the type checker incorrectly assumes that the parent of an abstract clafer is the root.
The text was updated successfully, but these errors were encountered: