[Top][All Lists]

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

Re: [Axiom-developer] Re: Literate ASDF

From: Gabriel Dos Reis
Subject: Re: [Axiom-developer] Re: Literate ASDF
Date: 20 May 2007 21:47:59 -0500

Assume you have linguistic support in Boot to state unambigously what
your module [1] defines (`exports') and what it needs (`imports'), then
your Boot program structures states what are the depedencies, and
those statement can be mechanically checked -- it therefore avoids
external definitions that may get out of sync, pretty much the same
way you don't want your documentation to get out of sync with actual
implementation.  You may use bootsys to extracts the exports and the
imports, if you need to.  Or you can just rely on bootsys to resolve
the depedencies for you. 

To test the idea, I've implemented a rudimentary extension to Boot.

  * you can say:

       module '"boot-tokens"

    which means that the definitions in the current file are part of
    the module "boot-tokens".  A module can span several files.
    How this is resolved should be Lisp system independent.
    Currently, I just map it to Lisp as:

        (provide "boot-tokens")

    but my plans are less simple.

  * you can also say:

       module '"boot-lexer"         
       import '"boot-tokens"         -- we need tokens interface
       import '"boot-includer"       -- idem for the includer

    which means that the module "boot-lexer" depends on both
    "boot-tokens" and "boot-includer".  How this depedency is resolved
    should be Lisp system independent.
    At the moment, I just map it to Lisp as:
       (require "boot-tokens")
       (require "boot-includer")

    Every Lisp system has its own idea of what ANSI Lisp module should be.
    However, the above simple mapping works well with GCL and CLISP.
    SBCL needs more help, but that is doable.

    I emphasize that the notion of `module' I have for Boot is not
    just a replicate of ANSI Lisp module.

    I'm still playing with that rudimentary translation.  I'm able to
    eliminate many irritating warnings from Lisp compilers to the
    effect that some variables are not defined, or some functions are

    With the above rudimentary translation, I was able to restructure
    the depedencies in src/boot/ in a more logical manner.  It is nice
    to see how it plays so well, so far.

[1] By module here, I don't necessarily mean ANSI Lisp module.

Once I've finished bootstrapping of the whole system, I'll commit the
experiment to gdr-sandbox.

-- Gaby

reply via email to

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