Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements the smashed sum and constraints‐based whole value analyses while refactoring several string-related domains to implement the new StringDomain interface. Key changes include:
- Refactoring the Satisfiability lattice by removing legacy Lattice methods and adding auxiliary operations.
- Converting various string abstract domains (Tarsis, FSA, Bricks, Suffix, Prefix, CharInclusion) to implement the new StringDomain interface and updating their exception handling.
- Introducing the SmashedSum domain to combine interval, string, and boolean values.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/Satisfiability.java | Refactored to remove legacy lattice operations and add auxiliary methods. |
| lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/SemanticsSanityTest.java | Added support for new domain types in default test cases. |
| lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/tarsis/ContainsTest.java | Updated test methods to declare thrown exceptions. |
| lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/Tarsis.java | Converted to implement StringDomain and implemented string equality semantics. |
| lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/FSA.java | Adapted substring and indexOf methods with improved exception handling. |
| lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Bricks.java | Replaced legacy nonrelational interface with StringDomain and refined substring logic. |
| lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Suffix.java | Modified to implement StringDomain and added a getSuffix method for clarity. |
| lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Prefix.java | Updated to use StringDomain and improved substring implementation. |
| lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/StringDomain.java | New interface to consolidate common string analysis methods. |
| lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Prefix.java, CharInclusion.java | Adjusted to align with the new StringDomain-based approach. |
| lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/SmashedSum.java | Introduced a new abstract domain combining numeric, string, and boolean analyses. |
Comments suppressed due to low confidence (1)
lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/Tarsis.java:269
- The magic literal "Ͳ" is used to signal a special case; consider extracting it into a named constant so its meaning is clearer.
if (a.isEmpty()) return b.equals("Ͳ") ? Satisfiability.UNKNOWN : Satisfiability.NOT_SATISFIED;
lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/SmashedSum.java
Show resolved
Hide resolved
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.
Description
Implementation of the smashed sum and the constraints-based whole value analyses.
Implemented features
Closes #326