KoiViMa (괴피마) stands for “Korean Inspired Virtual Machine”. It is an experimental object oriented application virtual machine written in the Java programming language.

When I started to learn Korean, I was delighted by the clean structure of the language. The subject object verb (SOV) sentence order is just like the famous inverse polish notation, which is in fact the natural sentence order for many people on this earth.

I thought it would be nice to have a programming language that's a bit like Korean. Unfortunately crafting a new language and building an interpeter is a tedious task. So I decided, there must be an easier way.

One way to get around the difficulties in compiler design is the use of a virtual machine, like Java or Microsoft's .net environment. Virtual machines usually reveal their own instruction set and run some form of intermediate code, for example byte code, freeing the programmer from the obstacles of a real world processor's instruction set.

However, the common virtual machines are still rather complicated and building a compiler on top of a virtual machine is still an adventure with an unknown ending.

So I created a simple, yet powerfull virtual machine, inspired by the Korean language. The result is KoiViMa. It is small enough to be understood in a few days, but a customizable execution context and operator set make it extremely flexible.

KoiViMa is most suited for experimental and educational purposes. It's main features are:

  1. Object oriented: Not only is KoiViMa itself written in an object oriented language. Even the code it runs consists of objects. Every single instruction and even data values are objects.

  2. Extensible: Each instruction for KoiViMa is represented by an operator, which is a Java class. Adding a new operator is simply done by adding a class to the specific “operators” directory.

  3. Pluggable Execution context: A program in KoiViMa runs in an execution context, representing some form of machine. The execution context is a wrapper for the code itself, the stack, different kinds of memory, registers and so on. The execution context can easily be customized allowing KoiViMa to represent different kinds of computers.

  4. Self adapting compiler: KoiViMa comes with a compiler that updates it's instruction set by searching the “operators” directory. It is capable to compile code for different instruction sets and execution contexts.