[e-lang] Joe-E Taming Policies
Mohsen Vakilian
mvakili2 at illinois.edu
Mon Sep 21 13:17:33 EDT 2009
David,
Thanks for your detailed response. I should say that Joe-E far exceeds my
expectations as a research project. I definitely expected to see glitches. I
found Joe-E quite interesting and I've been trying it out on a small program
to get more familiar with it. As a result, I encountered some problems but I
wasn't sure whether they are due to incomplete implementation of Joe-E. For
instance, I didn't realize that Hashtable exhibits some nondeterminism until
Adrian pointed that out.
I've already figured how to overwrite Joe-E's taming policies. You are
right, the first step is to modify the safej files. And, the next step is to
have Eclipse generate the Policy class by right clicking on the project,
selecting Joe-E and enabling the "Automatically build Policy class."
Thanks,
Mohsen Vakilian
On Mon, Sep 21, 2009 at 11:12 AM, David Wagner <daw at cs.berkeley.edu> wrote:
> Mohsen Vakilian wrote:
> > So, given that ArrayIndexOutOfBoundsException is an honorary interface in
> > Joe-E, there is no need to suppress its constructors. Right?
>
> Actually, the "honorary" business is something else and unrelated.
> ArrayIndexOutOfBoundsException is a class from the Java class library.
> Its constructors just happened to be tamed away because we never
> analyzed the class itself, and because the default is to suppress
> anything we haven't manually analyzed and determined to be safe.
>
> Honoraries are orthogonal to which methods/constructors are
> suppressed/allowed in the taming database. For some description of
> "honorary", see Sections 3.2 and 3.3 of the Joe-E spec. For more on
> taming, see Section 5 of the spec.
>
> > How can I overwrite some of the taming policies for my project?
>
> We have not yet written any documentation on how to do this,
> so you're mostly on your own. If you ask Adrian nicely, he might
> be able to provide some explanation when he gets a chance. (If you
> feel like giving back and are inspired to write a Wiki page for
> the Joe-E project on how to do this, that'd be useful.)
>
> The taming database is under the directory safej/ in the Joe-E
> distribution.
>
> If you look at the file
> safej/java/lang/ArrayIndexOutOfBoundsException.safej
> in the Joe-E distribution, you find this:
>
> # auto-generated safej: default deny everything
> class("java.lang.ArrayIndexOutOfBoundsException",
> honorary("org.joe_e.Powerless"),
> static(constructor(suppress, "ArrayIndexOutOfBoundsException()",
> comment("default deny")),
> constructor(suppress, "ArrayIndexOutOfBoundsException(String)",
> comment("default deny")),
> constructor(suppress, "ArrayIndexOutOfBoundsException(int)",
> comment("default deny"))))
>
> I believe this is the output of a tool that Adrian has written
> to traverse the Java class libraries and output a default taming
> file for every Java API, where the default is to deny/suppress
> everything. This provides a starting point, and then one can make
> taming decisions by editing the auto-generated file to allow
> methods that have been analyzed and determined to be safe.
>
> For another example, see safej/java/lang/String.safej. Hopefully
> you'll be able to puzzle out what the syntax means. Sorry for the
> shortage of documentation or tool support at the moment.
> _______________________________________________
> e-lang mailing list
> e-lang at mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/e-lang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eros-os.org/pipermail/e-lang/attachments/20090921/6e291ae8/attachment.html
More information about the e-lang
mailing list