Here are some notes on the Genprog automatic repair tool.
Note that Genprog is now on Github: https://github.com/squaresLab/genprog-code
Compiling
version SVN 1688 genprog-code-snapshot-svn1688.tar.gz
First compile CIL
wget http://downloads.sourceforge.net/project/cil/cil/cil-1.7.3.tar.gz
tar xvzf cil-1.7.3.tar.gz
cd cil-1.7.3
./configure
make
export CIL=`pwd`
Then compile Genprog (works with OCaml 4.02.3):
cd genprog-code-snapshot-svn1688
make
cp src/repair genprog-svn1688
./genprog-svn1688
The cool thing is that it has no dependencies once built:
linux-vdso.so.1 (0x00007ffca6bee000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0f157a4000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0f155a0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0f151fb000)
/lib64/ld-linux-x86-64.so.2 (0x000055a8afb02000)
version 3.0 SVN 1469 Genprog v3.0 (svn rev 1469)
It requires cil-1.3.7. I had to disable the ELF mode.
Command line options
--program X repair X
--seed X use X as random seed
--pos-tests X number of positive tests
--neg-tests X number of negative tests
--search X use strategy X (brute, distributed, ga, neutral, oracle, walk)
--gui enable phone GUI demo-based output. gui
--quiet disable all debug output. quiet
--exp-diff perform diffX/delta-debugging at the expression level. Default: false
--templates Use repair templates; read from file X. Default: none
--template-cache save the template computations to avoid wasting time.
--prefix X append X on file names to access original source. Default: ./
--sanity X Sanity strategy. Options: "yes", "no". Default: yes if no preexisting rep cache, no otherwise.
--no-rep-cache do not load representation (parsing) .cache file
--neg-weight X weight to give statements only on the negative path. Default: 1.0
--pos-weight X weight to give statements on both the positive and the negative paths. Default: 0.1
--fitness-in-parallel X allow X fitness evals for 1 variant in parallel
--keep-source keep all source files
--nested allow mutating the results of a previous mutation
--test-command X use X as test command
--test-script X use X as test script name
--compiler X use X as compiler
--compiler-command X use X as compiler command
--compiler-opts X use X as options
--preprocessor preprocessor command. Default: __COMPILER_NAME__ -E __COMPILER_OPTIONS__
--label-repair indicate repair locations
--flatten-path X flatten weighted path (sum/min/max/first/last)
--allow-coverage-fail allow coverage to fail its test cases
--regen-paths regenerate path files
--fault-scheme X fault localization scheme X. Options: path, uniform, line, weight, tarantula, jaccard, ochiai, clone. Default: path
--clone-file X code clone file used to modify weights
--fault-path X Negative path file, for path-based localization. Default: coverage.path.neg
--fault-file X Fault localization file. e.g., Lines/weights if scheme is lines/weights.
--fix-scheme X Fix localization scheme X. Options: path, uniform, line, weight, oracle, default (whatever Wes was doing before). Default: default
--fix-path X Positive path file, for path-based localization. Default: coverage.path.pos
--fix-file X Fix localization information file, e.g., Lines/weights.
--fix-oracle X List of source files for the oracle fix information.
--coverage-info X Collect and print out suite coverage info to file X
--coverage-per-test create and use 'per test case' coverage information
--use-partition N restrict mutations to partition N
--valgrind the program under repair is valgrind; lots of hackiness/special processing.
--rep-cache X rep cache file. Default: base_name.cache.
--skip-tests X assume test cases X (concat all names) pass
--skip-failed-sanity-tests skip those tests that the sanity check fails
--negative-test-weight X negative tests fitness factor. Default: 2.0
--single-fitness use a single fitness value
--sample X sample size of positive test cases to use for fitness. Default: 1.0
--samp-strat X Sample strategy: variant, generation, all. Default: variant
--print-source-name Print the source name(s) of variants with their fitness. Default: false
--print-incremental-evals Print the number of evals to date along with variants/fitness. Default:false
--best-test-rule X use X to rank possible tests in adaptive search
--sample-runs X Execute X runs of the test suite while sampling with oprofile.
--elf-risc Specify that a RISC instruction set is used with fixed-width instructions.
--asm-code-only Limit mutation operators to code sections of assembly files
--minimization Attempt to minimize diff script using delta-debugging
--edit-script Minimize the edit script, not the tree-based diff. Default: false
--lase-deallocation-api function API for deallocating memory to prevent leaks
--lase-paired-functions CSV contains function-to-wrap, prefix-function, and suffix-function
--semantic-check limit CIL mutations by requiring matching variables
--mt-cov instrument for coverage with locks. Avoid if possible.
--uniq print each visited stmt only once
--swap-bug swap is implemented as in ICSE 2012 GMB experiments.
--ignore-dead-code do not make known-dead mutations.
--ignore-standard-headers do not mutate C library #include headers.
--ignore-equiv-appends do not make equivalent append mutations.
--ignore-string-equiv-fixes do not consider string-equivalent fixes twice.
--ignore-untyped-returns do not insert 'return' if the types mismatch.
--popsize X variant population size
--crossover X use X as crossover [one,back,subset,flat]
--crossp X use X as crossover rate
--format X format for serialized population. Options: bin/binary, txt. Default: txt
--tournament-size X use x as tournament size
--appp X relative append probability. Default: 0.3333.
--delp X relative delete probability. Default: 0.3333.
--swapp X relative swap probability. Default: 0.3333
--repp X relative replace probability. Default: 0.0
--lasep X relative probability of applying LASE templates. Default: 0.0
--generations X conduct X iterations of the given search strategy. Default: 10.
--max-evals X allow X maximum fitness evaluations in GA runs
--promut X make X mutations per 'mutate' call
--geomp X probability of success for geometric distribution of mutations
--subatom-mutp X use X as subatom mutation rate
--subatom-constp X use X as subatom constant rate
--continue Continue search after repair has been found. Default: false
--best-edit-rule X use X to rank possible edits in adaptive search
--exclude-edits X exclude all edits specified in X when running repair (space-seperated)
--pd-mutp X use X as the binomial mutation rate in exploration proactive diversity search
--eviction-strategy X strategy for evicting from the steady-state popultion (random,tournament,worst)
--fitness-log X log pop fitness to CSV file; used for steady-state where pop fitness is not clear from debug log
--neutral-walk-max-size X Maximum neutral variant size; 0 for any size, -1 to maintain original.
--neutral-walk-weight X Weight selection to favor X individuals. (e.g., small)
--multiopt-minimize minimize multiopt objective
--multiopt-no-inf avoid infinite values
--num-objectives X expect X objective values
--hostname X server ip
--sport X server port
--port X my port
--num-comps X Distributed: Number of computers to simulate
--diversity-selection X Distributed: Use diversity for exchange
--variants-exchanged X Distributed: Number of variants to send
--gen-per-exchange X Distributed: Number of generations between exchanges
--split-search X Distributed: Split up the search space
--describe-machine describe the current machine (e.g., for cloud computing)
--incoming-pop X file of variants for the first generation. Either binary or a list of genomes to be read from a string.
--no-test-cache do not load testing .cache file
--nht-server X connect to network test cache server X
--nht-port X connect to network test cache server on port X
--nht-id X this repair scenario's NHT identifier
--rep X representation X (c,txt,java)
--oracle-genome X genome for oracle search, either string or binary file.
--version print the version and exit
-help Display this list of options
--help Display this list of options