1. A method comprising: determining sequence-execution constraints that constrain execution orders of a plurality of events of an event-driven software application; determining sequence-position constraints that constrain positions of the plurality of events in one or more possible event sequences of the plurality of events; determining event-relation constraints that each indicates a relationship between an event input and an event output of each of the plurality of events; forming a constraint set that enumerates the one or more possible event sequences and that includes the sequence-execution constraints, the sequence-position constraints, and the event-relation constraints; and encoding control flow information of the one or more possible event sequences into the constraint set.