diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6caeda6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +permissions: read-all + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + ocaml-compiler: + - "4.14" + - "5.1" + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + - run: opam install . --deps-only --with-test + - run: opam exec -- dune build + - run: opam exec -- dune runtest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..260787a --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +_build +*~ +\#*\# +.vscode/ +.#* +.dune.lock +.dune-stamp diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..3c56757 --- /dev/null +++ b/dune-project @@ -0,0 +1,21 @@ +(lang dune 3.2) +(using dune_site 0.1) +(name frama-c-saida) + +(generate_opam_files true) + +(license GPL-2.0-or-later) +(maintainers "Gustav Ung") +(authors "The Saida development team") +(source (github rse-verification/saida)) +(homepage "https://github.com/rse-verification/saida") +(version dev) + +(package + (name frama-c-saida) + (depends + (ocaml (>= 4.14)) + (frama-c (>= 26))) + (synopsis "ACSL contract inference for helper functions") + (description "This plugin for the Frama-C platform for source code analysis +of C programs provides inference of ACSL contracts for helper functions.")) diff --git a/frama-c-saida.opam b/frama-c-saida.opam new file mode 100644 index 0000000..3f04f59 --- /dev/null +++ b/frama-c-saida.opam @@ -0,0 +1,35 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +version: "dev" +synopsis: "ACSL contract inference for helper functions" +description: """ +This plugin for the Frama-C platform for source code analysis +of C programs provides inference of ACSL contracts for helper functions.""" +maintainer: ["Gustav Ung"] +authors: ["The Saida development team"] +license: "GPL-2.0-or-later" +homepage: "https://github.com/rse-verification/saida" +bug-reports: "https://github.com/rse-verification/saida/issues" +depends: [ + "dune" {>= "3.2"} + "ocaml" {>= "4.14"} + "frama-c" {>= "26"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] +] +dev-repo: "git+https://github.com/rse-verification/saida.git" diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 5c62c1a..0000000 --- a/src/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -FRAMAC_SHARE := $(shell frama-c-config -print-share-path) -PLUGIN_NAME = Saida -PLUGIN_CMO = options_saida saida_vis tricera2acsl main -include $(FRAMAC_SHARE)/Makefile.dynamic diff --git a/src/dune b/src/dune index c761491..b0eae0c 100644 --- a/src/dune +++ b/src/dune @@ -1,13 +1,11 @@ -( library - ( name Saida) - ( public_name frama-c-saida.core) - ( flags -open Frama_c_kernel (:standard -w -50 -w -6 -w -27 -w -39 -w -36)) - ( libraries frama-c.kernel) -) +(library + (name Saida) + (public_name frama-c-saida.core) + (flags -open Frama_c_kernel :standard -w -50-6-27-39-36) + (libraries frama-c.kernel)) (plugin - ( optional ) - ( name saida) - ( libraries frama-c-saida.core) - ( site (frama-c plugins)) -) \ No newline at end of file + (optional) + (name saida) + (libraries frama-c-saida.core) + (site (frama-c plugins))) diff --git a/src/dune-project b/src/dune-project deleted file mode 100644 index d2fa639..0000000 --- a/src/dune-project +++ /dev/null @@ -1,5 +0,0 @@ -(lang dune 3.2) -(using dune_site 0.1) - -(name frama-c-saida) -(package (name frama-c-saida)) \ No newline at end of file diff --git a/src/Saida.mli b/src/saida.mli similarity index 100% rename from src/Saida.mli rename to src/saida.mli