Functional Meta-types

Overview

A small number of meta-types are defined that correspond to functional programming primitives, otherwise known as 'closures', 'lambda expressions' and so on. These concepts are supported in most modern programming languages now, and the types defined here are intended to provide a minimal formal basis to enable other openEHR specification to defined function-related elements. Since UML does not contain native functional elements, the semantics here are approximated using normal class facilities.

The following illustrates the functional package.

BASE foundation types.functional
Figure 1. base.foundation_types.functional Package

Two key abstractions are required, namely 'function as a type', and 'tuple', which enables arguments to be formalised. To provide a 'function' type, a 'routine' type is also required. For completeness, a 'procedure' type is also defined. The 'tuple' type is defined as a generic meta-type whose descendants may additionally define any number of generic parameter types, corresponding to a type list.

Class Definitions

Unresolved include directive in modules/foundation_types/pages/functional.adoc - include::../UML/classes/routine.adoc[]

Unresolved include directive in modules/foundation_types/pages/functional.adoc - include::../UML/classes/function.adoc[]

Unresolved include directive in modules/foundation_types/pages/functional.adoc - include::../UML/classes/procedure.adoc[]

Unresolved include directive in modules/foundation_types/pages/functional.adoc - include::../UML/classes/tuple.adoc[]

Unresolved include directive in modules/foundation_types/pages/functional.adoc - include::../UML/classes/tuple1.adoc[]

Unresolved include directive in modules/foundation_types/pages/functional.adoc - include::../UML/classes/tuple2.adoc[]