-
Notifications
You must be signed in to change notification settings - Fork 0
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
Align language coverage with Java and VDMTools generators #108
Comments
Constructs to implement for now:
|
Need to include support for answering the inheritance queries
If the model contains no inheritance, then the file containing this information will simply contain an empty array:
This file must be paired with a corresponding flag |
Thanks, Victor. Did you really mean |
Good point, sorry about that! Because it's also generated, maybe it should follow the same approach as the |
Yeah sounds good. |
@peterwvj I have a questiona bout the |
After discussion, we will implement a static and recursive mechanism in the runtime supporting arbitrary nesting of Signature of the function should be Encoding scheme for |
@peterwvj , let us try to use the following convention for identifying the nested type. A 'q' for |
Sounds good to me, Victor. Shouldn't
Is that what you had in mind? How does this encoding scheme deal with records? |
Hi Peter, no, what I had in mind is that the inner type would be passed in the Regarding products, I liked your convention of identifying character followed by number of fields, I'll work a bit with that and maybe we can have another chat once I wrap my head around it entirely. |
I would like to use a list like the following in the type encoding array. Many of the built-in types are taken from gcc C++ name mangling:
Each one of these is prepended with a character I have worked out and tested the following scheme for encoding the type of the expression being queried, and it works well.
With this scheme, the runtime function
Some examples:
|
Sounds good, Victor, thanks! |
@peterwvj I've added precondition checking support to this issue because we need it to align with VDMT, but also because it seems like a very good idea in light issues found with the generated Continental model. |
Hi @peterwvj , in working on the assertions issue I realized that we don't support composition and iteration for maps, but VDMT does. I've added these to the list above. |
Currently, only is_nat is supported Addresses #108
@bandurvp I updated the generator to emit the OO operators (isofbaseclass, isofclass, samebaseclass and sameclass), but I've found runtime related problems with all of them that I need your help to address. Since there's quite a lot of stuff going on, I recommend we sit down face-to-face so I can explain you what's up. My work is available in pvj/ovt-254. However, since I build against Overture 2.5.4-SNAPSHOT (a version which is not released) my build environment is slightly complicated, so I don't recommend you merge this branch. I've set up numerous tests, inspired by the OO operator examples in the LRM that demonstrate all of these issues. Currently, I've commented out these tests since they produce code that either does not compile or generate wrong results when executed. |
@peterwvj , regarding #108 (comment) , yes it is a typo, I've updated the comment, sorry about that. |
Hi @peterwvj , let us talk about the OO operator issues above tomorrow, if you have time. |
Sure, let's talk tomorrow! |
@peterwvj , regarding union types, could we make use of the following type of equivalence to just emit a combinatorial |
Perhaps that's a better approach yes, but like you say, it could in theory increase the number of |
@bandurvp It looks like |
I just added |
VDM:
Corresponding C:
|
- isofclass is both hirarchy-based as well as an is query, so it is now part of both in terms of define exclusion. - Addresses #108.
For the purpose of a more fair comparison of generators we should endeavour to increase language coverage of VDM2C to approach that of the other two generators. Comparison is more fair this way because the generators can be seen to be equally generic.
The text was updated successfully, but these errors were encountered: