Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMPP/MSAWseqPP/   (Beweissystem der NASA Version 6.0.9©)  Datei vom 13.4.2020 mit Größe 926 B image not shown  

Quelle  AirSpace.vdmpp   Sprache: VDM

 
class AirSpace is subclass of GLOBAL

instance variables

--airspace : set of FO := {};
--inv forall x,y in set airspace & x <> y => x.getId() <> y.getId();

airspace : map FOId to FO := {|->};
  
operations

public addFO : FO ==> ()
addFO(fo) ==
  airspace := airspace ++ {fo.getId() |-> fo};

public removeFO : FOId ==> ()
removeFO(id) ==
  airspace := {id} <-: airspace;
    
public getFO : FOId ==> FO
getFO(id) ==
  return airspace(id)
pre id in set dom airspace;

public getAirspace : () ==> set of FO
getAirspace() ==
  return rng airspace;

public updateFO : FOId * Coordinates * Altitude ==> ()
updateFO(id,coord,alt) ==
  if (id in set dom airspace)
  then 
   (let fo = airspace(id)
    in 
     (fo.setCoordinates(coord);
      fo.setAltitude(alt);
     -- fo.registerPosition())
     )
   )
  else
    (let newfo = new FO(id,coord,alt)
     in airspace := airspace munion {id |-> newfo}
    );
    


end AirSpace

100%


¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.