Logic Programming

@ryanwgough

  1. What is Logic

  2. What is Logic Programming

  3. What use is Logic Programming

IT IS HOT IN HERE

I NEED A BEER

and

HOT(madlab)

NEEDS_BEER(ryan)

HOT(X)

and

LOCATED(P,X)

implies

NEEDS_BEER(P)

Prolog

Datalog

Mis

Ala

Geo

S.Ca

Flo

Poker Hand Kata

  • Three card hands

  • No suits, flushes, straights

  • J,Q,K,A only

Simply Logical?

  • Problem Focused

  • What not how

  • Out of the Tar Pit

Awkward Questions

  • Is this even programming?

  • More SQL?

Mini-Kanren

The Reasoned Schemer

https://github.com/RyanGough/ukanjs

https://github.com/miniKanren/sokuza-kanren/blob/master/sokuza-kanren.scm

More Logic

  • Datomic

  • Logic Blox

  • Answer Set Programming

Logic Programming

By Ryan Gough

Logic Programming

  • 367