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

Extract variable handling. #116

Merged
merged 1 commit into from
Oct 11, 2022
Merged

Extract variable handling. #116

merged 1 commit into from
Oct 11, 2022

Conversation

chriseth
Copy link
Collaborator

No description provided.

pub identifier: Identifier,
pub domain: Vec<SMTSort>,
pub codomain: SMTSort,
pub default_value: Option<SMTExpr>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This could be a bit of a hindrance later, but I would say let's keep it for now, we can always refactor further.

Copy link
Owner

Choose a reason for hiding this comment

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

what exactly do you mean? The default value or the whole thing?

src/variables.rs Outdated
/// Declares a new SSA index for the given variable and sets it to
/// "unknown" if the condition is false and to the old value if it is true.
#[must_use]
pub fn havoc_unless(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you think these should better be member functions?

Copy link
Owner

Choose a reason for hiding this comment

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

Might be cleaner when reading yea

src/variables.rs Outdated
use crate::smt::{self, SMTExpr, SMTSort, SMTStatement, SMTVariable};
use crate::ssa_tracker::SSATracker;

pub struct Variable {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you have an idea for a better name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

SystemVariable?

Copy link
Owner

Choose a reason for hiding this comment

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

yea, or EnvVariable? ContextVariable?

Copy link
Owner

@leonardoalt leonardoalt left a comment

Choose a reason for hiding this comment

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

I'm fine with it as is, feel free to merge or change the discussed items.

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.

2 participants