Developing autonomic systems is a major challenge due to their distributed nature, large dimension, high dynamism, open-endedness, and need of adaptation. In this paper, we tackle this challenge by proposing a language, called
SCEL, that combines abstractions and primitives specifically devised for programming autonomic systems by also using constraints and operations on them. We show that constraints permit addressing issues related to the programming of autonomic systems, since they are suitable means to deal with, e.g., partial knowledge, multi-criteria optimisation, preferences, uncertainty. We also present an advanced form of interaction that is particularly convenient in this setting. It allows a component of a system to access the constraint-based knowledge of all components checking its consistency and implications.