Exception handling in multi-agent oriented programming - Baldoni, Matteo; Baroglio, Cristina; Micalizio, Roberto; Tedeschi, Stefano (Knowledge engineering review, 2025)
Exception handling has been successfully proposed in the past years as a simple yet powerful software engineering tool to promote modularity and decoupling, while also preserving robustness. Multi-agent systems (MAS) and organizations (MAOs), in turn, offer powerful abstractions to build distributed systems; current models and methodologies, however, fall short in addressing exception handling in a systematic way, not considering exceptions as part of their design. Thus, the problem is usually approached by ad hoc solutions that hamper code modularization and decoupling. In this work, we outline a vision of how exception handling in MAS can be granted by design. We present an extension of the organizational model and infrastructure adopted in JaCaMo, that explicitly encompasses the notion of exception as a first-class element in the design of an organization. Relying on such a model, we propose an exception handling mechanism that is seamlessly integrated with organizational concepts, such as responsibilities, goals, and norms. In an organization, besides responsibilities for organizational goals, we propose to specify also responsibilities for managing exceptions, that is, for providing feedback about the context in which exceptions occur, and for handling it.