Next: , Previous: History, Up: Overview


1.3 File Organization

The source files for WB are written in the SCM dialect of Scheme:

wbdefs.scm
SCM configuration definitions.
segs.scm
handle.scm
blink.scm
prev.scm
del.scm
ents.scm
scan.scm
stats.scm
SCM code for WB-trees.
blkio.scm
wimpy POSIX interface to the disk. Replace this if you have a more direct interface to the disk.

These files are translated into the C, C#, and Java targets by SCM scripts named scm2c, scm2cs, and scm2java respectively. The function and variable data types in the target languages are determined by pattern-matching the first-element strings in the associations scm2c.typ, scm2cs.typ, and scm2java.typ respectively.

Files translated to C are put into the wb/ directory. Files translated to Java are put into the wb/java/ directory. Files translated to C# are concatenated with wb/csharp/Cssys.cs and wb/csharp/SchlepRT.cs and written to wb/csharp/Wb.cs.

In the Makefile:

s2hfiles
Derived *.h files for C.
s2cfiles
Derived *.c files for C.
s2jfiles
Derived java/*.java files for Java.
csharp/Wb.cs
Single derived source file for C#.

WB comes with a C utility program for database files stored on disk.

— Program: wbcheck path

Checks the structure of the database named by path and reclaims temporary trees to the freelist.

Manifest

wb.info
documents the theory, data formats, and algorithms; the C and SCM interfaces to WB-tree.
ChangeLog
documents changes to the WB.
example.scm
example program using WB-tree in SCM.
wbsys.h
The primary C include file for using the WB layer is is wbsys.h, which includes several other files from the directory. wbsys.h also defines WB's internal data types.
wbsys.c
Shared data and low-level C accessors.
wbsys.scm
Shared data and low-level accessors for debugging in SCM.
wbscm.c
C code for the SCM interface to WB-trees.
db.scm
code for SCM interface when debugging in SCM.
scm2c.scm
SCM code which translates SCM code into C.
scm2c.typ
rules relating variable names to types in generated C.
scm2cs.scm
SCM code which translates SCM code into C#.
scm2cs.typ
rules relating variable names to types in generated C#.
scm2java.scm
SCM code which translates SCM code into Java.
scm2java.typ
rules relating variable names to types in generated Java.
test.scm
file for testing WB-tree system.
test2.scm
more tests for WB-tree system.
Makefile
Unix makefile
VMSBUILD.COM
command script for compiling under VMS.
all.scm
loads all the SCM files for debugging.
wbtab.scm
SCM code allowing WB to implement SLIB relational databases.
rwb-isam.scm
SCM code allowing WB to implement SLIB relational databases with numerical and lexicographic key collations.
wbcheck.c
program for checking, repairing, and garbage collecting WB-tree databases.
wbview
SCM script for displaying low-level WB database associations.