1.1. Mapping of FMSL Constructs to Equivalent Java Constructs

1.1.1. Atomic Types

1.1.2. Collapsing Singleton Types

1.1.3. Composite Types

1.1.4. Operations

Independent of signature conversion, every FMSL operation and function translates to a non-static, public Java method. The signature conversion determines the class to which the method belongs. Discussion of the different cases of signature conversion follow.

1.1.4.1. Collection-Class Methods

Consider operations of the following form:

op O(C, x1:X1*>, ..., x1:X0>) -> C
where C is a collection object defined as
obj C is Y*;
for any type Y. There can be zero or more xi arguments, of any types.

Any such operation O translates into a method o of the following form:

class C {

...
public void
o(X x)
{

}

}

If class C exists at the time that m is derived, then the declaration of m is appended after any existing public methods of C, but before any protected or private methods, and before any data fields of C.

If class C does not exist at the time that o is derived, then it is created, and m is made its only method.