Print variables if asked to

This commit is contained in:
Ayaz Hafiz 2023-05-02 13:08:58 -05:00
parent bdba56ce74
commit d13e221678
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 11 additions and 0 deletions

View file

@ -62,6 +62,7 @@ pub struct DebugPrint {
pub print_ranks: bool,
pub ignore_polarity: bool,
pub print_weakened_vars: bool,
pub print_variables: bool,
}
impl DebugPrint {
@ -71,6 +72,7 @@ impl DebugPrint {
print_ranks: false,
ignore_polarity: false,
print_weakened_vars: false,
print_variables: false,
};
}
@ -658,6 +660,12 @@ fn write_content<'a>(
if env.debug.print_ranks {
buf.push_str(&format!("⟨@{:?}", subs.get_rank(var).into_usize()));
}
if env.debug.print_variables {
buf.push_str(&format!(
"<{:?}>",
subs.get_root_key_without_compacting(var)
));
}
match subs.get_content_without_compacting(var) {
FlexVar(Some(name_index)) => {