Ramana,
Actually after thinking about it, if you can modify your function you
can simply add PolyML.print or PolyML.makestring to print the arguments
or turn them into a string.
There's no number around that would identify particular arguments.
You'll need to construct that yourself. Perhaps I've caused some
confusion by comparing the GC sharing phase with hash-consing. The
sharing pass gains some of the advantages of hash-consing in reducing
the memory requirements but it only applies at the instant when it is
run. There's no on-going hashing.
David
On 13/10/2015 02:10, Ramana Kumar wrote:
Thanks David! That looks very promising.
Rather than printing the arguments using displayVal each time, would it be
possible to instead print a number identifying the argument value, so that
multiple calls to traced functions where some of the arguments are the same
re-use the same numbers?
I want to use the trace produced for replaying the sequence of function
calls in a context where it is expensive (or sometimes impossible) to
reconstruct the arguments from what displayVal prints, but where any value
can be saved and associated with a number for later use.
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml