Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ Clog supports multiple running modes, which represent a trade-off between speed
** Internal evaluation
Uses the internal semi-naive evaluator and it is reasonably fast when the number of tuples is small (< 1 million).
#+BEGIN_SRC
java -jar compiler.jar --eval metadl program.mdl -F fact_dir -D output_dir
java -jar compiler.jar --eval metadl program.mdl -F fact_dir -D output_dir -S program_to_analyse_dir
#+END_SRC
** Internal parallel evaluation
Depending on the shape of the strata dependency is graph, the parallel evaluator may speed things up.
#+BEGIN_SRC
java -jar compiler.jar --eval metadl-par program.mdl -F fact_dir -D output_dir
java -jar compiler.jar --eval metadl-par program.mdl -F fact_dir -D output_dir -S program_to_analyse_dir
#+END_SRC

* Language description
Expand Down
8 changes: 2 additions & 6 deletions src/java/lang/CmdLineOpts.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,8 @@ public static CmdLineOpts parseCmdLineArgs(String[] args) {
} else {
ret.srcs = new TreeMap<>();
for (String f : cmd.getOptionValue("S").split(":")) {
String[] fileAndMod = f.split(",");
if (fileAndMod.length != 2) {
throw new RuntimeException("Error parsing the -sources [-S] argument.");
} else {
ret.srcs.put(fileAndMod[0], fileAndMod[1]);
}
// [CR] I don't think we use this yet
ret.srcs.put(f, "A");
}
}
} else {
Expand Down
1 change: 1 addition & 0 deletions src/test/lang/CEvaluationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ private static void runTest(String fileName, boolean parallelEval) {
"--extra-arg -I" + includeDir.toAbsolutePath());
} catch (Exception e) {
System.err.println("Unexpected exception " + e);
e.printStackTrace();
fail();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/lang/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public static void singleEvaluationTest(String outputDir, String factDir,
String cmd,
String Xclang) throws Exception {

String sources = analyzedFiles.stream().map(f -> f.getPath() + ",A").collect(Collectors.joining(":"));
String sources = analyzedFiles.stream().map(f -> f.getPath()).collect(Collectors.joining(":"));

String desc = cmd
+ " -L " + lang
Expand Down