aboutsummaryrefslogtreecommitdiff
path: root/src/dotgraph.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-10-07 12:27:49 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-10-07 12:27:49 +0000
commit5d4171f7fb548e06ecd2440f57322b3c77f1074e (patch)
tree06f21a5e6dcf38943f58f7e32f4a23f5bed41da7 /src/dotgraph.cc
parent563afb7fcc9d6aabec9b867372ea8d651fd12e89 (diff)
* Synchronise terminology with the ICSE paper (e.g., slice -> closure,
fstate -> Nix expression). * Fix src/test.cc.
Diffstat (limited to 'src/dotgraph.cc')
-rw-r--r--src/dotgraph.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/dotgraph.cc b/src/dotgraph.cc
index 1b352e3ff..f9ff51b90 100644
--- a/src/dotgraph.cc
+++ b/src/dotgraph.cc
@@ -51,9 +51,9 @@ string pathLabel(const FSId & id, const string & path)
}
-void printSlice(const FSId & id, const FState & fs)
+void printClosure(const FSId & id, const NixExpr & fs)
{
- Strings workList(fs.slice.roots.begin(), fs.slice.roots.end());
+ Strings workList(fs.closure.roots.begin(), fs.closure.roots.end());
StringSet doneSet;
for (Strings::iterator i = workList.begin(); i != workList.end(); i++) {
@@ -67,9 +67,9 @@ void printSlice(const FSId & id, const FState & fs)
if (doneSet.find(path) == doneSet.end()) {
doneSet.insert(path);
- SliceElems::const_iterator elem = fs.slice.elems.find(path);
- if (elem == fs.slice.elems.end())
- throw Error(format("bad slice, missing path `%1%'") % path);
+ ClosureElems::const_iterator elem = fs.closure.elems.find(path);
+ if (elem == fs.closure.elems.end())
+ throw Error(format("bad closure, missing path `%1%'") % path);
for (StringSet::const_iterator i = elem->second.refs.begin();
i != elem->second.refs.end(); i++)
@@ -99,29 +99,29 @@ void printDotGraph(const FSIds & roots)
if (doneSet.find(id) == doneSet.end()) {
doneSet.insert(id);
- FState fs = parseFState(termFromId(id));
+ NixExpr ne = parseNixExpr(termFromId(id));
string label, colour;
- if (fs.type == FState::fsDerive) {
- for (FSIdSet::iterator i = fs.derive.inputs.begin();
- i != fs.derive.inputs.end(); i++)
+ if (ne.type == NixExpr::neDerivation) {
+ for (FSIdSet::iterator i = ne.derivation.inputs.begin();
+ i != ne.derivation.inputs.end(); i++)
{
workList.push_back(*i);
cout << makeEdge(*i, id);
}
- label = "derive";
+ label = "derivation";
colour = "#00ff00";
- for (StringPairs::iterator i = fs.derive.env.begin();
- i != fs.derive.env.end(); i++)
+ for (StringPairs::iterator i = ne.derivation.env.begin();
+ i != ne.derivation.env.end(); i++)
if (i->first == "name") label = i->second;
}
- else if (fs.type == FState::fsSlice) {
- label = "<slice>";
+ else if (ne.type == NixExpr::neClosure) {
+ label = "<closure>";
colour = "#00ffff";
- printSlice(id, fs);
+ printClosure(id, ne);
}
else abort();