Gary T. Leavens wrote:
Hi all,
I've been struggling a bit to write an Assert procedure in Oz.
Is there some standard Assert facility that is already implemented?
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
Dear Gary,
I'm not sure exactly what you would like to do. Here is some
information that might be useful for you.
You can find a Prolog-style assert on page 659 of CTM: this asserts
facts in a Prolog-style database, with first-argument indexing and
allows Prolog-style queries inside the Solve operation.
The Compiler.evalExpression function takes a string and an environment
and compiles and evaluates the string as an Oz expression. See:
http://www.mozart-oz.org/documentation/compiler/node4.html#section.api.module
For example, {Compiler.evalExpression "X+3" env('X':4) _} returns 7.
(The '_' is
bound to a zero-argument procedure that will terminate a runaway
computation when
executed.)
Peter
_________________________________________________________________________________
mozart-users mailing list
mozart-users@ps.uni-sb.de
http://www.mozart-oz.org/mailman/listinfo/mozart-users