Draft
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #156 +/- ##
============================================
- Coverage 59.77% 59.74% -0.03%
+ Complexity 521 520 -1
============================================
Files 109 109
Lines 7480 7480
Branches 828 828
============================================
- Hits 4471 4469 -2
- Misses 2830 2832 +2
Partials 179 179 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…egalArgumentException when indices points-to set is empty.
…legalArgumentException when 'lam' argument is missing.
…sisEngine.getDataflowSources.
…getDataflowSources.
…n SparseAdd.java.
…s in TensorGenerator.java.
…in the same class or an inherited class.
- Modified `PythonConstructorTargetSelector` to extract methods from both `IPythonClass` and `BypassSyntheticClass` (XML summaries), including the "do" method for the latter. - Updated `PythonInstanceMethodTrampolineTargetSelector` to recognize summarized classes as callables. - Updated `PythonSuper` with similar logic to support `super()` calls for summarized classes. - Ensures `self` correctly refers to the instance object in summarized methods, addressing wala#127.
…icit `__call__` on synthetic objects.
…ala#127 is resolved.
… `TestIssue127.java`. Adds tests for wala#127.
This commit resolves wala#127 by updating how synthetic methods defined in XML summaries are integrated into the Python front-end's object model. - Modifies `PythonAnalysisEngine` to automatically translate synthetic XML methods into "Function Classes", allowing them to leverage the existing trampoline generation infrastructure. - Restricts the application of the `IPythonClass` interface to only those synthetic classes that actually contain methods, preventing the erroneous interception of non-instance factory functions (e.g., `tf.reshape`) by the Python constructor selector. - Updates `PythonInstanceMethodTrampolineTargetSelector` to support flexible lookups of the `__call__` method for synthetic types, ensuring implicit invocations (like `c()`) route correctly to the underlying `do` method.
This commit improves the Pass 2 logic in `PythonAnalysisEngine` to accurately distinguish between auto-generated dummy constructors and intentional factory functions defined in XML summaries (e.g., `pd.read_excel`). - Updates the removal heuristic to only delete `do` methods that allocate the exact type of their declaring class AND belong to a class possessing other instance methods. - Ensures that pure factory functions modeled as classes without instance methods remain untouched, preserving their original XML-defined semantics. - Fixes `TestPandasModel.testPandas1` and ensures continued support for TensorFlow factory functions while maintaining the fix for wala#127.
…ly used a read_data helper that did not preserve shape and dtype information from input tensors.
…o remove the `read_dataset` helper. This change inlines tensor allocations directly within the `do` methods. It avoids the `read_dataset` helper pattern, which obfuscates object creation from 1-CFA context sensitivity. This prevents the aliasing of resulting tensor objects and ensures that tensor arguments are correctly tracked, fixing the failing test `testDataset19`.
… trampolines. - Updated `PythonInstanceMethodTrampolineTargetSelector` to properly recognize and resolve `do` methods (via a new constant `DO_METHOD_NAME`) for summarized classes when they are invoked as callables. - Added type safety to `getCall()` in `PythonMethodTrampolineTargetSelector` to gracefully return `null` instead of throwing `ClassCastException` on non-Python invoke instructions, avoiding analysis crashes.
Added an explanatory comment to the `from_tensor_slices` method detailing why dataset field initializations are duplicated across operations. This redundancy is required to bypass WALA's 1-CFA context sensitivity limits, ensuring unique allocation sites and preventing object aliasing in chained dataset operations.
Removes the centralized `read_dataset` helper methods in `Dataset` and `ImageDataGenerator` and inlines their logic directly into the `do` methods of various dataset operations. This circumvents 1-CFA context sensitivity limitations, ensuring unique allocation sites for dataset fields and preventing object aliasing in chained operations.
The underlying trampoline resolution issues that necessitated these workarounds have been resolved.
…l tensor specs in the code. The initial tensor dimensions were not accurate, which caused the test to fail. The expected tensor spec should be (256, 28, 28, 1) with dtype float32, which matches the actual tensor spec used in the `train_step` function in the `tensorflow_gan_tutorial.py` file.
In case we need it.
That's where they currently are.
…ponding tensor generators to support pass-through behavior for __call__ and call methods. Also, refine tensor source identification in PythonTensorAnalysisEngine by verifying sources with TensorGeneratorFactory.
…tive layer discovery and fixing trampoline injection for multiple allocations in summarized methods.
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.
Fix wala#267.