RÉGI VÁLTOZAT: gtrule newRule(out P1, out P2) = { precondition pattern lhs(P1, P2, N) = { process(P1); process(P2); process.next(N, P1, P2); } postcondition pattern rhs(P1, P2, N, P, N1, N2) = { process(P1); process(P2); process(P) in mutex.model; process.next(N1, P1, P); process.next(N2, P, P2); } } ... choose P1, P2 with apply newRule(P1, P2) do seq{ println("newRule: p1="+ name(P1) + " - p2="+ name(P2)); } ÚJ VÁLTOZAT: pattern newRule_lhs(P1, P2, N) = { process(P1); process(P2); process.next(N, P1, P2); } rule newRule_rhs(in P1, in P2, in N, out P, out N1, out N2) = seq{ new(process(P) in mutex.model); new(process.next(N1, P1, P)); new(process.next(N2, P, P2)); delete(N); } ... choose P1, P2, N with find newRule_lhs(P1, P2, N) do let P = undef, N1 = undef, N2 = undef in seq{ call newRule_rhs(P1, P2, N, P, N1, N2); println("newRule: p1="+ name(P1) + " - p="+ name(P) + " - p2="+ name(P2)); }