This repository was archived by the owner on Feb 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
2. Semantics
Dennis Campagna edited this page Jan 24, 2019
·
2 revisions
requires precondition-1 && precondition-2;ensures postcontition-1 && postcondition-2;signals (Exception e) (* this is true only if exception occurs*);-
assignable param;it says that param is modifiable -
assignable \nothing;means that the method doesn’t have side-effects
-
\old(E)value of E in pre-state (before the execturion of the method) -
\resultresult of method call -
a ⇒ ba implies b -
a ⇐ ba follows from b (i.e., b implies a) -
a ⇔ bif and only if b -
a <=!=> bnot (a if and only if b)
-
(\forall variable; range; condition)condition must always be true
-
(\exists variable; range; condition)it’s like Java’s logic operator ( ? : )
(\max variable; range; operation/condition)(\min variable; range; operation/condition)(\product variable; range; operation/condition)(\sum variable; range; operation/condition)
-
(\num_of int i; P(i); Q(i))cardinality of i for which P and Q are true
Sources and additional resources:
