Can't we hack it?
I'm somehow desperate to get it done.
I will write helper functions, for "my"
hash functionality, establishing some interface,
and hopefully these helper functions can solve it.
One possibility is to make set_hash ignore that it
is issued in a file. Don't know how to do it.
Strangely, if I use a helper-function set_hash1,
which just calls set_hash,
and call set_hash1, then nevertheless the value
is annotated by the file where this set_hash1
call is placed! I tried to quote the argument
etc., but doesn't work. But it should be possible
to get the "real" set_hash" call always located
in one file, and then we don't get these inconsistencies.
Finally, it should be possible to strip away those
annotations:
A hash table from the command line with [1,1] -> 77:
#S(HASH-TABLE TEST FASTHASH-EQUAL (((MLIST SIMP) 1 1) . 77))
And the same, but set in a file:
#S(HASH-TABLE TEST FASTHASH-EQUAL
(((MLIST SIMP
(0 /home/kullmann/csoliver/SAT-Algorithmen/OKplatform/OKsystem/Transitional/ComputerAlgebra/G\
raphs/Lisp/TestHashMap2.mac
SRC))
1 1)
. 77))
So one just needs to get rid off this
(0 /home/kullmann/csoliver/SAT-Algorithmen/OKplatform/OKsystem/Transitional/ComputerAlgebra/G\
raphs/Lisp/TestHashMap2.mac
SRC)
Unfortunately, I don't really speak Lisp :-(.
But perhaps somebody could supply me with a little function
which goes into that SIMP-term and removes that component.
Or we get the above redirection working.
Would be glad for some help!
Oliver
On Mon, May 05, 2008 at 08:02:20PM -0400, Stavros Macrakis wrote:
> On Mon, May 5, 2008 at 7:12 PM, Oliver Kullmann
> <O.Kullmann at swansea.ac.uk> wrote:
>
> > Now for example the function isomorphism returns a "hash table", without saying what that
> > is. One example for using it is given, by hash_table_data.
>
> Ah, in your earlier email, you said ""I'm using the hash-table from
> graph_core.lisp in the graphs-package...." but "hash-table" is the
> Lisp convention for a function name, whereas hash_table is the Maxima
> convention. And the plain old English name is "hash table".
>
> > Now to make further use of it, I looked up
> > the other function hash_table, set_hash, get_hash.
>
> I wasn't aware of these functions, sorry.
>
> > I understand this as the Maxima interface.
>
> You are right -- I misunderstood the situation, thinking that you were
> using an internal hash-table function.
>
> On the other hand, the graph package doesn't follow the usual Maxima
> conventions in several ways. For one thing, it returns the opaque
> identifier GRAPH to represent various graphs. Returning a Lisp hash
> table is even less Maxima-like. Normally, Maxima functions return
> something which prints out nicely. If it is too huge to print out
> nicely, it is up to the user to use $ rather than ;. But anyway, I
> digress.
>
> So the conclusion is I guess that there is a bug in the graph functions....
>
> -s