use c style interface instead of c++ class for virtual machine.