[2607.24504] Classifying Capabilities (Extended Version)
Skip to main content
Search arXiv
Press Enter to search · Advanced search
-->
Computer Science > Programming Languages
arXiv:2607.24504 (cs)
[Submitted on 27 Jul 2026]
Title:Classifying Capabilities (Extended Version)
Authors:Cao Nguyen Pham (1), Oliver Bračevac (1), Yichen Xu (1), Yaoyu Zhao (1), Martin Odersky (1) ((1) EPFL)<br>View a PDF of the paper titled Classifying Capabilities (Extended Version), by Cao Nguyen Pham (1) and 4 other authors
View PDF
Abstract:Capture checking in Scala 3 enables lightweight and practical effect and resource tracking by recording capabilities in types. However, the system offers no way to reason about kinds of capabilities. Natural constraints such as "retaining only the control-flow capabilities of this closure" or "excluding all thread-local capabilities from this argument" become inexpressible. Both arise in the Scala 3 standard library: "Try" re-throws caught exceptions, so it retains only the control-flow capabilities of its body, and "Future" must not capture thread-local resources. The inability to state these constraints has kept parts of the library outside capture checking.
We introduce capability classifiers: a tree-structured, user-extensible hierarchy of tags that classify capabilities by their semantic role. Projections filter capture sets by classifier, supporting both inclusion ("this http URL[C]") and exclusion ("this http URL[C]"). The tree structure enables decidable disjointness reasoning: classifiers on separate branches are guaranteed to be disjoint regardless of unknown extensions elsewhere in the hierarchy. We formalize classifiers as an extension of System Capless, a core calculus for capture checking, introducing a classifier kind algebra based on intersection, union, and subtraction of classifier subtrees. We extend the operational semantics to model exception interception and establish type safety, effect safety, and handler coverage via a big-step proof, fully mechanized in Lean 4. Classifiers are implemented in the Scala 3 capture checker, and we demonstrate their use on standard library types and real-world effect exclusion patterns.
Subjects:
Programming Languages (cs.PL)
Cite as:<br>arXiv:2607.24504 [cs.PL]
(or<br>arXiv:2607.24504v1 [cs.PL] for this version)
https://doi.org/10.48550/arXiv.2607.24504
Focus to learn more
arXiv-issued DOI via DataCite
Submission history<br>From: Cao Nguyen Pham [view email]<br>[v1]<br>Mon, 27 Jul 2026 14:36:56 UTC (115 KB)
Full-text links:<br>Access Paper:
View a PDF of the paper titled Classifying Capabilities (Extended Version), by Cao Nguyen Pham (1) and 4 other authors<br>View PDF<br>TeX Source
view license
Current browse context:
cs.PL
next >
new<br>recent<br>| 2026-07
Change to browse by:
cs
References & Citations
NASA ADS<br>Google Scholar
Semantic Scholar
export BibTeX citation<br>Loading...
BibTeX formatted citation
×
loading...
Data provided by:
Bookmark
Bibliographic Tools
Bibliographic and Citation Tools
Bibliographic Explorer Toggle
Bibliographic Explorer (What is the Explorer?)
Connected Papers Toggle
Connected Papers (What is Connected Papers?)
Litmaps Toggle
Litmaps (What is Litmaps?)
scite.ai Toggle
scite Smart Citations (What are Smart Citations?)
Code, Data, Media
Code, Data and Media Associated with this Article
alphaXiv Toggle
alphaXiv (What is alphaXiv?)
Links to Code Toggle
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub Toggle
DagsHub (What is DagsHub?)
GotitPub Toggle
Gotit.pub (What is GotitPub?)
Huggingface Toggle
Hugging Face (What is Huggingface?)
ScienceCast Toggle
ScienceCast (What is ScienceCast?)
Demos
Demos
Replicate Toggle
Replicate (What is Replicate?)
Spaces Toggle
Hugging Face Spaces (What is Spaces?)
Spaces Toggle
TXYZ.AI (What is TXYZ.AI?)
Related Papers
Recommenders and Search Tools
Link to Influence Flower
Influence Flower (What are Influence Flowers?)
Core recommender toggle
CORE Recommender (What is CORE?)
Author
Venue
Institution
Topic
About arXivLabs
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .
Which authors of this paper are endorsers? |<br>Disable MathJax (What is MathJax?)
Major funding support from