In his article entitled "From Play-In Scenarios to Code: An Achievable Dream", David Harel presented a development schema that makes it possible to go from high-level user-friendly requirements to a full system model, and from there to the final implementation.Even if Harel’s schema represents a real contribution to filing the gap between user requirements and final implementations, there is few work on its feasibility and none within UML2. This paper addresses this lack. First we use UML2 sequence diagrams as a formalism for requirement specification. Then an approach that synthesizes state machines from UML2 sequence diagrams is presented. From the obtained state machines, we implement a transformation to code. The AIBO platform (one of several types of robotic pets designed and manufactured by Sony) is used as a case study to illustrate our implementation.