A compiler for IEC61131-3 language