The property of context-awareness, inherent to a Pervasive
System, requires a clear definition of context and of how the
context parameter values must be extracted from the real
world. Since often the same variables are common to the
operational system and to the context it operates into, the
usage of the same language to manage both the application
and the context can lead to substantial savings in application
development time and costs. In this paper we propose a
context-management extension to the PerLa language and
middleware that allows for declarative gathering of context
data from the environment, feeding this data to the internal
context model and, once a context is active, acting on the
relevant resources of the pervasive system, according to the
chosen contextual policy