Re: Scratch low-level abstract syntax

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Preparatory to doing some examples, I offer the following revision to
my sketch of an abstract syntax (emphasis on the 'abstract'):

Component((String)shortName,
          (Set of String)inputPorts,
          (Set of String)outputPorts,
          (Set of String)parameters)

Two abstract special components are pre-defined:

["$IN",{},{"primary",*},{}] (the pipeline input component - - it has
                              only outputs (its inputs are outside),
                              extensible on demand)

["$OUT",{"primary",*},{},{}] (the pipeline output component - - it has
                              only inputs (its outputs are outside),
                              extensible on demand.

This may seem a bit odd at first, but remember, this is the _abstract_
syntax.  Doing things this way avoids complexity and special-casing
wrt connections (aka 'tubes', see below).
- ---------------

Pipeline((Set of String)parameters,
         (Set of Step)steps,
         (Set of Tubes)tubes)

   A pipeline's *steps* must contain exactly one step whose component is
   called "$IN" and whose *outputPorts* are complete (possibly empty, if
   the pipeline takes no inputs), and exactly one step whose component is
   called "$OUT" and whose *inputPorts* are complete (possibly empty, if
   the pipeline produces no outputs).

I've changed the name of the thing which infosets flow through to
'tube', to avoid confusion with various concrete syntax usages of the
word 'pipe'.

Step((String)name,
     (Component)component,
     (Set of Binding)arguments)

Tube((OutputPort)source,
     (InputPort)destination)

Port((String)step,
     (String)port)

OutputPort == Port such that port is in |step|.component.outputPorts
InputPort == Port such that port is in |step|.component.inputPorts

Binding == ExplicitBind((String)name,(String)value) |
           BindByRef((String)name,(String)parameter) where parameter
             is in surrounding pipeline.parameters

Invoke a pipeline with [doc source]* (same cardinality as $IN.outputs),
                       [doc sink]*   (same cardinality as $OUT.inputs)
                   and (Set of ExplicitBinding).

Here's a complete two-step example

Component(shortName: "xsdValidate"
          inputs: {"primary","schemaDocs"}
          outputs: {"primary"}
          parameters: {})
Component(shortName: "xslt1.0"
          inputs: {"primary","stylesheet"}
          outputs:{"primary"}
          parameters: {})
Component(shortName: "reader"
          inputs: {}
          outputs: {"primary"}
          parameters: {"URL"})

Pipeline(parameters: {}
         steps: {Step(name: "$IN"
                      component: Component(name: "$IN"
                                           inputs: {}
                                           outputs: {"primary"}
                                           parameters: {}))
                 Step(name: "sdr"
                      component: Component(name: "reader"
                                           [as above])
                      arguments: {["URL","my.xsd"]})
                 Step(name: "ssr"
                      component: Component(name: "reader"
                                           [as above])
                      arguments: {["URL","my.xsl"]})
                 Step(name: "v1"
                      component: Component(name: "xsdValidate"
                                           [as above])
                                           
                      arguments: {})
                 Step(name: "s1"
                      component: Component(name: "xslt1.0"
                                           [as above])
                                           
                      arguments: {})
                 Step(name: "$OUT"
                      component: Component(name: "$OUT"
                                           inputs: {"primary"}
                                           outputs: {}
                                           parameters: {}))}
         tubes: {Tube($IN.primary,v1.primary),
                 Tube(v1.primary,s1.primary),
                 Tube(s1.primary,$OUT.primary),
                 Tube(sdr.primary,v1.schemaDocs),
                 Tube(ssr.primary,s1.stylesheet)})

Phew!

Concrete syntax(es) to follow.

ht
- -- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFEpUlikjnJixAXWBoRAgYcAKCCSvhSjRlaDMP3hcykWla16gKBEQCfSYyQ
T5CsV74tolqg93OxCS5f1EM=
=v957
-----END PGP SIGNATURE-----

Received on Friday, 30 June 2006 15:55:41 UTC