A method for automatically generating test programs includes receiving a
description of a system under test, expressed in terms of variables
associated with the system and conditional constraints including
semantics applied to the variables, and receiving a definition of an
event to be tested in the system. The method generates an ECondCSP over
the variables responsively to the definition of the event and to the
conditional constraints, such that at least some of the semantics of the
conditional constraints are preserved in the ECondCSP when one or more of
the variables to which the semantics are applied are inactive. The
ECondCSP is solved to generate a test case for the system.