-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHoare2Test.v
More file actions
145 lines (120 loc) · 4.12 KB
/
Hoare2Test.v
File metadata and controls
145 lines (120 loc) · 4.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Set Warnings "-notation-overridden,-parsing".
From Coq Require Export String.
From PLF Require Import Hoare2.
Parameter MISSING: Type.
Module Check.
Ltac check_type A B :=
match type of A with
| context[MISSING] => idtac "Missing:" A
| ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"]
end.
Ltac print_manual_grade A :=
match eval compute in A with
| Some (_ ?S ?C) =>
idtac "Score:" S;
match eval compute in C with
| ""%string => idtac "Comment: None"
| _ => idtac "Comment:" C
end
| None =>
idtac "Score: Ungraded";
idtac "Comment: None"
end.
End Check.
From PLF Require Import Hoare2.
Import Check.
Goal True.
idtac "------------------- if_minus_plus_reloaded --------------------".
idtac " ".
idtac "#> Manually graded: decorations_in_if_minus_plus_reloaded".
idtac "Possible points: 2".
print_manual_grade manual_grade_for_decorations_in_if_minus_plus_reloaded.
idtac " ".
idtac "------------------- slow_assignment --------------------".
idtac " ".
idtac "#> Manually graded: decorations_in_slow_assignment".
idtac "Possible points: 2".
print_manual_grade manual_grade_for_decorations_in_slow_assignment.
idtac " ".
idtac "------------------- factorial --------------------".
idtac " ".
idtac "#> Manually graded: decorations_in_factorial".
idtac "Possible points: 3".
print_manual_grade manual_grade_for_decorations_in_factorial.
idtac " ".
idtac "------------------- Min_Hoare --------------------".
idtac " ".
idtac "#> Manually graded: decorations_in_Min_Hoare".
idtac "Possible points: 3".
print_manual_grade manual_grade_for_decorations_in_Min_Hoare.
idtac " ".
idtac "------------------- two_loops --------------------".
idtac " ".
idtac "#> Manually graded: decorations_in_two_loops".
idtac "Possible points: 3".
print_manual_grade manual_grade_for_decorations_in_two_loops.
idtac " ".
idtac "------------------- slow_assignment_dec --------------------".
idtac " ".
idtac "#> Manually graded: check_defn_of_slow_assignment_dec".
idtac "Advanced".
idtac "Possible points: 1".
print_manual_grade manual_grade_for_check_defn_of_slow_assignment_dec.
idtac " ".
idtac "#> slow_assignment_dec_correct".
idtac "Advanced".
idtac "Possible points: 2".
check_type @slow_assignment_dec_correct (
(forall m : nat, dec_correct (slow_assignment_dec m))).
idtac "Assumptions:".
Abort.
Print Assumptions slow_assignment_dec_correct.
Goal True.
idtac " ".
idtac "------------------- factorial_dec --------------------".
idtac " ".
idtac "#> Manually graded: factorial_dec".
idtac "Advanced".
idtac "Possible points: 6".
print_manual_grade manual_grade_for_factorial_dec.
idtac " ".
idtac " ".
idtac "Max points - standard: 13".
idtac "Max points - advanced: 22".
idtac "".
idtac "Allowed Axioms:".
idtac "functional_extensionality".
idtac "FunctionalExtensionality.functional_extensionality_dep".
idtac "".
idtac "".
idtac "********** Summary **********".
idtac "".
idtac "Below is a summary of the automatically graded exercises that are incomplete.".
idtac "".
idtac "The output for each exercise can be any of the following:".
idtac " - 'Closed under the global context', if it is complete".
idtac " - 'MANUAL', if it is manually graded".
idtac " - A list of pending axioms, containing unproven assumptions. In this case".
idtac " the exercise is considered complete, if the axioms are all allowed.".
idtac "".
idtac "********** Standard **********".
idtac "---------- decorations_in_if_minus_plus_reloaded ---------".
idtac "MANUAL".
idtac "---------- decorations_in_slow_assignment ---------".
idtac "MANUAL".
idtac "---------- decorations_in_factorial ---------".
idtac "MANUAL".
idtac "---------- decorations_in_Min_Hoare ---------".
idtac "MANUAL".
idtac "---------- decorations_in_two_loops ---------".
idtac "MANUAL".
idtac "".
idtac "********** Advanced **********".
idtac "---------- check_defn_of_slow_assignment_dec ---------".
idtac "MANUAL".
idtac "---------- slow_assignment_dec_correct ---------".
Print Assumptions slow_assignment_dec_correct.
idtac "---------- factorial_dec ---------".
idtac "MANUAL".
Abort.
(* 2020-09-09 21:08 *)