Using declarative mapping for automatic code generation from SDL and ASN.1

We present the concept of declarative mappings between specification and implementation languages. The main idea of a declarative mapping is to represent the properties of run-time entities rather than their implementations. Transformation of the declarative description into a “real” implementation is postponed until the run-time of the system. We call this additional run-time phase the start-up time of the automatically generated code. Delayed building of run-time structures brings much control of the appearance of the generated code. Declarative approach allows to generate very readable programs which are more attractive for code inspections, debugging and maintenance. Additional degree of control of the generated code can be used to significantly improve its external interfaces so that is can be easily integrated with legacy code or ported to different target platforms and environments. Delaying the transformation of the generated code allows to build very efficient run-time structures. We demonstrate how the concept of declarative mappings can be applied to SDL and ASN.1.