0. introduction!

Jatha Check! is an attempt to verify the Java-LISP capabilities of the Jatha package. This is a group project that was delegated to an individual (me) for COMP 205. It also serves as a personal exploration on what LISP is all about. I came into this with zip zilch zero idea of functional languages; I think I came out a little wounded but definitely for the better.

I feel that my head has been wrapped around something completely awesome as a result. My brain actually feels bigger. I wish LISP could do that for my bank account. More on conclusions later though.

So, originally you would be seeing a bunch of crazy source code and snippets in a massive .zip file. As it turns out however, I had some extra time so threw together this website in an attempt to gain in addition to just the grade for this pursuit, the possibility of international fame and glory.

Although my primary audience is my professor Dr. Ronald Hartung, I hope whoever wanders across this may find it of some use; as there was very sparse documentation for Java-LISP with respect to the Jatha libraries.

Ok enough blabbling. Here we go!

1. setup and installation

In order to effectively use this site, you will need to know what tools and setup I used for my project. The following is a brief list compiled with their respective download links. The list is roughly the chronological order of download and installation on the system. It should be sufficient to get everything mirrored appropriately should you wish to retrace all my steps in the verification of Jatha.

a. Netbeans 5.5 - http://www.netbeans.org
b. Jatha Library 2.7.1 - http://jatha.sourceforge.net
c. Common Lisp 2.41 - http://clisp.cons.org
d. Textpad 4 - http://www.textpad.com

What is really cool is the fact that this entire project is operating system independent due to the java runtimes. You can run windows, linux, or even solaris should you wish to replicate the verification. The Netbeans IDE was chosen because it is what I am most comfortable with from a professional background. So anyways, as specified, the first step is to download and install everything in that list. Make sure you dump the Jatha Library .jar file into your classpath.

2. the jatha library

So you have the software requirements downloaded and installed. The next step is to understand that there are two ways of running Jatha. The first way, which this project does not focus upon due to obvious reasons is to simply type:

   java -classpath jatha.jar org.jatha.Jatha

This runs the Jatha builtin GUI so you can immediately begin executing and evaluating LISP via Java. Of course this somewhat defeats the purpose of a verification and ultimately would result in a shortwinded project.

So we will be taking the second path, the path of using Jatha from within a custom class or some other java program. In this case, the following is the key line at the beginning of any given java class to ensure the library is available:

   import org.jatha.Jatha;

Granted for the puroposes of grading on the supplied test case within this project, one could certainly just use the GUI to copy/paste and execute for results; it is just as valid to run the code with the respective jatha class constructors. Choice, choices, choices.

3. into the fray

Objective 1: verify lisp easy cheesy basics

Hey we have to start somewhere, and atoms seem to be the perfect place to pickup this verification crusade. Batter up, Symbols, Numbers, Conses, Lists, and Functions. Check it out!.

Objective 2: verify lisp medium difficulty constructs

Is it getting warm in here or just me? Let us make sure Printing, Sorting, Equality, Binding, Scope, Arrays, and Strings work as intended. It is getting complicated! Check it out!.

Objective 3: verify the mind blowing crazy stuff

Protective gear is highly recommended: Structures, Setf, Conditionals, Recursion, Iteration, and Lambda! The sky is falling! Check it out!.

4. summary of results

So it would appear Jatha rocks!

From the test cases and observations, it would seem that Jatha does indeed contains a large subset of Common LISP and serves as a fairly complete Java library. The subset of Common LISP implemented is large and including most of the datatypes and their associated methods. The API allows programmatic access to LISP from Java, either using an eval() method or using Java methods. Additional LISP primitives can be written in Java and registered at runtime to be used in the LISP interpreter.

From wikipedia: Lisp is a family of computer programming languages with a long history and a distinctive fully-parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today. Today, the most widely-known general-purpose Lisp dialect is Common Lisp.

Lisp was originally created as a practical mathematical notation for computer programs. The name Lisp derives from \"List Processing\". Linked lists are one of Lisp languages' major data structures, and Lisp source code is itself made up of lists.

This project attemped to replicate some of the common as well as uncommon lisp constructs in java via the jatha library. The following LISP constructs were tested under Jatha and verified to be working!

Check out the previous section to see detail test cases and definitions.

  1. Symbols
  2. Numbers
  3. Conses
  4. Lists
  5. Functions
  6. Printing
  7. Sorting
  8. Equality
  9. Arrays
  10. Strings
  11. Structures
  12. Booleans
  13. Conditionals
  14. Funcall Apply
  15. Iteration
  16. Recursion
  17. Iteration
  18. Lambda

5. final reflection

What a ride...

It's been a great time, and there were plenty of challenges along the way. To briefly reiterate:

When this project first started, I had no clue about functional programming and the idea of investigating not only a new language but a completely new paradigm of programming was very daunting. I began by outlining a rough sketch of what I intended to focus on to acquire the primary objective: show that Jatha is a valid java library implementing LISP functions.

It was very difficult to stay organized and from hindsight the following sequence was good, but not optimal. This is what I did to approach this project and implement:

1. outline objectives
2. setup basecamp site for status tracking
    - http://chend.projectpath.com
    - user/hartung : pass/hartung
3. setup and install software
4. learn commonLISP basic constructs
5. review Java
6. experiment with Jatha GUI
7. proceed with test senarios
8. determine organization
9. code / review
10. gather results and document
11. publish findings
12. create site frontend
13. create site codeend
14. publish
15. update status on basecamp / milestones ongoing
16. document conclusions
17. construct final reflection

The schedule was adhered to fairly well, and partially the reason why I was able to produce this frontend to present my work is because deadlines were followed very strictly. Only a few all-nighters were applied sparingly through the project term. I still feel one of the more difficult challenges, if not the most tedious and ardorous was learning LISP itself. Functional programming just felt like it was forcibly requiring one to think sideways.

So here it is, my final report inclusive with this site and code tests. Please be sure to check out the 'into the fray' section as it contains the bulk of the work.

6. administrative

Looking back...


Thanks for suggesting this project topic to me; it has been a pretty wild ride getting introduced to functional programming. I honestly would have never picked up LISP on my own accord. As such this exercise has given me a fresh perspective on some of the cool things that are out there beyond the standard c++/java. I am interested in pursuing this further but with more of an application slant; perhaps writing an actual LISP application that can be useful beyond the vanilla functions. At any rate, thanks again for proposing this project.


[ dchen | chen31@franklin.edu ]