~/talk

Compile-time Logic Programming in Scala: what for?

Talkat Scala World 2019 · 2019-09-11..09-13· [compilers-and-language-design]
slides:none on file

Claim: Scala implicit resolution maps to Prolog-style logic so the compiler can perform compile-time Prolog via Scala implicits by encoding atoms as traits, terms as type parameters, and facts/rules as implicit defs. Uses HLists for heterogeneous lists, derives JSON typeclass writers and canBuildFrom instances, and proves an Akka Streams type-safe Akka Streams closed shape proof at compile time. Debugging uses -Xlog-implicits, the displaying compiler plugin and IntelliJ implicit hints. Limits include no multi-result inference, ambiguous implicit failures, and observed exponential compile-time blowup.

AI-written summary · about

  1. 0:00Compile-time logic programming intro
  2. 2:23Prolog basics quick intro
  3. 12:16Prolog to Scala implicits
  4. 23:36Logic programming examples
  5. 30:42Type-safe graph validation
  6. 46:00Debugging implicit limits
  7. 48:33Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.