Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  Enviroment.vdmrt   Sprache: VDM

 
class Enviroment
 
instance variables
 private file : Storage;
 public completeGrid : Grid;
 private currentRobotPosition : Grid`Point;
 private busy : bool := true;
operations
 public Enviroment : () ==> Enviroment
 Enviroment() ==
 (
   file := new Storage();
   completeGrid := new Grid(mk_Grid`Point(0,0),mk_Grid`Point(100,100));
 );
 
 public GetPointAvalibility: Grid`Point ==> Grid`PointAvalibility
 GetPointAvalibility(p) ==
   return completeGrid.GetPointAvalibility(p.X,p.Y);
   
public handleEvent : Grid * seq of SteeringController`Route * 
                     Grid`Point * bool==> ()
handleEvent(g, routes,dest,b) ==
   file.Save(g,routes,dest,b);
 
public isFinished : () ==> ()
 isFinished () == Robot`steering.isFinished();
 
thread
 (--here we have to interact with the robot, 
  --punch, shoot...something
 
   completeGrid := file.Load("testmap.map");
   start(Robot`nmc);   --observe
   start(Robot`mobs1); --move
   start(Robot`mobs2); --move
   start(Robot`mobs3); --move
   start(Robot`mobs4); --move
   start(Robot`steering);
   Robot`steering.SetDiscoverInfo(file.startingPoint,
                                  file.dest, file.battery);
 
   busy := false;
 
 )
 
sync
 
per isFinished => not busy;
 
 
end Enviroment


class EnviromentTest is subclass of TestCase
values
 
operations
 protected SetUp: () ==> ()
 SetUp () == skip;
 
 protected RunTest: () ==> ()
 RunTest () == skip;
 
  protected TearDown: () ==> ()
 TearDown () == skip
 
end EnviromentTest

92%


¤ Dauer der Verarbeitung: 0.12 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge