The Till classis virtually identical to the one presented in Appendix B
except that some of the operations have been modified tobe able to deliver
the value <Fail> to represent failed communication with the CentralResource.
Also, the resource instance variable is now a reference to a LocalResource,
though since LocalResource and CentralResource have an identical calling
interface, this change is minimal. The remaining changes are self-explanatory,
so in the sequel we merely present the class, with any changes from the
previous version indicated by underlining.
public ReturnCard : () ==> ()
ReturnCard() ==
(cardOk := false;
curCard:= nil) pre CardInside();
public GetBalance : () ==> [nat]|<Fail>
GetBalance() ==
resource.GetBalance(curCard.GetAccountId()) pre CardValidated();
public MakeWithdrawal : nat ==> bool | <Fail>
MakeWithdrawal(amount) ==
resource.Withdrawal
(curCard.GetAccountId(),curCard.GetCardId(),amount) pre CardValidated();
public RequestStatement : () ==> bool | <Fail>
RequestStatement() ==
resource.PostStatement(curCard.GetAccountId(),curCard.GetCardId()) pre CardValidated();
\end{vdm_al}
The IsLegalCard operation below is only used internally to validate a card.
\begin{vdm_al} public IsLegalCard : () ==> bool | <Fail>
IsLegalCard() == return
resource.IsLegalCard(curCard.GetAccountId(),curCard.GetCardId()) pre CardInside();
pure public CardValidated: () ==> bool
CardValidated() == return curCard <> niland cardOk;
pure public CardInside: () ==> bool
CardInside() == return curCard <> nil;
functions
Encode: Card`PinCode +> Card`Code
Encode(pin) ==
pin; -- NB The actual encoding procedure has not yet been chosen
end Till
\end{vdm_al}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.46Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-08)
¤
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 und die Messung sind noch experimentell.