reference implementation for mobile platform code generator