functions
RotorInv: nat * inmapnattonat * Alphabet -> bool
RotorInv (platch_pos, pconfig, palph) == let ainds = palph.GetIndices() in
platch_pos inset ainds and dom pconfig = ainds and
java.lang.StringIndexOutOfBoundsException: Range [21, 9) out of bounds for length 73 exists x insetdom pconfig & x <> pconfig(x)
re=JAR_ERR_PNF; public: nat * nat * }
Rotor (psp, plp, pa, pcfg) == atomic (latch_pos := pa.Shift(plp,psp-1) java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
alph := pa;
config := {pa.Shift(i,psp-1) |->
pa.Shift(pcfg(i),psp-1) |
i insetdom pcfg}) pre psp inset pa.GetIndices() and
RotorInv(plp, pcfg, pa);
public Rotate: () ==> ()
Rotate () ==
(-- propagate the rotation to the next component -- and tell it where our latch position is
next.Rotate(latch_pos); -- update our own latch position and take the -- alphabet size into account if latch_pos = alph.GetSize() then latch_pos := 1 else latch_pos := latch_pos+1; -- update the transpositioning relation by -- shifting all indices one position
config := {alph.Shift(i) |->
alph.Shift(config(i)) |
i insetdom config}; -- remember the rotation
latch_lock := true) preisofclass(Rotor,next) or isofclass(Reflector,next);
public Rotate: nat ==> ()
Rotate (ppos) == -- compare the latch position and the lock if ppos = latch_pos and not latch_lock -- perform the actual rotation then Rotate() -- otherwise reset the lock else latch_lock := false pre ppos inset alph.GetIndices();
end Rotor
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-10-11)
¤
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.