quasarresearchgroup / j-use

Java programming facade to the USE tool
https://quasarresearchgroup.github.io/j-use/
GNU General Public License v2.0
0 stars 0 forks source link

Set is not supported neither do tuple is Tuple #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Write a method that returns a Tuple in OCL
2. Generate the respective java code using j-use

What is the expected output? What do you see instead?

For instances...

-- @ObterJogosGrupo Obtém os jogos do grupo para uma dada lista de paises.
        obterJogosDoGrupo(p:Set(Pais)):Set(Tuple(pais:Pais, jogos:Set(Jogo))) = p->collect(each|
            Tuple{pais:Pais = each, jogos:Set(Jogo) = self.jogos}
        )->asSet

yields...

public Tuple(jogos:Set(Jogo),pais:Pais) obterJogosDoGrupo(Pais p)
{
        //  TODO
        //  return p->collect(each : Pais | Tuple {pais:each,jogos:self.jogos})->asSet
        return null;
}

It should give as it follows...
OclCollections.
public LinkedListSet<Tuple<LinkedListSet(Jogo),Pais>) 
>obterJogosDoGrupo(LinkedListSet<Pais> p)
{
        //  TODO
        //  return p->collect(each : Pais | Tuple {pais:each,jogos:self.jogos})->asSet
        return null;
}

Using the features as described in 
http://www.info2.uqam.ca/~tremblay/INF3140/OclCollections/OclCollections/LinkedL
istSet.html
and
http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.6.2/org.ecli
pse/ocl/3.0.2/org/eclipse/ocl/util/Tuple.java

Original issue reported on code.google.com by rc...@iscte-iul.pt on 20 Apr 2012 at 10:37

GoogleCodeExporter commented 9 years ago
The package org.eclipse.ocl.util seems to be a good candidate to the adoption 
of these new features.

Original comment by rc...@iscte-iul.pt on 20 Apr 2012 at 10:46

GoogleCodeExporter commented 9 years ago
The package mentioned above is a integrant part of the MDT(Model Development 
Tools)
http://www.eclipse.org/modeling/mdt/?project=ocl

Original comment by rc...@iscte-iul.pt on 20 Apr 2012 at 10:49

GoogleCodeExporter commented 9 years ago
http://www.info2.uqam.ca/~tremblay/INF3140/

There is a jar hear with a set of utilities for working with OCL.

Original comment by rc...@iscte-iul.pt on 20 Apr 2012 at 11:25