Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme and add macOS x86_64 CI. #148

Merged
merged 5 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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