Track in the
type
that a value has just one pointer to it
at runtime
unique
exactly 1 reference
non-unique
many references
non-unique container
unique
element
idea: use logic expressions to encode relations
idea: use logic expressions to encode relations
idea: when are two formulae equivalent?
finds the (most-general) unifier
claim: not a good fit in practice
😕
faster unification of uniqueness attributes
🚀
There is a hierarchy between variables
There is a hierarchy between variables
we don't know which variable will be \(\bullet\), therefore have to keep all options available in the unifier
unifies to:
"at least field \(name\) and at least field \(age\)"
A Polymorphic Type System for Extensible Records and Variants (Gaster & Jones, 1996)
rules
with container unification