fact: Definition spec := ADTRep Z { Def Constructor "new"(trueLevel : Z) : rep := ret trueLevel, Def Method "update"(trueLevel : rep, sensor : Z) : unit := if Zabs (sensor - trueLevel) <? sensorAccuracy then ret (trueLevel, tt) else trueLevel' <- {_ | True}; ret (trueLevel', tt), Def Method "timestep"(trueLevel : rep, targetLevel : Z) : action := act <- {act | match act with | Nothing => True | Fill => trueLevel + fillRate < tankMax | Empty => trueLevel - emptyRate >= 0 end}; ret (match act with | Nothing => trueLevel | Fill => trueLevel + fillRate | Empty => trueLevel - emptyRate end, act) }.
imports: Fiat.Common.Coq__8_4__8_5__Compat Ics