Introduction
In general, the main implementation technique for SOP is a replacement of design diagrams, textual source code, compiled bytecode, and so on, with one uniform representation - a linked tree of semantic nodes. UML-like view, textual source code, API documentation will be just different renderings of the same tree.
A compilation will be a process of tree rewriting to a state required by target platform. Different semantic meanings will be represented with different types of nodes, and each type will have a unique symbolic name, for instance a variable declaration node will have semantic type Var and variable increment operation will have semantic type Incr. A linked tree means that the tree of nodes will have cross-references, for example, Incr nodes will have references to variable declaration nodes (the variable which the operation increments). The target platform (hardware or a virtual machine) may support Incr operations directly; otherwise a compiler will rewrite Incr operation using others operations (like LoadVar+AddConst+SaveVar). Declaration nodes may have arbitrary attributes (metadata), which may alter compilation process, like [Volatile] or [Atomic] attributes for Var-s.
Adding new attributes and tree rewriting rules for these attributes is one way of language semantic adaptation to your specific project. Alternatively one may define new declaration semantic type VolatileVar or new operation AtomicIncr – a preferred way for high-level abstraction or description of new target hardware.
Ability to define new semantic types, attributes, rewriting rules yields a great flexibility for software developers. But from the other point of view, without careful design of semantic types and standardization of their names between different compilers and target platforms, we’ll quickly get into a complete mess.
Right now, at the very beginning of SOP development, we have a good chance to provide a careful design and standardize core semantic types and attributes for different programming paradigm and multi-paradigm languages (which can be extended by concrete programming languages). In the same way we can define standard semantic node set for generic compilation targets (like current hardware or JVM/.NET virtual platforms), which can be extended by specific processors or customized VMs. Of cause, we also have to provide compilation rules (tree rewriting) from standard high-level language semantic nodes to standard compilation targets.