java.lang.Object
dev.civl.sarl.IF.config.Configurations
This is the public interface for managing SARL configuration objects and
files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SARLConfigLooks for a SARL configuration file, and, if one is not found, creates one in the user's home directory.static voidMakes a new SARL configuration file in the user's home directory.static SARLConfignewConfiguration(File configFile) Parses the specified SARL configuration file.static SARLConfignewConfiguration(Collection<ProverInfo> provers) Creates a newSARLConfigobject based on the given list of prover information objects.
-
Constructor Details
-
Configurations
public Configurations()
-
-
Method Details
-
newConfiguration
Creates a newSARLConfigobject based on the given list of prover information objects.- Parameters:
provers- ordered collection of prover infos- Returns:
- resulting
SARLConfigobject wrapping those provers
-
newConfiguration
Parses the specified SARL configuration file.
- Parameters:
configFile- a SARL configuration file- Returns:
- the
SARLConfigobject 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
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'sPATHfor appropriate theorem provers. In either case, the configuration file is parsed, and the resultingSARLConfigobject is returned. The public static variableDEFAULT_CONFIGwill 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
SARLConfigobject 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.sarlin 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.
-