Skip to content

Commit e0eebf5

Browse files
committed
Moved induction proof to auto-run nightly
1 parent 1acd2ef commit e0eebf5

File tree

6 files changed

+86
-21
lines changed

6 files changed

+86
-21
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ bench/joel
88
bench/pages/
99
bench/fwt.rkt
1010
bench/bugs.rkt
11+
bench/induction.rkt
1112
geckodriver.log
13+
cache
1214
previous/
1315

1416
# Racket and TypeScript junk

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,6 @@ bench/induction.rkt: capture/capture.py capture/all.js bench/induction/list.html
103103
'bench/induction/list.html#2' 'bench/induction/list.html#3' \
104104
'bench/induction/list.html#4' 'bench/induction/list.html#5' \
105105
'bench/induction/list.html#50'
106+
107+
reports/induction.html reports/induction.json: bench/induction.proof
108+
racket src/report.rkt proofs $(FLAGS) --show-all --cache reports/induction.cache --timeout 600 -o reports/induction $^

bench/button_test_stress/button_test_stress.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

bench/button_test_stress/list_append.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

bench/button_test_stress/prerun.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

bench/induction.proof

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
;; -*- mode: scheme -*-
2+
;; A Proof to verify the functionality of a simple website that uses java script
3+
;; By Skyler Griffith
4+
5+
(import "common.thm")
6+
7+
(page press-0 (load "induction.rkt" doc-1)
8+
:w (between 800 1920)
9+
:h (between 600 1280)
10+
:fs (between 16 32))
11+
12+
(page press-1 (load "induction.rkt" doc-2)
13+
:w (between 800 1920)
14+
:h (between 600 1280)
15+
:fs (between 16 32))
16+
17+
(page press-2 (load "induction.rkt" doc-3)
18+
:w (between 800 1920)
19+
:h (between 600 1280)
20+
:fs (between 16 32))
21+
22+
(page press-3 (load "induction.rkt" doc-4)
23+
:w (between 800 1920)
24+
:h (between 600 1280)
25+
:fs (between 16 32))
26+
27+
(page press-4 (load "induction.rkt" doc-5)
28+
:w (between 800 1920)
29+
:h (between 600 1280)
30+
:fs (between 16 32))
31+
32+
(page press-5 (load "induction.rkt" doc-6)
33+
:w (between 800 1920)
34+
:h (between 600 1280)
35+
:fs (between 16 32))
36+
37+
(page press-50 (load "induction.rkt" doc-7)
38+
:w (between 800 1920)
39+
:h (between 600 1280)
40+
:fs (between 16 32))
41+
42+
(theorem (top-above-bottom b)
43+
(>= (- (bottom b) (top b) 0)))
44+
45+
(proof (top-above-bottom top-above-bottom press-0 press-1 press-2 press-3 press-4 press-5)
46+
(component list (id list))
47+
(component button (tag button))
48+
(components todos (child (id list) *))
49+
50+
(erase todos :text)
51+
(assert todos (and (> (height ?) 0) (float-flow-skip ?) (non-negative-margins ?)))
52+
(pre list (= (floats-tracked ?) 0))
53+
(induct list ; the inductive fact
54+
(and (>= (- (bottom inductive-footer) (top inductive-header)) 0) (= (floats-tracked inductive-footer) (floats-tracked inductive-header))))
55+
(assert list (forall () (>= (- (bottom (last list)) (top (first list)) 0)))))
56+
57+
(proof (stress-test top-above-bottom press-50)
58+
(component list (id list))
59+
(component button (tag button))
60+
(components todos (child (id list) *))
61+
62+
(erase todos :text)
63+
(assert todos (and (> (height ?) 0) (float-flow-skip ?) (non-negative-margins ?)))
64+
(pre list (= (floats-tracked ?) 0))
65+
(induct list ; the inductive fact
66+
(and (>= (- (bottom inductive-footer) (top inductive-header)) 0) (= (floats-tracked inductive-footer) (floats-tracked inductive-header))))
67+
(assert list (forall () (>= (- (bottom (last list)) (top (first list)) 0)))))
68+
69+
(proof (interactive-onscreen interactive-onscreen press-0 press-1 press-2 press-3)
70+
(component list (id list))
71+
(component button (tag button))
72+
(components todos (child (id list) *))
73+
(erase todos :text)
74+
(assert list
75+
(=> (or (= (prev list) null)
76+
(non-negative-margins (prev list)))
77+
(non-negative-margins list)))
78+
(assert * (forall (b) (=> (onscreen ?)
79+
(=> (or (is-component b) (is-interactive b)) (onscreen b)))))
80+
(assert (- * list) (forall (t) (=> (has-type t text) (> (width t) 0) (non-negative-margins ?))))
81+
(assert root (onscreen root)))

0 commit comments

Comments
 (0)