Skip to content

Conversation

@matthiasgreen
Copy link
Contributor

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.

@matthiasgreen
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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(...)

Copy link
Member

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");
Copy link
Member

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.");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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)]
Copy link
Member

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 {
Copy link
Member

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?

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