MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: (fix) bizarre mathematica replacement rule error

  • Subject: [mg2533] Re: [mg2497] (fix) bizarre mathematica replacement rule error
  • From: hay at haystack.demon.co.uk (Allan Hayes)
  • Date: Thu, 16 Nov 1995 06:47:00 GMT
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: daemon at wri.com ( )

Elaine Kant<kant at kathmandu.scicomp.com>
in [mg2497] (fix) bizarre mathematica replacement rule error

reported the behaviour in the attached message

On my NeXT, the input given and the simpler inputs below all give  
the message "Low-Level MathLink error message:link died"

a /.And[x_== y_, p_ == q_] :> 6

a /.And[x_== x_, x_==x_] :> 6

Alan Hayes
hay at haystack.demon.co.uk

*************

Begin forwarded message:

>From: kant at kathmandu.scicomp.com (Elaine Kant)
>To: mathgroup at smc.vnet.net
>Subject: [mg2497] (fix) bizarre mathematica replacement rule error

I think I just figured out how to solve my previous problem,
  namely to use
     Literal[And][x_==y_, p_==q_] :> 6
  instead of
     (x_==y_ && p_ == q_) :> 6
But I still find it curious that the incorrect version (sometimes)  
crashes
the system.  Post the previous message or not as you wish.

Original message:


Can anyone explain the following behavior to me??  I cannot understand
why this statement crashes Mathematica, and especially why it doesn't
crash if you change the variable names used.

This is a simplified example of a behavior I got with a replacement
rule that does make more sense than this one (and also crashed
Mathematica), so just using variable names that don't cause the crash
will not solve my real problem.

We observed the same behavior on a PC version of 2.2 as well as under
Solaris Mma 2.2 as shown here.

==========================================================
> math
Mathematica 2.2 for Solaris
Copyright 1988-94 Wolfram Research, Inc.

In[1]:= a == b /. (x_==y_ && p_ == q_) :> 6
Bus error (core dumped)
>


> math
Mathematica 2.2 for Solaris
Copyright 1988-94 Wolfram Research, Inc.

In[1]:= m == n /. (x_==y_ && p_ == q_) :> 6

Out[1]= m == n

In[2]:= a == b /. (x_==y_ && p_ == q_) :> 6
Segmentation fault (core dumped)

==========================================================
[[[For the curious, the actual culprit was

if[resmax <= tol || ncnt >= ncntmax, return[], seq[]] /.
 		{... (x_==y_ && z_==x_) :> y==z ...}
]]]
==========================================================

Elaine Kant
SciComp Inc.
5806 Mesa Drive, Suite 250
Austin, TX 78731

email:	kant at scicomp.com
voice:  512-451-1430
fax:    512-451-1622
www:	http://www.sig.net/~scicomp/





  • Prev by Date: Re: Problems with high-dimensional lists
  • Next by Date: Re: Positive[a] = True ???
  • Previous by thread: (fix) bizarre mathematica replacement rule error
  • Next by thread: Re: (fix) bizarre mathematica replacement rule error