Fork me on GitHub

Changes in 0.15.0

Release date: 2025-09-09.

Major Changes

Number of major changes: 4

Generation of implicit event constructors

In SARL, events are fundamental constructs for agent communication, often requiring explicit constructor definitions to initialize their fields. Prior to this change, developers had to manually define constructors for every event, even when the event’s structure was simple or followed a predictable pattern. This manual process introduced several inefficiencies:

To streamline event definition and improve developer productivity, SARL introduced automatic constructor generation for events. This feature:

The compiler automatically generates constructors based on an event’s declared fields, eliminating the need for manual implementation. Example:

event MyEvent {
	var description : String
	var payload : double
}

The SARL compiler now automatically generates constructors that are equivalent to the following SARL code:

event MyEvent {
	var description : String
	var payload : double
	new (description : String = null, payload : double = 0.0) {
		this.description = description
		this.payload = payload
	}
}

Space API outside the Janus SRE

In earlier versions of SARL, the Space Implementation API was tightly coupled with the Janus SRE (SARL Runtime Environment). This design choice introduced several limitations:

These constraints hindered SARL’s goal of providing a generic, modular, and runtime-agnostic agent programming framework. To address these issues, the Space Implementation API was moved from the SRE codebase to the SARL SDK. The Space API is now part of the SARL standard library, making it independent of any specific runtime environment. The API was redesigned to rely on abstract interfaces and runtime-agnostic contracts, ensuring compatibility with any SARL-compliant environment. Key abstractions, such as Space and SpaceSpecification, are now defined in the SARL SDK, while concrete implementations (e.g., SRE-based) are provided as plugins or extensions.

Existing SRE-based applications continue to function seamlessly, as the SRE now implements the generic Space API rather than defining it.

Library for creating agent working memory

Agent-based systems often require temporary storage and efficient manipulation of data during their execution, particularly for tasks such as reasoning, decision-making, or maintaining contextual state. Prior to this change, SARL lacked built-in utilities for managing such short-term data structures. Developers had to rely on ad-hoc solutions—such as custom collections or external libraries.

SARL 0.15 introduced a simple “working memory” utility toolset. The working memory utilities are directly accessible within agent behaviors with the WorkingMemory capacity, enabling seamless interaction with other SARL constructs. A default skill is provided for implementing the WorkingMemory capacity based on data structure that maps knowledge names (or identifiers) to their values.

Robust Type Checker for Type Parameters

SARL supports generic constructs, such as parameterized events, to enable flexible and reusable agent-based systems. However, prior to the recent update, SARL’s type checking mechanism—built on the Xtext framework—lacked robust validation for type parameter conformance. This limitation led to several challenges:

To overcome these limitations, SARL implemented a dedicated type checker that builds upon the existing Xtext framework. This enhanced checker ensures that generic type arguments adhere to their specified bounds (for example, T extends Number). Additionally, it validates conformance in subtype hierarchies and enforces correct type relationships within inheritance chains and interface implementations, including complex scenarios.

Detailed Changes

1. SARL Language

1.1. SARL Language and Grammar

1.2. SARL Validator

1.3. Java Model Inferrer

1.4. Programmatic Code Builder

1.5. Third-party Syntax Color Style

2. SARL Development Toolkit (SDK)

3. Eclipse Products

4. Janus Run-time Environment

5. Maven Compiler Plugin

6. SARL Documentation

7. For SARL Contributors

8. Changes in the Previous Versions