<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<HTML>
  <HEAD>
    <link rel="icon"          href="/favicon.ico" type="image/x-icon">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="stylesheet"    href="../../../../../../default.css"  type="text/css">

    <TITLE>Common Lisp - Image Based Development</TITLE>

    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <META HTTP-EQUIV="Description"
          NAME="description" CONTENT="Common Lisp - Image Based Development">
    <META NAME="author"      CONTENT="Pascal J. Bourguignon">

    <META NAME="keywords"    CONTENT="Common Lisp, Lisp, Lisp Image, Image Based Common Lisp, IBCL">
  </HEAD>
  <BODY>
    <!--TOP-BEGIN-->
<!-- This section is automatically generated by html-update, -->
<!-- from data in 'node.el'.    Please, do not edit it here. -->
<DIV CLASS="TOP"></DIV>
<!--TOP-END-->
    <!--MENU-BEGIN-->
<!-- This section is automatically generated by html-update, -->
<!-- from data in 'node.el'.    Please, do not edit it here. -->
<DIV CLASS="MENU"><HR><P>|
 <A HREF="../../../../../../toc.html">Contents</a> |
 <A HREF="../../../../../../index.html">Home</a> |
 <A HREF="../wang.html.in">Previous</a> |
 <A HREF="../index.html.in">Up</a> |
 <A HREF="../sedit/index.html.in">Next</a> |
</P><HR></DIV>
<!--MENU-END-->

    <H1>Image Based Development</H1>

    <p>The package <tt>IBCL</tt> exports the same symbols as <tt>COMMON-LISP</tt>, but for
      some of the functions of macros modified to track of the source
      of the definitions and to be able to edit them from the image,
      and to save them in files.</p>

    <p>The package <tt>IBCL-USER</tt> is a virgin package using <tt>IBCL</tt> instead of <tt>CL</tt>.</p>

    <p>One can work at the REPL, define variables with
      <tt>DEFCONSTANT</tt>, <tt>DEFVAR</tt>, <tt>DEFPARAMETER</tt>, macros with <tt>DEFMACRO</tt>,
      and functions with <tt>DEFUN</tt>, edit macro and function definitions
      with <tt>ED</tt>, and save the image with <tt>SAVE-IMAGE</tt>.</p>

    <p>The function <tt>LIST-PACKAGES-WITH-SOURCES</tt> returns a list of packages
      where some of these variables or functions are defined.
      The function <tt>SOURCE</tt> returns the source form of the given
      variable or function.
      The function <tt>SAVE-SOURCES</tt> saves the definitions in a package,
      or all the definitions to a file or stream.</p>

    <p>A recent complete implementation of IBCL can be found in the
      <a href="https://gitorious.org/com-informatimago/com-informatimago">
        Informatimago  Common Lisp Library at gitorious</a>, specifically:
      <a
         href="https://gitorious.org/com-informatimago/com-informatimago/trees/master/common-lisp/lisp">
        com.informatimago.common-lisp.lisp</a>.

    <p>You can load it in a Common Lisp implementation with
      <ahref="http://www.quicklisp.org/">quicklisp</a>:</p>

<pre>
cl-user&gt; (ql:quickload :com.informatimago.common-lisp.lisp.ibcl)
To load "com.informatimago.common-lisp.lisp.ibcl":
  Load 1 ASDF system:
    com.informatimago.common-lisp.lisp.ibcl
; Loading "com.informatimago.common-lisp.lisp.ibcl"
[package com.informatimago.common-lisp.lisp.image-based-common-lisp]
[package com.informatimago.common-lisp.lisp.image-based-common-lisp-user]
(:com.informatimago.common-lisp.lisp.ibcl)
cl-user&gt; (in-package :ibcl-user)
#&lt;Package "COM.INFORMATIMAGO.COMMON-LISP.LISP.IMAGE-BASED-COMMON-LISP-USER"&gt;
image-based-common-lisp-user&gt; (defun f (x)
                                (if (zerop x)
                                  1
                                  (* x (f (1- x)))))

f
image-based-common-lisp-user&gt; (source 'f :function)
(defun f (x) (if (zerop x) 1 (* x (f (1- x)))))
#&lt;Package "COM.INFORMATIMAGO.COMMON-LISP.LISP.IMAGE-BASED-COMMON-LISP-USER"&gt;
image-based-common-lisp-user&gt; (defvar f 42)
f
image-based-common-lisp-user&gt; (source 'f :variable)
(defvar f 42)
#&lt;Package "COM.INFORMATIMAGO.COMMON-LISP.LISP.IMAGE-BASED-COMMON-LISP-USER"&gt;
image-based-common-lisp-user&gt; (defun (setf f) (newval) (setf f newval))
(setf f)
image-based-common-lisp-user&gt; (source '(setf f) :function)
(defun (setf f) (newval) (setf f newval))
#&lt;Package "COM.INFORMATIMAGO.COMMON-LISP.LISP.IMAGE-BASED-COMMON-LISP-USER"&gt;
image-based-common-lisp-user&gt; (in-package :cl-user)
#&lt;Package "COM.INFORMATIMAGO.COMMON-LISP.LISP.IMAGE-BASED-COMMON-LISP-USER"&gt;
image-based-common-lisp-user&gt; (cl:in-package :cl-user)
#&lt;Package "COMMON-LISP-USER"&gt;
cl-user&gt;
</pre>

<p>Old proof-of-concept source:
  <UL>
    <LI><A HREF="ibcl.lisp">ibcl.lisp</A></LI>
    <LI><A HREF="ibcl-bootstrap.lisp">ibcl-bootstrap.lisp</A>
      A script to generate an executable image using
      IMAGE-BASED-COMMON-LISP instead of COMMON-LISP.
      For <a href="http://clisp.cons.org/">clisp</a>
      or  <a href="http://sbcl.sourceforge.net/">sbcl</a>.</LI>
  </UL>
</p>

<!--MENU-BEGIN-->
<!-- This section is automatically generated by html-update, -->
<!-- from data in 'node.el'.    Please, do not edit it here. -->
<DIV CLASS="MENU"><HR><P>|
 <A HREF="../../../../../../toc.html">Contents</a> |
 <A HREF="../../../../../../index.html">Home</a> |
 <A HREF="../wang.html.in">Previous</a> |
 <A HREF="../index.html.in">Up</a> |
 <A HREF="../sedit/index.html.in">Next</a> |
</P><HR></DIV>
<!--MENU-END-->
<!--BOTTOM-BEGIN-->
<!-- This section is automatically generated by html-update, -->
<!-- from data in 'node.el'.    Please, do not edit it here. -->
<DIV CLASS="BOTTOM">
<hr><code><small>
 | <a href="http://www.informatimago.com//develop/lisp/com/informatimago/small-cl-pgms/ibcl/index.html.in">Mirror on informatimago.com</a>
 | <a href="http://informatimago.free.fr/i//develop/lisp/com/informatimago/small-cl-pgms/ibcl/index.html.in">Mirror on free.fr</a>
 | </small></code>

<BR><SMALL>
      <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-html401"
          alt="Valid HTML 4.01!" height="31" width="88"></a>
   </SMALL>
</DIV>
<!--BOTTOM-END-->
</BODY>
</HTML>
ViewGit