Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
test.check + core.logic: Generating the tests. And the solutions. [pt-BR]
Search
Nicolás Berger
June 25, 2015
Programming
0
36
test.check + core.logic: Generating the tests. And the solutions. [pt-BR]
#clojure #core.logic #test.check
Nicolás Berger
June 25, 2015
Tweet
Share
More Decks by Nicolás Berger
See All by Nicolás Berger
[ES] Introducción a om.next - Clojure User Group Buenos Aires
nberger
0
63
test.check + core.logic: Generating the tests. And the solutions.
nberger
0
29
Other Decks in Programming
See All in Programming
Tailwind CSSを本気でカスタマイズする方法
fsubal
15
5.5k
Git Lint
bkuhlmann
4
760
Goのmultiple errorsについて (2024年4月版)
syumai
4
1.2k
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
170
Native Federation: The Future of Micro Frontends in Angular
manfredsteyer
PRO
0
110
PHPはいつから死んでいるかの調査
chiroruxx
2
420
Balkan Ruby 2024 — How and why to run SQLite on Rails in production
fractaledmind
0
100
Documentation for users with AsciiDoc and Antora
ahus1
0
370
Micro Frontends for Java Microservices - Utah JUG 2024
mraible
PRO
1
110
WebGLで始める コンピュータグラフィックス入門
heller77
0
300
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
200
GitHub Copilotのススメ
marcy731
1
230
Featured
See All Featured
Scaling GitHub
holman
457
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
22
1.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
Clear Off the Table
cherdarchuk
85
310k
Documentation Writing (for coders)
carmenintech
60
4k
4 Signs Your Business is Dying
shpigford
176
21k
Building Effective Engineering Teams - LeadDev
addyosmani
32
1.9k
The Brand Is Dead. Long Live the Brand.
mthomps
49
29k
Being A Developer After 40
akosma
67
580k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Transcript
Meetup clj-sp Test.check + core.logic Gerando os testes. E as
soluções Nicolás Berger @nicoberger Buzzlabs
Core.logic • Implementação do miniKanren: “an embedded DSL for logic
programming” • “kanren”: “relação” em japonês • Programação declarativa → WHAT not HOW “Separate the search algorithm from the logical construction”
Demo core.logic
test.check • Já geramos as soluções, vamos gerar os testes
• Property-based testing • Generate → Run → Shrink Do not write the tests. Generate them!
Demo core.logic + test.check
Exemplos de core.logic • Puzzles (sudoku, who owns the zebra?)
• Árvore genealógica • Knapsack • Malware & threat analysis (threatgrid) • Static code analyzer (kibit) • Type inferencer (lambda calculus)
Links / Referencias • John Hughes - Testing the Hard
Stuff and Staying Sane https://www.youtube.com/watch?v=zi0rHwfiX1Q • David Nolen https://skillsmatter.com/skillscasts/3553-the-refined-clojurist • Zebra puzzle: https://github.com/swannodette/logic-tutorial#zebras • https://github.com/jonase/kibit • https://github.com/frenchy64/Logic-Starter/wiki • http://minikanren.org/ • http://yellerapp.com/posts/2015-04-13-effective-test-check.html • http://www.philandstuff.com/slides/2014/euroclojure.html • http://blog.guillermowinkler.com/blog/2015/04/12/verifying-state-machine-behavior-us ing-test-dot-check/ • http://stackoverflow.com/questions/28467011/what-are-the-main-technical-difference s-between-prolog-and-minikanren-with-resp
Perguntas? :)