ASM generator