Next: Evaluation, Previous: Usage, Up: Usage [Contents][Index]
The following example code;
asm software object from a file,
(in-package :software-evolution-example)
;; gcd.s may be compiled from gcd.c in the test/ directory.
(let ((orig (from-file (make-instance 'asm) "../test/gcd/gcd.s"))) ; (1)
(multiple-value-bind (mutant edit) (mutate (copy *original*)) ; (2)
(let ((temp (temp-file-name "s")))
(to-file mutant temp) ; (3)
(format t "Results of applying ~S to gcd written to ~S.~%" ; (4)
edit temp))))
Executing this code will print output resembling the following.
Results of applying (:CUT 44) to gcd written to "/tmp/fileyfH5Hx.s".