A system for constructing a reconfigurable runtime system used in an automation system using reusable runtime functions, RRFs, comprising: a memory having modules stored thereon; and a processor for performing executable instructions in the modules stored on the memory, the modules comprising: a specialization module configured to execute a specialization operation to configure or customize at least one RRF to satisfy functional requirements of the automation system, wherein each RRF is definable with selectable options for functions and subfunctions, and wherein the runtime system includes at least one scheduling RRF defined such that resources are allocated using dynamic hard non-preemptive scheduling, at least one timing RRF, and at least one logging RRF; a stitching module configured to execute a stitching operation that connects output of the at least one timing RRF to input of the at least one scheduling RRF, allowing timing information output by timing RRF to be input for scheduling RRF; and a stacking module configured to execute a stacking operation that stacks the at least one logging RRF on top of the at least one timing RRF configured as hard real-time, or on top of the at least one scheduling RRF configured as preemptive dynamic scheduler, wherein the at least one logging RRF provides logging capabilities of data generated by the underlying RRFs (224, 225) as layers to create new abstractions, functionality and services; wherein the specialization operation, the stitching operation, and the stacking operation are each executed using one or more keywords according to a runtime specification language, RSL. a memory having modules stored thereon; and a processor for performing executable instructions in the modules stored on the memory, the modules comprising: a specialization module configured to execute a specialization operation to configure or customize at least one RRF to satisfy functional requirements of the automation system, wherein each RRF is definable with selectable options for functions and subfunctions, and wherein the runtime system includes at least one scheduling RRF defined such that resources are allocated using dynamic hard non-preemptive scheduling, at least one timing RRF, and at least one logging RRF; a stitching module configured to execute a stitching operation that connects output of the at least one timing RRF to input of the at least one scheduling RRF, allowing timing information output by timing RRF to be input for scheduling RRF; and a stacking module configured to execute a stacking operation that stacks the at least one logging RRF on top of the at least one timing RRF configured as hard real-time, or on top of the at least one scheduling RRF configured as preemptive dynamic scheduler, wherein the at least one logging RRF provides logging capabilities of data generated by the underlying RRFs (224, 225) as layers to create new abstractions, functionality and services; wherein the specialization operation, the stitching operation, and the stacking operation are each executed using one or more keywords according to a runtime specification language, RSL. a specialization module configured to execute a specialization operation to configure or customize at least one RRF to satisfy functional requirements of the automation system, wherein each RRF is definable with selectable options for functions and subfunctions, and wherein the runtime system includes at least one scheduling RRF defined such that resources are allocated using dynamic hard non-preemptive scheduling, at least one timing RRF, and at least one logging RRF; a stitching module configured to execute a stitching operation that connects output of the at least one timing RRF to input of the at least one scheduling RRF, allowing timing information output by timing RRF to be input for scheduling RRF; and a stacking module configured to execute a stacking operation that stacks the at least one logging RRF on top of the at least one timing RRF configured as hard real-time, or on top of the at least one scheduling RRF configured as preemptive dynamic scheduler, wherein the at least one logging RRF provides logging capabilities of data generated by the underlying RRFs (224, 225) as layers to create new abstractions, functionality and services; wherein the specialization operation, the stitching operation, and the stacking operation are each executed using one or more keywords according to a runtime specification language, RSL.