Skip to content

Commit

Permalink
Revert "feat: benchmark setup (#183)"
Browse files Browse the repository at this point in the history
This reverts commit 4414dc5.
  • Loading branch information
shigoel authored Sep 26, 2024
1 parent 4414dc5 commit 608cebd
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 150 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,3 @@ jobs:
if : ${{ runner.os == 'macOS' }}
run: |
make cosim NUM_TESTS=100
- name: Run LNSym Benchmarks (Ubuntu)
if : ${{ runner.os != 'macOS' }}
run: |
make benchmarks
8 changes: 0 additions & 8 deletions Benchmarks.lean

This file was deleted.

50 changes: 0 additions & 50 deletions Benchmarks/Command.lean

This file was deleted.

23 changes: 0 additions & 23 deletions Benchmarks/SHA512.lean

This file was deleted.

15 changes: 0 additions & 15 deletions Benchmarks/SHA512_150.lean

This file was deleted.

15 changes: 0 additions & 15 deletions Benchmarks/SHA512_225.lean

This file was deleted.

15 changes: 0 additions & 15 deletions Benchmarks/SHA512_400.lean

This file was deleted.

10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ LAKE = lake
NUM_TESTS?=3
VERBOSE?=--verbose

.PHONY: all
.PHONY: all
all: specs correctness proofs tests cosim
# Note that we don't include benchmarks in `all`,
# to avoid slowing down CI too much

.PHONY: specs
time -p $(LAKE) build Specs
Expand All @@ -37,12 +35,8 @@ awslc_elf:
cosim:
time -p lake exe lnsym $(VERBOSE) --num-tests $(NUM_TESTS)

.PHONY: benchmarks
benchmarks:
$(LAKE) build Benchmarks

.PHONY: clean clean_all
clean:
clean:
$(LAKE) clean

clean_all: clean
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LNSym: Native Code Symbolic Simulator in Lean
[![Makefile CI](https://github.com/leanprover/LNSym/actions/workflows/makefile.yml/badge.svg)](https://github.com/leanprover/LNSym/actions/workflows/makefile.yml)
[![Makefile CI](https://github.com/leanprover/LNSym/actions/workflows/makefile.yml/badge.svg)](https://github.com/leanprover/LNSym/actions/workflows/makefile.yml)

LNSym is a symbolic simulator for Armv8 machine-code programs.

Expand Down Expand Up @@ -41,8 +41,6 @@ native-code programs of interest.

`awslc_elf`: perform ELF loading tests for AWS-LC.

`benchmarks`: run benchmarks for the symbolic simulator.

### Makefile variables that can be passed in at the command line

`VERBOSE`: Verbose mode; prints disassembly of the instructions being
Expand Down
2 changes: 2 additions & 0 deletions Tactics/Sym.lean
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,15 @@ elab "sym_n" whileTac?:(sym_while)? n:num s:(sym_at)? : tactic => do

let goal ← subst goal hEqId
trace[Tactic.sym] "performed subsitutition in:\n{goal}"
traceHeartbeats

replaceMainGoal [goal]

-- Rudimentary aggregation: we feed all the axiomatic effect hypotheses
-- added while symbolically evaluating to `simp`
let msg := m!"aggregating (non-)effects"
withTraceNode `Tactic.sym (fun _ => pure msg) <| withMainContext' do
traceHeartbeats "pre"
let goal? ← LNSymSimp (← getMainGoal) c.aggregateSimpCtx c.aggregateSimprocs
replaceMainGoal goal?.toList

Expand Down
10 changes: 5 additions & 5 deletions Tactics/SymContext.lean
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ def inferStatePrefixAndNumber : SymM Unit := do
state_prefix := (state.get? 0).getD 's' |>.toString,
currentStateNumber })
else
SymM.logWarning m!"\
Expected state to be a single letter followed by a number, but found:
{state}
SymM.logWarning "\
Expected state to be a single letter followed by a number, but found:
{state}
Falling back to the default numbering scheme, \
with `s1` as the first new intermediate state"
Falling back to the default numbering schema,
with `s1` as the first new intermediate state"
modifyThe SymContext ({ · with
state_prefix := "s",
currentStateNumber := 1 })
Expand Down
3 changes: 0 additions & 3 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ lean_lib «Tactics» where
lean_lib «Doc» where
-- add library configuration options here

lean_lib «Benchmarks» where
-- add library configuration options here

@[default_target]
lean_exe «lnsym» where
root := `Main
Expand Down

0 comments on commit 608cebd

Please sign in to comment.