Modelling a JVM for polymorphic bytecode