Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL] cyclic connection
[EVL] cyclic connection [message #1400730] Mon, 14 July 2014 16:37 Go to next message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
Hi,
I try to write a check and I need some help. I need to proof to a cyclic connection.

https://dl.dropboxusercontent.com/u/58418042/dmn/connection.png

If I have a cyclic connection like on the picture, I have to show a error.

I looking too for an api or command overview for evl, because I know only some of the commands.

Thanks,
Justus
Re: [EVL] cyclic connection [message #1400877 is a reply to message #1400730] Mon, 14 July 2014 21:21 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Justus,

The "closure" operation may be of use here e.g. assuming that nodes are connected via a "previous" reference, something like self.closure(n|n.previous).excludes(self) would do the trick.

Cheers,
Dimitris
Re: [EVL] cyclic connection [message #1401333 is a reply to message #1400877] Tue, 15 July 2014 13:03 Go to previous messageGo to next message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
Hi Dimitris,

I get the error "Property 'previous' not found in object Decision". If I look in the Properties of my element, I see only the name. If I look to the link I see from and to.

Greetings,
Justus
Re: [EVL] cyclic connection [message #1401348 is a reply to message #1401333] Tue, 15 July 2014 13:21 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Justus,

Could you please share your metamodel?

Cheers,
Dimitris
Re: [EVL] cyclic connection [message #1401351 is a reply to message #1400730] Tue, 15 July 2014 13:25 Go to previous messageGo to next message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
Hi Dimitris,

the emf File?

@namespace(uri="dmn", prefix="dmn")
package dmn;
 
@gmf.diagram(onefile="true", diagram.extension="dmn")
class DMN {
    val Elements[*] dmn_elements;
    val Requirements[*] dmn_requirements;
}

abstract class Elements{
	attr String name;
}

abstract class IRFrom{
	
}

abstract class KRTo{
	
}

abstract class DBK{
	
}

@gmf.node(figure="figures.Decision", label="name", label.icon="false", size="200,75")
class Decision extends Elements, IRFrom, KRTo, DBK{

}

@gmf.node(figure="figures.BusinessKnowledgeModel", label="name" , label.icon="false", size="200,75")
class Business_knowledge_model extends Elements, KRTo, DBK{
	
}

@gmf.node(figure="figures.InputData", label="name", label.icon="false", size="200,75")
class Input_data extends Elements, IRFrom{
	
}

@gmf.node(figure="figures.KnowledgeSource", label="name", label.icon="false", size="200,75")
class Knowledge_source extends Elements, DBK{
	
}

abstract class Requirements{
	
}

@gmf.link(source="from", target="to", target.decoration="filledclosedarrow", color="0,0,0")
class Information_Requirement extends Requirements{
	ref IRFrom from;
	ref Decision to;
}

@gmf.link(source="from", target="to", target.decoration="arrow", style="dash", color="0,0,0")
class Knowledge_Requirement extends Requirements{
	ref Business_knowledge_model from;
	ref KRTo to;
}

@gmf.link(source="from", target="to", target.decoration="decoration.AuthorityRequirementDecorator", style="dash", color="0,0,0")
class Authority_Requirement extends Requirements{
	ref Elements from;
	ref Elements to;
}


Greetings,
Justus

[Updated on: Tue, 15 July 2014 13:25]

Report message to a moderator

Re: [EVL] cyclic connection [message #1402120 is a reply to message #1401351] Wed, 16 July 2014 14:53 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Justus,

Essentially, you need to detect a cycle in your graph so I'd suggest implementing a depth-first search algorithm (see [1] for additional pointers).

Cheers,
Dimitris

[1] http://en.wikipedia.org/wiki/Cycle_(graph_theory)
Re: [EVL] cyclic connection [message #1402230 is a reply to message #1400730] Wed, 16 July 2014 18:20 Go to previous messageGo to next message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
Hi Dimitris,

This Is what I was looking for. One more Question. How to get my Elements and Requirements in a collection?

var elements : Collection;
elements = ???


Greetings,
Justus
Re: [EVL] cyclic connection [message #1402285 is a reply to message #1402230] Wed, 16 July 2014 20:17 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Justus,

The following should do the trick:

var elements : Sequence;
elements.addAll(Elements.all);
elements.addAll(Requirements.all);

Cheers,
Dimitris
Re: [EVL] cyclic connection [message #1402782 is a reply to message #1402285] Thu, 17 July 2014 13:44 Go to previous message
Justus 2000 is currently offline Justus 2000Friend
Messages: 15
Registered: May 2014
Junior Member
Hi Dimitris,

Thanks for your help. now it is running. EVL and EOL are realy nice. Very Happy

Greetings,
Justus
Previous Topic:[Eugenia] using properties of embedded classes in labels?
Next Topic:Use EOL operation and/or EOL files on Exeed
Goto Forum:
  


Current Time: Fri Apr 26 23:11:29 GMT 2024

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

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

Back to the top