Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Automatic generation of patches.

15 views
Skip to first unread message

Hal Niner

unread,
Oct 31, 2003, 12:42:05 PM10/31/03
to
I'm looking for a automatic way of generating files that patch a live
running system. My idea is: I have (a) an old source code (b) a new
source code. Somehow I want to generate a file containing the
difference between (b) and (a) that can be (LOAD)ed into a running
lisp system. Ideally this file would containg only the minimal
changes needed to upgrade the live system.

Henrik Motakef

unread,
Oct 31, 2003, 1:06:15 PM10/31/03
to
ha...@cyberspace.org (Hal Niner) writes:

There is some diff-like stuff in the CMU AI repository that could be useful:
<http://www-cgi.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/src_cmp/0.html>

But that will only help you with finding differences in source code,
for a useful patch you will need more. I doubt that an automatic
solution can work reliably.

Paul Wallich

unread,
Oct 31, 2003, 1:18:01 PM10/31/03
to
Henrik Motakef wrote:

Fer example, you'd have to do some reasoning to capture changes in the
formats of data structures passed among functions and generate the
appropriate conversions. Alternately you could restrict "legal" changes
in source files to ones that could be handled by your patch system, but
that might not be satisfactory either.

paul

Espen Vestre

unread,
Nov 3, 2003, 3:23:53 AM11/3/03
to
ha...@cyberspace.org (Hal Niner) writes:

I use a fairly naive "lisp diff" program that roughly does the
following:

- constructs the set-difference between the two programs (testing
with a function which is roughly EQUALP)
- adds dummy methods for any _removed_ methods (alternatively, one
could add forms that actually removed those methods)
- adds setf-forms corresponding to any changed DEFVARS.
- inserts IN-PACKAGE wherever it occurs

It's by no means perfect, but I actually _very_ rarely have to do
any manual amendments to the patches automatically created with this
program.
--
(espen)

Martin Ginkel

unread,
Nov 5, 2003, 5:26:05 AM11/5/03
to
Espen Vestre wrote:
> I use a fairly naive "lisp diff" program that roughly does the
> following:
>
> - constructs the set-difference between the two programs (testing
> with a function which is roughly EQUALP)
> - adds dummy methods for any _removed_ methods (alternatively, one
> could add forms that actually removed those methods)
> - adds setf-forms corresponding to any changed DEFVARS.
> - inserts IN-PACKAGE wherever it occurs
>
> It's by no means perfect, but I actually _very_ rarely have to do
> any manual amendments to the patches automatically created with this
> program.

Send links ;-)!

I would like to include CVS into the process of diff-generation, but
that is probably not too hard.
The deleted methods problem is already solved by a delete-method macro
(working by name, quals and lamdas).

The main things, I need to compute are the lists of changed definitions
and the order of patching (probably from defsystem).

Martin

0 new messages