On 2014-11-20, Emmanuel Charpentier <emanuel.charpent...@gmail.com> wrote:

> BTW, Maxima has this kind of logic (for example, "is" can return "true", 
> "false" or "unknown") and uses it, so it's at least conceptually doable. 
> And useful ! But with very deep consequences. 

For the record, Maxima has a global flag prederror which governs the
evaluation of predicates. When prederror=false (default), is(p) =>
unknown when p is not known (to Maxima) to be true or false, and
if p then ... evaluates to a partially-evaluated conditional
expression. When prederror=true, is(p) and if p then ... trigger
an error.

In practice, this has worked well enough, i.e. without causing too
much confusion -- I don't remember any complaints about programs
assuming true/false not working as expected. A more theoretical
problem is that Maxima's partial evaluation policy isn't entirely
consistent -- when p isn't decidable to Maxima, you can get a
partially-evaluated conditional, but not a partially-evaluated
loop (triggers an error), and various programming functions (e.g.
length, first, integerp) might act in an unexpected way. This, too,
hasn't caused trouble, from what I remember.

FWIW

Robert Dodier

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to