Opened 5 years ago

Closed 5 years ago

#20126 closed defect (fixed)

QEPCAD does not pass optional "memcells" to the constructor

Reported by: yzh Owned by:
Priority: major Milestone: sage-7.1
Component: interfaces Keywords: QEPCAD
Cc: mkoeppe, rws, tmonteil, dimpase Merged in:
Authors: Yuan Zhou Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 4196760 (Commits, GitHub, GitLab) Commit: 41967600e912f08cd8c6bfc854919e30f64a329f
Dependencies: Stopgaps:

Status badges

Description

In the following problem of simplifying quantifier free formulas, QEPCAD crashed with the failure "Too few cells reclaimed."

sage: var('x,y,z')
(x, y, z)
sage: conds = [-z < 0, -y + z < 0, x^2 + x*y + 2*x*z + 2*y*z - x < 0, \
               x^2 + x*y + 3*x*z + 2*y*z + 2*z^2 - x - z < 0, \
               -2*x + 1 < 0, -x*y - x*z - 2*y*z - 2*z^2 + z < 0, \
               x + 3*y + 3*z - 1 < 0]
sage: qepcad(conds)
Qepcad crashed -- automatically restarting.
sage: qe = qepcad(conds, interact=True)
sage: qe.go()
QEPCAD object has moved to phase 'Before Projection (z)'
sage: qe.go()
QEPCAD object has moved to phase 'Before Choice'
sage: qe.go()
** 90355 cells, 19999 arrays in 17 milliseconds.
Failure occurred in:    GCSI (final check)
Reason for the failure: Too few cells reclaimed.
N   = 90355
NU  = 1000000
RHO = 10
Now the FAIL handler is aborting the program ...

This could be solved by augmenting memcells to 200000. One excepts that

sage: qepcad(conds, memcells=2000000)
2 x - 1 > 0 /\ z > 0 /\ z - y < 0 /\ 3 z + 3 y + x - 1 < 0

However, the current Sage interface to QEPCAD forgets to pass memcells to the constructor of QEPCAD.

Change History (9)

comment:1 Changed 5 years ago by yzh

  • Branch set to u/yzh/qepcad_does_not_pass_optional__memcells__to_the_constructor

comment:2 Changed 5 years ago by yzh

  • Authors set to Yuan Zhou
  • Cc rws tmonteil added
  • Commit set to 9d8c2b3c9d3d7e8b9b1108c2b68c2d4ce5ed77b5
  • Status changed from new to needs_review

comment:3 Changed 5 years ago by mkoeppe

  • Cc dimpase added

comment:4 Changed 5 years ago by dimpase

  • Status changed from needs_review to needs_work
  • Work issues set to add doctest

OK, please add the doctest

sage: ... # set vars and conds
sage: qepcad(conds, memcells=2000000) # optional - qepcad
2 x - 1 > 0 /\ z > 0 /\ z - y < 0 /\ 3 z + 3 y + x - 1 < 0

then I will be happy to give it positive review.

comment:5 Changed 5 years ago by git

  • Commit changed from 9d8c2b3c9d3d7e8b9b1108c2b68c2d4ce5ed77b5 to 41967600e912f08cd8c6bfc854919e30f64a329f

Branch pushed to git repo; I updated commit sha1. New commits:

4196760add doctest where qepcad constructs with a given memcells value

comment:6 follow-up: Changed 5 years ago by yzh

I added the doctest above. However, I failed to run sage -t on qepcad.py due to #20128; it caused 91 doctests failed.

comment:7 in reply to: ↑ 6 Changed 5 years ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_work to positive_review
  • Work issues add doctest deleted

Replying to yzh:

I added the doctest above. However, I failed to run sage -t on qepcad.py due to #20128; it caused 91 doctests failed.

it works for me on Linux and on OSX 10.11 just fine. Positive review.

comment:8 Changed 5 years ago by yzh

Thank you! :)

comment:9 Changed 5 years ago by vbraun

  • Branch changed from u/yzh/qepcad_does_not_pass_optional__memcells__to_the_constructor to 41967600e912f08cd8c6bfc854919e30f64a329f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.