summaryrefslogtreecommitdiff
path: root/impl
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-07-09 18:42:28 +1000
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-07-09 18:42:28 +1000
commit9f3fff18f29d250745a758d13e4c4d39f59bee9c (patch)
tree3caae5a4b8edb970ebefbf6d489a4afc6e5a06a4 /impl
parentfcc8fc238754b6cf1bd7ac394de44ee30c50d6f7 (diff)
Few quick logging changes, just for fun.
Diffstat (limited to 'impl')
-rw-r--r--impl/ImprovementOperator.hpp9
-rw-r--r--impl/Log.hpp2
-rw-r--r--impl/TODO.org10
3 files changed, 12 insertions, 9 deletions
diff --git a/impl/ImprovementOperator.hpp b/impl/ImprovementOperator.hpp
index d99ccbc..e70b5af 100644
--- a/impl/ImprovementOperator.hpp
+++ b/impl/ImprovementOperator.hpp
@@ -224,18 +224,21 @@ struct SmartImprovementOperator : public ImprovementOperator<Domain> {
stableSet = invalidSet.inverse();
}
+ log::strategy << std::endl;
log::strategy << "stable: " << stableSet << std::endl;
log::strategy << "infl: " << _influence << std::endl;
DynamicMaxStrategy strat(_system, stratOut, _influence, rho, stableSet, changedSet);
log::strategy << "invalid: " << invalidSet << std::endl;
+ log::strategy << "==================" << std::endl;
for (auto it = invalidSet.begin(),
end = invalidSet.end();
it != end;
++it) {
+ auto expr = _system.maxExpression(*it);
unsigned int subExpression = strat.get(_system.maxExpression(*it));
- log::strategy << _system.maxExpression(*it)
- << " -> "
- << subExpression << std::endl;
+ log::strategy << expr
+ << " --[" << subExpression << "]-> "
+ << *expr.arguments()[subExpression] << std::endl;
}
log::strategy << std::endl;
IdSet<MaxExpression<Domain>> seen;
diff --git a/impl/Log.hpp b/impl/Log.hpp
index 0f12fec..621c94c 100644
--- a/impl/Log.hpp
+++ b/impl/Log.hpp
@@ -15,7 +15,7 @@ namespace log {
struct LoggerBuffer : public std::streambuf {
LoggerBuffer(std::streambuf* buffer, const std::string& name)
: _buffer(buffer),
- _prefix(name + " :- "),
+ _prefix(name + ": "),
_prefix_next(true) { }
int_type overflow(int_type c=EOF) {
diff --git a/impl/TODO.org b/impl/TODO.org
index fe7acee..4d14b64 100644
--- a/impl/TODO.org
+++ b/impl/TODO.org
@@ -17,11 +17,11 @@
- [X] debug
- [X] trace
- [X] info
-- [ ] Provide output [0/5]
- - [ ] strategies
- print the system and assignment, then the next strategy
- print each strategy like this:
- max(0, x, sub(y,2)) -> sub(y,2)
+- [-] Provide output [0/5]
+ - [-] strategies [1/2]
+ - [ ] print the system and assignment, then the next strategy
+ - [X] print each strategy like this:
+ max(0, x, sub(y,2)) --[2]-> sub(y,2)
- [ ] fixpoint
print the system we're working with, then print the resultant assignment
- [ ] debug