Changes between Version 58 and Version 59 of Be a CIVL developer


Ignore:
Timestamp:
02/24/23 10:57:11 (3 years ago)
Author:
Alex Wilton
Comment:

Updated section on running CIVL

Legend:

Unmodified
Added
Removed
Modified
  • Be a CIVL developer

    v58 v59  
    6767  1. Perform the previous two steps for the project `dev.civl.mc`.
    6868
    69 == Running CIVL ==
    70 1. Somewhere on your system, create a plain text file containing exactly the following two lines:
     69== Running CIVL from command line ==
     701. We will create a script that will sit on your `PATH` that will allow you to conveniently run `CIVL` from the `.class` files built in Eclipse.
     71  1. Create two new environment variables:
     72    * `ECLIPSE_WORKSPACE` should be the path to your Eclipse workspace folder.
     73    * `VSL_DEPS` should be the path to your `vsl-X.XX` dependencies folder.
     74  1. Somewhere on your system, create a plain text file named `civl` containing exactly the following two lines:
    7175  {{{
    7276#!/bin/sh
    73 java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
     77java -cp $ECLIPSE_WORKSPACE/dev.civl.abc/bin:$ECLIPSE_WORKSPACE/dev.civl.gmc/bin:$ECLIPSE_WORKSPACE/dev.civl.mc/bin:$ECLIPSE_WORKSPACE/dev.civl.sarl/bin:$VSL_DEPS/mods/antlr3/antlr3runtime.jar:$VSL_DEPS/mods/antlr4/antlr4runtime.jar dev.civl.mc.CIVL $@
    7478  }}}
    75   where {{{/Path/To/Your/workspace}}} is replaced with the path to your Eclipse workspace directory.  Name this file `civl`, put it in your `PATH`, and make it executable (`chmod ugo+x civl`). Alternatively, you can define an alias in your `.profile`, `.bash_profile`, `.bashrc`, or equivalent:
    76 {{{
    77 alias civl='java -jar /Path/To/Your/workspace/CIVL/civl.jar'
    78 }}}
    79 1. From the shell (terminal window), execute `civl config`.  This should find the theorem provers in your `PATH` and create a file `.sarl` in your home directory.
    80 1. In Eclipse, navigate to "Run->Run Configurations... Create a new JUnit configuration."   Name it "CIVL Regression Tests". Select "Run all tests in the selected project..." and navigate to the folder `test/regress` in the CIVL project. The Test runner should be JUnit 4. Under the Arguments tab, type `-ea` in the VM arguments area (to enable assertion checking).
    81 1. An example of how to set up a single test from within Eclipse: \\ create a new Run Configuration via the Run->Run Configurations... menu.  Create a new "Java Application" configuration.  Call it `CIVLbarrier2`.  The Project is CIVL. The main class is `edu.udel.cis.vsl.civl.CIVL`.  Under the Arguments tab, set the Program arguments to `verify examples/concurrency/barrier2.cvl`.  Modify the VM arguments as in the step above.  You should now be able to run the test by clicking "Run".
     79  1. Make it executable with the command `chmod ugo+x civl`.
     80  1. Move this file to somewhere on your `PATH`.
     81  1. Run `civl help` from the command line to ensure that it worked. You should get a long list of command line options that CIVL accepts. \\\\
     821. Execute the command `civl config`.  This should find the theorem provers in your `PATH` and create a file `.sarl` in your home directory. You can now run `civl` from the command line. Go to the example files found in `dev.civl.com/examples` and try running `civl verify` on some of them!
     83
     84== Running CIVL from within Eclipse ==
     851. In Eclipse, navigate to "Run->Run Configurations... Create a new JUnit configuration."   Name it "CIVL Regression Tests". Select "Run all tests in the selected project..." and navigate to the folder `test/regress` in the CIVL project. The Test runner should be JUnit 4. Under the Arguments tab, type `-ea` in the VM arguments area (to enable assertion checking). \\\\
     861. An example of how to set up a single test from within Eclipse: \\ create a new Run Configuration via the Run->Run Configurations... menu.  Create a new "Java Application" configuration.  Call it `CIVLbarrier2`.  The Project is `dev.civl.mc`. The main class is `dev.civl.mc.CIVL`.  Under the Arguments tab, set the Program arguments to `verify examples/concurrency/barrier2.cvl`.  Modify the VM arguments as in the step above.  You should now be able to run the test by clicking "Run".
    8287
    8388== Using Subversion from the command-line ==