Waldek Hebisch <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis wrote: | > | > Waldek Hebisch <[EMAIL PROTECTED]> writes: | > | > [...] | > | > | More generally, Spad compiler collects all type information in | > | databases. I like to think that Spad file contain two parts: | > | interface part which declares all exports and implementation part. | > | From such point of view databases are just compiled form | > | of interface part. My effort is basically to create a new | > | compiler for interface parts. To allow incremental developement | > | such compiler must be compatible with existing Spad compiler, | > | > You can say | > | > open-axiom --exports-only --compile FOO.spad | > | > to get only the interface of the domain constructor FOO. Like for | > category compilation, it does only very minimal checking, to | > help bootstrap. The system is not completely hooked into the | > constructor layout sub-system so as to obviate the need for some | > domains. That is for after Xmas. | > | | How does it differ from setting $bootStrapMode to true? And can | you generate things like operation list or constructor modemap | without using databases?
open-axiom --exports-only is a much more stripped down version of open-axiom --bootstrap. For example, the former does not define the constructor function (so that I can catch some errors or bugs in the existing base AXIOM system), does not generate an NRLIB (therefore no index.KAF). Yes, open-axiom --exports-only generates the format of information that needs to on the category frame, except that I remove all the slot numbers -- slot numbers from categories are almost always bogus anyway. For example, open-axiom --exports-only --compile ZMOD.spad gives (content of ZMOD.sig): (SETQ |$CategoryFrame| (|put| '|IntegerMod| '|isFunctor| '(((~= ((|Boolean|) $ $)) T (ELT $ NIL)) ((|zero?| ((|Boolean|) $)) T (ELT $ NIL)) ((|subtractIfCan| ((|Union| $ "failed") $ $)) T (ELT $ NIL)) ((|size| ((|NonNegativeInteger|))) T (ELT $ NIL)) ((|sample| ($)) T (CONST $ NIL)) ((|recip| ((|Union| $ "failed") $)) T (ELT $ NIL)) ((|random| ($)) T (ELT $ NIL)) ((|one?| ((|Boolean|) $)) T (ELT $ NIL)) ((|nextItem| ((|Union| $ "failed") $)) T (ELT $ NIL)) ((|lookup| ((|PositiveInteger|) $)) T (ELT $ NIL)) ((|latex| ((|String|) $)) T (ELT $ NIL)) ((|init| ($)) T (CONST $ NIL)) ((|index| ($ (|PositiveInteger|))) T (ELT $ NIL)) ((|hash| ((|SingleInteger|) $)) T (ELT $ NIL)) ((|convert| ((|Integer|) $)) T (ELT $ NIL)) ((|coerce| ($ (|Integer|))) T (ELT $ NIL)) ((|coerce| ((|OutputForm|) $)) T (ELT $ NIL)) ((|characteristic| ((|NonNegativeInteger|))) T (ELT $ NIL)) ((|Zero| ($)) T (CONST $ NIL)) ((|One| ($)) T (CONST $ NIL)) ((= ((|Boolean|) $ $)) T (ELT $ NIL)) ((- ($ $)) T (ELT $ NIL)) ((- ($ $ $)) T (ELT $ NIL)) ((+ ($ $ $)) T (ELT $ NIL)) ((** ($ $ (|PositiveInteger|))) T (ELT $ NIL)) ((** ($ $ (|NonNegativeInteger|))) T (ELT $ NIL)) ((* ($ $ $)) T (ELT $ NIL)) ((* ($ (|PositiveInteger|) $)) T (ELT $ NIL)) ((* ($ (|NonNegativeInteger|) $)) T (ELT $ NIL)) ((* ($ (|Integer|) $)) T (ELT $ NIL))) (|addModemap| '|IntegerMod| '(|IntegerMod| |#1|) '#0=((|Join| (|CommutativeRing|) (|Finite|) (|ConvertibleTo| (|Integer|)) (|StepThrough|)) (|PositiveInteger|)) T '|IntegerMod| (|put| '|IntegerMod| '|mode| '(|Mapping| . #0#) |$CategoryFrame|)))) To start the bootstrap without existing cached Lisp, I also need to generate an abbreviation database (that is the most vexing part of all AXIOM systems -- the parser should not have any business whatsoever with the databases). To make the whole thing work, one needs: (1) start compiling categories -- the reason is that minimal checking is done here. (Though that is scheduled to change for OpenAxiom as more advanced extensions enter the pipeline). At this point, one should use open-axiom --exports-only to compile categories so that default implementations are ignored. (implemented). (2) then, compile domains as usual. For this to work, one needs to make the system stop requiring defaults to be present. This works in one of my experimental tree. But, it needs some tuning. (3) proceed with compiling only default implementations in categories. This is done with open-axiom --defaults-only --compile. (implemented) (4) Finally build the complete databases from the index.KAF files. (already implemented in all AXIOM systems). So, I've not done extensive testing yet. I've found that not generating the index.KAF during the bootstrap process is a probably a good way to avoid subtle errors based on mismatch between actual information and those stored in the database. I'm unlikely to make progress on this before next year. -- Gaby ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel