Walnut icon indicating copy to clipboard operation
Walnut copied to clipboard

Failing to load files from Word Automata Library

Open FinnLidbetter opened this issue 6 years ago • 0 comments

If the Main.prover class is run from a directory that is not Walnut/bin, i.e., the program is run using java -cp /pathToWalnut/bin Main.prover from a directory that is not Walnut/bin, then files in the Word Automata Library do not load correctly. This seems to be due to the setPaths() method in the Main.UtilityMethods class. The method only handles what to do if the user's working directory is already Walnut/bin.

public static void setPaths(){
  String path = System.getProperty("user.dir");
  if(path.substring(path.length()-3).equals("bin"))
    dir = "../";
}

(Use case arose when writing a program that runs Walnut as a subprocess).

FinnLidbetter avatar Oct 18 '18 13:10 FinnLidbetter