Hi Waldek,

On 01/14/2012 06:03 PM, Waldek Hebisch wrote:
Ralf Hemmecke wrote:

I realized that the compiler accepts domain implementations that
obviously miss the implementation for certain signatures.

Why does that make sense? Cannot the *compiler* abort on missing
functions? I would not like to only find out about missing functions at
runtime.

Beside problems with conditionals mentioned by Gaby, there is
another problem.  Imagine typical steps in developement cycle:

1) create and compile a category
2) create and compile a domian
3) add signature to category

Even if at step 2 domain was 'complete' after step 3 you may
stil get error due to missing signature.  OTOH in step 3
one may add new default implementation, so that signature
that was absent at step 2 may be implemented later as
category default.

You seem to have a more dynamic view on the library, i.e. you seem compile and recompile domains that live in the middle of the Algebra library. I usually look at Algebra like on a library compiled with Aldor, i.e. in a kind of dependency graph. If I change and recompile a domain D in the middle, I would expect that I have to recompile any domain that depends on D, since otherwise anything can happen.

Currently the way to discover missing signatures is via
HyperDoc: search for your new domain, it it is parametrized
make sure to specify arguments, then choose Operations, then
Implementations.  You will see where each operation is
implemented.  Unimplemented operations (if any) will be
listed as a separate group.

Note that without parameters it is impossible to evaluate
conditions and the above will not work.

Thanks a lot. I would not evhave expected to see my new compiled domain immediately in HyperDoc. I don't know why, but it never occured to me. Anyway, your hint is quite helpful.

Also thanks for this hint.
  fooz ==> 2*z
  fooz where z ==> x^2
but I'm pretty sure that I won't use it. Anyway, it looks like a implementing parametrized macros, might be relatively easy, since you would simply transform

foo z ==> val_which_depends_on_z

into a definition such that foo in "foo(x^2)" is replaced by
val_which_depends_on_z where z ==>
and the "(x^2)" is concatenated. ;-)

That's probably too much simplified.

Ralf



Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to