Generating instructions from certain primitives