In today’s interconnected world, an internal layer is required in numerous pieces of software, in order to link outside components or data sources. These layers are also used to bridge different data formats, and make them interpretable for their host programs. In these layers, embedded script languages are commonly adopted, because of their adaptability to different conditions, and especially because of their faster development time. This originates from their less constrained model compared to statically typed, compiled languages. These script languages are also commonly used to define the behavior of agents in simulations, for example in computer games, to define the reactions of non-player controlled characters.
The thesis discusses one of such script languages: Lua. Specifically, the structure and interpretation of its bytecode, and its runtime environment. Furthermore, the thesis discusses an implementation of the language in the Java programming language. This implementation aims to follow the inner mechanics of the original one, while extending its cooperative threading model, to allow preemptive code interruptions. Therefore allowing stricter sandboxing for the embedded language by limiting its code execution time.