Hi all,

On Mon, 25 Sep 2006, Gary T. Leavens wrote:

I've been struggling a bit to write an Assert procedure in Oz.
Is there some standard Assert facility that is already implemented?

My effort is now available at:

  http://www.cs.iastate.edu/~cs541/lib/Assert.oz

it relies on the file

   http://www.cs.iastate.edu/~cs541/lib/OPIEval.oz

and both of these work in the OPI.  The disadvantage is that assertion
compilation shows some verbose output in the OPI, and I can't figure
out how to turn that off.  Another disadvantage is that users have to
quote their assertion's text.

These only work in the OPI and aren't functors.  I can't figure out
how to make functors out of these, as I don't know how to get hold of
the current lexical environment in order to pass it to
Compiler.evalExpression.

I suppose just adding assert as a linguistic abstraction directly in
the compiler would be better. (Has anyone done that? :-)

        Gary T. Leavens
        Department of Computer Science, Iowa State University
        229 Atanasoff Hall, Ames, Iowa 50011-1041 USA
        http://www.cs.iastate.edu/~leavens  phone: +1-515-294-1580


_________________________________________________________________________________
mozart-users mailing list                               
mozart-users@ps.uni-sb.de
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to