Repository navigation
feat(core, analyzer, go-server): Add model support to analyzer - #387
Merged
Merged
Conversation
Saloed
requested changes
Aug 28, 2026
Saloed
requested changes
Sep 1, 2026
misonijnik
force-pushed
the
misonijnik/go-models-core
branch
5 times, most recently
from
September 5, 2026 11:39
7677cea to
d324e41
Compare
misonijnik
force-pushed
the
misonijnik/go-models-core
branch
from
October 13, 2026 10:12
d324e41 to
0e8a2ce
Compare
Saloed
requested changes
Oct 22, 2026
Saloed
requested changes
Oct 22, 2026
Saloed
left a comment
Contributor
There was a problem hiding this comment.
Let's make a more clear and resource efficient transformation logic.
- Introduce lookups (similar to JVM IR). The instructions shouldn't hold the resolved function/type references
- Apply transformation during lookup resolution. The transformation intercepts the lookup, then bypass the lookup if it is not responsible.
- We don't need transformation caches at all. We can cache resolved lookups where we need it.
Base automatically changed from
misonijnik/isolated-approximations-cli
to
main
October 27, 2026 10:26
Address review 5615028707 by moving model path normalization into an IR transformer, making package ownership immutable, and replacing body copying with decoding in the lookup context. Remove transformation caches and add lookup interception regressions. Validation: 131 Go IR tests and 5 analyzer tests passed; affected consumers compile; git diff --check passes. Benchmark and roundtrip tasks excluded.
misonijnik
force-pushed
the
misonijnik/go-models-core
branch
from
October 27, 2026 11:02
f22e3ee to
773bdeb
Compare
Saloed
requested changes
Oct 27, 2026
Saloed
left a comment
Contributor
There was a problem hiding this comment.
The general IR architecture is ok. However, we should try to reduce the plenty of miscellaneous entities. Also, we should carefully verify that all the introduced entities have a correct equals implementation
Address review 5673574297 by removing the intermediate model entities and giving the remaining views an equals/hashCode consistent with the IR implementations. - The model transformer is no longer a GoIRProgram; it intercepts package lookup and builds GoIRPackageImpl/GoIRNamedTypeImpl instead of the overlay package and named-type views. - ModelFunctionCandidate and the transformer's function re-wrapping are gone; the overlay emits ModelFunction/ApproximatedFunction directly. - ModelPathNormalizer is folded into GoIRModelPathTransformer, dropping its unused package view. - The transformer chain builds GoIRGlobalImpl/GoIRConstImpl instead of anonymous delegating views. - Package and named-type views compare by import path/full name, like their Impl counterparts. - Function identity is fullName plus model-ness, shared by GoIRFunctionImpl and all function views, so an approximation never equals the function it replaces (bodies and instruction locations inherit function equality). Validation: 134 Go IR tests (new identity regression included), GoUnitResolverTest and EntryPointSelectionTest pass; git diff --check clean.
Saloed
requested changes
Oct 28, 2026
Resolve models through package lookup on a single GoIRProgramImpl instead of a transformer-chain program that re-wrapped every function, package and named type. The model transformer now builds concrete IR objects (GoIRPackageImpl, GoIRNamedTypeImpl, GoIRModelFunctionImpl, GoIRApproximatedFunctionImpl) and maps opentaint/<target> paths while decoding model bodies, like the JVM approximation instruction substitutor. Removes GoIRTransformerChain, its function/package/named-type views, the delegating model function wrappers, GoIRModelPathTransformer and GoIRBodyReader. GoIRProgram.originalProgram is gone; originals are reached through GoIRApproximatedFunction.original.
Saloed
approved these changes
Oct 28, 2026
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.
No description provided.