dustmite

DustMite, a general-purpose data reduction tool Written by Vladimir Panteleev <vladimir@thecybershadow.net>

Members

Aliases

Predictor
alias Predictor = AccumulatingPredictor!(0.01)
Undocumented in source.
ReductionCacheKey
alias ReductionCacheKey = Tuple!(Entity, q{origRoot}, Reduction, q{r})
Undocumented in source.
Splitter
alias Splitter = splitter.Splitter
Undocumented in source.
equal
alias equal = std.algorithm.comparison.equal
Undocumented in source.
join
alias join = std.string.join
Undocumented in source.
startsWith
alias startsWith = std.string.startsWith
Undocumented in source.

Classes

CarefulStrategy
class CarefulStrategy

Keep going deeper until we find a successful reduction. When found, finish tests at current depth and restart from top depth (new iteration). If we reach the bottom (depth with no nodes on it), we're done.

InBreadthStrategy
class InBreadthStrategy

Keep going deeper. If we reach the bottom (depth with no nodes on it), start a new iteration. If we finish an iteration without finding any reductions, we're done.

InDepthStrategy
class InDepthStrategy

Look at every entity in the tree. If we can reduce this entity, continue looking at its siblings. Otherwise, recurse and look at its children. End an iteration once we looked at an entire tree. If we finish an iteration without finding any reductions, we're done.

IterativeStrategy
class IterativeStrategy
Undocumented in source.
LevelStrategy
class LevelStrategy
Undocumented in source.
LookbackStrategy
class LookbackStrategy

Keep going deeper until we find a successful reduction. When found, go up a depth level. Keep going up while we find new reductions. Repeat topmost depth level as necessary. Once no new reductions are found at higher depths, jump to the next unvisited depth in this iteration. If we reach the bottom (depth with no nodes on it), start a new iteration. If we finish an iteration without finding any reductions, we're done.

PingPongStrategy
class PingPongStrategy

Keep going deeper until we find a successful reduction. When found, go up a depth level. Keep going up while we find new reductions. Repeat topmost depth level as necessary. Once no new reductions are found at higher depths, start going downwards again. If we reach the bottom (depth with no nodes on it), start a new iteration. If we finish an iteration without finding any reductions, we're done.

SimpleStrategy
class SimpleStrategy
Undocumented in source.
Strategy
class Strategy
Undocumented in source.

Functions

addressDead
bool addressDead(Entity root, size_t[] address)
Undocumented in source. Be warned that the author may not have intended to support it.
addressFromArr
Address* addressFromArr(size_t[] address)
Undocumented in source. Be warned that the author may not have intended to support it.
addressToArr
size_t[] addressToArr(const(Address)* address)
Undocumented in source. Be warned that the author may not have intended to support it.
applyNoRemoveDeps
void applyNoRemoveDeps(Entity root)
Undocumented in source. Be warned that the author may not have intended to support it.
applyNoRemoveMagic
void applyNoRemoveMagic(Entity root)
Undocumented in source. Be warned that the author may not have intended to support it.
applyNoRemoveRules
void applyNoRemoveRules(Entity root, RemoveRule[] removeRules)
Undocumented in source. Be warned that the author may not have intended to support it.
applyReduction
Entity applyReduction(Entity origRoot, Reduction r)
Undocumented in source. Be warned that the author may not have intended to support it.
applyReductionImpl
Entity applyReductionImpl(Entity origRoot, Reduction r)

Apply a reduction to this tree, and return the resulting tree. The original tree remains unchanged. Copies only modified parts of the tree, and whatever references them.

applyReductionToPath
string applyReductionToPath(string path, Reduction reduction)
Undocumented in source. Be warned that the author may not have intended to support it.
assignID
void assignID(Entity e)
Undocumented in source. Be warned that the author may not have intended to support it.
autoRetry
void autoRetry(void delegate() fun, const(char)[] operation)
Undocumented in source. Be warned that the author may not have intended to support it.
checkDescendants
size_t checkDescendants(Entity e)
Undocumented in source. Be warned that the author may not have intended to support it.
convertRefs
void convertRefs(Entity root)
Undocumented in source. Be warned that the author may not have intended to support it.
cowRange
auto cowRange(E[] arr)

An output range which only allocates a new copy on the first write that's different from a given original copy.

