|
|
|
Re: [ATL] Lazy rules & resolveTemp? [message #104155 is a reply to message #104076] |
Mon, 27 April 2009 08:20 |
Marcel Messages: 54 Registered: July 2009 |
Member |
|
|
Hi,
I am pretty sure of the structure. I solved the problem in another way
using lazy rules.
However, I still have a question regarding lazy rules and resolveTemp that
is very much related to this one.
My transformation builds a state machine. A state machine consists of
states and transitions.
I create a new state and a new transition in a lazy rule. How can I add
the state created in the lazy rule to the set of states of the state
machine and the transition created in the lazy rule to the set of
transitions of the state machine.
The structure is roughly as follows:
rule Class{
from
class_in: slco!Class
to
class_out: slco!Class(
...
stateMachines <- class_in.stateMachines->append(token_server)
),
token_server: slco!StateMachine (
states <- Bag{initial, idle}->union('states generated by the lazy
rule'),
transitions <- Bag{initial_to_idle}->union('transitions generated by
the lazy rule')
),
inital: slco!State(...),
idle: slco!State(...),
initial_to_idle: slco!Transition(...)
}
lazy rule tokenClient(
from sm_in: slco!stateMachine
...
to
s_out: slco!State (...)
...
t_out: slco!Transition(...)
)
For every state machine in 'class_in.stateMachines', the lazy rule should
be called.
How should I call this lazy rule such that the states end up in the bag
containing states and the transitions in the bag containing transitions?
Thanks!
Marcel
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04068 seconds