login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBox Trace EXPR and FRAC revision 1 of 2

1 2
Editor: Bill Page
Time: 2010/01/06 08:08:17 GMT-8
Note: avoid problem SBCL restart on abort

changed:
-
Trace may affect correct output of '1::EXPR INT' . This page should be read in conjunction with IssueTracker #283.
To suppress the infinite loop being displayed till overflow, add ')math' to the package traced (does not always work). I think the coercion '2/3::FRAC INT' is where the main bug lies, but since it is affected by ')trace', it may not be easy to find.


We first establish that without ')trace' , the following works as intended.
\begin{axiom}
2/3::FRAC INT
1::EXPR INT
\end{axiom}

What led me to suspect that 'FRAC' is involved in the ')trace'  bug is the following trace obtained in a Windows session (but unfortunately, I no longer know the exact set up to reproduce this)::
  
  (7) -> 1::EXPR INT
  1<enter SparseMultivariatePolynomial.zero?,17 :
   arg1= 1
  1>exit  SparseMultivariatePolynomial.zero?,17 :
   false
  1<enter Fraction.*,60 : 1\((0 . 1) 0 . 1)
   1<enter SparseMultivariatePolynomial.coerce,77 :
    arg1= 1
   1>exit  SparseMultivariatePolynomial.coerce,77 :
    1
   1<enter SparseMultivariatePolynomial.=,97 :
    arg1= 1
    arg2= 1
   1>exit  SparseMultivariatePolynomial.=,97 :
    true
   1<enter SparseMultivariatePolynomial.*,65 :
    arg1= 1
    arg2= 1
    1<enter SparseMultivariatePolynomial.*,90 :
     arg1= 1
     arg2= 1
    1>exit  SparseMultivariatePolynomial.*,90 :
     1
   1>exit  SparseMultivariatePolynomial.*,65 :
    1
   1<enter SparseMultivariatePolynomial.zero?,17 :
    arg1= 1
   1>exit  SparseMultivariatePolynomial.zero?,17 :
    false
   1<enter SparseMultivariatePolynomial.=,97 :
    arg1= 1
    arg2= 1
   1>exit  SparseMultivariatePolynomial.=,97 :
    true
  1>exit  Fraction.*,60 : ((0 . 1) 0 . 1)
  1<enter Fraction.denom,73 : ((0 . 1) 0 . 1)
   2<enter Fraction.denom,73 : ((0 . 1) 0 . 1)
    3<enter Fraction.denom,73 : ((0 . 1) 0 . 1)
     ...


The following, surprisingly also works (trying to recreate the above trace, but failed).

\begin{axiom}
)trace FRAC
)trace SMP )math
1::EXPR INT
\end{axiom}

Here are trace examples that produced Bind Stack Overflow.

\begin{axiom}
)trace INT
)trace FRAC 
)trace EXPR INT )math
)trace KERNEL EXPR INT
)trace SMP(INT, KERNEL EXPR INT)
)trace outputForm
1::EXPR INT
\end{axiom}



\begin{axiom}
2/3::FRAC INT
\end{axiom}

For a preliminary analysis, see [SandBox Trace Analysed].

Trace may affect correct output of '1::EXPR INT' . This page should be read in conjunction with IssueTracker? #283. To suppress the infinite loop being displayed till overflow, add ')math' to the package traced (does not always work). I think the coercion '2/3::FRAC INT' is where the main bug lies, but since it is affected by ')trace', it may not be easy to find.

We first establish that without ')trace' , the following works as intended. begin{axiom} 2/3::FRAC INT 1::EXPR INT end{axiom}

What led me to suspect that 'FRAC' is involved in the ')trace' bug is the following trace obtained in a Windows session (but unfortunately, I no longer know the exact set up to reproduce this):

(7) -> 1::EXPR INT
1<enter SparseMultivariatePolynomial.zero?,17 :
 arg1= 1
1>exit  SparseMultivariatePolynomial.zero?,17 :
 false
1<enter Fraction.*,60 : 1\((0 . 1) 0 . 1)
 1<enter SparseMultivariatePolynomial.coerce,77 :
  arg1= 1
 1>exit  SparseMultivariatePolynomial.coerce,77 :
  1
 1<enter SparseMultivariatePolynomial.=,97 :
  arg1= 1
  arg2= 1
 1>exit  SparseMultivariatePolynomial.=,97 :
  true
 1<enter SparseMultivariatePolynomial.*,65 :
  arg1= 1
  arg2= 1
  1<enter SparseMultivariatePolynomial.*,90 :
   arg1= 1
   arg2= 1
  1>exit  SparseMultivariatePolynomial.*,90 :
   1
 1>exit  SparseMultivariatePolynomial.*,65 :
  1
 1<enter SparseMultivariatePolynomial.zero?,17 :
  arg1= 1
 1>exit  SparseMultivariatePolynomial.zero?,17 :
  false
 1<enter SparseMultivariatePolynomial.=,97 :
  arg1= 1
  arg2= 1
 1>exit  SparseMultivariatePolynomial.=,97 :
  true
1>exit  Fraction.*,60 : ((0 . 1) 0 . 1)
1<enter Fraction.denom,73 : ((0 . 1) 0 . 1)
 2<enter Fraction.denom,73 : ((0 . 1) 0 . 1)
  3<enter Fraction.denom,73 : ((0 . 1) 0 . 1)
   ...

The following, surprisingly also works (trying to recreate the above trace, but failed).

begin{axiom} )trace FRAC )trace SMP )math 1::EXPR INT end{axiom}

Here are trace examples that produced Bind Stack Overflow.

begin{axiom} )trace INT )trace FRAC )trace EXPR INT )math )trace KERNEL EXPR INT )trace SMP(INT, KERNEL EXPR INT) )trace outputForm 1::EXPR INT end{axiom}

begin{axiom} 2/3::FRAC INT end{axiom}

For a preliminary analysis, see [SandBox Trace Analysed]?.