The San language - tedious detail about sequents

The San language - tedious detail about sequents

Post by cri » Mon, 20 Oct 2003 14:46:28


This is still another epistle in the ongoing saga of the
definition of the San programming language. This article tries
to nail down details of the sequent concept, definition, and
features.

Prior threads include:

Yet Another Scripting Language - Syntax thoughts
Yet another scripting language - arithmetic
Yet another scripting language - formalizing flow control
Yet another scripting language - Variables, function invocation,
and some syntax
Yet Another Scripting Language - RepriseYet Another Scripting Language
-
Routines again, file structure, and sample code
San sample code - a quining program
The San programming language - the eight queens problem
San sample code - the secant root finder

HTML versions of these articles can be found at
http://home.tiac.net/~cri/mathcomp.html .

There is a fair amount of inconsistency between the early
articles and the later ones. In large part this reflects the
evolution of and maturing of the language design.



8.0 Sequents

The San language supports a programming construct called
a sequent. Sequents can be thought of as mini-programs that
produce lists (of scalar values). The general model is one of a
list (produced by a source) modified serially by a suite of
operators that accept an input list, modify it, and emit an
output list.

A sequent consists of a sequence expression enclosed within
brackets. Sequence expressions consist of a sequence source
optionally followed by sequence operators. Sequence sources are
recursively built up from a combination of primary sources and
sequents.



8.1 A grammar for sequents

This is a quasi-formal description of the grammar for sequents,
i.e., enough material so that one specify a formal grammar.

Special characters:

lb: Left bracket
rb: Right bracket
vb: Vertical bar

Terms and such:

SRC: A list source
PS: Primary source
SO: Operator
SX: Sequence expression
SQ: Sequent

Production rules:

SQ <- lb SX rb
SX <- SRC | SX vb OP
SRC <- PS | SQ | SRC SQ | SQ SRC

8.2 Use of sequents in San code

Sequents can appear in loop specifiers, i.e.., the form

begin loop VAR from SEQUENT

They can also appear in distributed assignments, e.g.,

foo[] <- [1...n]

which sets the contents of foo[] to be the integers from 1 to n.

(Note: strictly speaking it sets the primary values of foo's
vectors of morphs to be the integers.)

8.3 Primary sources

Primary sources are either simple lists or sequence generators.
There are two major categories of primary sources, sequence
special forms, and morph vectors. In addition there are also
some miscellaneous sources.

8.3.1 Simple lists

The simplest type of primary source is the simple list, e.g.,

[x, y, z]

Note that this list is a list of the (default) values of x, y,
and z.

8.3.2 Special forms representing sequences

(a) integer sequences, e.g., m...n
(b) semi infinite integer sequences, e.g., m...*
(c) letter sequences, e.g., 'A...'Z
(c) alphseq

The alphseq generator successively generates the lower case
letters a...z, the letter pairs aa...zz, etc.


8.3.3 Morph vectors
(a) row vector, foo[]
(b) row slice, foo[i,]
(c) column vector, foo.[]
(d) column slice
 
 
 

1. San Francisco San Francisco San Francisco San Francisco San Francisco San Francisco San Francisco

2. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45358332405)

US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45358332405)
======================================================================================

Position: San Storage Manager Admin
Reference: ZYD00164
Location: San Antonio TX
Duration:

Skills: 7 + years experience installing, configuring, implementing,
tuning, and debugging HDS SAN (Hitachi Hardware 9960/9980),
Shadow Image and PAV (Parallel Access Volume) software in
both s390 mainframe and open systems environments. Strong
knowledge of FDR/ABR, ABARS, Harbor backup, SMS, DFDSS, ICF
catalogs and SAN management tools.



Please send your current resume in confidence to
XXXX@XXXXX.COM
.45358332405.

3. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45357132410)

4. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45356514671)

5. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45356814410)

6. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45356857600)

7. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45357732407)

8. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45358032410)

9. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45355937290)

10. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45356532408)

11. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45357114980)

12. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45356814410)

13. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45358932406)

14. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45356232409)

15. US-TX-San Antonio: San Storage Manager Admin, HDS SAN, Shadow Image, PAV (45356514671)