(kin)

(kin) is a relative of common lisp for the JVM.

(kin) grew out of a JVM bytecode manipulation library, and is in part a response to the many postings on comp.lang.java.programmer about macro languages, expression evaluation and interpreters.

If you're going to write a macro language for an application, then it's going to end up a lot like lisp. So kin is intentially strongly related to common lisp. If your application is a set of assembler tools, then you might also just end up with a lisp compiler.

(kin:packages)

There are four main parts of (kin) as follows:

(kin-lang:eval)

The interpreter in (kin) is based on Java's reflection API and is designed for simple prototyping work. All Java objects may be manipulated as first class objects in (kin).

Some examples of using the (kin) interpreter can be seen at swing prototyping.

(kin-lang-assembler:assembler)

This was the first part of (kin) that was written; essentially it is a set classes which represent JVM bytecode and allow manipulation of JVM assembler.

The assembler implemention in kin is at a slightly higher level of abstraction than that in BCEL (Byte Code Engineering Library) and is designed for symbolic manipulation and graph based transformations, instead of BCEL's use of the visitor pattern for lower-level operations.

An example of using the (kin) interpreter to drive the assembler can be seen at bytecode assembler.

(kin-lang-assembler-ui)

This is most of a UI for inspecting Java bytecode. This got so far then was largely superseded by the facilites you get using the interpreter to query the assembler library, but will be finished off as it has some useful visualisation features, and runs some unit tests on the assembler libraries.

The UI also includes a sub-libary for layout of swing components based on the OS X Aqua style guide.

(kin-lang-math:bignum)

Initially (kin) used java's BigInteger class. Being bored one day I ported some Scheme to C++ and accidently came up with a representation that's nearly twice as fast when implemented in pure Java.

(kin:test-beds)

A few bits and pieces of (kin) that work (kinda):
62-bit packed arithmetic algorithms test skeleton

Pete Kirkham

2003-08-13.

SourceForge.net Logo