I have commited modified algebra bootstrap procedure.  One benefit
is that more of build can be done in parallel.  Togethere with
few speedups of Spad compiler on my 2.4 GHz Core 2 Quadro I can
now do build from svn in less than 9 minutes (using make -j 6).

Also adding new files to algebra should be easier:
1) add source to pamphlets
2) in Makefile.in:
   - if you added new pamphlets then add its names to SPAD_SRCS
   - add names of constructors to SPADLIST[1-8] as appropriate
   - if you added categories then add their names to CATLIST
   - if your categries have defaults ('add' section) add them
     to CATDOMS

CATLIST is still sorted according to dependencies in prevoius
bootstrap procedure, but now order on entries in CATLIST
should not matter.

Most of boo* files are gone, intead we have a single 'boo_db.input'
file which is simple than the old one.

How does it work?  First stage is parsing all algebra files using
$SaveParseOnly flag -- this stores parsed form of the whole
algebra.  Then 'processGlobals()' routine from 'ncomp.boot'
looks at constructor headers and builds initial version of
database (only in memory).  After that 'processGlobals()'
callse 'boo_comp_cats()' (also from 'ncomp.boot') which
compiles all categories form parsed form, without creating
disc files.  Normally compiler used to evaluate category
just after compilation, which in turn required evaluation
of other categories.  So, this immediate evaluation created
dependencies, because we have to compile category before we
can evaluate it.  The trick here is that we skip this evaluation,
which removes most of dependencies.  There are few dependencies
which remain.  Namely, given:

A(b : C) : Category == ...

where C is a domain, we need to evaluate categories used in
definition of C.  However, the only dependency of this form
is with C beeing one of integer domains and categories used
in definition of Integer do not have such parameters.  So
we first compile categories with no domain parameter, then
the rest and this automatically resolves dependencies.

Then we compile all algebra in bootstrap
mode -- we can do this is any order because we have needed
info in database and we compiled all categories, so we are
able to evaluate them.

Next, we compile categories and core domains in non-bootstrap
mode -- with inlining optimization disabled but otherwise like
normal.

After that we create databases.  The resulting databases are
good enough to correctly compile whole algebra.  All this is
done sequantially in a single process in first stage.

The second stage we recompile core domains in normal mode
(this is needed for inlining optimization to work correctly).
The second stage is also purely sequential.

The third stage is recompilation of the whole algebra (except
of core domais).  This is done in parallel, as there are
no dependencies.

In a sense new bootstrap is more compicated than the old
one.  However, now 'processGlobals()' is doing the tricky
part and makefiles got simpler.

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to