Changes in 0.13.0
Release date: 2023-09-19.
1. Major Changes
Number of major changes: 3
1.1. Transition from Java 8 to Java 17
Since the beginning of its life, SARL supports version 8 of Java.
However, Java has considerably evolved during the past decade; And the lastest long-time-support version of Java is 17.
New features have been added and enhancements have been made since Java 8.
These features and enhancements improve startup, performance, memory usage, and provide better integration with containers.
Moreover, the recent tools such as Eclipse and Xtext require to use at least the version 17 of Java to have benefits of the feature enhancements and bug fixes.
Consequently, the SARL development team as decided in 2021 to apply to SARL a transition from Java 8 to Java 17.
Moving from Java 8 to Java 17 was a significant amount of work (approximatively 18 months) and will apply major changes in all the SARL projects.
Version 0.13.0 requires Java 17 as a minimum requirement.
Many the modules and artifacts of SARL have change of their names to obtain a unified naming convention that is also compatible with those that must be used for Java modules.
Details: [1, 2, 3, 4, 5, 6, 7, 8, 9].
1.2. Novel SARL Project Structure
Since few years, contributors to SARL notify the high complexity of the SARL project structure.
It was almost impossible to compile a sub-project of SARL without downloading and compiling all the sub-projects.
The transition from Java 8 to Java 17 gives us the opportunity to rethink the structure of the SARL project and its sub-projects.
There is not any more a single project for all SARL (with its associated root pom file).
The SARL project is splitted into different sub-projects that may be compiled independently.
Each project is dedicated to a specific set of features and tools. These sub-projects are:
- sarl-bom: Provide the Build-of-Material, i.e., a shared list of Maven dependency, for all the SARL sub-projects;
- sarl-baseutils: Set of Maven artifacts that are independent of SARL but needed to build the SARL artifacts;
- sarl-lang: Provides the language definition, the associated compiler (including the Maven plugin) and code formatting styles for different text editors;
- sarl-sdk: Set of Maven artifacts that constitute the SDK for all the SARL developers;
- sarl-apputils: Shared projects for building applications that are using a SARL compiler;
- sarl-sre: SARL runtime environment (or SARL virtual machine);
- sarl-docs: Tools and Doclet for the generation of the documentation, including the API documentation pages;
- sarl-cli: Set of command-line tools (sarlc, sarldoc, janus…);
- sarl-eclipse: Eclipse-based editor for SARL;
- sarl-officialdoc: Markdown files of the official documentation of SARL.
1.3. Integration of a Goal-oriented Behavior in the SARL API
The SARL Standard Development Kit (SDK) includes a novel API dedicated to time-based goal-oriented behaviors.
Goal-Oriented Behavior (GOB) is a general term that covers any technique taking into account goals of the agents.
GOB is not supported by a single technique.
This new feature of the SARL API corresponds to a standard GOB that is used in video game applications.
This API equips the agents with an action selection mechanism to select the best action to be realized for archieving one of the agent goals.
Documentation: SARL website
2. Detailed Changes
2.1. SARL Language
2.1.1. SARL Language and Grammar
- Enable the
static
modifier for the members of agent-oriented type declarations. [more details]
- Add automatic variable converters from
Object
type to base/native types. [more details]
2.1.2. SARL Validator
- When the unary minus operator and a call to an extension method are used in the same expression, the operational semantic of this expression may be not the one expected by the developper, e.g.,
-2.abs
. In the example, according to the priorities of the SARL operators, it must be interpreted as -abs(2) == -2
. However, some developper could misinterpret this expression as abs(-2) == 2
. When this type of expression is found in the code, the SARL compiler generates a warning to notify the deveopper that he/she may have not coded the correct expression. [more details]
2.1.3. Java Model Inferrer
- The detector of pure functions that is embedded in SARL may cause a stack-overflow error when it is analysis a recursive function. The code of the detector was rewritten to avoid this error. [more details]
- Several null-pointer exception were fixed in the SARL compiler. [1, more details, 3, 4]
- Do not generate import statements for types that are declared in the default package. [more details]
2.1.4. SARL Batch Compiler
- Add an option for converting the warnings to errors. [more details]
- Add in the SARL API an implementation of the time-based goal-oriented behavior that is used in video games. [more details]
2.3. SARL User Interface
2.3.1. Eclipse Products
- Fixing the classpath containers of SARL and Janus for devel and release versions of the IDE. [more details]
2.3.2. Maven Integration in Eclipse
- Fixing the m2e configurator to properly set the classpath for a SARL project. [more details]
- Integration tests are usually coded in the source folder
src/it
. These folders are now supported by the SARL m2e plugin and automatically created. [more details]
2.3.3. Launching Configurations
- Ensure that the classpaths that are used for launching an application in the Eclipse IDE contain unique bundle entries. [more details]
2.3.4. Preferences
- When the SRE is preinstalled in the Eclipse IDE (as it is the case for Janus), the property page associated to this SRE must not allow to change the name and location of the SRE. A read-only editing page for the preinstalled SRE’s properties has been included in the Eclipse products. [more details]
- When the page for editing the SRE properties cannot be created, an error message is shown in a dialog box. [more details]
2.3.5. Wizards
- In the dialog box that permits to create a SARL Maven project, the box “Create simple Maven project” is now selected by default. [more details]
- When a SARL Maven project is created, the wizard creates by default the all folders for SARL code. [more details]
2.3.6. Other UI Components
- The Xtext editor that is used for editing SARL code is extended to avoid null-pointer exception and the loose of the link between the SARL file and the editor. [1, 2]
- Fixing the condition for enabling the popup-menu action dedicated to the transformation of a regular SARL project to SARL Maven project. [more details]
- The Java package explorer is located in the bottom panel. [more details]
- Add onboarding images in SARL perspectives. [1, 2]
2.4. External Contributions to SARL
- An example of the usage of the new API dedicated to time-based goal-oriented behavior is introduced. [more details]
2.5. Janus Run-time Environment
- Replace the Google Service Manager by a specific service manager. The Google Service Manager launches the services asynchronously with a thread that is not marked as daemon. This thread avoids the SRE to stop its run when no more agent is alive. For solving this problem, a simple service manager is implemented in the Janus SRE [more details]
- The
sarl-maven-plugin
is printing out a warning message when it does not detect a SRE inthe project classpath. This message notifies the developper that it is necessary to use a specific tool for launching the SARL program, e.g. janus
or a launch configuration the Eclipse product. [more details]
- Add an option for converting the warnings to errors. [more details]
2.7.1. sarlc
- Add current directory in the default classpath of
sarlc
. [more details]
- Add an option for converting the warnings to errors. [more details]
2.7.2. sarldoc
- Add current directory in the default classpath of
sarldoc
. [more details]
2.7.3. janus
- Add current directory in the default classpath of
janus
and janusnode
. [more details]
2.8. SARL Documentation
2.8.1. Documentation of the SARL SDK
- Add a reference documentation for the time-based goal-oriented behavior that is usually used in video game agents. [more details]
2.8.2. Documentation of tutorials
- Add tutorial for creating a runnable file for SARL application. [more details]
- Add a tutorial for creating an agent that is deciding of the next actions using a time-based goal-oriented behavior. [more details]
2.8.3. FAQ
- Update the FAQ for fixing the starting issue of the SARL product on MacOS. [more details]
2.8.4. Documentation Generators
- Fixing the SARL doclet for being used on Java 17 platform. [1, 2]
- The new Eclipse plugin developement framework, and Tycho, now enable the directly include Maven artifacts in the target platform. This feature allows to avoid the create of specific P2 repositories for artifacts that are not bundlified. The SARL P2 repository will disappear in short time. [more details]
- Add a specific product for SARL contributors. This products includes standard SARL IDE, Eclipse RCP and Eclipse DSL tools. [1, 2]
- With the introduction of the BOM project for SARL, all the constants accross the SARL projects becomes unified. They are used by Maven for injecting the values in the code or property files. [1, more details]
- Write the information arguments (since, isRemoval) for all the
Deprecated
annotations. These information arguments were introducted in recent Java API. [1, 2]
- Replace the use of the Maven plugin
maven-bundle-plugin
by bnd-maven-plugin
. The first plugin is no more maintained. The second plugin provides more configurations features than the first plugin. [more details]
- Upgrade major libraries:
3. Changes in the Previous Versions