Javy 2S was a preliminary version of Javy2. It has only single player capabilities, a slightly different metaphor and it uses jCOLIBRI to allow students ask for help.
The application was never released to the public but used as an internal resource. Here you can find some videos that show its execution with a brief explanation about them.
Javy execution starts. The video briefly shows the menu that reflects that the student “Guru” has logged in. Game starts with the character standing in a room that represents the frame or activation record of the method being executed. The user walks for a while trough it and tries between two different camera modes.
The student then goes to the terminal which shows that we are currently executing the method “main” in the class “main“.
Student goes on with his walk, and reaches a door. He uses the X-ray vision, and discovers that the door locks the access to other frames (or method execution). The door will open when a method invocation instruction is executed.
Player then goes to a teleporter that will lead us to the room where the method code resides.
Using the teleporter, the student reaches the room that store the method code. The room has no exit but a teleporter that let the student go back to the frame room. When using the terminal in the room, the user see which code has to compile:
int c; c = 5 * 3;
That in JVM assembly code (bytecodes) translates to:
Using the teleporter student goes back to the frame room. At the terminal, we activate the console and type “bipush 5” in order to have that instruction executed, but the terminal informs us that we need to get the resource “5” from the environment.
We hunt some enemies using our gun. These enemies hid the resources we were looking for, so we are now in conditions to try again and execute the bytcodes.
Student opens the console, and types “bipush 5“. The instruction is correctly executed, and a box with an “I” (from integer) appears in the operand stack that lie on the floor. X-ray confirms that the box represents the number five.
Player types then “bipush 3” and the new box appears. Finally “imul” performs the operation, poping the boxes and pushing a new integer box with the number 15.
The last instruction is “istore_1“, that pops the integer from the operand stack and stores it in frame’s first local variable. The variable appears at the other side of the terminal. X-ray reflects that the box represents an integer variable that stores a 15.
The execution of this new exercise starts on the application menu, just as that showed on the exercise above. Student starts at the same point, in the frame room. The video shows how the player gets the code he has to execute. To do that, he walks to the teleporter, activates it and consult the terminal in the method code room.
The code we need to execute is:
Figure f1 = new Circle(1.0);
That reveals that this exercise has a class hierarchy compose, at least, by two differente classes, where Circle inherit from Figure. In order to start the execution, player drives himself to the frame console using the teleporter.
Student must translate the java code above to the bytecodes of the JVM. In this case, the assembly code is as follows:
;; Memory reservation for the new
; Push the reference in the operand stack
;; Constructor invocation
; Duplicate the referente ("this" parameter)
; Push 1.000000 parameter
; Method invocation
invokeespecial Circle <init> (D)V
The video shows the student walking towards the console located in the frame room, using the teleporter of the method room.
Instead of hunting for the resources as done in exercise 1, the student ask the system to execute by itself the next instruction, just to know how to do it. When player types down “next“, the system executes it. Executing “new Circle” creates a reference box in the operand stack (note the “R” on it), then “dup” creates a new box copying the previous one, and finally “dconst_1” push that constant as double (note the “D” on the box).
The video ends with the execution of “invokespecial Circle <init>(D)V” (method <init> from class Circle with the signature “(D)V”), that pop the double parameter and the this reference. The execution of the instruction also opens the door that give us access to the new frame that has been created to execute the constructor. This door is also shown in the video.
jCOLIBRI in Javy 2S
jCOLIBRI, the CBR framework developed in our research group, is smoothly integrated in Javy 2. The application calls jCOLIBRI java main classes from C++ to launch our specific CBR system.
The CBR system is able to answer questions provided in natural language regarding Java and the JVM instruction set. The CBR systems has been made by last year students under the supervision of the research group.
This video shows one of such interaction, where the student ask for help to the system typing down three different questions. If you want to read the answer you definitely need to use the high resolution video.