ATL Standard Library
< To: ATL
The ATL standard library consists of the types built into ATL and of their operations. It is based on the OCL 2.0 standard library as described in chapter 11 of the UML 2.0 OCL Final Adopted specification. However, some extensions have been made (see ATL_FAQ#How_close_is_ATL_navigation_language_from_the_OCL_2.0_standard.3F).
This page describes how the ATL standard library is implemented in the two ATL Virtual Machines (VMs) available from Eclipse.org.
EMF VM Implementation
In EMFVM, the ATL standard library is mostly implemented in the ExecEnv Java class. Most types are not wrapped, and Java objects are used directly in many cases.
Regular VM Implementation
In the Regular VM, Java objects are wrapped by specific objects (instances of subclasses of ASMOclAny). In the description that follows, for each type T a CVS link is given to the Java class implementing T in the Regular ATL virtual machine. In each class, operations available from the ATL language (as opposed to implementation-specific methods) are represented as Java methods located below the following comment:
// Native Operations Below
In some of these classes, there are two additional comments delimiting:
- Operations specified by OCL 2.0:
// OCL Operations
- Operations added in ATL:
// Additional Operations
All of these Java classes are located in the org.atl.engine.vm.nativelib package.
When the description given here is not complete enough, it is possible to go and read the Java implementation. This way, it is possible to know, for instance: the list of available operations and their semantics (e.g. operation String.regexReplaceAll(a : String, b : String) is implemented in ASMString using java.lang.String.replaceAll(String a, String b)).
The Collection OCL type is implemented by the ASMCollection (deprecated version) Java class. There is no underlying Java type for this abstract type. However, all concrete collection types are implemented by sub-classes of java.util.Collection.
The types described in this section are not part of the OCL 2.0 specification.