1. A controller device for configuring one or more network elements of a software-defined network, the controller device comprising: a data interface for receiving relation data items and action policy rules, each relation data item expressing a pair of entities and their relationship and each action policy rule expressing an event and one or more actions to be carried out in response to the event, and a processor for generating configuration data for the one or more network elements, wherein the processor is configured to: derive implicit relations between pairs of the entities on the basis of the relation data items, and generate the configuration data for the one or more network elements on the basis of the relation data items, the action policy rules, and the derived implicit relations.