Home » Modeling » TMF (Xtext) » Selection for a type system
Selection for a type system [message #871576] |
Mon, 14 May 2012 09:00  |
Eclipse User |
|
|
|
Hi,
I am a newbie in the modeling world and I need to define a grammar for a certain DSL. It is necessary to have syntax and type check.
Can anyone recommend a good type system?
I have found XSemantics and Xtext typesystem, and now I am wondering about Xbase.
Which one is good, or maybe someone can point the pro's and cons of them?
Any comment will be appreciated.
Thanks,
Zlatka
|
|
| | |
Re: Selection for a type system [message #875814 is a reply to message #871576] |
Wed, 23 May 2012 07:10   |
Eclipse User |
|
|
|
On 05/14/2012 03:00 PM, Zlatka Manas wrote:
> Hi,
> I am a newbie in the modeling world and I need to define a grammar for a
> certain DSL. It is necessary to have syntax and type check. Can anyone
> recommend a good type system?
> I have found XSemantics and Xtext typesystem, and now I am wondering
> about Xbase.
> Which one is good, or maybe someone can point the pro's and cons of them?
>
> Any comment will be appreciated.
>
> Thanks,
> Zlatka
Hi
we are working on a comparison about the possible type system frameworks
for Xtext languages.
We have already presented a preliminary version of this work, the slides
can be found here
http://www.rcp-vision.com/?page_id=3902
In general, if your DSL has to be tightly coupled with Java, then you
should really consider to rely on Xbase (and exploit its full
integration with the Java type system). If this is not the case, you
might consider a manual implementation of the type system for your DSL
in plain Java/Xtend2, or rely on the other two frameworks XSemantics
(which provides examples of a type system for Featherweight Java and
type inference of lambda calculus) and Xtext typesystem (XTS); these
frameworks also provide a DSL for specific mechanisms targeted to type
system implementations.
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
|
|
|
Re: Selection for a type system [message #892922 is a reply to message #871576] |
Sun, 01 July 2012 18:49   |
Eclipse User |
|
|
|
The language should not be coupled with Java, so Xbase is out.
Out of the remaining two, which one can be learned faster? Or which syntax is simpler? Which criteria can be crucial for one or the other system?
I really need to make a decision on which system to use but for the moment they are equal.
The documentation for XSemantics is better structured and provides good examples, whereas XTS documentations is a bit messy. Also, concerning support, I think that XTS might have a bigger community so more people can help, not to mention the author himself. If I am wrong, I apologize to Lorenzo and the users of XSemantics.
Based on the documentation and examples, I would go for XSemantics but the judgments and premises and rules etc etc are a bit too much formal language.
Is there anyone who has used both of the systems and can provide a good (user) overview of them?
Any comment will be appreciated.
Thanks,
Zlatka
|
|
|
Re: Selection for a type system [message #893146 is a reply to message #892922] |
Mon, 02 July 2012 17:43   |
Eclipse User |
|
|
|
On 07/02/2012 12:49 AM, Zlatka Manas wrote:
> The language should not be coupled with Java, so Xbase is out.
> Out of the remaining two, which one can be learned faster? Or which
> syntax is simpler? Which criteria can be crucial for one or the other
> system?
> I really need to make a decision on which system to use but for the
> moment they are equal. The documentation for XSemantics is better
> structured and provides good examples, whereas XTS documentations is a
> bit messy. Also, concerning support, I think that XTS might have a
> bigger community so more people can help, not to mention the author
> himself. If I am wrong, I apologize to Lorenzo and the users of
> XSemantics. Based on the documentation and examples, I would go for
> XSemantics but the judgments and premises and rules etc etc are a bit
> too much formal language.
> Is there anyone who has used both of the systems and can provide a good
> (user) overview of them? Any comment will be appreciated.
>
> Thanks,
> Zlatka
Hi Zlatka,
yes Xsemantics targets formal systems (and indeed if you need to develop
an involved type system you have to get into formal systems somehow ;)
I'm more than happy to help you if you need support :)
Xsemantics 1.1.0 (based on Xtext 2.3.0) has just been released with
updated documentation.
hope this helps
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
|
|
| | | | | | |
Re: Selection for a type system [message #986071 is a reply to message #984192] |
Sun, 18 November 2012 04:31  |
Eclipse User |
|
|
|
On 11/14/2012 02:36 PM, Tommaso De Sica wrote:
> Goodevening everyone,
> I have a similar problem. I'm working with an existing language
> (Structured Text) and I have to create an editor for it.
> Obviously I use Xtext for grammar definition, but now I have to add a
> type system and I'm not sure about which instrument is the best for me.
>
> I'm going to use Xbase, but I have some types different by Java Types
> (eg UDINT or WORD). Can I use Xbase or is it better to use something else?
> In the second case, Xsemantics could be a good alternative?
>
> Very thanks for your suggestions.
Dear Tommaso
in Xsemantics I define the type system of Xsemantics in Xsemantics
itself; since Xsemantics itself is based on Xbase, with some additional
small types and a different type rule (e.g., the one for Xbase variable
declaration); when I define the type system I can reuse Xbase classes to
define my typesystem: in most cases I simply delegate to Xbase
(ITypeProvider), in the cases I want to customize I write my own rules.
You can find the definition here:
http://sourceforge.net/p/xsemantics/code/ci/68395a1c0bed6fa2f3cdf7a0220a49d4f27c98ae/tree/plugins/it.xsemantics.dsl/src/it/xsemantics/dsl/typing/XsemanticsTypeSystem.xsemantics
hope this helps
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
|
|
|
Goto Forum:
Current Time: Tue Jul 08 01:12:01 EDT 2025
Powered by FUDForum. Page generated in 0.06044 seconds
|