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 146 147 148 149 150 151 152
|
; ACL2 Sidekick
; Copyright (C) 2014 Kookamara LLC
;
; Contact:
;
; Kookamara LLC
; 11410 Windermere Meadows
; Austin, TX 78759, USA
; http://www.kookamara.com/
;
; License: (An MIT/X11-style license)
;
; Permission is hereby granted, free of charge, to any person obtaining a
; copy of this software and associated documentation files (the "Software"),
; to deal in the Software without restriction, including without limitation
; the rights to use, copy, modify, merge, publish, distribute, sublicense,
; and/or sell copies of the Software, and to permit persons to whom the
; Software is furnished to do so, subject to the following conditions:
;
; The above copyright notice and this permission notice shall be included in
; all copies or substantial portions of the Software.
;
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
; DEALINGS IN THE SOFTWARE.
;
; Original author: Jared Davis <jared@kookamara.com>
(in-package "SIDEKICK")
(include-book "quicklisp/hunchentoot" :dir :system)
(include-book "io")
(include-book "std/util/defconsts" :dir :system)
(include-book "oslib/catpath" :dir :system)
(include-book "session")
(include-book "disassemble")
(include-book "lookup")
(include-book "webcommand")
(include-book "lint")
(include-book "eventdata")
(include-book "explore")
(include-book "centaur/misc/tshell" :dir :system)
(defttag :sidekick)
(set-state-ok t)
(program)
(defconsts *sidekick-dir* (cbd))
(define start (&key (port maybe-natp))
:parents (sidekick)
:short "Start the ACL2 sidekick web server."
(declare (ignorable port))
(raise "Under the hood definition not installed."))
(define stop ()
:parents (sidekick)
:short "Stop the ACL2 sidekick web server."
(raise "Under the hood definition not installed."))
; (depends-on "server-raw.lsp")
(include-raw "server-raw.lsp"
:host-readtable t)
(xdoc::add-resource-directory "sidekick" "screenshots")
(defxdoc sidekick
:parents (acl2::projects)
:short "The ACL2 Sidekick is a graphical add-on for ACL2. It extends your
ACL2 session with a web server so that you can interact with ACL2 through your
browser. You use the Sidekick along with—not instead of—Emacs or
your favorite ACL2 development environment."
:long "<p><b>Note</b>: the Sidekick is <b>highly experimental</b> software
and at this point is mostly a proof of concept.</p>
<p>Screenshots:</p>
<ul>
<li><a href='res/sidekick/emacs.png'>Sidekick with Emacs</a></li>
<li><a href='res/sidekick/eclipse.png'>Sidekick with Eclipse/ACL2(s)</a></li>
</ul>
<h3>Basic Setup</h3>
<p>The Sidekick has been tested on <a href='http://ccl.clozure.com'>CCL</a> on
Linux with Firefox or Chromium as the browser. It might possibly work on other
Lisps, most likely SBCL and LispWorks.</p>
<p>To build the Sidekick, build ACL2 as usual and then certify at least the
@('basic') and @(see acl2::quicklisp) books, e.g.,</p>
@({
$ cd acl2
$ make LISP=ccl
$ cd acl2/books
$ make USE_QUICKLISP=1 basic quicklisp
})
<p>Then certify the sidekick books:</p>
@({
$ cd acl2/books/projects/sidekick
$ cert.pl top # should produce top.cert
})
<p>The Sidekick should now be ready. To try it out, go to the
@('projects/sidekick/demo') directory and follow along with @('demo.lsp').</p>
<h4>Sidekick Images</h4>
<p>For instant startup times, you can build an ACL2 image with the Sidekick
built in.</p>
@({
$ cd acl2/books/projects/sidekick
$ make # should produce a 'sidekick' executable
$ ./sidekick
})
<p>You can then use this @('sidekick') executable instead of invoking your
normal @('saved_acl2') image when doing interactive development.</p>
<h4>Browser Launching</h4>
<p>You can tell the Sidekick to automatically launch a web browser when it
boots up by setting the @('SIDEKICK_BROWSER') environment variable. For
instance:</p>
@({
$ export SIDEKICK_BROWSER=\"firefox\"
})
<p>Whatever command you supply will simply be invoked, in the background, with
the argument @('http://localhost:9000/') (or similar).</p>
<h4>Other Ports</h4>
<p>The Sidekick will try to listen on port 9000 by default, but this can be
adjusted using SIDEKICK_PORT. For instance:</p>
@({
$ export SIDEKICK_PORT=9001
})
<p>You can also explicitly start the sidekick on a different port by using,
e.g., @('(sidekick::start 9001)').</p>")
|