[Top][All Lists]

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

fyi, (scripts frisk) checked in

From: Thien-Thi Nguyen
Subject: fyi, (scripts frisk) checked in
Date: Mon, 07 Jan 2002 19:57:14 -0800

commentary extract below.


module (scripts frisk)
./scripts/frisk commentary:

 Usage: frisk [options] file ...

 Analyze FILE... module interfaces in aggregate (as a "body"),
 and display a summary.  Modules that are `define-module'd are
 considered "internal" (and those not, "external").  When module X
 uses module Y, X is said to be "(a) downstream of" Y, and Y is
 "(an) upstream of" X.

 Normally, the summary displays external modules and their internal
 downstreams, as this is the usual question asked by a body.  There
 are several options that modify this output.

  -u, --upstream      show upstream edges
  -d, --downstream    show downstream edges (default)
  -i, --internal      show internal modules
  -x, --external      show external modules (default)

 If given both `upstream' and `downstream' options ("frisk -ud"), the
 output is formatted: "C MODULE --- UP-LS --- DOWN-LS", where C is
 either `i' or `x', and each element of UP-LS and DOWN-LS is (TYPE

 In all other cases, the "C MODULE" occupies its own line, and
 subsequent lines list the up- or downstream edges, respectively,
 indented by some non-zero amount of whitespace.

 Top-level `use-modules' (or `load' or 'primitive-load') forms in a
 file that do not follow a `define-module' result an edge where the
 downstream is the "default module", normally `(guile-user)'.  This
 can be set to another value by using:

  -m, --default-module MOD    set MOD as the default module

 Usage from a Scheme Program: (use-modules (scripts frisk))

 Module export list:
  (frisk . args)
  (make-frisker . options)    => (lambda (files) ...) [see below]
  (mod-up-ls module)          => upstream edges
  (mod-dn-ls module)          => downstream edges
  (mod-int? module)           => is the module internal?
  (edge-type edge)            => symbol: {regular,autoload,computed}
  (edge-up edge)              => upstream module
  (edge-down edge)            => downstream module

 OPTIONS is an alist.  Recognized keys are:

 `make-frisker' returns a procedure that takes a list of files, the
 FRISKER.  FRISKER returns a closure, REPORT, that takes one of the
  modules  -- entire list of modules
  internal -- list of internal modules
  external -- list of external modules
  i-up     -- list of modules upstream of internal modules
  x-up     -- list of modules upstream of external modules
  i-down   -- list of modules downstream of internal modules
  x-down   -- list of modules downstream of external modules
  edges    -- list of edges
 Note that `x-up' should always be null, since by (lack of!)
 definition, we only know external modules by reference.

 The module and edge objects managed by REPORT can be examined in
 detail by using the other (self-explanatory) procedures.  Be careful
 not to confuse a freshly consed list of symbols, like `(a b c)' with
 the module `(a b c)'.  If you want to find the module by that name,
 try: (cond ((member '(a b c) (REPORT 'modules)) => car)).

 TODO: Make "frisk -ud" output less ugly.
       Consider default module as internal; add option to invert.
       Support `edge-misc' data.

reply via email to

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