axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] string.spad


From: root
Subject: [Axiom-developer] string.spad
Date: Wed, 20 Aug 2003 21:37:50 -0400

One of the steps I took to break cycles in the algebra involved 
creating a separate file for each domain. Some spad files
contain several domains. 

Developers of algebra code have many styles. Some created macros
that only exist at the top of a spad file while others placed
macros at the start of each domain. 

The scope of a macro such as:

MINSTRINGINDEX ==> 1

is the whole file. When I broke the domains into separate files
I was careful to ensure that each "small" domain got a copy of
the macros included in the DOMAIN.spad file. That is the correct
behavior.

However, the side-effect of that copy changed the original source
code of the "big" spad file. So, for example, string.spad contains
5 domains (CHAR, CCLASS, ISTRING, STRICAT, and STRING). In the
original file the macro

MINSTRINGINDEX ==> 1

appears once. This was copied so it appears in each chunk and thus
in each domain. Compiling CHAR.spad, or STRING.spad sees only one
copy. However, when the whole string.spad file is extracted it
contains 5 copies of the macro.

The spad compiler gets a value stack overflow if you try to compile
string.spad. I don't yet know the cure. 

Tim
address@hidden
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]