|
|
@ -19,18 +19,15 @@ prgm = Program( |
|
|
|
) |
|
|
|
|
|
|
|
outputs = [R8.A] |
|
|
|
test_cases = [TestCase()] |
|
|
|
test_cases = [TestCase(), TestCase(state=CPUState(carry=1))] |
|
|
|
|
|
|
|
params = OptimizationParameters(max_size=4) |
|
|
|
|
|
|
|
initial_cost = cost(prgm, test_cases, outputs, prgm) |
|
|
|
initial_cycles = prgm.perf() |
|
|
|
|
|
|
|
print("Program to optimize:") |
|
|
|
prgm.display() |
|
|
|
|
|
|
|
print(f"Cost: {initial_cost[0]}") |
|
|
|
print(f"Cycles: {initial_cycles}") |
|
|
|
print(f"Cost: 0.0") |
|
|
|
print(f"Cycles: {prgm.perf()}") |
|
|
|
|
|
|
|
start_time = time() |
|
|
|
|
|
|
|