Documentation Source Text

Check-in [0b915cf1f8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add support for gathering evidence from SLT.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0b915cf1f84d1bf787bc9533187dabd4960a65f7
User & Date: drh 2010-07-27 15:25:58.000
Context
2010-07-28
13:42
Add a blue tint to requirements matrix summary entries that are partially completed, with darker colors indicating more completion. (check-in: 4eb9d03d43 user: drh tags: trunk)
2010-07-27
15:25
Add support for gathering evidence from SLT. (check-in: 0b915cf1f8 user: drh tags: trunk)
13:22
Update the documentation for SQLITE_DEFAULT_AUTOVACUUM to cover the incremental vacuum option. (check-in: 39f2677bb7 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to Makefile.
15
16
17
18
19
20
21





22
23
24
25
26
27
28
#
TCLSQLITE3C = ../bld/tclsqlite3.c

#### The toplevel directory of the TH3 test harness sources
#    Leave blank if TH3 is not available.
#
TH3 =






#### A C-compiler for building utility programs to run locally
#
CC = gcc -g -Wall

#### Extra C-compiler flags needed to compile TCLSH
#







>
>
>
>
>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
TCLSQLITE3C = ../bld/tclsqlite3.c

#### The toplevel directory of the TH3 test harness sources
#    Leave blank if TH3 is not available.
#
TH3 =

#### The toplevel directory of the SQLLogicTest (SLT) test
#    harness sources.  Leave blank if SLT is not available.
#
SLT =

#### A C-compiler for building utility programs to run locally
#
CC = gcc -g -Wall

#### Extra C-compiler flags needed to compile TCLSH
#
Changes to main.mk.
1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
###############################################################################
# The following macros should be defined before this script is
# invoked:
#
# DOC              The toplevel directory of the documentation source tree.
#
# SRC              The toplevel directory of the source code source tree.
#
# TCLSQLITE3C      Name of the amalgamation source file
#
# TH3              The toplevel directory for TH3.  May be an empty string.



#
# TCLFLAGS         Extra C-compiler options needed to link against TCL
#
# TCLSTUBFLAGS     Extra C-compiler options needed to link a TCL extension
#
# NAWK             Nawk compatible awk program.  Older (obsolete?) solaris
#                  systems need this to avoid using the original AT&T AWK.











>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
###############################################################################
# The following macros should be defined before this script is
# invoked:
#
# DOC              The toplevel directory of the documentation source tree.
#
# SRC              The toplevel directory of the source code source tree.
#
# TCLSQLITE3C      Name of the amalgamation source file
#
# TH3              The toplevel directory for TH3.  May be an empty string.
#
# SLT              The toplevel directory for SQLLogicTest.  May be an
#                  empty string
#
# TCLFLAGS         Extra C-compiler options needed to link against TCL
#
# TCLSTUBFLAGS     Extra C-compiler options needed to link a TCL extension
#
# NAWK             Nawk compatible awk program.  Older (obsolete?) solaris
#                  systems need this to avoid using the original AT&T AWK.
92
93
94
95
96
97
98



99
100
101
102
103
104
105
106
107
108
109



110
111
112
113
114
115
116
	./tclsh $(SCANNER) src $(SRC)/ext/rtree/*.[ch]
	./tclsh $(SCANNER) tcl $(SRC)/test/*.test
	if test '' != '$(TH3)'; then \
	  ./tclsh $(SCANNER) th3 $(TH3)/mkth3.tcl; \
	  ./tclsh $(SCANNER) th3/req1 $(TH3)/req1/*.test; \
	  ./tclsh $(SCANNER) th3/cov1 $(TH3)/cov1/*.test; \
	fi




# Copy and HTMLize evidence files
#
FMT = $(DOC)/format_evidence.tcl

format_evidence: tclsh
	rm -fr doc/matrix/ev/*
	./tclsh $(FMT) src doc/matrix $(SRC)/src/*.[chy]
	./tclsh $(FMT) src doc/matrix $(SRC)/ext/fts3/*.[ch]
	./tclsh $(FMT) src doc/matrix $(SRC)/ext/rtree/*.[ch]
	./tclsh $(FMT) tcl doc/matrix $(SRC)/test/*.test




private_evidence: format_evidence
	./tclsh $(FMT) th3 doc/matrix $(TH3)/mkth3.tcl
	./tclsh $(FMT) th3/req1 doc/matrix $(TH3)/req1/*.test
	./tclsh $(FMT) th3/cov1 doc/matrix $(TH3)/cov1/*.test

# Generate the traceability matrix







>
>
>











>
>
>







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
	./tclsh $(SCANNER) src $(SRC)/ext/rtree/*.[ch]
	./tclsh $(SCANNER) tcl $(SRC)/test/*.test
	if test '' != '$(TH3)'; then \
	  ./tclsh $(SCANNER) th3 $(TH3)/mkth3.tcl; \
	  ./tclsh $(SCANNER) th3/req1 $(TH3)/req1/*.test; \
	  ./tclsh $(SCANNER) th3/cov1 $(TH3)/cov1/*.test; \
	fi
	if test '' != '$(SLT)'; then \
	  ./tclsh $(SCANNER) slt $(SLT)/test/evidence/*.test; \
	fi

# Copy and HTMLize evidence files
#
FMT = $(DOC)/format_evidence.tcl

format_evidence: tclsh
	rm -fr doc/matrix/ev/*
	./tclsh $(FMT) src doc/matrix $(SRC)/src/*.[chy]
	./tclsh $(FMT) src doc/matrix $(SRC)/ext/fts3/*.[ch]
	./tclsh $(FMT) src doc/matrix $(SRC)/ext/rtree/*.[ch]
	./tclsh $(FMT) tcl doc/matrix $(SRC)/test/*.test
	if test '' != '$(SLT)'; then \
	  ./tclsh $(FMT) slt doc/matrix $(SLT)/test/evidence/*.test; \
	fi

private_evidence: format_evidence
	./tclsh $(FMT) th3 doc/matrix $(TH3)/mkth3.tcl
	./tclsh $(FMT) th3/req1 doc/matrix $(TH3)/req1/*.test
	./tclsh $(FMT) th3/cov1 doc/matrix $(TH3)/cov1/*.test

# Generate the traceability matrix
Changes to matrix.tcl.
278
279
280
281
282
283
284

285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
    INSERT INTO srcreq SELECT reqno FROM requirement WHERE srcfile=$srcfile;
  }
  set totalcnt [db one {SELECT count(*) FROM srcreq}]
  puts $out "<tr><td><a href=\"$srcfile\">$srcfile</a></td>"
  set ev(tcl) 0
  set ev(th3) 0
  set ev(src) 0

  set ev(any) 0
  db eval {
    SELECT count(distinct reqno) AS cnt, srcclass 
      FROM evidence
     WHERE reqno IN srcreq
     GROUP BY srcclass
  } {
    set ev($srcclass) $cnt
  }
  db eval {
    SELECT count(distinct reqno) AS cnt
      FROM evidence
     WHERE reqno IN srcreq
  } {
    set ev(any) $cnt
  }
  foreach srcclass {tcl th3 src any} {
    set cnt $ev($srcclass)
    if {$cnt==$totalcnt} {
      set cx evok
    } else {
      set cx evnil
    }
    puts $out "<td><cite class=$cx>$srcclass: $cnt/$totalcnt</cite></td>"







>
















|







278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
    INSERT INTO srcreq SELECT reqno FROM requirement WHERE srcfile=$srcfile;
  }
  set totalcnt [db one {SELECT count(*) FROM srcreq}]
  puts $out "<tr><td><a href=\"$srcfile\">$srcfile</a></td>"
  set ev(tcl) 0
  set ev(th3) 0
  set ev(src) 0
  set ev(slt) 0
  set ev(any) 0
  db eval {
    SELECT count(distinct reqno) AS cnt, srcclass 
      FROM evidence
     WHERE reqno IN srcreq
     GROUP BY srcclass
  } {
    set ev($srcclass) $cnt
  }
  db eval {
    SELECT count(distinct reqno) AS cnt
      FROM evidence
     WHERE reqno IN srcreq
  } {
    set ev(any) $cnt
  }
  foreach srcclass {tcl slt th3 src any} {
    set cnt $ev($srcclass)
    if {$cnt==$totalcnt} {
      set cx evok
    } else {
      set cx evnil
    }
    puts $out "<td><cite class=$cx>$srcclass: $cnt/$totalcnt</cite></td>"
358
359
360
361
362
363
364

365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
     WHERE srcfile=$srcfile
     ORDER BY srcseq
  } {
    puts $out "<hr><a name=\"$reqno\"></a>"
    puts $out "<p><a href=\"$basename#$reqno\">$reqno</a>"

    set ev(tcl) 0

    set ev(th3) 0
    set ev(src) 0
    db eval {
      SELECT count(*) AS cnt, srcclass 
        FROM evidence
       WHERE reqno=$reqno
       GROUP BY srcclass
    } {
      set ev($srcclass) $cnt
    }
    set proof($reqno) 0
    foreach srcclass {tcl th3 src} {
      set cnt $ev($srcclass)
      if {$cnt} {
        set cx evok
        incr proof($reqno)
      } else {
        set cx evnil
      }







>











|







359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
     WHERE srcfile=$srcfile
     ORDER BY srcseq
  } {
    puts $out "<hr><a name=\"$reqno\"></a>"
    puts $out "<p><a href=\"$basename#$reqno\">$reqno</a>"

    set ev(tcl) 0
    set ev(slt) 0
    set ev(th3) 0
    set ev(src) 0
    db eval {
      SELECT count(*) AS cnt, srcclass 
        FROM evidence
       WHERE reqno=$reqno
       GROUP BY srcclass
    } {
      set ev($srcclass) $cnt
    }
    set proof($reqno) 0
    foreach srcclass {tcl slt th3 src} {
      set cnt $ev($srcclass)
      if {$cnt} {
        set cx evok
        incr proof($reqno)
      } else {
        set cx evnil
      }
440
441
442
443
444
445
446

447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
      FROM requirement
     WHERE srcfile=$srcfile
     ORDER BY srcseq
  } {
    puts $out "<tr><td><a class=ev href=\"$basename#$reqno\">$reqno</a></td>"

    set ev(tcl) 0

    set ev(th3) 0
    set ev(src) 0
    db eval {
      SELECT count(*) AS cnt, srcclass 
        FROM evidence
       WHERE reqno=$reqno
       GROUP BY srcclass
    } {
      set ev($srcclass) $cnt
    }
    set proof($reqno) 0
    foreach srcclass {tcl th3 src} {
      set cnt $ev($srcclass)
      if {$cnt} {
        set cx evok
        incr proof($reqno)
      } else {
        set cx evnil
      }







>











|







442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
      FROM requirement
     WHERE srcfile=$srcfile
     ORDER BY srcseq
  } {
    puts $out "<tr><td><a class=ev href=\"$basename#$reqno\">$reqno</a></td>"

    set ev(tcl) 0
    set ev(slt) 0
    set ev(th3) 0
    set ev(src) 0
    db eval {
      SELECT count(*) AS cnt, srcclass 
        FROM evidence
       WHERE reqno=$reqno
       GROUP BY srcclass
    } {
      set ev($srcclass) $cnt
    }
    set proof($reqno) 0
    foreach srcclass {tcl slt th3 src} {
      set cnt $ev($srcclass)
      if {$cnt} {
        set cx evok
        incr proof($reqno)
      } else {
        set cx evnil
      }