Skip to content

Commit 2835371

Browse files
author
Eric Bodden
committed
Tagging the 2.3.0 release of the Jasmin project.
1 parent 0d65823 commit 2835371

File tree

124 files changed

+16279
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+16279
-0
lines changed

trunk/INSTALL

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
December 3, 2004 - Jennifer Lhotak
2+
To Compile Jasmin:
3+
4+
We've made a new build.xml file so Jasmin can be built using ant.
5+
6+
The first time you run it it will ask you to copy ant.settings.template to ant.settings and to set the variables in that file. (In particular the jav_cup.jar variable)
7+
8+
At this time the only dependency is some version of Java Cup. Note we no longer distribute Cup with Jasmin. A maintained and up-to-date version of Cup is distributed with Polyglot which is also a dependency of Soot (just like this version of Jasmin). Therefore we recommend that you use that version of Cup. You may set the java_cup.jar variable to be a path to the entire Polyglot jar distributed with Soot and everything will work fine.
9+
10+
To run ant to compile Jasmin use:
11+
12+
$ ant
13+
14+
To build a Jasmin jar, that will be put in the lib directory use:
15+
16+
$ ant jasmin-jar
17+
18+
Additionally, you may compile the individual parts of jasmin, jas and scm by using:
19+
20+
$ ant jas
21+
22+
or
23+
24+
$ ant scm
25+
26+
27+
January 25, 2001 -PL
28+
updated May 3, 2001 - PL
29+
30+
How to compile jasmin:
31+
32+
The UNIX shell-script bin/compile_all.sh ('sh ./bin/compile_all.sh')
33+
should be able to recompile all classes under any JDK. A user can
34+
compile each constituent package manually by following below instructions.
35+
36+
- compile jas (following instructions are from lib/jas/src/compile.sh)
37+
* from lib/jas/src directory,
38+
* create empty classes subdirectory
39+
* javac -d classes jas/*.java (ignoring warnings)
40+
* cd scm
41+
* export CLASSPATH=$(JASMIN_ROOT)/lib/jas/src/classes
42+
* javac -d . autogen/autogen.java
43+
* java -cp .:$CLASSPATH autogen
44+
* cd ..
45+
* javac -d classes scm/*.java
46+
- copy jas class files to the classes directory
47+
* cp -a $(JASMIN_ROOT)/lib/jas/src/classes/* $(JASMIN_ROOT)/classes
48+
49+
- compile java_cup and java_cup runtime ( lib/cup/compile.sh )
50+
* cd $(JASMIN_ROOT)/lib/cup
51+
* create empty classes subdirectory
52+
* javac -d ./classes src/java_cup/*.java src/java_cup/runtime/*.java
53+
* cp ./classes/* ${JASMIN_ROOT}/classes
54+
55+
- (optional) compile jasmin's javacup parser
56+
* first, add java_cup package to the class path
57+
* export CLASSPATH=${JASMIN_ROOT}/classes:${CLASSPATH}
58+
* cd ${JASMIN_ROOT}/src
59+
* (mkdir classes; cd classes)
60+
* java java_cup.Main < ../jasmin/parser.cup
61+
* mv sym.java parser.java ../jasmin
62+
63+
- compile jasmin ( src/compile.sh )
64+
* export CLASSPATH=$(JASMIN_ROOT)/classes
65+
* cd $(JASMIN_ROOT)/src
66+
* javac -d classes jasmin/*.java
67+
* mv classes/* ${JASMIN_ROOT}/classes

trunk/README

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
Jasmin README file May 28, 2004, Patrick Lam
2+
3+
Welcome to Jasmin version sable-1.2.7.
4+
5+
This is a specialized version of jasmin which is used as a back end for the
6+
Soot framework.
7+
8+
Note that with permission from Jonathan Meyer, this package is distributed
9+
under the GNU Library General Public License and so can be distributed with
10+
Soot.
11+
12+
13+
Original Jasmin README:
14+
---------------------------------------------------------------------------
15+
16+
Jasmin README file 1 March 1997, Jonathan Meyer
17+
18+
Description
19+
-----------
20+
Welcome to Jasmin version 1.06.
21+
22+
Jasmin is a Java Assembler Interface. It takes ASCII descriptions for Java
23+
classes, written in a simple assembler-like syntax, and using the Java
24+
Virtual Machine instruction set. It converts them into binary Java class
25+
files suitable for loading into a Java interpreter.
26+
27+
Jasmin was written as the companion to the book "Java Virtual Machine",
28+
published by O'Reilly, written by Troy Downing and myself.
29+
(See http://www.ora.com/catalog/javavm/).
30+
31+
If you want to know more about what Jasmin is, why I wrote Jasmin,
32+
or what kinds of uses Jasmin can be put to, look at doc/about.html.
33+
34+
Home Page
35+
---------
36+
Check out the Jasmin home page at:
37+
38+
http://cat.nyu.edu/meyer/jasmin
39+
40+
this will tell you the latest news on Jasmin - in particular, make sure that you
41+
have the most recent version, since I'm sure to add bells and whistles over time!
42+
(For example, I plan to rewrite the parser in Jasmin so that it does more error
43+
checking). Also, you can register on this page to receieve news about new releases
44+
and bug fixes.
45+
46+
Requirements
47+
------------
48+
Jasmin is written in Java, so it should be fairly straightforward to get it
49+
set up and running in your environment.
50+
51+
I have tested Jasmin with the Sun JDK 1.0 on Solaris and Windows 95, and with J++
52+
on Windows NT.
53+
54+
In the bin directory are scripts for running Jasmin on Unix systems and batch files
55+
for Windows. These may need some tailoring on your system.
56+
57+
Installation Instructions
58+
-------------------------
59+
Below you will find installation instructions for:
60+
61+
-- Windows 95/NT and J++
62+
-- Windows 95/NT and Sun's JDK or Symantec Cafe
63+
-- Unix and the Sun JDK
64+
65+
Jasmin should run on other platforms that have Java installed. Look at the scripts
66+
in the bin directory to get an idea of how Jasmin is started.
67+
68+
A version of the classes for Jasmin in ZIP format is available. See the Jasmin
69+
home page (http://cat.nyu.edu/meyer/jasmin).
70+
71+
******** Windows 95/NT and J++ ********
72+
73+
-- Basic Installation
74+
75+
1. Extract the jasmin distribution files and place them in C:\JASMIN
76+
77+
2. Add C:\JASMIN\BIN to your path by editing your AUTOEXEC.BAT.
78+
79+
Then you run Jasmin using the vjasmin command (as show below).
80+
81+
-- Notes
82+
83+
Under J++, you use jvc (instead of javac) to compile Java code, and jview (instead
84+
of java) to run it.
85+
86+
If you want to maintain the Jasmin files somewhere other than C:\JASMIN,
87+
first move the files to the location you want to use, then edit the bin\vjasmin.bat
88+
script and change the JASMIN variable so that it points to the jasmin directory.
89+
Then add the jasmin bin directory to your path by editing your AUTOEXEC.BAT.
90+
91+
-- Trying Jasmin out
92+
93+
If you are using Jasmin with Visual J++ on Windows 95/NT, you can quickly try out
94+
Jasmin by installing the files in c:\jasmin and then typing to a DOS command prompt:
95+
96+
cd c:\jasmin
97+
vjasmin examples\HelloWorld.j
98+
99+
After running Jasmin, you should find the compiled HelloWorld.class file
100+
in the examples directory.
101+
102+
You can then run the HelloWorld program by doing:
103+
104+
jview examples.HelloWorld
105+
106+
******** Windows 95/NT and Sun's JDK or Symantec Cafe ********
107+
108+
I have run Jasmin under Windows 95 using Symantec Cafe (it probably works
109+
under other implementations of the JDK as well).
110+
111+
-- Basic Installation
112+
113+
1. Extract the jasmin distribution files and place them in C:\JASMIN.
114+
115+
2. Add C:\JASMIN\BIN to your path by editing your AUTOEXEC.BAT.
116+
117+
-- Notes
118+
119+
On some systems, you may need to add the C:\JASMIN\CLASSES directory to your
120+
CLASSPATH variable. CLASSPATH is either defined in C:\AUTOEXEC.BAT (JDK) or
121+
or C:\Cafe\BIN\SC.INI (Cafe version 1.2 and later).
122+
123+
If you want to maintain the Jasmin files elsewhere in your directory hierarchy,
124+
first move the files to the location you want to use, then edit the bin\jasmin.bat
125+
script and change the JASMIN variable so that it points to the jasmin directory.
126+
Then add the jasmin bin directory to your path by editing your AUTOEXEC.BAT.
127+
128+
-- Trying Jasmin Out
129+
130+
If you are using Sun's JDK or Symantec Cafe on Windows 95/NT, you can try Jasmin by
131+
installing the files in c:\jasmin and then typing to a DOS command prompt:
132+
133+
cd c:\jasmin
134+
jasmin examples\HelloWorld.j
135+
136+
After running Jasmin, you should find the compiled HelloWorld.class file
137+
in the examples directory.
138+
139+
You can then run the HelloWorld program by doing:
140+
141+
java -verify examples.HelloWorld
142+
143+
Its a good idea to use the '-verify' option for Java programs compiled with
144+
Jasmin, since this will catch any structural violations you have in
145+
your code.
146+
147+
******** Unix and the Sun JDK ********
148+
149+
I've tried Jasmin on SGIs and Suns running Sun's JDK 1.02. It should work on
150+
other Unix boxes with the JDK as well.
151+
152+
-- Basic Installation
153+
154+
1. Extract the jasmin distribution files and place them in /usr/local/jasmin.
155+
156+
2. Add /usr/local/jasmin/bin to your path, by editing your .cshrc (or equivalent).
157+
158+
-- Notes
159+
160+
If you want to maintain the Jasmin files somewhere other than /usr/local/jasmin,
161+
first extract the files, then edit the bin/jasmin script and change the JASMIN variable
162+
so that it points to the jasmin directory. Then add the Jasmin bin directory to
163+
your path.
164+
165+
-- Trying Jasmin Out
166+
167+
On Unix systems with the JDK installed, change into the directory containing
168+
this readme file, then type to a shell prompt:
169+
170+
jasmin examples/HelloWorld.j
171+
172+
After running Jasmin, you should find the compiled HelloWorld.class file
173+
in the examples directory.
174+
175+
You can then run the HelloWorld program by doing:
176+
177+
java -verify examples.HelloWorld
178+
179+
Its a good idea to use the '-verify' option for Java programs compiled with
180+
Jasmin, since this will catch any structural violations you have in
181+
your code.
182+
183+
184+
Problems/Questions
185+
------------------
186+
If you have a problem with Jasmin, please visit the Jasmin home page at:
187+
188+
http://cat.nyu.edu/meyer/jasmin
189+
190+
this will give you instructions on how to submit problem reports. There is
191+
also a FAQ on this page that you could check to see if your problem has already been
192+
encountered.
193+
194+
Where Next
195+
----------
196+
After trying Jasmin out, have a look at the HelloWorld.j source, and try
197+
compiling and running the other examples.
198+
199+
There is documentation for Jasmin in the doc directory. You should probably
200+
start with the 'guide.html' document.
201+
202+
If you decide you want to use Jasmin on files in other directories, see the
203+
Installation Instructions below.
204+
205+
Rebuilding Jasmin
206+
-----------------
207+
The bin/compile.sh script is what I use to rebuild Jasmin under Solaris. I've
208+
included it for your enjoyment, though your mileage may vary.
209+
210+
Java API to Jasmin
211+
------------------
212+
In the doc/api directory is a description of some of the public classes in the
213+
Jasmin package. You may find this a more appropriate hook to the Jasmin assembler in
214+
your application. Note that this API is under revision and may change (but its very
215+
small and basic, so changes should be easy to adapt to).
216+
217+
Files
218+
-----
219+
The following files are included in this distribution:
220+
221+
README - this file
222+
bin/ - Shell scripts and Batch files for running Jasmin under DOS/Unix
223+
examples/ - directory containing example files written for Jasmin
224+
src/ - the Java source code and for the jasmin package
225+
lib/ - contains Java sources for the java_cup and jas packages
226+
classes/ - contains Java class files used by jasmin.
227+
doc/ - various documentation files.
228+
229+
Copyright
230+
---------
231+
Jasmin is Copyright (1997) Jonathan Meyer, under the terms of
232+
the GNU General Public License. See COPYING for more.
233+
234+
Jasmin uses the JAS package which has its own copyright - see lib/jas/README.
235+
236+
Jasmin was built partially using the java_cup package, which is also in
237+
the lib directory.

trunk/ant.settings.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Location of Java Cup classes jar file to link Jasmin against
2+
# either classes dir or jar - note polyglot comes with cup-classes
3+
java_cup.jar=${user.home}/cup-classes/
4+
5+
# Location in which to generate Jasmin release tarballs
6+
release.loc=lib
7+
8+
# Version of Jasmin for tagging tarballs
9+
jasmin.version=2.2.1

trunk/bin/jasmin

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
java jasmin.Main $*

trunk/bin/runall.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/csh
2+
3+
#
4+
# Compiles and then runs all of the classes in the examples
5+
# directory, then tidies up afterwards.
6+
#
7+
8+
#
9+
# Compile
10+
#
11+
echo "Compiling examples:"
12+
bin/jasmin -g examples/*.j
13+
14+
#
15+
# Build CLASSES list
16+
#
17+
cd examples
18+
cat /dev/null >! CLASSES
19+
foreach i (*.class)
20+
echo $i:r >>! CLASSES
21+
end
22+
cd ..
23+
24+
#
25+
# Run the examples
26+
#
27+
echo "Running examples:"
28+
29+
foreach i (`cat examples/CLASSES`)
30+
echo $i\:
31+
java -verify examples.$i foo bar
32+
echo ""
33+
end
34+
35+
#
36+
# Now remove the class files and the CLASSES list
37+
#
38+
cd examples
39+
/bin/rm -f *.class CLASSES
40+

0 commit comments

Comments
 (0)