Skip to content

Commit

Permalink
Update compression.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlb2251 authored Nov 26, 2023
1 parent fca80f7 commit 358745b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,7 @@ impl Pattern {

// to guarantee eta long we cant allow abstractions to start with a lambda at the top
if cfg.eta_long {
match_locations.retain(|node| match expands_to_of_node(&set[*node]) {
ExpandsTo::Lam(_) => false,
_ => true,
});
match_locations.retain(|node| !matches!(expands_to_of_node(&set[*node]), ExpandsTo::Lam(_)));
}

let utility_upper_bound = utility_upper_bound(&match_locations, body_utility, cost_of_node_all, num_paths_to_node, cost_fn, cfg);
Expand Down Expand Up @@ -2276,4 +2273,4 @@ pub fn json_of_step_results(step_results: &[CompressionStepResult], train_progra
"rewritten_dreamcoder": rewritten_dreamcoder,
"abstractions": step_results.iter().map(|inv| inv.json(&cfg.step)).collect::<Vec<serde_json::Value>>(),
})
}
}

0 comments on commit 358745b

Please sign in to comment.