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

Quelle  CheckSpeedEvent.vdmpp   Sprache: VDM

 
\section{The CheckSpeedEvent Test Class}

The CheckSpeedEvent class implements a test event that checks the
speed of a train (i.e.\ of a KLV instance). It provides a setSpeed and
an execute operation. The execute operation returns the status of the
Cab Display and of the Emergency Break.

\begin{vdm_al}
class CheckSpeedEvent is subclass of Event

instance variables

  speed : real;

operations 

  public
  CheckSpeedEvent: real ==> CheckSpeedEvent
  CheckSpeedEvent (s) ==
    speed := s;

  public
  execute : KLV ==> Test`TestResult
  execute (klv) ==
    ( klv.checkSpeed(speed);
      let mk_(a,e,g) = klv.getCabDisplay().getDisplay(),
          e' = klv.getEmergencyBreak().getEmergencyBreak() in
      return mk_Test`KLVstate(mk_Test`CabDisp(a,e,g), 
                              mk_Test`EmerBreak(e')) );

end CheckSpeedEvent
\end{vdm_al}

80%


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