In this paper, we address the problem of synthesizing
systems by selecting the set of observable events. We first investigate the case of
observability where the set of observable events is fixed a priori. In this context, we show that checking whether a system is opaque and computing an optimal static observer ensuring opacity are both PSPACE-complete problems. Next, we introduce
partial observability where the set of observable events can change over time. We show how to check that a system is opaque w.r.t. a dynamic observer and also address the corresponding synthesis problem: given a system
and secret states
, compute the set of dynamic observers under which
is opaque. Our main result is that the synthesis problem can be solved in EXPTIME.