Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path-condition slicing #494

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Conversation

zapashcanon
Copy link
Member

No description provided.

@zapashcanon zapashcanon force-pushed the pc-slicing branch 2 times, most recently from 63feb31 to 2fc41c8 Compare February 10, 2025 18:55
@zapashcanon zapashcanon marked this pull request as ready for review February 10, 2025 19:09
| [] -> Smtml.Expr.Set.singleton c
| [] ->
(* TODO: using Smtml.Expr.Set.empty seems to be working but it looks suspicious, it should be tested *)
Smtml.Expr.Set.singleton c
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess if get_symbols returns [] it must be a concrete expression that is not being simplified properly 😢

Copy link
Member Author

Choose a reason for hiding this comment

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

Hum... I believe this branch is sometimes reached. I can provide the list of expressions that are not simplified if you're interested? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a commit that fails on such not properly simplified expressions, see 5d4b35b

They all seem to be related to ++, extract and extend.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah thanks! I think there are a few of these that I can fix easily.

The ones with pointers are more tricky because I don't want to simplify pointers so much that we loose the Ptr type from a given expression. Then, we would loose the ability to track heap chunks.

Do you think having something like an unsafe_simplify, that is more aggressive and simplifies every concrete expression to a given value helpful here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I need to think more about it to get a clear idea of what we want. I believe you know better than me so, unsafe_simplify is probably OK for now! :)

@zapashcanon zapashcanon force-pushed the pc-slicing branch 2 times, most recently from f89e2c7 to d509e9e Compare February 17, 2025 13:59
@zapashcanon
Copy link
Member Author

I'm getting a few (3):

$ owi c ...
owi: internal error, uncaught exception:
     Invalid_argument("index out of bounds")
     Raised at Stdlib__Domain.join in file "domain.ml", line 299, characters 16-24
     Called from Stdlib__Array.iter in file "array.ml", line 113, characters 31-48
     Called from Owi__Wq.read_as_seq.(fun) in file "src/data_structures/wq.ml", line 17, characters 4-16
     Called from Owi__Cmd_sym.cmd.print_and_count_failures in file "src/cmd/cmd_sym.ml", line 100, characters 10-20
     Called from Owi__Cmd_sym.cmd in file "src/cmd/cmd_sym.ml", line 131, characters 15-49
     Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
     Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44

When running on Test-Comp (on programs 829, 843 and 1187).

@zapashcanon zapashcanon force-pushed the pc-slicing branch 2 times, most recently from 2ae28d5 to 7953e56 Compare February 22, 2025 11:57
@zapashcanon
Copy link
Member Author

zapashcanon commented Mar 4, 2025

TODO:

change type t = Smtml.Expr.Set.t Union_find.t to type t = Smtml.Expr.Set.t Union_find.t * Smtml.Expr.Set.t so that we don't have to convert the UF to a set all the time. It should be almost free to maintain.

EDIT: Done in 0255585

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.

3 participants