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
Top-level abstract clafer extending a nested abstract clafer #67
Comments
|
My first stab at implementing it reveals a few problems, the biggest one being that I would have to change the analyses to always keep track of the whole inheritance hierarchy of a clafer to determine valid nesting and generate correct output. Currently, the code generated for The correct code should be The reason that the constraint There's onc trick we could do: always interpret abstract top-level clafers which extend nested abstract clafers as actually their siblings. So, our example would actually be represented in IR as that is the real semantics of allowing to define |
|
Implementation. We execute the transformation in two phases:
|
The is a feature request to allow extending nested abstract Clafers. Consider the following example:
Currently, this code would not compile as Hook is not nested under Person. It would be nice to be able to say things like
So that large models can be broken into smaller pieces. Semantically this could work if when you had an abstract Clafer with inheritance it would also inherit the relation (if it exists) between the parent and the Clafer being inherited. I.e. in our example:
The text was updated successfully, but these errors were encountered: