InstQL: A query language for virtual institutions using answer set programming Institutions provide a mechanism to capture and reason about “correct” and “incorrect” behaviour within a social context. While institutions can be studied in their own right, their real potential is as instruments to govern open software architectures like multi-agent and service-oriented systems. Our domain-specific action language for normative frameworks, InstAL aims to help focus designers’ attention on the expression of issues such as permission, violation and power but does not help the designer in verifying or querying the model they have specified. In this paper we present the query language InstQL which includes a number of powerful features including temporal constraints over events and fluents that can be used in conjunction with InstAL to specify those traces that are of interest in order to investigate and reason over the underlying normative models. The semantics of the query language is provided by translating InstQL queries into AnsProlog, the same computational language as InstAL. The result is a simple, high-level query and constraint language that builds on and uses the reasoning power of ASP.