A code generator for tupleN in LMS