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

feat: lift to expressions, vacuous and random_search tactics #7

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c2ce721
steps towards meta-testing; needs redesign
siddhartha-gadgil Nov 18, 2024
28a7b34
monad lifts
siddhartha-gadgil Nov 18, 2024
f4fd9ad
some cases presumably correct now
siddhartha-gadgil Nov 19, 2024
6fabb20
more meta code written; untested
siddhartha-gadgil Nov 19, 2024
ed3ed3b
removed `.mistmatch`, throwing errors instead
siddhartha-gadgil Nov 20, 2024
3939224
tests for matching
siddhartha-gadgil Nov 20, 2024
814db0e
more instances
siddhartha-gadgil Nov 20, 2024
d6c28fb
Merge branch 'main' of https://github.com/siddhartha-gadgil/plausible
siddhartha-gadgil Nov 20, 2024
699bd8c
ported test, fiddly expressions
siddhartha-gadgil Nov 20, 2024
e1974f8
test code including some buggy code
siddhartha-gadgil Nov 21, 2024
e7c235d
fixes; first case working (bug in second case)
siddhartha-gadgil Nov 21, 2024
0176065
fixed another case
siddhartha-gadgil Nov 21, 2024
189afce
bug fixed, more tests
siddhartha-gadgil Nov 22, 2024
6384d06
function, elaborator for disproof; bugs remain: `and`, `or`, maybe ot…
siddhartha-gadgil Nov 22, 2024
4920676
fixed `and` an `or`, commented out noise
siddhartha-gadgil Nov 22, 2024
dbba754
purged `-- logInfo`
siddhartha-gadgil Nov 22, 2024
df56c20
fixed subtype
siddhartha-gadgil Nov 22, 2024
8e01cc2
Vacuous tactic
siddhartha-gadgil Nov 23, 2024
7ea0944
separated tests
siddhartha-gadgil Nov 23, 2024
6897196
clean up of tests
siddhartha-gadgil Nov 23, 2024
466ad91
random search implemented
siddhartha-gadgil Nov 25, 2024
241a26f
clean up comments and tests
siddhartha-gadgil Nov 25, 2024
0187e13
optional expression in failure, rename run
siddhartha-gadgil Nov 26, 2024
b8b8453
propExpr optional
siddhartha-gadgil Nov 26, 2024
cd513bd
removed requirement for `ToExpr` in MetaTestable
siddhartha-gadgil Nov 26, 2024
09bbbef
making APIs more similar
siddhartha-gadgil Nov 26, 2024
713defb
removed product expression, fixes function case
siddhartha-gadgil Nov 28, 2024
fb1fa9f
cleaner definition fixes regression
siddhartha-gadgil Nov 29, 2024
2217b44
purge debug data
siddhartha-gadgil Nov 29, 2024
deaaf3b
profiling
siddhartha-gadgil Nov 30, 2024
9decec1
some fixes
siddhartha-gadgil Nov 30, 2024
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
5 changes: 4 additions & 1 deletion Plausible/Functions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ instance Pi.sampleableExt : SampleableExt (α → β) where
interp f := SampleableExt.interp ∘ f.apply
sample := do
let xs : List (_ × _) ← (SampleableExt.sample (α := List (α × β)))
let ⟨x⟩ ← Gen.up <| (SampleableExt.sample : Gen (SampleableExt.proxy β))
let ⟨x⟩ ← Gen.up (SampleableExt.sample : Gen (SampleableExt.proxy β))
pure <| TotalFunction.withDefault (List.toFinmap' <| xs.map <|
Prod.map SampleableExt.interp id) x
-- note: no way of shrinking the domain without an inverse to `interp`
shrink := { shrink := letI : Shrinkable α := {}; TotalFunction.shrink }
proxyExpr? := none

end

Expand All @@ -149,13 +150,15 @@ instance (priority := 2000) PiPred.sampleableExt [SampleableExt (α → Bool)] :
interp m x := interp m x
sample := sample
shrink := SampleableExt.shrink
proxyExpr? := none

instance (priority := 2000) PiUncurry.sampleableExt [SampleableExt (α × β → γ)] :
SampleableExt.{imax (u + 1) (v + 1) w} (α → β → γ) where
proxy := proxy (α × β → γ)
interp m x y := interp m (x, y)
sample := sample
shrink := SampleableExt.shrink
proxyExpr? := none

end SampleableExt

Expand Down
Loading