-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RoundTrip/t62 failure #100
Comments
Regarding the output of simplifying It's too bad if |
I'm not sure I understand. Did you mean
I agree they should simplify to the same program (although I'm not sure what you mean by 'random choices'). This issue is due to what Domain can and can't represent. In particular, in In There is also a much more minor issue. There are no integrals (i.e. no Domain bounds), so Domain won't even try to do anything. This would be fairly easy to fix, although care would have to be taken to not call Domain simplifiers which don't have a chance of succeeding without bounds, so as to avoid lots of extra work in the general case. |
To elaborate on my "concern":
By "random choices", I mean |
Regarding the |
I agree that this is the issue, but I am fairly sure that the issue is caused precisely by the buggy result of I visualize it as follows:
and
and (solving for
Indeed. But I can't see any (simpler) way to get that behaviour without giving Domain the ability to represent weights, and that isn't a simple change at all. |
In this case, pushing the weights down wouldn't help us. Indeed, there is no place we can put the weights to allow Domain a chance to solve the domain problem, except in the Domain shape itself. We end up with an expression of the form
which doesn't allow Domain to extract a shape and a body, since there is no common body (or, the common body is the entire expression, and Domain doesn't get to see the conditions, so it doesn't get to solve them). |
What is the current status of this one? |
t62.0 is unchanged; I don't think I'll be revisiting it for a while. It is somewhat of a tricky edge case, in terms of the solution from SemiAlgebraic being slightly sub-optimal, and in terms improving the conditions any more with t62.expected is also unchanged. Making it simplify to the same program as t62.0 is entirely non-trivial, so I don't think I'll revisit that for a while either. The buggy output of |
Maybe it's worth telling Maplesoft about this |
Yes, it is - @yuriy0, could you do this please? |
This almost roundtrips, but the two conditions whose body is
reject
get combined, and the resulting condition is solved:This is clearly the wrong answer, so I think it's a bug. Interestingly, solving for
[x1]
instead of[x0]
giveswhich is a correct answer (but probably not all that useful; it will be thrown away by KB). I'm guessing we want this program to roundtrip, so throwing away both of these results seems to be the correct thing to do.
Here we get a pretty nice solution. It could be nicer in terms of the operational cost of computing the inequalities. The first
if
could be writtenx2 == x1 && (x /= 0)
. The other two conditions feel like they could be simpler, but I don't see to what they could be simplified. In either case, we don't really have a mechanism for simplifying conditions in this way; Maple will basically always gives us conditions in disjunctive normal form. Maybe that's good enough.The test case is currently testing that
t62.0
simplifies tot62.expected
but there is really no way that will happen; they should be separate tests.The text was updated successfully, but these errors were encountered: