fact: Definition ExampleSpec := ADTRep (Rep PaintballSpec * Rep TurretSpec * Rep JoystickSpec) { Def Constructor RADL_Init (_ : unit) : rep := barrel <- callCons PaintballSpec RADL_Init tt; turret <- callCons TurretSpec RADL_Init tt; trigger <- callCons JoystickSpec RADL_Init tt; ret (barrel, turret, trigger), Def Method RADL_Step (r' : rep, msg : EveryMessage) : EveryMessage := if (TiltXSafe (snd (msg ~~> "TiltX")) && TiltYSafe (snd (msg ~~> "TiltY"))) then barrel <- callMeth PaintballSpec RADL_Step (fst (fst r')) (SubMessage ["Trigger" ] msg); turret <- callMeth TurretSpec RADL_Step (snd (fst r')) (SubMessage [] msg); trigger <- callMeth JoystickSpec RADL_Step (snd r') (SubMessage [] msg); ret ((fst barrel, fst turret, fst trigger), (ilist_app (snd turret) (ilist_app (snd trigger) (snd barrel)))) else trigger <- callMeth JoystickSpec RADL_Step (fst (fst r')) (SubMessage [] msg); turret <- callMeth TurretSpec RADL_Step (snd (fst r')) (SubMessage [] msg); ret ((tt, fst turret, fst trigger), (ilist_app (snd turret) (ilist_app (snd trigger) ((icons (B := @TopicTypes PaintballTopics)(``"Fired") ``("IDLE") (inil _))))))}.
imports: Coq.Strings.String Coq.Bool.Bool Coq.Lists.List Coq.Program.Program Coq.Arith.Arith Fiat.ADT Fiat.ADT.ComputationalADT Fiat.ADTNotation Fiat.ADTRefinement Fiat.ADTRefinement.BuildADTRefinements Fiat.Fiat4Monitors.RADL_Topics Fiat.Fiat4Monitors.RADL_Messages Fiat.Fiat4Monitors.RADL_Flags Fiat.Fiat4Monitors.RADL_Nodes Fiat.Fiat4Monitors.RADLNodeADTs Fiat.Fiat4Monitors.LandsharkTopics Fiat.Fiat4Monitors.LandsharkNodes Bedrock.Platform.Facade.DFacade Bedrock.Platform.Facade.Notations Bedrock.Platform.Cito.ADT Bedrock.Platform.Cito.RepInv Bedrock.Platform.AutoSep