Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
test.check + core.logic: Generating the tests. ...
Search
Nicolás Berger
July 08, 2015
Programming
43
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
test.check + core.logic: Generating the tests. And the solutions.
Nicolás Berger
July 08, 2015
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
75
test.check + core.logic: Generating the tests. And the solutions. [pt-BR]
nberger
0
41
Other Decks in Programming
See All in Programming
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
250
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
sbt 2.0: takeoff
eed3si9n
0
160
すこし踏み込む CancellationToken
htkym
2
1.7k
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.7k
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.8k
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
280
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Making Projects Easy
brettharned
120
6.8k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
GraphQLとの向き合い方2022年版
quramy
50
15k
Thoughts on Productivity
jonyablonski
76
5.4k
Into the Great Unknown - MozCon
thekraken
41
2.8k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
Skip the Path - Find Your Career Trail
mkilby
1
260
Transcript
Meetup Clojure Buenos Aires Test.check + core.logic Generating the tests,
and the solutions Nicolás Berger @nicoberger
Core.logic • miniKanren implementation: “an embedded DSL for logic programming”
• “kanren”: “relation” in japanese • Declarative programming→ WHAT not HOW “Separate the search algorithm from the logical construction”
Demo core.logic
test.check • Property-based testing • Generate → Run → Shrink
• Generate: random generators, use existing or combine to create new ones • Run: Assert properties for every input • Shrink: Find a smaller input that still fails Do not write the tests. Generate them!
Demo core.logic + test.check
Exemplos de core.logic • Puzzles (sudoku, who owns the zebra?)
• Genealogic tree • 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
Thanks! Nicolás Berger @nicoberger