Skip to content

Commit

Permalink
Update readme and add macOS x86_64 CI. (#148)
Browse files Browse the repository at this point in the history
* Simplify CI and add macOS x86_64.

* Fix build-args input.

* remove build-args.

* Add quotes.

* Revert CI changes.
  • Loading branch information
abdoo8080 authored Nov 22, 2024
1 parent a6271ab commit a1b04be
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ jobs:
strategy:
matrix:
include:
- name: Linux
- name: Linux-x86_64
os: ubuntu-latest
- name: macOS
- name: macOS-aarch64
os: macos-latest
- name: macOS-x86_64
os: macos-13
steps:
- name: Install Elan
run: |
Expand All @@ -25,4 +27,4 @@ jobs:
lake update
lake build Smt Smt.Rat Smt.Real
- name: Test lean-smt
run: lake run test
run: lake test
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,22 @@ are working on adding support for other theories as well.

## Requirements
`lean-smt` depends on [`lean-cvc5`](https://github.com/abdoo8080/lean-cvc5) FFI,
which currently only supports Linux (x86_64) and macOS (AArch64).
which currently only supports Linux (x86_64) and macOS (AArch64 and x86_64).

## Usage
To use `lean-smt` in your project, add the following line to your list of
dependencies in `lakefile.lean`:
```lean
require smt from git "https://github.com/ufmg-smite/lean-smt.git"@"main"
require smt from git "https://github.com/ufmg-smite/lean-smt.git" @ "main"
def libcpp : String :=
if System.Platform.isWindows then "libstdc++-6.dll"
else if System.Platform.isOSX then "libc++.dylib"
else "libstdc++.so.6"
package foo where
moreLeanArgs := #[s!"--load-dynlib={libcpp}"]
moreGlobalServerArgs := #[s!"--load-dynlib={libcpp}"]
```
`lean-smt` comes with one main tactic, `smt`, that translates the current goal
into an SMT query, sends the query to cvc5, and (if the solver returns `unsat`)
Expand Down
4 changes: 2 additions & 2 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "aff591ae23965f28f15d8a1437a06d9febb704b0",
"rev": "b7a6933c50aea5bb294eeff9ed2555640bc9c435",
"name": "cvc5",
"manifestFile": "lake-manifest.json",
"inputRev": "aff591ae23965f28f15d8a1437a06d9febb704b0",
"inputRev": "b7a6933c50aea5bb294eeff9ed2555640bc9c435",
"inherited": false,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover-community/batteries",
Expand Down
4 changes: 2 additions & 2 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Lake
open Lake DSL

require cvc5 from
git "https://github.com/abdoo8080/lean-cvc5.git" @ "aff591ae23965f28f15d8a1437a06d9febb704b0"
git "https://github.com/abdoo8080/lean-cvc5.git" @ "b7a6933c50aea5bb294eeff9ed2555640bc9c435"

require mathlib from
git "https://github.com/leanprover-community/mathlib4.git" @ "v4.13.0"
Expand Down Expand Up @@ -40,7 +40,7 @@ USAGE:
Run tests.
-/
script test do
@[test_driver] script test do
let files ← readAllFiles (FilePath.mk "Test")
let mut tests : Array FilePath := #[]
let mut expected : Array FilePath := #[]
Expand Down

0 comments on commit a1b04be

Please sign in to comment.