~/talk

Constraining Complexity in the Generics Design

Talkat GopherCon AU 2023 · 2023-11-08..11-10· [go, compilers-and-language-design]
links:none on file
slides:none on file

Allowing interfaces-with-methods inside union constraints makes the compiler’s implication check coNP-hard by reduction from Boolean satisfiability: the construction maps each Boolean variable to two interfaces (X and notX), adds “at least one” and “both” interfaces, and asks if formula∧atLeastOne implies notBoth. That makes precise checking potentially exponential and exploitable (C++ has similar cases). Practical compromises are one-level unions (DNF-like restriction), a conservative checker that rejects when unsure, or timeouts.

AI-written summary · about

  1. 0:00Introduction
  2. 0:40Union elements
  3. 2:37P vs NP
  4. 4:40NP Hard
  5. 6:22Co NP Hard
  6. 8:57Reduction Proof
  7. 11:07Solution
  8. 12:36Proof
  9. 14:18Frustration
  10. 14:48Ignore the problem
  11. 16:08Subproblems
  12. 18:09Type Checker
  13. 21:04Type Switches
  14. 23:08Conclusion
~/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.