Patent ID: 8694682

Claim:
A system comprising: a resource-constrained device comprising: memory and one or more processors; an application program having instructions stored in the memory and executable by the one or more processors; an operating system stored in the memory and executable by the one or more processors to expose application program interfaces and runtime structures; and a virtual execution system stored in the memory comprising: an execution engine configured to execute the application program and to facilitate the compatibility of the application program with the operating system; wherein: the virtual execution system exposes a programming model comprising application program interfaces and runtime structures of the virtual execution system; the instructions are augmented by metadata that describe non-functional aspects comprising requirement characteristics of the instructions and characteristics of the operating system, the non-functional aspects including energy consumption information, the metadata having been added to the instructions (1) by a programmer on an instruction level, or (2) automatically for all instructions of a specific type based on profiles; the execution engine is arranged to access the non-functional aspects; and the execution engine is arranged to use the non-functional aspects during the execution of the application program to facilitate a mapping from the programming model to the application program interfaces and the runtime structures of the operating system by using the non-functional aspects to find appropriate application program interfaces and runtime structures of the operating system.