1. A programmable logic controller (PLC) for executing a program written in one or more high-level functional languages, the controller comprising a plurality of resources for executing various portions of the program; and at least one memory coupled to the processors; and a compiler for performing functional parallelism by: parsing the program into a plurality of program organization units (POUs); identifying blocks within the high-level functional languages of each POU that include one or more time delays such that operations before and after the time delays can be executed in parallel; creating program fragments as partitioned by the identified time delays; and scheduling the program fragments across the plurality of resources to be executed in parallel.