Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL fan-in & fan-out
OCL fan-in & fan-out [message #3596] Tue, 06 February 2007 10:51 Go to next message
Joana M. F. Trindade is currently offline Joana M. F. TrindadeFriend
Messages: 7
Registered: July 2009
Junior Member
Hello everyone,

I am using the EMFT Query framework to check OCL queries against instance
models. However, I'm new to OCL and I can't seem to find any good
tutorials.

So, I have a instance model which is composed by objects that extend
either "Component" or "Connector" (more specifically, a MVC architecture
editor). What I would like to do is calculate the fan-in/fan-out of a
given component. By fan-in and fan-out I mean counting the number of
connectors pointing to a component (fan-in), and the number of connectors
leaving a component (fan-out).

I'd appreciate any kind of help or advise.

Thanks in advance,
Joana Trindade
Re: OCL fan-in & fan-out [message #4868 is a reply to message #3596] Mon, 12 February 2007 10:54 Go to previous message
Joana M. F. Trindade is currently offline Joana M. F. TrindadeFriend
Messages: 7
Registered: July 2009
Junior Member
Anyway, I've managed to do it. With a component selected at the diagram:

-- fan-in
Connector.allInstances()->select(c : Connector | c.target.name =
self.name)->size()

-- fan-out
Connector.allInstances()->select(c : Connector | c.source.name =
self.name)->size()

Cheers,
Joana M. F. Trindade
Previous Topic:OCL/UML Help
Next Topic:ocl, uml, can't start.
Goto Forum:
  


Current Time: Thu Apr 25 01:41:36 GMT 2024

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

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

Back to the top