Ldmc — The Ladder-Typed Data Morphing Compiler
Given a description of input/output types, ldmc generates code for transforming between different data representations of the same abstract type.
Based on ladder types, which enable the disambiguation of lower-level representations while keeping the higher-level, abstract type structure intact, ldmc takes a library of primitive data transformation routines (morphisms) and tries to compose them into a path of morphisms such that the requested data transformation problem can be solved. This works by inducing a graph of morphisms (see picture below), inside which ldmc searches for the shortest path between the given input and output type.
Example: To solve the data transformation problem given by the type description
morph_angle1: Angle ~ Degrees ~ ℝ ~ native.Float64
--> Angle ~ Radians ~ ℝ ~ native.Float64
ldmc creates the following graph:
