|
|||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||
See:
Description
| Jeva (Experimental) | |
| edu.mit.ai.psg.jeva | Jeva prerelease version of 1999.02.28 Copyright (c) 1997-1999 Massachusetts Institute of Technology Jeva is the core of a source code evaluator for Java programs; see edu.mit.ai.psg.jevaUI for user interfaces. |
| edu.mit.ai.psg.jeva.examples | |
| edu.mit.ai.psg.jevaUI | JevaGUI and JevaCLI provide user interfaces for Jeva which accept typed Java declarations, statements, and expressions. |
| JevaES | |
| edu.mit.ai.psg.jevaES | JevaES is a core source code evaluator for Java expressions and statements; see JevaESUI for user interfaces. |
| edu.mit.ai.psg.jevaESUI | JevaESGUI and JevaESCLI provide user interfaces for JevaES which accept typed expressions and statements. |
| Jexa | |
| edu.mit.ai.psg.jexa | Jexa, a Java examiner, provides expandable/collapsible outlines for browsing through object nets. |
| edu.mit.ai.psg.ui.outlines | Outlines: core expandable/collapsible outline components (OutlineTree), with protocol for looking up the most specific outline generator for new/child objects (Outliner), and interface for extending the set of generators to new classes and interfaces (IOutlineComponentGenerator). |
| Other Packages | |
| edu.mit.ai.psg.strings | Prettify Strings: Methods for safely producing object strings (Stringify), formatting output strings with nested parentheses, brackets, and braces (Prettify), and indenting multi-line strings (Indent, IndentWriter). |
prerelease version of 1999.02.20edu.mit.ai.psg.jevaES is the core of a Java source code evaluator for expressions and statements. JevaES accepts Java 1.2 source code expressions and statements (but not class declarations, nor anonymous classes) and evaluates (interprets) them. JevaES uses the reflective capabilities included in Java 1.2 (java.lang.reflect) so it can be used with compiled classes.
Copyright (c) 1996-1999 Massachusetts Institute of Technology.
This software is provided "as is" without express or implied warranty.
Contains parser generated by Sun's JavaCC/JJTree from a modified version of the example Java grammar.
JevaESUI provides a graphical (windowed) user interface to JevaES. JevaESCLI provides a command line (stream) interface. Both are useful for exploring and developing compiled systems.
edu.mit.ai.psg.jeva is an experimental (much less tested and used) core of a Java evaluator that accepts class and interface declarations (but not nested nor anonymous classes). It also implements an evalhook. There are corresponding JevaGUI and JevaCLI interfaces.
Jexa, a Java Examiner, provides means to view and navigate object nets as expandable outline trees. Jexa uses the JavaBeans introspector and the Java 1.2 reflection capabilities to access the fields and properties of objects. Objects found through navigation can be used to set the value of Jexa.mousedObject, so that they are accessible for use in method calls (e.g., from JevaESGUI or JevaESCLI).
Jeva has additional requirements. See edu.mit.ai.psg.jeva.
Use for experiments: To use JevaESGUI or JevaESCLI for your own
experiments, simply start them from the command line:
javaw edu.mit.ai.psg.jevaESUI.JevaESGUI
for a window
java edu.mit.ai.psg.jevaESUI.JevaESCLI
for the command line.
Your own classes are accessible if they are in the classpath [which usually
includes the current directory; note that
System.getProperty("java.class.path") returns the classpath in
effect, and System.getProperty("user.dir") returns the current
directory pathname]. To access package protected methods and fields of your
programs, use "package myPackage;" from the interface.
To examine objects using Jexa: Use the "Examine Result"
button in JevaESGUI, or evaluate
import edu.mit.ai.psg.jexa.Jexa;
Jexa.examine(myObject)
To invoke methods on the objects found via Jexa: From Jexa, mouse-2
or shift-clicking on an object brings up a pop-up menu through which you can
set Jexa.mousedObject to the object. Then simply call methods using
Jexa.mousedObject, casting it if needed. E.g,
MyClass foundObj =
(MyClass) Jexa.mousedObject;
foundObject.myMethod(...)
Use with debuggers: Using JevaESGUI while running a debugger
like jdb can be an effective way to explore erroneous behavior: use
JevaESGUI to explore test cases that may trigger exceptions, and use jdb to
catch the exceptions. (Note that jdb reads from System.in in its own
thread, so JevaESCLI cannot be used with jdb.)
jdb edu.mit.ai.psg.jevaESUI.JevaESGUI
Started from programs: Import edu.mit.ai.psg.jevaESUI.*; and
then call either one; JevaESGUI is preferred if more than one thread
may be reading System.in (e.g., when using jdb).
JevaESGUI.main(null);
JevaESCLI.main(null);
Program inspection points: To add inspection points into your program, where you can experiment with values of program variables using a read-eval-print-loop (REPL) window, first create an environment (using JevaES.makeDefaultEnv(..) and JevaES.extendEnv(..)) to hold the name bindings, and call JevaESGUI.repl(..) with that environment. See DemoInspectPoint.java for a simple example.
Program Stubs:
To use use JevaESUI in a program stub (code which asks the user to
compute a value, e.g., for cases or procedures not yet written) using
a read-eval-print-loop (REPL) window, supply an environment as above, but
also provide the return type of values can be returned
and declared exceptions that may be thrown. See
DemoAppointmentCalendarStub.java for a simple example.
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-bugs@ai.mit.edu |
||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||