Skip to content

Add support for StringBuilder.capacity() method - #157

Open
Suvrat1629 wants to merge 1 commit into
SymbolicPathFinder:sv-compfrom
Suvrat1629:string-capacity-support
Open

Suvrat1629 wants to merge 1 commit into
SymbolicPathFinder:sv-compfrom
Suvrat1629:string-capacity-support

Conversation

@Suvrat1629

Copy link
Copy Markdown

Added handleCapacity() method in SymbolicStringHandler.java that:

  • Retrieves the symbolic length of the StringBuilder
  • Calculates capacity using the formula: length + 16 (as per Java's StringBuilder specification for StringBuilder(String s) constructor)
  • Pushes the resulting symbolic integer expression onto the stack

Relates to #108 (jbmc-regression/StringBuilderCapLen04.yml)

Signed-off-by: Suvrat1629 <suvrat1629@gmail.com>
@Suvrat1629
Suvrat1629 changed the base branch from master to sv-comp March 17, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant