propeller.problems.software.smallest

SMALLEST PROBLEM from C. Le Goues et al., "The ManyBugs and IntroClass Benchmarks

for Automated Repair of C Programs," in IEEE Transactions on Software

Engineering, vol. 41, no. 12, pp. 1236-1256, Dec. 1 2015.

 doi: 10.1109/TSE.2015.2454513

This problem file defines the following problem: takes as input four ints, computes the smallest, and prints to the screen the smallest input.

-main

(-main & args)

Runs the top-level genetic programming function, giving it a map of arguments with defaults that can be overridden from the command line or through a passed map.

error-function

(error-function argmap data individual)

Finds the behaviors and errors of an individual: Error is 0 if the value and the program’s selected behavior match, or 1 if they differ. The behavior is here defined as the final top item on the PRINT stack.

instructions

Stack-specific instructions, input instructions, close, and constants

random-int

(random-int)

Random integer between -100 and 100

train-and-test-data

Inputs are 4-tuples of random integers and the outputs are the minimum value of each tuple.