2
; Copyright (C) 2014 Kookamara LLC
7
; 11410 Windermere Meadows
8
; Austin, TX 78759, USA
9
; http://www.kookamara.com/
11
; License: (An MIT/X11-style license)
13
; Permission is hereby granted, free of charge, to any person obtaining a
14
; copy of this software and associated documentation files (the "Software"),
15
; to deal in the Software without restriction, including without limitation
16
; the rights to use, copy, modify, merge, publish, distribute, sublicense,
17
; and/or sell copies of the Software, and to permit persons to whom the
18
; Software is furnished to do so, subject to the following conditions:
20
; The above copyright notice and this permission notice shall be included in
21
; all copies or substantial portions of the Software.
23
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29
; DEALINGS IN THE SOFTWARE.
31
; Original author: Jared Davis <jared@kookamara.com>
35
(verify (implies (and (natp x)
41
(revappend z (floor k n)))))
43
; Note: the acl2-customization.lsp file in this directory loads the sidekick
44
; book. When you start ACL2 in this directory, you should see a message such
47
; ----------------------------------------------------------------
49
; Sidekick started, see http://localhost:9000/
51
; ----------------------------------------------------------------
53
; To try out the Sidekick, point your web browser to that address. Some things
56
; - Go to the Session page. Run through these events interactively, and see
57
; how it follows along with what you're doing.
59
; - Interactively run ``:show append''. It should bring up the lookup page
60
; with documentation, properties, etc.
62
; - Try something like (include-book "std/top" :dir :system) and then take
63
; a look at the :lint command. You can get there by clicking or by typing
69
; This is just to test out the session viewer color stuff
78
(declare (xargs :guard t))
85
(equal (app (app x y) z)
88
; We'll add a disabled event to see the color change.
90
(defthmd app-when-atom
95
; And partially disabled/enabled events get a slightly lighter color:
98
(declare (xargs :verify-guards nil))
103
(+ (fib (- x 1)) (fib (- x 2))))))
107
(equal (fib 36) ,(fib 36))))
109
(defsection partially-disabled
111
(defthmd disabled-lemma
113
(equal (app x y) y)))
115
(defthm enabled-lemma
117
(equal (app x y) y))))
120
"Stupid test of encoding"
124
(declare (xargs :mode :program :guard (natp x)))
127
(verify-termination f (declare (xargs :verify-guards nil)))
131
(defsection mixed-program/logic
134
(declare (xargs :mode :program))
138
(declare (xargs :mode :logic))
141
(defsection mixed-verified/unverified
143
(defun f-unverified (x)
144
(declare (xargs :verify-guards nil))
147
(defun f-verified (x)
148
(declare (xargs :verify-guards t))
151
(defsection two-program
153
(defun f-program1 (x)
154
(declare (xargs :mode :program))
157
(defun f-program2 (x)
158
(declare (xargs :mode :program))
161
(defsection two-unverified
163
(defun f-unverified1 (x)
164
(declare (xargs :verify-guards nil))
167
(defun f-unverified2 (x)
168
(declare (xargs :verify-guards nil))
171
(defsection two-verified
173
(defun f-verified1 (x)
174
(declare (xargs :verify-guards t))
177
(defun f-verified2 (x)
178
(declare (xargs :verify-guards t))
182
(defsection program-section
184
(declare (xargs :mode :program))
187
(defsection logic-section
189
(declare (xargs :verify-guards nil))
192
(defsection verified-section
193
(defun g-verified (x)
194
(declare (xargs :verify-guards t))
199
(equal (app (app x y) z)
203
(equal (app (app x y) z)
207
(equal (app (app x y) z)
211
(equal (app (app x y) z)
215
(equal (app (app x y) z)
219
(equal (app (app x y) z)
223
(equal (app (app x y) z)
227
(equal (app (app x y) z)
232
(declare (xargs :verify-guards t))
239
(define h4 (x) :mode :program x)
242
(defsection nesting-test