Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Framework-Independent Types
Framework-Independent Types [message #1738372] Tue, 19 July 2016 10:16 Go to next message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
Hi,

In Papyrus, you can select property types from the following sources (there may be others I am not aware of):
- UML Types
- ECore Primitive Types

Because ECore contains the greater variety of data types (e.g., UML Types doesn't have a Date type,) I usually choose types from there. Unfortunately, ECore is tied to the Eclipse Modeling Framework, it isn't framework-independence.

How do you folks deal with this independence issue?

Re: Framework-Independent Types [message #1738377 is a reply to message #1738372] Tue, 19 July 2016 10:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi<br>
<br>
The UMLforOCL profile enables you to define your own custom
DataTypes and characterize their numeric capabilities and OCL
behavior.<br>
<br>
<a class="moz-txt-link-freetext" href="http://">http://</a><cite class="_Rm"><a class="moz-txt-link-abbreviated" href="http://www.slideshare.net/EdWillink/the">www.slideshare.net/EdWillink/the</a>-<b>ocl</b>for<b>uml</b>-profile</cite><br>
<br>
Eclipse OCL tooling only uses the Integer/Real distinction at
present. In due course OCL evaluation / code generation may be
enforce limited precisions more accurately.<br>
<br>
Similarly other tools may begin to use the fuller specification.<br>
<br>
    Regards<br>
<br>
        Ed Willink<br>
<br>
<br>
On 19/07/2016 11:16, Philippe de Rochambeau wrote:<br>
</div>
<blockquote cite="mid:nmkul9$5c8$1@xxxxxxxxe.org" type="cite">Hi,
<br>
<br>
In Papyrus, you can select property types from the following
sources (there may be others I am not aware of):
<br>
- UML Types
<br>
- ECore Primitive Types
<br>
<br>
Because ECore contains the greater variety of data types (e.g.,
UML Types doesn't have a Date type,) I usually choose types from
there. Unfortunately, ECore is tied to the Eclipse Modeling
Framework, it isn't framework-independence.
<br>
<br>
How do you folks deal with this independence issue?
<br>
<br>
<br>
</blockquote>
<p><br>
</p>

<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
This email has been checked for viruses by Avast antivirus software.
<br><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient">www.avast.com</a>
</p>
</td>
</tr>
</table>
<br />
</body>
</html>
Re: Framework-Independent Types [message #1738397 is a reply to message #1738377] Tue, 19 July 2016 12:40 Go to previous messageGo to next message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
Member
Very interesting slides. Thank you for sharing.
Re: Framework-Independent Types [message #1738399 is a reply to message #1738397] Tue, 19 July 2016 12:58 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

Another option could be to define your primitive types as part of, or in a separate, imported, UML model. Note that this uses standard UML capabilities. In addition, as part of Papyrus, these can be built and distributed as (model) libraries, making it easier to share in a team. Placing it in a library has the added advantage of write protection. This is, for example, what we have done in Papyrus-RT to easily expose the UML-RT primitives, which are not found in any other library, the the Papyrus-RT users.

As you have not defined what you meant by "platform indepdendence", I am unsure if that addresses your need , but I wanted to mention that alternative.


/Charles Rivet
Re: Framework-Independent Types [message #1738410 is a reply to message #1738399] Tue, 19 July 2016 13:35 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Charles

Libraries may be a good way to 'implement' them but you still need to
use the UMLforOCL profile to 'specify' them so that OCL knows that
expressions involving variables typed by your PrimitiveTypes names may
use Integer / Real operations. (Unless your PrimitiveTypes totally
displace OCL types and you provide explicit toInteger() etc conversion
methods.)

Regards

Ed Willink


On 19/07/2016 13:58, Charles Rivet wrote:
> Another option could be to define your primitive types as part of, or
> in a separate, imported, UML model. Note that this uses standard UML
> capabilities. In addition, as part of Papyrus, these can be built and
> distributed as (model) libraries, making it easier to share in a team.
> Placing it in a library has the added advantage of write protection.
> This is, for example, what we have done in Papyrus-RT to easily expose
> the UML-RT primitives, which are not found in any other library, the
> the Papyrus-RT users.
>
> As you have not defined what you meant by "platform indepdendence", I
> am unsure if that addresses your need , but I wanted to mention that
> alternative.
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: Framework-Independent Types [message #1738419 is a reply to message #1738410] Tue, 19 July 2016 15:43 Go to previous message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

[quote title=Ed Willink wrote on Tue, 19 July 2016 09:35]Hi Charles

Libraries may be a good way to 'implement' them but you still need to
use the UMLforOCL profile to 'specify' them so that OCL knows that
expressions involving variables typed by your PrimitiveTypes names may
use Integer / Real operations. (Unless your PrimitiveTypes totally
displace OCL types and you provide explicit toInteger() etc conversion
methods.)

Regards

Ed Willink

Hi Ed,

I agree in principle. in the particular case of their use in Papyrus-RT, this is not necessary because, as part of the principles of operation of the tool, these are only used by our code generator, which explicitly understands their meaning. Those properties are not (at least yet, depending on users explicit needs) used in operations in the model.

Thanks for the feedback!

Regards,
Charles


[...snip...]


/Charles Rivet
Previous Topic:Setting a property's initial value on Papyrus OCL
Next Topic:Providing default style for notation element
Goto Forum:
  


Current Time: Fri Mar 29 08:08:10 GMT 2024

Powered by FUDForum. Page generated in 0.05894 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top