  We test M. Berry's ansatz on nodal deficiency in presence of boundary. The
square billiard is studied, where the high spectral degeneracies allow for the
introduction of a Gaussian ensemble of random Laplace eigenfunctions
("boundary-adapted arithmetic random waves"). As a result of a precise
asymptotic analysis, two terms in the asymptotic expansion of the expected
nodal length are derived, in the high energy limit along a generic sequence of
energy levels. It is found that the precise nodal deficiency or surplus of the
nodal length depends on arithmetic properties of the energy levels, in an
explicit way.
  To obtain the said results we apply the Kac-Rice method for computing the
expected nodal length of a Gaussian random field. Such an application uncovers
major obstacles, e.g. the occurrence of "bad" subdomains, that, one hopes,
contribute insignificantly to the nodal length. Fortunately, we were able to
reduce this contribution to a number theoretic question of counting the
"spectral semi-correlations", a concept joining the likes of "spectral
correlations" and "spectral quasi-correlations" in having impact on the nodal
length for arithmetic dynamical systems.
  This work rests on several breakthrough techniques of J. Bourgain, whose
interest in the subject helped shaping it to high extent, and whose fundamental
work on spectral correlations, joint with E. Bombieri, has had a crucial impact
on the field.
