/jabyinja

My Eötvös Loránd University (Computer Science BSc.) Thesis

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

Ja(va) By(tecode) In(terpreter) (in) Ja(va)

My BSc thesis work for Eötvös Loránd University's Computer Science curriculum

Prerequisities

Building the code

Normally:

$ mvn package
$ java -jar target/jabyinja-*.jar <optional class file>

With Just:

$ just co
$ java -jar target/jabyinja-*.jar <optional class file>

Generating a PDF from the thesis

Ignore any warnings

Normally:

$ cd thesis/
$ pdflatex thesis.tex
$ bibtex thesis
$ pdflatex thesis.tex
$ pdflatex thesis.tex

With Just:

$ just t

Usage

Without specifying any files, the program will try to interpret Main.class, located in the same directory as from where you ran the program from. If you do intend to specifcy a given file, do it with a single argument, where you name the .class file (i.e. if your file is named Example.class, you write Example.class NOT Example)

Number precision

Jabyinja

BYTE SHORT INTEGER LONG FLOAT DOUBLE
MAX 127 32767 2147483647 9223372036854775807 3.4028235E38 1.7976931348623157E308
MIN -128 -32768 -2147483648 -9223372036854775808 1.4E-45 4.9E-324
0xCA -54 -54 -54 -54
0xFE -2 -2 -2 -2
0xBA -70 -70 -70 -70
0xBE -66 -66 -66 -66
0xCAFE -2 -13570 -13570 -13570
0xBABE -66 -17730 -17730 -17730
0xCAFEBABE -66 -17730 -889275714 -889275714
0xCAFEBABECAFEBABE -66 -17730 -889275714 -3819410105351357762
PI (6) 3.141592 3.141592
PI (7) 3.1415925 3.1415926
PI (6) ^ 2 9.8696 9.869600294464002
PI (6) ^ 3 31.006258 31.006257328285756
PI (15) 3.1415927 3.141592653589793
PI (16) 3.1415927 3.141592653589793
PI (15) ^ 2 9.869605 9.869604401089358
PI (15) ^ 3 31.006279 31.006276680299816

/usr/bin/java

BYTE SHORT INTEGER LONG FLOAT DOUBLE
MAX 127 32767 2147483647 9223372036854775807 3.4028235E38 1.7976931348623157E308
MIN -128 -32768 -2147483648 -9223372036854775808 1.4E-45 4.9E-324
0xCA -54 -54 -54 -54
0xFE -2 -2 -2 -2
0xBA -70 -70 -70 -70
0xBE -66 -66 -66 -66
0xCAFE -2 -13570 -13570 -13570
0xBABE -66 -17730 -17730 -17730
0xCAFEBABE -66 -17730 -889275714 -889275714
0xCAFEBABECAFEBABE -66 -17730 -889275714 -3819410105351357762
PI (6) 3.141592 3.141592
PI (7) 3.1415925 3.1415926
PI (6) ^ 2 9.8696 9.869600294464002
PI (6) ^ 3 31.006258 31.006257328285756
PI (15) 3.1415927 3.141592653589793
PI (16) 3.1415927 3.141592653589793
PI (15) ^ 2 9.869605 9.869604401089358
PI (15) ^ 3 31.006279 31.006276680299816

Thankfully, they are the exact same

JVM Instructions checklist

OPCODE IMPLEMENTED?
NOP
ACONST_NULL
ICONST_*
LCONST_*
FCONST_*
DCONST_*
BIPUSH
SIPUSH
LDC*
ILOAD*
LLOAD*
FLOAD*
DLOAD*
ALOAD*
IALOAD
LALOAD
FALOAD
DALOAD
AALOAD
BALOAD
CALOAD
SALOAD
ISTORE*
LSTORE*
FSTORE*
DSTORE*
ASTORE*
IASTORE
LASTORE
FASTORE
DASTORE
AASTORE
BASTORE
CASTORE
SASTORE
POP*
DUP*
DUP2*
SWAP
*ADD
*SUB
*MUL
*DIV
*REM
*NEG
*SHL
*SHR
*USHR
*AND
*OR
*XOR
IINC
I2*
L2*
F2*
D2*
LCMP
FCMP*
DCMP*
IF*
GOTO
JSR
RET
TABLESWITCH
LOOKUPSWITCH
*RETURN
*STATIC
*FIELD
INVOKE*
INVOKEDYNAMIC
NEW
NEWARRAY
ANEWARRAY
ARRAYLENGTH
ATHROW
CHECKCAST
INSTANCEOF
MONITOR*
WIDE
MULTIANEWARRAY
IF*NULL
GOTO_W
JSR_W