  The recent introduction of the smart radio environments (SREs) paradigm,
enabled by reconfigurable intelligent surfaces (RISs), has put in evidence the
need for physically-consistent models and design tools for communication
systems integrating electromagnetic (EM) and signal processing theories. In
this perspective, starting from rigorous EM arguments, in this paper we propose
a general framework for the characterization and design of programmable EM
environments. We first show that any linear EM environment in the presence of
boundary conditions can be interpreted as a space-variant linear feedback
filter. Then we provide a methodology to characterize programmable EM systems
as a linear graph described by matrix operators thus leading to the
determination of the transfer function of the EM system. Finally, some examples
are given related to the characterization and design of RISs, also showing that
some previous results in the literature are just particular cases of our
general framework.
