Repository navigation
Conversation
asgerf
force-pushed
the
asgerf-legacy-mad-property-models
branch
from
October 30, 2026 10:05
b07ed01 to
470d915
Compare
Property models (e.g. UITextField.text, Process.arguments) are matched against member accesses using type inference on the base. Selector now covers both call-site and property selectors. Also add stubs for all types mentioned in models to the builtins, since dependency declarations are not extracted outside of tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
asgerf
force-pushed
the
asgerf-legacy-mad-property-models
branch
from
October 30, 2026 10:55
4c9b634 to
58c2b3f
Compare
Previously type inference assumed that UnqualifiedMemberAccess could only be qualified by a receiver parameter, which bypasses the abstraction set up in prior phases.
asgerf
force-pushed
the
asgerf-legacy-mad-property-models
branch
from
October 30, 2026 11:02
58c2b3f to
6965a5c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Legacy Swift models include sources and sinks that refer to properties rather than calls (e.g.
UITextField.text,Process.arguments,URLSessionConfiguration.tlsMinimumSupportedProtocolVersion).LegacyMaD.qllpreviously only understood method/constructor models, so these were ignored.Approach
Selectornow covers both call-site selectors (MkCallSelector) and property selectors (MkPropertySelector). Property selectors are built from source/sink rows whose name has no argument list. A newmatchesPropertyAccesssits alongsidematchesCallandmatchesCallable.subtypesis true). Accesses that are call callees are excluded."") are the value of the property read.PostUpdate) are the value assigned to the property, plus the post-update node of the property itself (to catch in-place mutation liketask.arguments.append(x)). This deviates from legacy Swift, which used the post-update node of the base; unified has no implicit taint reads, so that would not be useful here.Builtins
Outside of tests, declarations from dependencies are not extracted, so types like
URLorProcesswould never be resolved by type inference. To compensate,tools/builtins/types.swiftnow contains a representative declaration (type hierarchy only, no members) for every type mentioned inlegacy-swift.model.yml. Themadtest has amissingBuiltinTypequery that guards against model types lacking a builtin, and a newmad-builtinstest exercises property models with no stubs at all.Notes for review
Realm.Configuration,URL.AsyncBytes) are declared but not yet resolved by type inference, so property models on them still don't match. These test cases are markedMISSING.executableURLwrites andarguments?.append); the corresponding TODO in the query is removed.