Skip to content

Commit

Permalink
Separate output for multiple solver calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzleutgeb committed Apr 28, 2021
1 parent f663f4b commit cbc8225
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gradle-env.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"": {
"name": "atlas",
"version": "v0.0.4",
"version": "v0.0.5",
"path": "",
"gradle": {
"version": "7.0",
Expand Down Expand Up @@ -3841,4 +3841,4 @@
]
}
}
}
}
10 changes: 8 additions & 2 deletions src/main/java/xyz/leutgeb/lorenz/atlas/ast/Program.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,19 @@ public ConstraintSystemSolver.Result solve(
this.condensation,
(scc) ->
() -> {
final var prover = new Prover(name + randomHex(), null, basePath);

Set<FunctionDefinition> fds =
scc.vertexSet().stream()
.map(functionDefinitions::get)
.collect(Collectors.toSet());

final var sccName =
fds.stream()
.map(FunctionDefinition::getFullyQualifiedName)
.map(Util::fqnToFlatFilename)
.collect(joining("+"));

final var prover = new Prover(sccName, null, basePath);

// Stub annotations.
for (var fd : fds) {
fd.stubAnnotations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ public ConstraintSystemSolver.Result solve(
Set<Constraint> outsideConstraints, List<UnknownCoefficient> target) {
return ConstraintSystemSolver.solve(
Sets.union(outsideConstraints, Sets.union(accumulatedConstraints, externalConstraints)),
basePath,
basePath.resolve(name),
target);
}

Expand Down

0 comments on commit cbc8225

Please sign in to comment.