Dear All, I investigated the crash. It is caused by an infinite loop of calls in GiNaC::ex::ex at /usr/include/ginac/ex.h:265 in GiNaC::symbol::eval at /usr/include/ginac/symbol.h:49 in GiNaC::ex::construct_from_basic(GiNaC::basic const&) from /usr/lib/libginac.so.5 This happens because the assignment symbol x("x"); x = realsymbol("y"); is done through the inherited operator const basic & basic::operator=() which resets the status_flags::evaluated (for different classes) and this flag is never set again for symbols. Now the first question is: do we really want a symbol to be assigned through operator=? If the answer is "yes" then there is the second question is: to repair the situation either * an adjusted symbol::operator=() shall be provided, which sets the flag evaluated; or * at ex:eval() we shall set status_flags::evaluated for GiNaC::symbol and its children? Another option is: basic::operator= shall reset status_flags::evaluated only if another object is not of a child class. My understanding of GiNaC is not sufficient to take decision on this matter. Best wishes, Vladimir -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://goo.gl/EaG2Vu Software: Geometry of cycles http://moebinv.sourceforge.net/
On Sat, 14 May 2016 10:03:26 +0100, "Vladimir V. Kisil" <kisilv@maths.leeds.ac.uk> said:
VVK> Dear Jan, VVK> Please accept my apology, you did send a complete VVK> example and I have overseen that. In my opinion, the issue is VVK> not with the inheritance as such. Symbol x is not assumed to be VVK> a left value. There are GiNaC::ex for this. VVK> Best wishes, Vladimir -- Vladimir V. Kisil VVK> http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius VVK> Transformations http://goo.gl/EaG2Vu Software: Geometry of VVK> cycles http://moebinv.sourceforge.net/
On Sat, 14 May 2016 09:21:23 +0100, "Vladimir V. Kisil" VVK> <kisilv@maths.leeds.ac.uk> said:
On Sat, 14 May 2016 04:53:54 +0200, Jan Rheinländer <jrheinlaender@gmx.de> said:
JR> Dear Vladimir, realsymbol is not my derived class. See JR> ginac/symbol.h ! VVK> Yes, and as far as I am aware there is no problem with VVK> realsymbol in GiNaC. Furthermore, in my own project (see the VVK> end of the email) I have successfully derived several new VVK> classes following the advise from the GiNaC tutorial. VVK> If you are looking for an assistance you need to provide a VVK> complete piece of software, including the full description of VVK> your derived class, which causes the issue. VVK> Best wishes, Vladimir -- Vladimir V. Kisil VVK> http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius VVK> Transformations http://goo.gl/EaG2Vu Software: Geometry of VVK> cycles http://moebinv.sourceforge.net/ VVK> _______________________________________________ GiNaC-devel VVK> mailing list GiNaC-devel@ginac.de VVK> https://www.cebix.net/mailman/listinfo/ginac-devel VVK> _______________________________________________ GiNaC-devel VVK> mailing list GiNaC-devel@ginac.de VVK> https://www.cebix.net/mailman/listinfo/ginac-devel