-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update submodules in extern/riddle and extern/semitone
- Loading branch information
1 parent
bc0c282
commit 5e2ea2b
Showing
10 changed files
with
127 additions
and
102 deletions.
There are no files selected for viewing
Submodule riddle
updated
11 files
+1 −1 | include/compilation_unit.hpp | |
+1 −1 | include/core.hpp | |
+1 −1 | include/env.hpp | |
+26 −26 | include/expression.hpp | |
+1 −1 | include/method.hpp | |
+9 −9 | include/statement.hpp | |
+1 −1 | src/compilation_unit.cpp | |
+2 −2 | src/core.cpp | |
+25 −25 | src/expression.cpp | |
+1 −1 | src/method.cpp | |
+8 −8 | src/statement.cpp |
Submodule semitone
updated
17 files
+7 −0 | CMakeLists.txt | |
+2 −2 | include/dl/idl_theory.hpp | |
+2 −2 | include/dl/rdl_theory.hpp | |
+0 −2 | include/lra/lra_theory.hpp | |
+0 −2 | include/ov/ov_theory.hpp | |
+52 −3 | include/sat_core.hpp | |
+25 −0 | include/sat_value_listener.hpp | |
+2 −3 | include/theory.hpp | |
+2 −2 | src/dl/idl_theory.cpp | |
+2 −2 | src/dl/rdl_theory.cpp | |
+0 −2 | src/lra/lra_theory.cpp | |
+0 −2 | src/ov/ov_theory.cpp | |
+11 −6 | src/sat_core.cpp | |
+0 −8 | src/theory.cpp | |
+6 −6 | tests/test_lra.cpp | |
+1 −1 | tests/test_ov.cpp | |
+1 −1 | tests/test_rdl.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,46 @@ | ||
#include "graph.hpp" | ||
#include "solver.hpp" | ||
#include "logging.hpp" | ||
#include <cassert> | ||
|
||
namespace ratio | ||
{ | ||
graph::graph(solver &slv) noexcept : slv(slv) {} | ||
|
||
void graph::add_flaw(std::unique_ptr<flaw> &&f, bool enqueue) noexcept | ||
void graph::expand_flaw(flaw &f) | ||
{ | ||
auto &phi = phis[variable(f->get_phi())]; | ||
phi.push_back(std::move(f)); | ||
assert(!f.expanded); | ||
|
||
if (enqueue) | ||
this->enqueue(*phi.back()); | ||
else | ||
slv.expand_flaw(*phi.back()); | ||
LOG_TRACE("[" << slv.get_name() << "] Expanding flaw"); | ||
// we expand the flaw.. | ||
f.expand(); | ||
|
||
// we apply the flaw's resolvers.. | ||
for (const auto &r : f.resolvers) | ||
{ | ||
LOG_TRACE("[" << slv.get_name() << "] Applying resolver"); | ||
res = r; | ||
try | ||
{ | ||
r.get().apply(); | ||
} | ||
catch (const std::exception &e) | ||
{ // the resolver is inapplicable.. | ||
if (!sat->new_clause({!r.get().get_rho()})) | ||
throw riddle::unsolvable_exception(); | ||
} | ||
res = std::nullopt; | ||
} | ||
|
||
switch (sat->value(f.get_phi())) | ||
{ | ||
case utils::True: // we have a top-level (a landmark) flaw.. | ||
if (std::none_of(f.get_resolvers().begin(), f.get_resolvers().end(), [this](const auto &r) | ||
{ return sat->value(r.get().get_rho()) == utils::True; })) | ||
active_flaws.insert(&f); // the flaw has not yet already been solved (e.g. it has a single resolver).. | ||
break; | ||
case utils::Undefined: // we do not have a top-level (a landmark) flaw, nor an infeasible one.. | ||
bind(variable(f.get_phi())); // we listen for the flaw to become active.. | ||
break; | ||
} | ||
} | ||
} // namespace ratio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters