Add means to recover method definitions from method objects

Bug #1819015 reported by Paul F. Dietz on 2019-03-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

One can get the definition of ordinary functios using FUNCTION-LAMBDA-EXPRESSION (if the function was in a LOADed file, rather than from a fasl, or was defined by eval-ing a defun, or calling COMPILE on a lambda expression), but there is nothing similar for methods.

Add a means for obtaining the source for a method from the method object, and also a means of replacing and restoring a method object for a generic function.

It might be necessary to cheat a bit due to methods being defined in a lexical environment which may no longer be available, but that applies to the lambda expression from FUNCTION-LAMBDA-EXPRESSION as well.

The use case for this is to do mutation testing on Common Lisp code. This would involve getting the definitions of functions and methods, mutating them, and seeing if the test suite kills the mutants.

description: updated
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers