A LOCK statement has the form:
LOCK mu DO S END
where S is a statement and mu is an expression.
It is equivalent to:
WITH m = mu DO
Thread.Acquire(m);
TRY S FINALLY Thread.Release(m) END
END
where m stands for a variable that does not occur in S.