kesterel2lustre

compile Kernel Esterel to Lustre
git clone https://a3nm.net/git/kesterel2lustre/
Log | Files | Refs | README

checker.hs (518B)


      1 module Checker where
      2 
      3 import Esterel
      4 
      5 instantaneous (Annotated p _) = case p of
      6     Present _ e1 e2 -> instantaneous e1 || instantaneous e2
      7     Esterel.Nothing -> True
      8     Pause -> False
      9     Emit _ -> True
     10     Exit _ -> False -- does not relinquish control
     11     Suspend p _ -> instantaneous p
     12     Signal _ p -> instantaneous p
     13     Trap _ p -> instantaneous p
     14     Loop _ -> False -- does not relinquish control
     15     Seq e1 e2 -> instantaneous e1 && instantaneous e2
     16     Par e1 e2 -> instantaneous e1 || instantaneous e2
     17