Skip to content

Whole value analysis#327

Merged
lucaneg merged 26 commits intomasterfrom
whole-value-analysis
Jun 24, 2025
Merged

Whole value analysis#327
lucaneg merged 26 commits intomasterfrom
whole-value-analysis

Conversation

@lucaneg
Copy link
Member

@lucaneg lucaneg commented Jun 9, 2025

Description
Implementation of the smashed sum and the constraints-based whole value analyses.

Implemented features
Closes #326

@lucaneg lucaneg added this to the 0.2 milestone Jun 9, 2025
@lucaneg lucaneg requested a review from Copilot June 9, 2025 10:48
@lucaneg lucaneg self-assigned this Jun 9, 2025
@lucaneg lucaneg added the 🎆 type:feature New feature or request label Jun 9, 2025
@lucaneg lucaneg added this to LiSA Jun 9, 2025
@lucaneg lucaneg added the 🔍 scope:analysis Work regarding abstract domains or fixpoint algorithms label Jun 9, 2025
@lucaneg lucaneg moved this to PR WIP in LiSA Jun 9, 2025
@lucaneg lucaneg added the 🏗 resolution:wip Incomplete work - do not review yet label Jun 9, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

@lucaneg lucaneg removed the 🏗 resolution:wip Incomplete work - do not review yet label Jun 24, 2025
@lucaneg lucaneg moved this from PR WIP to PR Ready in LiSA Jun 24, 2025
@lucaneg lucaneg merged commit f5955fd into master Jun 24, 2025
3 checks passed
@lucaneg lucaneg deleted the whole-value-analysis branch June 24, 2025 13:16
@github-project-automation github-project-automation bot moved this from PR Ready to PR Merged in LiSA Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔍 scope:analysis Work regarding abstract domains or fixpoint algorithms 🎆 type:feature New feature or request

Projects

Status: PR Merged

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Implement the Smashed Sum and the Whole-Value Analysis based on constraints

2 participants