Using Rewrite Strategies for Testing BUpL Agents L˘ acr˘ amioara As ¸tef˘ anoaei ⋆1 , Frank S. de Boer 1,2 , M. Birna van Riemsdijk 3 1 CWI, Amsterdam, The Netherlands 2 LIACS - Leiden University, The Netherlands 3 TU, Delft, The Netherlands Abstract. In this paper we focus on the problem of testing agent programs writ- ten in BUpL, an executable, high-level modelling agent language. Our approach consists of two main steps. We first define a formal language for the specification of test cases with respect to BUpL. We then implement test cases written in the formal language by means of a general method based on rewrite strategies. Test- ing an agent program with respect to a given test case corresponds to strategically executing the rewrite theory associated to the agent with respect to the strategy implementing the test case. Keywords: Agent Languages, Testing, Rewriting, Strategies 1 Introduction An agent is commonly seen as an encapsulated computer system that is situated in some environment and that is capable of flexible, autonomous action in that environment in order to meet its design objectives [12], or dynamic goals. An important line of research in the agent systems field is the design of agent languages [3] with emphasis on the use of formal methods. The guiding idea is that agent-specific concepts such as beliefs (representing the environment and possibly other data the agent has to store), goals (representing the desired state of the environment), and plans (specifying which sequences of actions and possibly compositions of other plans to execute in order to reach the goals) facilitate the programming of agents. Along these lines, we take as case of study in this paper a simple variant of 3APL [7], the agent language BUpL, which is introduced in [1]. There the authors advocate the use of the Maude language [4] and its supporting tools for prototyping, executing, and verifying BUpL agents. One of the main advantages of Maude is that it provides a single framework in which the use of a wide range of formal methods is facilitated. Namely, being a rewrite-based framework, it makes it is easy to prototype modelling languages with an operational semantics by means of rewrite theories [8], and it provides mechanisms for verifying programs and language definitions by means of LTL model-checking [6]. Furthermore, the inherent reflective feature of rewriting logic (and of Maude, in particular) offers an alternative to model-checking by means of rewrite strategies. In this paper, we extend the results from [1]. More precisely, we investigate the problem whether a BUpL agent is conformant with respect to a given specification, ⋆ Email: L.Astefanoaei@cwi.nl; Address: Centrum voor Wiskunde en Informatica (CWI),P.O. Box 94079,1090 GB Amsterdam, The Netherlands; Tel.: +31 (0)20 592 4368