Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMPP/SmokingPP/   (Wiener Entwicklungsmethode ©)  Datei vom 13.4.2020 mit Größe 815 B image not shown  

Quelle  World.vdmpp   Sprache: VDM

 
class World

instance variables
public static graphics : gui_Graphics:= new gui_Graphics();

table: Table := new Table();
public agent: Agent := new Agent(table);
smokers : set of Smoker := {new Smoker("Smoker 1", <Tobacco>, table),
                            new Smoker("Smoker 2", <Paper>, table),
                            new Smoker("Smoker 3", <Match>, table)};
limit : nat;
finished : bool := false;

operations

public World: nat ==> World
World(simtime) ==
(
  IO`print("World Ctor");
  limit := simtime;
  
);

public Yield: () ==> ()
Yield() == skip;

Finished: () ==> nat
Finished() ==
  agent.GetTime();

public Run: () ==> ()
Run() ==
(
   startlist(smokers);
    graphics.init();
 )

thread
(
while agent.GetTime() <= limit do
  skip
  finished := true)

sync

per Finished => finished;
end World

91%


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