Recently we have proposed the "almost ASAP" semantics as an alternative semantics for timed automata. This semantics is useful when modeling realtime controllers : control strategies modeled with this semantics are robust and implementable (without making the synchrony hypothesis). We show in this paper how to effectively encode this semantics using timed automata along with their classical semantics. We have implemented a tool set that allows us to verify, using HyTech and Uppaal, the almost ASAP behavior of controllers and generate automatically provably correct code from verified models. To illustrate the applicability of our results, we show how we have synthesized the code for the Philips Audio Control Protocol for Lego Mindstorms TM .
IntroductionTimed automata are an important formal model for the specification and analysis of real-time systems. Formalisms like timed automata and hybrid automata are central in the so-called model-based development methodology for embedded controllers. The steps underlying that methodology can be summarized as follows: (i) construct a (timed/hybrid automaton) model Env of the environment in which the controller will be embedded; (ii) make clear what is the control objective: for example, prevent the environment to enter a set of Bad states; (iii) design a (timed automaton) model Cont of the control strategy; (iv) verify that Reach( Env Cont ) ∩ Bad = ∅. When Cont has been proven correct, it would be valuable to ensure that an implementation Impl of that model can be obtained in a systematic way in order to ensure the conservation of correctness, that is to ensure that Reach( Env Impl ) ∩ Bad = ∅ is obtained by construction.Unfortunately, this is often not possible for several fundamental and/or technical reasons. First, the notion of time used in the traditional semantics of timed automata is continuous and defines perfect clocks with infinite precision while implementations can only access time through digital and finitely precise clocks. Second, * This is the extended version of the paper with the same title to appear in Proc. , is a parametric semantics that leaves as a parameter ∆, which takes value δ ∈ Q ≥0 , the reaction delay of the controller. This semantics relaxes the classical semantics of timed automata in that it does not impose on the controller to react instantaneously but imposes on the controller to react within δ time units. We have proven that a timed controller is implementable with a sufficiently fast hardware if there exists δ ∈ Q >0 such that Reach( Env Cont AAsap δ ) ∩ Bad = ∅. To use the AASAP semantics in practice, we need tool support. In [DDR04], we have shown that the AASAP semantics of a controller can be encoded using a single parameter timed automaton. Unfortunately, this construction is exponential in all cases, which makes it useless for all but the toy examples. In this paper, we define a new compositional construction that avoids the exponential blow-up. The exponential behavior can still appear during the verification phase but ...