Age | Commit message (Collapse) | Author |
|
In particular:
- fix up the MCF sovler to get rid of all the warnings/errors
- make the build with Wall and Werror and whatnot again
|
|
For the solver utility it'd be good to have MCF problems, so here they
are!
Format is:
MCF<supplies, arcs>(cost*)
Supplies is a [int,int,int,...], where each int represents a new node
Arcs is [int:int, int:int, int:int, ...] where each int:int pair
represents an edge from the first to the second (1 indexed from the
"supplies" array).
Costs is the argument to the function. There must be as many costs as
arcs, and they are set from left to right, in order.
|
|
|
|
|
|
Adding function arguments to the system, as well as making it slightly easier
to read.
|
|
Also some contribution writing stuff.
Basically: lots of work.
|
|
_var_influence was really just duplicating data that was available
elsewhere, so I got rid of it.
I also did some writing about the algorithm and stuff for the thesis.
|
|
Conflicts:
impl/test/run
|
|
|
|
|
|
|
|
As far as I can tell, it's worked! Hooray!
|
|
So now it will solve correctly for
x = y + 1
y = max(0, x + 1)
I also added in tests for this (and a slightly different form with `x`
going through another variable, `z`, for indirection).
The tests will also stop now after five seconds of execution. If they
can't be solved in five seconds then they're considered a failure.
|
|
|
|
|
|
Conflicts:
.gitignore
impl/MaxStrategy.hpp
impl/VariableAssignment.hpp
impl/systems/test.eqns
impl/test/7.eqns
|
|
If you ignore the intermediate results for the strategy iteration phase
then you're in the clear! I think!
|
|
It runs in two separate passes:
- improve strategy (for all)
- evaluate fixpoint
Unfortunately this loses out on locality at the moment.
I really want a local solver, so I'll have to see what I can do about
that.
|
|
|
|
Still doesn't work in clang, though.
|
|
|
|
- Remove exceptions
- Remove dynamic casts
The bug was relating to MaxStrategy not cleaning up the influence sets
after propagating changes. I just added a call to .clear() and it seems
fine.
|
|
|
|
Some other stuff, too, I think. Oh well. No biggie!
|
|
|
|
- Make it a bit nicer to use the command-line
- Remove the strategies we won't be using
- Clean up some code around the place, generally
|
|
Much simpler to understand. Basically have a variable assignment which
is dynamic and updates with the strategy changes. Similarly have
strategy changes easily invalidate the variable assignment.
This makes them strongly inter-dependent, but simplifies the
implementation considerably. Proving it should be easier like this, too.
|
|
|
|
|
|
|
|
|
|
I must have forgotten to commit them earlier. How annoying.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Especially making logging a bit nicer.
|
|
|
|
Trivial 100000 var case in 15s on my Uni machine.
|
|
Also add the beginnings of some log stuff, mayhaps.
|
|
|
|
|
|
This should perform better in cases where we have smaller sets.
|
|
Slows it down *heaps* for the moment.
Still need to add the MaxStrategy part, which should speed it up a fair
bit. At the moment it has to do a fair bit more work for no benefit.
|
|
|
|
I'll bring them back later, when I redo the range stuff.
|
|
Conflicts:
impl/Expression.hpp
impl/Operator.hpp
impl/Variable.hpp
impl/main.cpp
|
|
(command-line arguments specify which to use)
Also:
- Fix up Complete<T> to work comparing `inf` to 1 (stupid bug)
- Clean up the systems/ folder a bit
- Change the printed output to differentiate variables and constants
(!v/!c, respectively)
- Perform a slight optimisation to the strategy-iteration process
|