Definitions :: valuem : seqof ValueDef
fnm : map Name to ExplFnDef;
\end{vdm_al}
\subsection{Value Definitions}
The value definitions simply consist of a left hand side pattern and
a right hand side expression.
\begin{vdm_al}
----------------------------------------------------------------------- -------------------------- Value Definitions -------------------------- -----------------------------------------------------------------------
ValueDef :: pat : Pattern
val : Expr;
\end{vdm_al}
\subsection{Function Definitions}
The abstract syntax of a function which are needed for the looseness
analysis here is composed of the name of the function, the argument pattern and the body expression. Thus, information such as the type of the
function isnot needed in this context.
ExplFnDef :: nm : Name
pat : Pattern
body : Expr;
\end{vdm_al}
\subsection{Expressions}
The expressions which are used in this paper are restricted tolet
expressions (including let-be-such-that expressions), conditional
expressions, apply expressions (only for function application),
literals, names, bracketed expressionsa nd (a few) binary expressions.
These expressions have been selected because they are sufficient to
show the principles in the loose evaluation presented in this paper.
The patterns used in this paper are pattern identifiers (notice here
how the position of the pattern has been incorporated as
well\footnote{We will see later why this is essential, even though any
other unique identification of the pattern name could be used.}), and set patterns (forset enumeration andsetunion patterns). For
bindings we are only considering set bindings because we only
investigate an executable subsetof VDM-SL here.
\begin{vdm_al} ----------------------------------------------------------------------- -------------------- Patterns and Bindings ---------------------------- -----------------------------------------------------------------------
Pattern = PatternName | MatchVal | SetPattern;
PatternName :: nm : [(Name * Position)];
MatchVal :: val : Expr;
SetPattern = SetEnumPattern | SetUnionPattern;
SetEnumPattern :: Elems : seqof Pattern;
SetUnionPattern :: lp : Pattern
rp : Pattern;
Position = nat * nat;
Bind = SetBind;
SetBind :: pat : Pattern Set : Expr;
\end{vdm_al}
Only set bindings are considered.
\subsection{Literals}
We have chosen only to have numerical and boolean literals in this
paper.
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.