createStrategy
Strategy createStrategy(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
deleteAny
void deleteAny(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
dirSuffix
string dirSuffix(string suffix)
Undocumented in source. Be warned that the author may not have intended to support it.
dump
void dump(Entity root, Writer writer)
Undocumented in source. Be warned that the author may not have intended to support it.
dumpSet
void dumpSet(Entity root, string fn)
Undocumented in source. Be warned that the author may not have intended to support it.
dumpToHtml
void dumpToHtml(Entity root, string fn)
Undocumented in source. Be warned that the author may not have intended to support it.
entityAt
Entity entityAt(Entity root, size_t[] address)
Undocumented in source. Be warned that the author may not have intended to support it.
equal
bool equal(const(Address)* a, const(Address)* b)

Return true if these two addresses are the same (they point to the same node).

findAddressAtLevel
bool findAddressAtLevel(size_t[] address, Entity root)

Find the first address at the depth of address.length, and populate address[] accordingly. Return false if no address at that level could be found.

findEntity
FindResult findEntity(Entity root, const(Address)* addr)
Undocumented in source. Be warned that the author may not have intended to support it.
fuzz
void fuzz(Entity root)
Undocumented in source. Be warned that the author may not have intended to support it.
getMaxBreadth
size_t getMaxBreadth(Entity e)
Undocumented in source. Be warned that the author may not have intended to support it.
loadCoverage
void loadCoverage(Entity root, string dir)
Undocumented in source. Be warned that the author may not have intended to support it.
main
int main(string[] args)
Undocumented in source. Be warned that the author may not have intended to support it.
measure
void measure(void delegate() p)
Undocumented in source. Be warned that the author may not have intended to support it.
nextAddress
bool nextAddress(size_t[] address, Entity root, bool descend)

Find the next address, starting from the given one (going depth-first). Update address accordingly. If descend is false, then skip addresses under the given one. Return false if no more addresses could be found.

nextAddressInLevel
bool nextAddressInLevel(size_t[] address, Entity root)

Find the next address at the depth of address.length, and update address[] accordingly. Return false if no more addresses at that level could be found.

obfuscate
void obfuscate(Entity root, bool keepLength)
Undocumented in source. Be warned that the author may not have intended to support it.
recalculate
void recalculate(Entity root)

Update computed fields for dirty nodes

reduce
void reduce(Entity root)
Undocumented in source. Be warned that the author may not have intended to support it.
reduceByStrategy
void reduceByStrategy(Strategy strategy)
Undocumented in source. Be warned that the author may not have intended to support it.
require
V require(V[K] aa, K key, V value)

Polyfill for object.require

resetProgress
void resetProgress(Entity root)
Undocumented in source. Be warned that the author may not have intended to support it.
safeDelete
void safeDelete(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
safeMkdir
void safeMkdir(char[] path)
Undocumented in source. Be warned that the author may not have intended to support it.
safeRename
void safeRename(string src, string dst)
Undocumented in source. Be warned that the author may not have intended to support it.
safeReplace
void safeReplace(string path, void delegate(string path) creator)
Undocumented in source. Be warned that the author may not have intended to support it.
safeSave
void safeSave(Entity root, string savedir)
Undocumented in source. Be warned that the author may not have intended to support it.
save
void save(Entity root, string savedir)
Undocumented in source. Be warned that the author may not have intended to support it.
saveResult
void saveResult(Entity root)
Undocumented in source. Be warned that the author may not have intended to support it.
saveTrace
void saveTrace(Entity root, Reduction[] reductions, string dir, bool result)
Undocumented in source. Be warned that the author may not have intended to support it.
startsWith
bool startsWith(const(Address)* haystack, const(Address)* needle)

Returns true if the haystack address starts with the needle address, i.e. the entity that needle points at is a child of the entity that haystack points at.

test
TestResult test(Entity root, Reduction[] reductions)
Undocumented in source. Be warned that the author may not have intended to support it.
tryReduction
bool tryReduction(Entity root, Reduction r)

Try specified reduction. If it succeeds, apply it permanently and save intermediate result.

Manifest constants

nullFileName
enum nullFileName;
Undocumented in source.
nullFileName
enum nullFileName;
Undocumented in source.

Static functions

findEntityEx
FindResultEx findEntityEx(Entity root, const(Address)* addr)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

AccumulatingPredictor
struct AccumulatingPredictor(double exp)
Undocumented in source.
AddressRange
struct AddressRange
Undocumented in source.
FastWriter
struct FastWriter(Next)
Undocumented in source.
FindResult
struct FindResult
Undocumented in source.
FindResultEx
struct FindResultEx
Undocumented in source.
Lookahead
struct Lookahead
Undocumented in source.
Reduction
struct Reduction
Undocumented in source.
ReductionIterator
struct ReductionIterator
Undocumented in source.
RemoveRule
struct RemoveRule
Undocumented in source.
RoundRobinCache
struct RoundRobinCache(K, V)
Undocumented in source.
TestResult
struct TestResult
Undocumented in source.
Times
struct Times
Undocumented in source.

Variables

cache
bool[EntityHash] cache;
Undocumented in source.
dir
string dir;
doDump
bool doDump;
Undocumented in source.
foundAnything
bool foundAnything;
globalCache
string globalCache;
Undocumented in source.
iter
ReductionIterator iter;
Undocumented in source.
lookaheadProcesses
Lookahead[] lookaheadProcesses;
Undocumented in source.
lookaheadResults
TestResult[EntityHash] lookaheadResults;
Undocumented in source.
maxBreadth
size_t maxBreadth;
maxSteps
int maxSteps;
noRedirect
bool noRedirect;
Undocumented in source.
noSave
bool noSave;
Undocumented in source.
nullReduction
auto nullReduction;
Undocumented in source.
origDescendants
size_t origDescendants;
Undocumented in source.
predictor
Predictor predictor;
Undocumented in source.
reductionCache
RoundRobinCache!(ReductionCacheKey, Entity) reductionCache;
resultDir
string resultDir;
Undocumented in source.
rng
Mt19937 rng;
Undocumented in source.
rootAddress
Address rootAddress;
Undocumented in source.
strategy
string strategy;
tester
string tester;
Undocumented in source.
tests
int tests;
Undocumented in source.
times
Times times;
trace
bool trace;
whiteout
bool whiteout;
Undocumented in source.

Meta

License

Boost Software License, Version 1.0