-
Notifications
You must be signed in to change notification settings - Fork 11
Graph coloring example #198
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
base: master
Are you sure you want to change the base?
Conversation
|
Just noticed that the readme contains outdated information and needs to be updated. |
|
|
||
| fn int_eq<Lbl: Label>(a: IAtom, b: IAtom, model: &mut Model<Lbl>) -> ReifExpr { | ||
| if USE_EQUALITY_LOGIC.get() { | ||
| if a.is_const() && !b.is_const() && b.shift == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b.shift can be added/substracted? to a.shift constant in ReifExpr::EqVal(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you implement this before I merge?
| mod encode; | ||
| mod parse; | ||
|
|
||
| pub static SPECIAL_BRANCHER: EnvParam<bool> = EnvParam::new("ARIES_COLORING_SPECIAL_BRANCHER", "true"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of EnvParam is to allow exposing deeply buried parameters of the solver. Here you do not have this problem so it should be exposed as a command line parameter (with clap crate?).
| pub fn from_file(path: &Path) -> Self { | ||
| let mut res: Problem = Default::default(); | ||
| assert!(path.is_file()); | ||
| let lines = read_lines(path).expect("File provided was not able to be read."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| let lines = read_lines(path).expect("File provided was not able to be read."); | |
| let lines = read_lines(path).expect("File provided could not be read."); |
| res | ||
| } | ||
|
|
||
| #[allow(unused)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove lint or function.
|
|
||
| fn int_eq<Lbl: Label>(a: IAtom, b: IAtom, model: &mut Model<Lbl>) -> ReifExpr { | ||
| if USE_EQUALITY_LOGIC.get() { | ||
| if a.is_const() && !b.is_const() && b.shift == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you implement this before I merge?
A simple crate which encodes and solves graph coloring problems. Used to profile equality logic. A modification was made to the model's eq expression in order for IVar equality to be modeled with Eq logic.