Class Configurations

java.lang.Object
dev.civl.sarl.IF.config.Configurations

public class Configurations extends Object
This is the public interface for managing SARL configuration objects and files.
  • Constructor Details

    • Configurations

      public Configurations()
  • Method Details

    • newConfiguration

      public static SARLConfig newConfiguration(Collection<ProverInfo> provers)
      Creates a new SARLConfig object based on the given list of prover information objects.
      Parameters:
      provers - ordered collection of prover infos
      Returns:
      resulting SARLConfig object wrapping those provers
    • newConfiguration

      public static SARLConfig newConfiguration(File configFile) throws SARLException

      Parses the specified SARL configuration file.

      Parameters:
      configFile - a SARL configuration file
      Returns:
      the SARLConfig object resulting from parsing the file
      Throws:
      SARLException - if the file is not found, or an I/O error occurs, or if the configuration file does not conform to the syntax of SARL configuration files
    • getDefaultConfiguration

      public static SARLConfig getDefaultConfiguration()

      Looks for a SARL configuration file, and, if one is not found, creates one in the user's home directory. In the case where the file was not found, the new configuration file will be named .sarl, and it will be created by searching the user's PATH for appropriate theorem provers. In either case, the configuration file is parsed, and the resulting SARLConfig object is returned. The public static variable DEFAULT_CONFIG will also be updated.

      If the configuration file has syntax errors, or there is some I/O problem when reading it, the application will execute immediately with a non-0 error code.

      Returns:
      the SARLConfig object obtained by parsing the configuration file
    • makeConfigFile

      public static void makeConfigFile()
      Makes a new SARL configuration file in the user's home directory. If there is already a file named .sarl in that directory, it is moved to .sarl.old. This method searches for theorem provers on the user's system in order to create the file. If anything goes wrong, it does not throw an exception, but terminates immediately with a non-0 exit code.