Below is mostly "thinking loudly":
I am now reworking "database" handling. Currently a category may
have default domain. There is code to compute it: if there is only
one domain of given category and the domain has the same argument
list as the category, then this domain is the defult domain for
this category. However, computed values are later ignored and
interpreter uses hardcoded list which is slightly different than
the computed list. Default domain is used by interpreter to
guess needed domain given a category. Arguably, hardcoded list
may be a bit better than the computed one: hardcoded list
contains Expression, which in the past used to be the only
FunctionSpace, but now we have more domains. I consider few
posibilities:
- declare hardcoded list to be "the truth"
- use computed list via database machinery
- compute default domain on demand, this does not look hard and
the computed value may be cached, so cost should be small
Related to this is question of SubDomain. Currently Spad compiler
uses hardcoded info about NonNegativeInteger and PositiveInteger.
Info about other subdomains is propagated via global variables,
which AFAICS is error prone. So more general use of SubDomain
is likely to lead to trouble. Again there are some possiblities:
- declare that all subdomais must be hardcoded into the compiler
and interpreter (essentially current state)
- implement handling via database machinery
Note that info related to subdomains is not derivable from other
info.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/ZhYF0yYzHr_JYK54%40fricas.org.