Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMPP/ProductLinePP/     Datei vom 13.4.2020 mit Größe 684 B image not shown  

Quelle  SYSTEM-SW-controller.vdmpp   Sprache: VDM

 

class Software

instance variables
  heater : Heater;
  thermistor : Thermistor;
  liquid_level_sensor : LiquidLevelSensor;

operations
  public
  Setup: RealWorld1 | RealWorld2 ==> ()
  Setup(realworld) ==
    (heater := new Heater();
     heater.Setup(realworld);
     thermistor := new Thermistor();
     thermistor.Setup(realworld);
     liquid_level_sensor := new LiquidLevelSensor();
     liquid_level_sensor.Setup(realworld);
     );

  public
  Boil: () ==> ()
  Boil() ==
    while thermistor.GetTemperature() < 100.0 and
          liquid_level_sensor.IsOn()
      do
        heater.On()
  pre  liquid_level_sensor.IsOn()
  post not liquid_level_sensor.IsOn();

end Software

Messung
CHZG
808810089

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland