From b3160f88b20fef5ed081ae86affd484a5d03703a Mon Sep 17 00:00:00 2001 From: breandan Date: Tue, 25 Apr 2023 16:39:54 -0400 Subject: [PATCH] yield cartesian product of multiterminal completion --- build.gradle.kts | 2 +- galoisenne | 2 +- .../mcgill/cstk/experiments/repair/PythonStatementRepair.kt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3ffde8a3..bc0ea049 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - kotlin("jvm") version "1.8.20" + kotlin("jvm") version "1.8.21" id("com.github.ben-manes.versions") version "0.46.0" id("de.undercouch.download") version "5.4.0" id("com.github.johnrengelman.shadow") version "8.1.1" diff --git a/galoisenne b/galoisenne index 8815925a..47636773 160000 --- a/galoisenne +++ b/galoisenne @@ -1 +1 @@ -Subproject commit 8815925a05045e002da9b8d069c9b3bbc27a1ad2 +Subproject commit 476367737f652d2f0fa5b207f649885c9a80e156 diff --git a/src/main/kotlin/edu/mcgill/cstk/experiments/repair/PythonStatementRepair.kt b/src/main/kotlin/edu/mcgill/cstk/experiments/repair/PythonStatementRepair.kt index ca3f6747..756869c1 100644 --- a/src/main/kotlin/edu/mcgill/cstk/experiments/repair/PythonStatementRepair.kt +++ b/src/main/kotlin/edu/mcgill/cstk/experiments/repair/PythonStatementRepair.kt @@ -13,7 +13,7 @@ import kotlin.time.* */ fun main() { - MAX_SAMPLE = 20 + MAX_SAMPLE = 100 MAX_REPAIR = 2 syntheticErrorCorrection() organicErrorCorrection() @@ -102,7 +102,7 @@ fun repairPythonStatement( cfg = pythonStatementCFG, coarsen = String::coarsenAsPython, uncoarsen = String::uncoarsenAsPython, - synthesizer = optRepair(clock), // Enumerative search + synthesizer = satRepair(clock), // Enumerative search diagnostic = { println("Δ=${ levenshtein( prompt, it ) - 1 } repair: ${prettyDiffNoFrills(prompt, it)}") }, filter = { isValidPython() }, ) @@ -235,7 +235,7 @@ S -> S IOP S | S BOP S IOP -> + | - | * | / | % | ** | << | >> | & | ^ BOP -> < | > | <= | >= | == | != | in | is | not in | is not S -> S ; -S -> : +S -> S | S : | - S S -> None | True | False S -> S ^ S | S in S S -> [ S : ]