|
|
last edited 5 years ago by test1 |
1 2 | ||
Editor: test1
Time: 2019/07/18 17:49:19 GMT+0 |
||
Note: |
changed: -(categories, domains and packages) provided with FriCAS. The source code (categories, domains and packages) provided with FriCAS. For this meaning see [FriCAS Library]. The source code changed: - The process of adding new algebra to FriCAS is considerable different The process of adding new algebra to FriCAS is considerably different changed: -Historically building algebra was a compilcated process. FriCAS has Historically building algebra was a complicated process. FriCAS has changed: -function bodies. Fortunately all this is handled by the algbera function bodies. Fortunately all this is handled by the algebra changed: -Note: FriCAS algebra is build from scratch during full build. However Note: FriCAS algebra is build from scratch during full build (when you fetch sources from SVN repository). However
In FriCAS the word algebra
normally means collection of constructors
(categories, domains and packages) provided with FriCAS. For this meaning
see FriCAS Library. The source code
for algebra is contained in src/algebra
subdirectory of the FriCAS source
tree. Below we use algebra
to mean just a single part (a single constructor
or a small collection of tightly coupled constructors).
The process of adding new algebra to FriCAS is considerably different from Axiom and OpenAxiom. FriCAS no longer uses the old Lisp bootstrap method. Instead the build proceeds directly from the SPAD source code in several phases. The dependencies between SPAD modules are no longer so critical and build process should handle them automatically.
To add new algebra code you need:
1) Create a new file(s) and and it to the SPAD_SRCS variable in src/algebra/Makefile.in. This step is not needed if you are adding code to an already existing file.
2) Add the constructor(s) (more precisely its abbreviation(s)) to apropriate SPADLIST variable in src/algebra/Makefile.in. To assist parallel build abbreviations are divided between several variables, in lexicographic order.
3) If you are adding a category and it to the CATLIST variable in src/algebra/Makefile.in
4) If you are adding category with default implementation add it to the CATDOMS variable in src/algebra/Makefile.in
5) If you are adding a domain which should be subject to inlining optimization
add it to DOMLIST variable in src/algebra/Makefile.in (to activate inlining
you also need to add it to |$optimizableConstructorNames|
in
src/interp/setq.lisp
Historically building algebra was a complicated process. FriCAS has special support to simplify it. Basic idea is that once declarations of constructors and exported functions are known we can compile implementation parts in any order. FriCAS contains special function which performs first part of algebra build collecting informations about constructors. There is an extra complication because we want inlining optimization: calls to simple function in a few core domains are replaced by function bodies. Fortunately all this is handled by the algebra Makefile and to add new constructor it is enough to follow instructions above.
Note: FriCAS algebra is build from scratch during full build (when you fetch
sources from SVN repository). However
release tarball contains partially compiled machine independent files,
which saves build time, but means that actual Spad files are not used.
To force full rebuild one can remove pre-generated
directory from the
source tree, (re)configure and build.