diff --git a/.travis-ci.sh b/.travis-ci.sh index 0d47d40..fc7fea0 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -7,12 +7,15 @@ opam repo add coq-released https://coq.inria.fr/opam/released opam repo add distributedcomponents-dev http://opam-dev.distributedcomponents.net opam pin add coq $COQ_VERSION --yes --verbose -opam pin add coq-mathcomp-ssreflect $SSREFLECT_VERSION --yes --verbose - -opam install verdi StructTact verdi-runtime ocamlbuild --yes --verbose case $MODE in + lockserv) + opam pin add lockserv . --yes --verbose + ;; + lockserv-seqnum) + opam pin add lockserv-seqnum . --yes --verbose + ;; *) - ./build.sh + opam pin add verdi-lockserv . --yes --verbose ;; esac diff --git a/.travis.yml b/.travis.yml index 77aa044..0ac5775 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,10 @@ addons: - aspcud env: matrix: - - MODE=build COQ_VERSION=8.6 SSREFLECT_VERSION=1.6.1 - - MODE=build COQ_VERSION=8.5.3 SSREFLECT_VERSION=1.6 + - MODE=build COQ_VERSION=8.5.3 + - MODE=build COQ_VERSION=8.6 + - MODE=lockserv COQ_VERSION=8.6 OPAMBUILDTEST=1 + - MODE=lockserv-seqnum COQ_VERSION=8.6 script: bash -ex .travis-ci.sh sudo: false notifications: diff --git a/Makefile b/Makefile index 2a7ab76..767a69f 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ endif default: Makefile.coq $(MAKE) -f Makefile.coq - +$(MAKE) -C extraction/lockserv LOCKSERV_MLFILES = extraction/lockserv/ocaml/LockServ.ml extraction/lockserv/ocaml/LockServ.mli LOCKSERV_SEQNUM_MLFILES = extraction/lockserv-seqnum/ocaml/LockServSeqNum.ml extraction/lockserv-seqnum/ocaml/LockServSeqNum.mli @@ -40,6 +39,9 @@ $(LOCKSERV_MLFILES) $(LOCKSERV_SEQNUM_MLFILES): Makefile.coq lockserv: +$(MAKE) -C extraction/lockserv +lockserv-test: + +$(MAKE) -C extraction/lockserv test + lockserv-seqnum: +$(MAKE) -C extraction/lockserv-seqnum @@ -57,4 +59,4 @@ lint: distclean: clean rm -f _CoqProject -.PHONY: default clean lint $(LOCKSERV_MLFILES) $(LOCKSERV_SEQNUM_MLFILES) lockserv lockserv-seqnum +.PHONY: default clean lint $(LOCKSERV_MLFILES) $(LOCKSERV_SEQNUM_MLFILES) lockserv lockserv-test lockserv-seqnum diff --git a/README.md b/README.md index 137bb42..0d0f4f4 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,9 @@ Then, run `./configure` in the root directory. This will check for the appropri By default, the script assumes that `Verdi` and `StructTact` are installed in Coq's `user-contrib` directory, but this can be overridden by setting the `Verdi_PATH` and `StructTact_PATH` environment variables. -Finally, run `make` in the root directory. This will compile the lock server definitions, check the proofs of mutual exclusion, and finally build an OCaml program from the extracted code called `LockServMain` in the `extraction/lockserv` directory. +Finally, run `make` in the root directory. This will compile the lock server definitions, check the proofs of mutual exclusion, and extract OCaml event handler code. + +To build an OCaml program from the extracted code called `LockServMain.native` in the `extraction/lockserv` directory, run `make lockserv` in the root directory. Running LockServ on a Cluster ----------------------------- diff --git a/lockserv-seqnum.install b/lockserv-seqnum.install new file mode 100644 index 0000000..0560b79 --- /dev/null +++ b/lockserv-seqnum.install @@ -0,0 +1 @@ +bin: ["extraction/lockserv-seqnum/_build/ocaml/LockServSeqNumMain.native" {"lockserv-seqnum"}] diff --git a/lockserv-seqnum.opam b/lockserv-seqnum.opam new file mode 100644 index 0000000..32aa176 --- /dev/null +++ b/lockserv-seqnum.opam @@ -0,0 +1,32 @@ +opam-version: "1.2" +version: "dev" +maintainer: "palmskog@gmail.com" + +homepage: "https://github.com/DistributedComponents/verdi-lockserv" +dev-repo: "https://github.com/DistributedComponents/verdi-lockserv.git" +bug-reports: "https://github.com/DistributedComponents/verdi-lockserv/issues" +license: "BSD" + +build: [ + [ "./configure" ] + [ make "-j%{jobs}%" "lockserv-seqnum" ] +] +available: [ ocaml-version >= "4.02.3" ] +depends: [ + "coq" {((>= "8.5" & < "8.6~") | (>= "8.6" & < "8.7~"))} + "verdi" {= "dev"} + "StructTact" {= "dev"} + "verdi-runtime" {= "dev"} + "ocamlfind" {build} + "ocamlbuild" {build} +] + +authors: [ + "James Wilcox <>" + "Doug Woos <>" + "Pavel Panchekha <>" + "Zachary Tatlock <>" + "Steve Anton <>" + "Karl Palmskog <>" + "Ryan Doenges <>" +] diff --git a/lockserv.install b/lockserv.install new file mode 100644 index 0000000..7178a1c --- /dev/null +++ b/lockserv.install @@ -0,0 +1 @@ +bin: ["extraction/lockserv/_build/ocaml/LockServMain.native" {"lockserv"}] diff --git a/lockserv.opam b/lockserv.opam new file mode 100644 index 0000000..bbb0ec6 --- /dev/null +++ b/lockserv.opam @@ -0,0 +1,34 @@ +opam-version: "1.2" +version: "dev" +maintainer: "palmskog@gmail.com" + +homepage: "https://github.com/DistributedComponents/verdi-lockserv" +dev-repo: "https://github.com/DistributedComponents/verdi-lockserv.git" +bug-reports: "https://github.com/DistributedComponents/verdi-lockserv/issues" +license: "BSD" + +build: [ + [ "./configure" ] + [ make "-j%{jobs}%" "lockserv" ] +] +build-test: [make "lockserv-test"] +available: [ ocaml-version >= "4.02.3" ] +depends: [ + "coq" {((>= "8.5" & < "8.6~") | (>= "8.6" & < "8.7~"))} + "verdi" {= "dev"} + "StructTact" {= "dev"} + "verdi-runtime" {= "dev"} + "ocamlfind" {build} + "ocamlbuild" {build} + "ounit" {test & >= "2.0.0"} +] + +authors: [ + "James Wilcox <>" + "Doug Woos <>" + "Pavel Panchekha <>" + "Zachary Tatlock <>" + "Steve Anton <>" + "Karl Palmskog <>" + "Ryan Doenges <>" +] diff --git a/verdi-lockserv.opam b/verdi-lockserv.opam new file mode 100644 index 0000000..fe164c6 --- /dev/null +++ b/verdi-lockserv.opam @@ -0,0 +1,28 @@ +opam-version: "1.2" +version: "dev" +maintainer: "palmskog@gmail.com" + +homepage: "https://github.com/DistributedComponents/verdi-lockserv" +dev-repo: "https://github.com/DistributedComponents/verdi-lockserv.git" +bug-reports: "https://github.com/DistributedComponents/verdi-lockserv/issues" +license: "BSD" + +build: [ + [ "./configure" ] + [ make "-j%{jobs}%" ] +] +depends: [ + "coq" {((>= "8.5" & < "8.6~") | (>= "8.6" & < "8.7~"))} + "verdi" {= "dev"} + "StructTact" {= "dev"} +] + +authors: [ + "James Wilcox <>" + "Doug Woos <>" + "Pavel Panchekha <>" + "Zachary Tatlock <>" + "Steve Anton <>" + "Karl Palmskog <>" + "Ryan Doenges <>" +]