Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong k-bound passed when using approximation with raw verification - fix 2052379 #135

Merged
merged 11 commits into from
Feb 12, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public String toString() {
StringBuilder result = new StringBuilder();

if (useRawVerification) {
if (rawVerificationOptions != null) {
rawVerificationOptions = rawVerificationOptions.replaceAll("(--k-bound|-k) +\\d+", "$1 " + kBound());
}
return result.append(rawVerificationOptions).toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,13 @@ public String toString() {
StringBuilder result = new StringBuilder();

if (useRawVerification) {
if (rawVerificationOptions != null) {
rawVerificationOptions = rawVerificationOptions.replaceAll("(--k-bound|-k) +\\d+", "$1 " + kBound());
}
return result.append(rawVerificationOptions).toString();
}

result.append("--k-bound ");
result.append(extraTokens+tokensInModel);
result.append(kBoundArg());

var traceSwitch =traceMap.get(traceOption) ;
if (traceSwitch != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ public void setTokensInModel(int tokens){ // TODO: Get rid of this method when v
}

public String kBoundArg() {
return " --k-bound " + (extraTokens+tokensInModel) + " ";
return "--k-bound " + kBound() + " ";
}

public int kBound() {
return (extraTokens + tokensInModel);
}

public String deadTokenArg() {
return dontUseDeadPlaces ? " --keep-dead-tokens " : "";
}
Expand All @@ -100,6 +104,9 @@ public String toString() {
StringBuilder result = new StringBuilder();

if (useRawVerification) {
if (rawVerificationOptions != null) {
rawVerificationOptions = rawVerificationOptions.replaceAll("(--k-bound|-k) +\\d+", "$1 " + kBound());
}
return result.append(rawVerificationOptions).toString();
}

Expand Down
Loading