Small style fixes

This commit is contained in:
Jip J. Dekker 2021-03-03 15:26:31 +11:00
parent a55350fde6
commit 5f8553d8cc
No known key found for this signature in database
GPG Key ID: 517DF4A00618C9C3

View File

@ -952,10 +952,10 @@ technique that originates from compiler optimisation \autocite{cocke-1970-cse}
and has proven to be very effective in discrete optimisation
\autocite{marinov-2005-sat-optimisations, araya-2008-cse-numcsp}, including
during the evaluation of constraint modelling languages such as
\minizinc \autocite{rendl-2009-enhanced-tailoring}.
\minizinc\ \autocite{rendl-2009-enhanced-tailoring}.
For instance, in the constraint\\
\mzninline{(abs(x)*2 >= 20) \/ (abs(x)+5>= 15)}\\
\mzninline{(abs(x)*2 >= 20) \/ (abs(x)+5 >= 15)}\\
the expression \mzninline{abs(x)} is evaluated twice. Since functions in
\microzinc\ are guaranteed to be pure and total, any expressions that are
syntactically equal can be detected by a static compiler analysis before
@ -973,12 +973,11 @@ in the following example.
Consider the fragment:
\begin{mzn}
function var float: pythagoras(var float: a,
var float: b) =
let {
var float: x = pow(a, 2);
var float: y = pow(b, 2);
} in sqrt(x + y);
function var float: pythagoras(var float: a, var float: b) =
let {
var float: x = pow(a, 2);
var float: y = pow(b, 2);
} in sqrt(x + y);
constraint pythagoras(i, i) >= 5;
\end{mzn}