Browse files

adding more documentation to describe how actions are repaired.

  • Loading branch information...
jgaleotti committed Oct 4, 2018
1 parent 32b428e commit de5c9600efd168b0c7234c09867c592a6eb8b6d2
Showing with 10 additions and 6 deletions.
  1. +10 −6 core/src/main/kotlin/org/evomaster/core/database/DbAction.kt
@@ -89,14 +89,18 @@ class DbAction(
* Some actions might break schema constraints
* (such as unique columns or primary keys).
* This method tries to fix each unique column that is broken
* (such as unique columns, primary keys or foreign keys).
* This method tries to fix each action that is broken.
* The repair algorithm first tries to modify genes.
* If it is unable to do, it starts removing Db Actions
* In order to do so, it starts by finding the first action with a broken gene.
* This gene is randomize. If an action cannot be repaired after
* <code>maxNumberOfAttemptsToRepairAnAction</code> attempts
* (because it is not satisfiable given the current list of previous actions),
* the remaining actions (including the one that is broken) are removed
* from the list of actions.
* Returns true if the action list was fixed without truncating it.
* Returns false if the list needed to be truncated
* Returns true if the action list was fixed without removing any action.
* Returns false if actions needed to be removed
fun repairBrokenDbActionsList(actions: MutableList<DbAction>,
randomness: Randomness,

0 comments on commit de5c960

Please sign in to comment.