ModelDriven / Alf-Reference-Implementation

Open-source implementation of the Action Language for fUML (Alf) specification.
30 stars 2 forks source link

A collection function invocation may cause a mapping error #59

Closed seidewitz closed 6 years ago

seidewitz commented 6 years ago

When a collection function invocation is invoked, the mapping is optimized by replacing the collection function with the corresponding underlying sequence function. A reference to this sequence function is obtained from the root namespace cache, and the reference is then mapped to the opaque behavior implementing the library function. However, the logic for mapping the sequence function uses getElement() to get the mapped element, which does not trigger actual mapping if it has not already happened. If the mapping for the needed sequence has not been otherwise been triggered, then the returned element will be null, resulting in a mapping error.

seidewitz commented 6 years ago

Fixed in v1.1.0c.