Module dev.civl.mc

Class UserInterface

java.lang.Object
dev.civl.mc.run.IF.UserInterface

public class UserInterface extends Object

This class provides a user interface to CIVL. The public methods in this class provide a programmatic interface; there are also methods to provide a command line interface. This class does not provide a graphical user interface.

The high-level commands provided by this interface are as follows:

  • help: print a help message explaining all commands and options
  • config: configure CIVL by looking for provers, creating a .sarl file, etc.
  • show: show the results of preprocessing, parsing, AST construction, AST transformations, and model construction
  • run: run a program once, using a random number generator to resolve nondeterminism
  • verify: verify a program by exploring its state space
  • compare: compare two programs for functional equivalence
  • replay: replay a trace saved by previous invocation of verify or compare that found a violation
  • Field Details

    • debug

      public static final boolean debug
      Running in debug mode (which prints debugging information)?
      See Also:
  • Constructor Details

    • UserInterface

      public UserInterface()
      Creates a new instance of UserInterface using the Options given in definedOptions.
    • UserInterface

      public UserInterface(PrintStream out, PrintStream err)
  • Method Details

    • run

      public boolean run(String... args)
      Runs the appropriate CIVL tools based on the command line arguments.
      Parameters:
      args - command line arguments
      Returns:
      true iff everything succeeded and no errors were found
    • run

      public boolean run(Collection<String> args)
      Runs the appropriate CIVL tools based on the command line arguments. This variant is provided in case a collection is more convenient than an array.
      Parameters:
      args - command line arguments as collection
      Returns:
      true iff everything succeeded and no errors were found
    • run

      public boolean run(String argsString)
      Runs command specified as one big String.
      Parameters:
      argsString - a single string containing command and all options; what would be typed on the command line by a user
      Returns:
      true iff everything succeeded and no errors were found