Linked Lists for Real-Time Java

Thursday, May 16, 2002

Tested the iterators for DoublyLinkedList and SinglyLinkedList. Both look okay, I'm pretty sure.
posted by Amy Sia 5:44 PM

Okay, so we have switched gears, simplified some things, and have since come up with a SinglyLinkedList for the HashMap people.
DoublyLinkedList is now implemented as well.

Usage patterns for List:
Basically, the List is good for inserting (one can append and prepend in constant time) and removing elements at the beginning of the list.
The SinglyLinkedList uses a forward iterator, and with this iterator one can find elements, set elements in the list, and remove them, and insert elements in the middle of the list. The DoublyLinkedList can have both a forward iterator, but also a reversible iterator. This means the iterator can traverse the list backwards or forwards.
Obviously, iteration gets bad for large data sets when you want to find a certain element in the list (and delete it, or whatever). Basically, accessing and deletion can be considered bad if it is done with elements inside the list.

We haven't done any testing yet to time anything, so we have no clue how long it would take worst case to find an element by using an iterator. We will try tomorrow.
posted by Amy Sia 4:34 PM

Monday, May 13, 2002

To run Morgan's tool, I had to take out the package stuff for the classes. To keep RTException under control, I created them as a static class -- it's more efficient that way.
Morgan's tool is still not working for the new Tester.java (the version for the RTLinkedList) -- one possibility is due to the inner classes. I will look into this a little further tomorrow.
posted by Amy Sia 5:29 PM

Completed the API for our RTLinkedList, and put it in JavaDoc format. Sweet, eh?

The link is available to the right, and here:
http://www.cs.wustl.edu/~aes1/RTLinkedList/RTLinkedList.html
posted by Amy Sia 5:19 PM

Wednesday, May 08, 2002

How I was able to run Morgan's tool on our program Tester.java:
cp /project/cytron/mdeters/scopes/scopes.conf .
cp /project/cytron/mdeters/scopes/scopeclasses .
jikes Tester.java
myjava -classpath /usr/java/lib/classes.zip:/pkg/java_1.2/jre/lib/rt.jar:.:.. -rcgc -logconf scopes.conf -logfile Tester.log Tester
java -jar /project/cytron/mdeters/scopes/scopefinder.jar -a ScopeAssignment.aj Tester.log
setenv CLASSPATH /project/danzon/pkg/aspectj/current/lib/aspectjrt.jar:.:/pkg/java_1.4.0/jre/lib/rt.jar
/project/danzon/pkg/aspectj/current/bin/ajc -argfile scopeclasses Tester.java
java Tester

Make sure you have these set up in your ~/.cshrc.mine file (and call 'source ~/.cshrc' when you are done!):
alias myjava /project/cytron/mdeters/bin/myjava
setenv JIKESPATH "/pkg/java_1.4.0/jre/lib/rt.jar:.:..:../.."
setenv CLASSPATH ".:..:/pkg/java_1.4.0/jre/lib/rt.jar"
setenv CLASSPATH_REPO /project/cytron/mdeters/jdk1.1.8-repository/build/classes:/pkg/java_1.4.0/jre/lib/rt.jar
posted by Amy Sia 11:15 AM

Tuesday, May 07, 2002

Today we attempted to use Morgan's scope finder tool on our Tester.java. Morale low. :-( Hopefully we can get everything set up in the next couple of days.

First there were issues with using Java 2's LinkedList class (or anything in java.util) while running a scope finder based on the Java 1.1.8 JVM. Right now there are issues with our Tester.log and running the scopefinder. Seems we get a lot of "count: xx" output, which indicates that a weird message is being skipped. However, we don't know what the message is. It's all a big mystery. I wonder if we can get this to work the way it's supposed to. It looks like it's going to take a while. Sigh...
posted by Amy Sia 5:41 PM

A good command to remember. It helps us use the LinkedList class while using Morgan's tool:
myjava -classpath /usr/java/lib/classes.zip:/pkg/java_1.2/jre/lib/rt.jar:.:.. -rcgc -logconf scopes.conf -logfile Tester.log Tester
posted by Eric Fesenmaier 5:15 PM

Monday, May 06, 2002

Due to our inital CVS setup snaffoo's(sp?), I'd recommend using:
cvs checkout -P LinkedList
cvs update -P LinkedList

unless you want to get Eric's empty .* directories.

Not the smartest thing in the world, but that was pretty stupid. Blame David.
posted by Amy Sia 4:40 PM

We are now learning CVS and will learn about morgan's timing tool soon. Some important CVS commands we might need later:
--setenv CVSROOT /project/cytron/mdeters/repo
--setenv CVSEDITOR [editor]

--cvs import
--cvs checkout
--cvs update
--cvs add
--cvs commit
posted by Eric Fesenmaier 1:24 PM

We wrote our first bit of test code for Linked List. It's pretty basic.
http://www.cs.wustl.edu/~ecf1/Tester.java
posted by Amy Sia 9:51 AM

Friday, May 03, 2002

Eric and I tried to come up with some ideas for our implementation of a doubly-linked list and the problem of removing an element from the list in real-time. So far, none of our ideas have worked. Eric had this idea about adding a hashtable that references the entries by hashing the object. This way when a delete is called we could reference the list entry in the hashmap and delete it that way. However, collisions and resizing become additional problems, plus the waste of space.

Everything is a trade-off, and we're not sure what's more important -- time, space, flexibility, etc.

Right now we're looking into a doubly-linked list with weak references and seeing if better methods of garbage collection could possibly help us. We're researching stuff on the web in our search.
posted by Amy Sia 3:23 PM

I meant this is not a test!
posted by Eric Fesenmaier 2:03 PM

This is just a test!
posted by Amy Sia 2:01 PM

Powered by Blogger

Description
A progress log of our implementation of a real-time-ready linked list for Java.

Related Work
Java LinkedList API
Our LinkedList notes
Tester.java
RTLinkedList API
RTLinkedList notes

Archives
current