From 48f1f929076b5cf0a76b695762b9657fe8bd6e3d Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Mon, 18 Aug 2025 11:24:10 -0400 Subject: [PATCH 01/47] rewrite check --- tests/fuzz_symbol_weighting_test.rs | 2 +- tests/integration_tests.rs | 44 ++++++++++++++--------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/fuzz_symbol_weighting_test.rs b/tests/fuzz_symbol_weighting_test.rs index 4a888867..e921bc7a 100644 --- a/tests/fuzz_symbol_weighting_test.rs +++ b/tests/fuzz_symbol_weighting_test.rs @@ -73,7 +73,7 @@ fn generate_random_weights(selected_symbols: &[&String], rng: &mut ChaCha8Rng) - fn run_fuzz_compression(cost_prims: &serde_json::Value, test_file: &String, seed: u64) { let cost_prims_str = cost_prims.to_string(); - let args = format!("-i3 -a3 --verbose-best --cost-prim {}", cost_prims_str); + let args = format!("-i3 -a3 --rewrite-check --verbose-best --cost-prim {}", cost_prims_str); let output_file = format!("data/expected_outputs/fuzz/{:0>3}_{}.json", seed, test_file.split("/").last().unwrap().split(".").next().unwrap()); compare_out_jsons_testing(test_file, &output_file, &args, InputFormat::ProgramsList); } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 44cd3f26..2f7ceff4 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -91,43 +91,43 @@ fn origami_2_a3_i10() { #[test] fn neurosym_match_at_tag() { - compare_out_jsons_testing("data/neurosym/match_at_tag.json", "data/expected_outputs/neurosym_match_at_tag.json", "", InputFormat::ProgramsList); - compare_out_jsons_testing("data/neurosym/match_at_tag.json", "data/expected_outputs/neurosym_match_at_tag_excluded.json", "--fused-lambda-tags 2", InputFormat::ProgramsList); + compare_out_jsons_testing("data/neurosym/match_at_tag.json", "data/expected_outputs/neurosym_match_at_tag.json", " --rewrite-check", InputFormat::ProgramsList); + compare_out_jsons_testing("data/neurosym/match_at_tag.json", "data/expected_outputs/neurosym_match_at_tag_excluded.json", "--fused-lambda-tags 2 --rewrite-check", InputFormat::ProgramsList); } #[test] fn neurosym_metavariable_with_tag() { compare_out_jsons_testing("data/neurosym/metavariable_with_tag.json", "data/expected_outputs/neurosym_metavariable_with_tag.json", "", InputFormat::ProgramsList); - compare_out_jsons_testing("data/neurosym/metavariable_with_tag.json", "data/expected_outputs/neurosym_metavariable_with_tag_excluded.json", "--fused-lambda-tags 2", InputFormat::ProgramsList); + compare_out_jsons_testing("data/neurosym/metavariable_with_tag.json", "data/expected_outputs/neurosym_metavariable_with_tag_excluded.json", "--fused-lambda-tags 2 --rewrite-check", InputFormat::ProgramsList); } #[test] fn symbol_weighting_test_higher_weight() { - compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_default.json", "-i1 -a3", InputFormat::ProgramsList); - compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_h_200.json", "-i1 -a3 --cost-prim {\"H\":200}", InputFormat::ProgramsList); - compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_h_202.json", "-i1 -a3 --cost-prim {\"H\":202}", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_default.json", "-i1 -a3 --rewrite-check", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_h_200.json", "-i1 -a3 --rewrite-check --cost-prim {\"H\":200}", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_h_202.json", "-i1 -a3 --rewrite-check --cost-prim {\"H\":202}", InputFormat::ProgramsList); } #[test] fn symbol_weighting_test_lower_weight() { - compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_default.json", "-i1 -a3", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_default.json", "-i1 -a3 --rewrite-check", InputFormat::ProgramsList); // l1,l2,l3 all should have value 60 in the following test - compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_l_60.json", "-i1 -a3 --cost-prim {\"L1\":60,\"L2\":60,\"L3\":60}", InputFormat::ProgramsList); - compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_l_67.json", "-i1 -a3 --cost-prim {\"L1\":67,\"L2\":67,\"L3\":67}", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_l_60.json", "-i1 -a3 --rewrite-check --cost-prim {\"L1\":60,\"L2\":60,\"L3\":60}", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_l_67.json", "-i1 -a3 --rewrite-check --cost-prim {\"L1\":67,\"L2\":67,\"L3\":67}", InputFormat::ProgramsList); } -const DFA_ARGS: &str = r#"--tdfa-json-path test_data/dfa.json --tdfa-root M --valid-metavars ["S","E","seqS"] --valid-roots ["S","E","seqS"] --tdfa-non-eta-long-states {"seqS":"S"} --tdfa-split ~"#; +const DFA_ARGS: &str = r#" --tdfa-json-path test_data/dfa.json --tdfa-root M --valid-metavars ["S","E","seqS"] --valid-roots ["S","E","seqS"] --tdfa-non-eta-long-states {"seqS":"S"} --tdfa-split ~"#; #[test] fn tdfa_multi_arg_function() { - compare_out_jsons_testing("data/python/multi-arg-function.json", "data/expected_outputs/multi-arg-function-basic.json", "-i2 -a3", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/multi-arg-function.json", "data/expected_outputs/multi-arg-function-with-dfa.json", &("-i2 -a3 ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/multi-arg-function.json", "data/expected_outputs/multi-arg-function-basic.json", "-i2 -a3 --rewrite-check", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/multi-arg-function.json", "data/expected_outputs/multi-arg-function-with-dfa.json", &("-i2 -a3 --rewrite-check ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); } #[test] fn tdfa_sequence() { - compare_out_jsons_testing("data/python/front-of-sequence.json", "data/expected_outputs/front-of-sequence.json", &("-i2 -a3 ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/back-of-sequence.json", "data/expected_outputs/back-of-sequence.json", &("-i2 -a3 ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/front-of-sequence.json", "data/expected_outputs/front-of-sequence.json", &("-i2 -a3 --rewrite-check ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/back-of-sequence.json", "data/expected_outputs/back-of-sequence.json", &("-i2 -a3 --rewrite-check ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); } fn python_args() -> String { @@ -136,24 +136,24 @@ fn python_args() -> String { #[test] fn python_symbols_regression() { - compare_out_jsons_testing("data/python/10.json", "data/expected_outputs/10.json", &("-i10 -a2 --symvar-prefix & ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/10.json", "data/expected_outputs/10.json", &("-i10 -a2 --rewrite-check --symvar-prefix & ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); } #[test] fn symbols_basic() { - compare_out_jsons_testing("data/python/symbols-alignment.json", "data/expected_outputs/symbols-alignment.json", "-i2 -a3 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbols-cannot-be-literal.json", "data/expected_outputs/symbols-cannot-be-literal.json", "-i2 -a3 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbols-cannot-be-literal-0-arity.json", "data/expected_outputs/symbols-cannot-be-literal-0-arity.json", "-i2 -a3 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbol-reuse-dfa.json", "data/expected_outputs/symbol-reuse-dfa.json", &("-i1 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/pick-up-on-abstractions-0-arity.json", "data/expected_outputs/pick-up-on-abstractions-0-arity.json", &("-i1 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbols-alignment.json", "data/expected_outputs/symbols-alignment.json", "-i2 -a3 --rewrite-check --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbols-cannot-be-literal.json", "data/expected_outputs/symbols-cannot-be-literal.json", "-i2 -a3 --rewrite-check --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbols-cannot-be-literal-0-arity.json", "data/expected_outputs/symbols-cannot-be-literal-0-arity.json", "-i2 -a3 --rewrite-check --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --rewrite-check --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse-dfa.json", "data/expected_outputs/symbol-reuse-dfa.json", &("-i1 -a0 --rewrite-check ".to_owned() + &python_args()), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/pick-up-on-abstractions-0-arity.json", "data/expected_outputs/pick-up-on-abstractions-0-arity.json", &("-i1 -a0 --rewrite-check ".to_owned() + &python_args()), InputFormat::ProgramsList); } #[test] #[should_panic(expected = "Inconsistent symbols: \"NameStr\" and \"Name\" for expr &os:0")] fn symbols_basic_inconsistent_symbols() { - compare_out_jsons_testing("data/python/non-working-import-and-number-in-same-spot.json", "data/expected_outputs/non-working-import-and-number-in-same-spot.json", &("-i3 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/non-working-import-and-number-in-same-spot.json", "data/expected_outputs/non-working-import-and-number-in-same-spot.json", &("-i3 -a0 --rewrite-check ".to_owned() + &python_args()), InputFormat::ProgramsList); } From 2ef9f55d1e88be0a66f6d0c53179040a4bee34e1 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Mon, 18 Aug 2025 19:22:40 -0400 Subject: [PATCH 02/47] add fix for tdfa issue --- src/compression.rs | 69 ++++++++++++++++++++++++++++++--------------- src/expansion.rs | 25 +++++++++++----- src/pattern_args.rs | 4 +++ src/rewriting.rs | 14 ++++++++- src/tdfa.rs | 1 + 5 files changed, 83 insertions(+), 30 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 616b42c1..b2a5d8a7 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -491,7 +491,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| expands_to_of_node(&set[*node]).is_lam()); + match_locations.retain(|node| expands_to_of_node(&set[*node], None).is_lam()); } let utility_upper_bound = utility_upper_bound(&match_locations, body_utility, cost_fn, cost_of_node_all, num_paths_to_node, cfg); @@ -650,6 +650,7 @@ pub struct SharedData { pub multistep_cfg: MultistepCompressionConfig, pub tracking: Option, pub fused_lambda_tags: Option>, + pub prev_results: Vec, } pub fn invalid_metavar_location(shared : &SharedData, node: Idx) -> bool { @@ -676,6 +677,7 @@ fn fused_lambda_location(set : &ExprSet, fused_lambda_tags: &Option>, + pub type_of_ivar: Vec, } impl CriticalMultithreadData { @@ -954,7 +956,11 @@ fn stitch_search( { // for debugging let tracked = original_pattern.tracked && expands_to == tracked_expands_to(&original_pattern, hole_zid, &shared); - if tracked { found_tracked = true; } + if tracked { + // println!("{} tracking expanding {} to {}", "[TRACK]".red().bold(), original_pattern.to_expr(&shared), zipper_replace(original_pattern.to_expr(&shared), &shared.zip_of_zid[hole_zid], Node::Prim(format!("<{expands_to}>").into()))); + // println!("Match locations containing fn_0: {:?}", locs.iter().map(|loc|shared.set.get(*loc).to_string()).filter(|x| x.contains("fn_0")).collect::>()); + found_tracked = true; + } if shared.cfg.follow_prune && !tracked { continue 'expansion; } @@ -1060,7 +1066,7 @@ fn stitch_search( if shared.cfg.rewrite_check { // run rewriting just to make sure the assert in it passes let rw_fast = rewrite_fast(&finished_pattern, &shared, &Node::Prim("fake_inv".into()), &shared.cost_fn); - let (rw_slow, _, _) = rewrite_with_inventions(&shared.programs.iter().map(|p|p.to_string()).collect::>(), &[finished_pattern.clone().to_invention("fake_inv", &shared)], &shared.multistep_cfg); + let (rw_slow, _, _) = rewrite_with_inventions_resumable(&shared.programs.iter().map(|p|p.to_string()).collect::>(), &[finished_pattern.clone().to_invention("fake_inv", &shared)], &shared.multistep_cfg, &shared.prev_results); for (fast,slow) in rw_fast.iter().zip(rw_slow.iter()) { assert_eq!(fast.to_string(), slow.to_string()); } @@ -1208,7 +1214,7 @@ fn get_zippers( let node = set.get(idx).node().clone(); arg_of_zid_node[EMPTY_ZID].insert(idx, - Arg { shifted_id: idx, unshifted_id: idx, shift: 0, cost: analyzed_cost[idx] as Cost, expands_to: expands_to_of_node(&node) }); + Arg { shifted_id: idx, unshifted_id: idx, shift: 0, cost: analyzed_cost[idx] as Cost, expands_to: expands_to_of_node(&node, None) }); match node { Node::IVar(_) => { unreachable!() } @@ -1740,11 +1746,12 @@ pub fn multistep_compression_internal( weights: Option>, name_mapping: Option>, follow: Option>, - cfg: &MultistepCompressionConfig + cfg: &MultistepCompressionConfig, + prev_results: &[CompressionStepResult] ) -> Vec { let mut rewritten: Vec = train_programs.to_vec(); - let mut step_results: Vec = Default::default(); + let mut step_results: Vec = prev_results.to_vec(); let cost_fn = &cfg.step.cost.expr_cost(); let tstart = std::time::Instant::now(); @@ -1914,21 +1921,7 @@ pub fn construct_shared( if !cfg.quiet { println!("arg_of_zid_node size: {}", arg_of_zid_node.len()) } // set up tracking if any - let tracking: Option = { - if let Some(s) = &cfg.follow { - let mut set = ExprSet::empty(Order::ChildFirst, false, false); - let idx = set.parse_extend(s).unwrap(); - let expr = ExprOwned::new(set,idx); - if let Some(zids_of_ivar) = zids_of_ivar_of_expr(&expr, &zid_of_zip) { - Some(Tracking { expr, zids_of_ivar }) - } else { - if !cfg.quiet { println!("Tracking: can't possibly find a match for this in corpus because one if the necessary zippers ZIDs doesnt exist in corpus")} - return None; - } - } else { - None - } - }; + let tracking: Option = compute_tracking_from_config(cfg, &zid_of_zip)?; @@ -2100,6 +2093,7 @@ pub fn construct_shared( multistep_cfg: multistep_cfg.clone(), tracking, fused_lambda_tags: fused_copy, + prev_results: prev_results.to_vec(), }); if !shared.cfg.quiet { println!("built SharedData: {:?}ms", tstart.elapsed().as_millis()) } @@ -2107,6 +2101,22 @@ pub fn construct_shared( Some(shared) } +fn compute_tracking_from_config(cfg: &CompressionStepConfig, zid_of_zip: &FxHashMap, usize>) -> Option> { + if let Some(s) = &cfg.follow { + let mut set = ExprSet::empty(Order::ChildFirst, false, false); + let idx = set.parse_extend(s).unwrap(); + let expr = ExprOwned::new(set,idx); + if let Some(zids_of_ivar) = zids_of_ivar_of_expr(&expr, zid_of_zip) { + Some(Some(Tracking { expr, zids_of_ivar, type_of_ivar: vec![] })) + } else { + if !cfg.quiet { println!("Tracking: can't possibly find a match for this in corpus because one if the necessary zippers ZIDs doesnt exist in corpus")} + None + } + } else { + Some(None) + } +} + /// Takes a set of programs and does one full step of compresison. #[allow(clippy::too_many_arguments)] pub fn compression_step( @@ -2235,6 +2245,20 @@ pub fn multistep_compression( name_mapping: Option>, follow: Option>, cfg: &MultistepCompressionConfig +)-> (Vec, serde_json::Value) { + multistep_compression_resumable(programs, tasks, weights, name_mapping, follow, cfg, &[]) +} + + +// Like `multistep_compression` but allows for resumable compression, where you can provide the prior inventions +pub fn multistep_compression_resumable( + programs: &[String], + tasks: Option>, + weights: Option>, + name_mapping: Option>, + follow: Option>, + cfg: &MultistepCompressionConfig, + prev_results: &[CompressionStepResult] )-> (Vec, serde_json::Value) { let mut programs = programs.to_vec(); let mut cfg = cfg.clone(); @@ -2280,7 +2304,8 @@ pub fn multistep_compression( weights.clone(), name_mapping, follow, - &cfg, + &cfg, + prev_results, ); // write everything to json diff --git a/src/expansion.rs b/src/expansion.rs index af3a2f7b..b246d69b 100644 --- a/src/expansion.rs +++ b/src/expansion.rs @@ -134,24 +134,35 @@ impl std::fmt::Display for ExpandsTo { pub fn tracked_expands_to(pattern: &Pattern, hole_zid: ZId, shared: &SharedData) -> ExpandsTo { // apply the hole zipper to the original expr being tracked to get the subtree // this will expand into, then get the ExpandsTo of that - let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(&shared.zip_of_zid[hole_zid]).idx; - match expands_to_of_node(&shared.tracking.as_ref().unwrap().expr.set[idx]) { - ExpandsTo(ExpandsToInner::IVar(i, VariableType::Metavar)) => { - ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, VariableType::Metavar)) + let zip = &shared.zip_of_zid[hole_zid]; + let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(zip).idx; + match expands_to_of_node(&shared.tracking.as_ref().unwrap().expr.set[idx], Some((pattern, shared))) { + ExpandsTo(ExpandsToInner::IVar(i, _)) => { + let idx_in_corpus = shared.set.get(pattern.match_locations[0]).zip(zip).idx; + let is_sym = shared.sym_var_info.as_ref().is_some_and(|s| s.is_symvar_spot(idx_in_corpus)); + let vt = if is_sym { + assert!(invalid_metavar_location(shared, idx_in_corpus)); + VariableType::Symvar + } else { + VariableType::Metavar + }; + ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, vt)) } e => e } } -pub fn expands_to_of_node(node: &Node) -> ExpandsTo { +pub fn expands_to_of_node(node: &Node, pattern: Option<(&Pattern, &SharedData)>) -> ExpandsTo { + // pattern only used if node is IVar, to map to the correct variable index in the pattern + // it isn't used in other cases, so None is fine there ExpandsTo( match node { Node::Var(i, tag) => ExpandsToInner::Var(*i, *tag), Node::Prim(p) => ExpandsToInner::Prim(p.clone()), Node::Lam(_, tag) => ExpandsToInner::Lam(*tag), Node::App(_,_) => ExpandsToInner::App, - Node::IVar(i) => ExpandsToInner::IVar(*i, VariableType::Metavar), + Node::IVar(i) => ExpandsToInner::IVar(*i, /*placeholder, will be determined by caller*/ VariableType::Metavar), } ) } @@ -187,7 +198,7 @@ pub fn get_ivars_expansions(original_pattern: &Pattern, arg_of_loc: &FxHashMap VariableType { + self.variables[ivar].1 + } + fn zippers(&self, shared: &SharedData) -> Vec> { self.arg_choices.iter().map(|lzid| shared.zip_of_zid[lzid.zid].clone() diff --git a/src/rewriting.rs b/src/rewriting.rs index 461502d2..50394bde 100644 --- a/src/rewriting.rs +++ b/src/rewriting.rs @@ -161,6 +161,15 @@ pub fn rewrite_with_inventions( invs: &[Invention], cfg: &MultistepCompressionConfig, ) -> (Vec, Vec, serde_json::Value) { + rewrite_with_inventions_resumable(programs, invs, cfg, &[]) +} + +pub fn rewrite_with_inventions_resumable( + programs: &[String], + invs: &[Invention], + cfg: &MultistepCompressionConfig, + prev_results: &[CompressionStepResult] +) -> (Vec, Vec, serde_json::Value) { // if invs.is_empty() { // return programs.to_vec() @@ -185,7 +194,10 @@ pub fn rewrite_with_inventions( // cfg.step.rewritten_dreamcoder = true; // cfg.step.rewritten_intermediates = true; - let (step_results, json_res) = multistep_compression(programs, None, None, None, follow, &cfg); + println!("Rewriting!"); + println!("Following inventions: {:?}", follow.as_ref().unwrap()[0].body.to_string()); + + let (step_results, json_res) = multistep_compression_resumable(programs, None, None, None, follow, &cfg, prev_results); // return the last one - note that if an abstraction wasn't used anywhere it will not be included in the step_results so this // may be shorter than invs.len(), however we do ensure that we continue searching for the rest of the abstractions if this happens diff --git a/src/tdfa.rs b/src/tdfa.rs index 0cf22eb2..7f7b8cfa 100644 --- a/src/tdfa.rs +++ b/src/tdfa.rs @@ -204,6 +204,7 @@ impl TDFAInventionAnnotation { impl TDFA { pub fn new(root: String, dfa: String, valid_metavars: Vec, valid_roots: Vec, tdfa_non_eta_long_states: HashMap, prev_invs: Vec<(String, Option)>, split: Option) -> Self { + println!("Prev inventions: {:?}", prev_invs); let mut dfa: HashMap>> = serde_json::from_str(&dfa).unwrap(); for (name, tdfa_annotation) in prev_invs { if let Some(annotation) = tdfa_annotation { From 9030c88f03238b5a41d4736fbd247d3668f327df Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Mon, 18 Aug 2025 19:47:39 -0400 Subject: [PATCH 03/47] update follow so it uses inventions directly --- src/compression.rs | 60 +++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 616b42c1..d47322cb 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -428,7 +428,7 @@ impl CostConfig { impl Pattern { /// create a single hole pattern `??` //#[inline(never)] - fn single_hole(corpus_span: &Span, cost_fn: &ExprCost, cost_of_node_all: &[Cost], num_paths_to_node: &[Cost], tdfa_global_annotations: &Option, set: &ExprSet, cfg: &CompressionStepConfig) -> Self { + fn single_hole(corpus_span: &Span, cost_fn: &ExprCost, cost_of_node_all: &[Cost], num_paths_to_node: &[Cost], tdfa_global_annotations: &Option, set: &ExprSet, cfg: &CompressionStepConfig, follow: &Option) -> Self { let body_utility = 0; let mut match_locations: Vec = corpus_span.clone().collect(); match_locations.sort(); // we assume match_locations is always sorted @@ -501,7 +501,7 @@ impl Pattern { match_locations, // single hole matches everywhere utility_upper_bound, body_utility, // 0 body utility - tracked: cfg.follow.is_some(), + tracked: follow.is_some(), } } /// convert pattern to an Expr @@ -723,6 +723,21 @@ impl Invention { pub fn new(body: ExprOwned, arity: usize, name: &str) -> Self { Self { body, arity, name: String::from(name) } } + pub fn from_string(name: &str, body: &str) -> Self { + let mut set = ExprSet::empty(Order::ChildFirst, false, false); + let idx = set.parse_extend(body).unwrap(); + let body = ExprOwned { set, idx }; + let arity = AnalyzedExpr::new(IVarAnalysis).analyze_get(body.immut()).iter().max().map(|x|*x as usize + 1).unwrap_or(0); + Self { body, arity, name: String::from(name) } + } + + pub fn to_tracking(self, zid_of_zip: &FxHashMap, ZId>) -> Option { + if let Some(zids_of_ivar) = zids_of_ivar_of_expr(&self.body, &zid_of_zip) { + Some(Tracking { expr: self.body, zids_of_ivar }) + } else { + return None; + } + } } impl Display for Invention { @@ -1778,11 +1793,10 @@ pub fn multistep_compression_internal( for i in 0..cfg.iterations { if !cfg.step.quiet { println!("{}",format!("\n=======Iteration {i}=======").blue().bold()) } - let inv_name = if let Some(follow) = &follow { - cfg.step.follow = Some(follow[i].body.to_string()); - follow[i].name.clone() + let (inv_name, follow_iter) = if let Some(follow) = &follow { + (follow[i].name.clone(), Some(follow[i].clone())) } else { - format!("{}{}", cfg.abstraction_prefix, cfg.previous_abstractions + step_results.len()) + (format!("{}{}", cfg.abstraction_prefix, cfg.previous_abstractions + step_results.len()), cfg.step.follow.as_ref().map(|x| Invention::from_string("inv", x))) }; // call actual compression @@ -1795,7 +1809,8 @@ pub fn multistep_compression_internal( very_first_cost, &name_mapping, &step_results, - ); + &follow_iter, + ); if !res.is_empty() { // rewrite with the invention @@ -1806,7 +1821,7 @@ pub fn multistep_compression_internal( step_results.push(res); } else if follow.is_some() { // if `follow` was given then we will keep going for the full set of iterations - if !cfg.step.quiet { println!("Invention not found: {}", cfg.step.follow.as_ref().unwrap() ) } + if !cfg.step.quiet { println!("Invention not found: {:?}", follow.as_ref().unwrap() ) } } else { if !cfg.step.quiet { println!("No inventions found at iteration {i}") } break; @@ -1841,6 +1856,7 @@ pub fn construct_shared( tasks: &[String], weights: &[f32], prev_results: &[CompressionStepResult], + follow: &Option, ) -> Option> { let cfg = &multistep_cfg.step.clone(); @@ -1913,23 +1929,15 @@ pub fn construct_shared( if !cfg.quiet { println!("{} zips", zip_of_zid.len()) } if !cfg.quiet { println!("arg_of_zid_node size: {}", arg_of_zid_node.len()) } - // set up tracking if any - let tracking: Option = { - if let Some(s) = &cfg.follow { - let mut set = ExprSet::empty(Order::ChildFirst, false, false); - let idx = set.parse_extend(s).unwrap(); - let expr = ExprOwned::new(set,idx); - if let Some(zids_of_ivar) = zids_of_ivar_of_expr(&expr, &zid_of_zip) { - Some(Tracking { expr, zids_of_ivar }) - } else { - if !cfg.quiet { println!("Tracking: can't possibly find a match for this in corpus because one if the necessary zippers ZIDs doesnt exist in corpus")} - return None; - } + let tracking = match follow { + Some(follow) => if let Some(x) = follow.clone().to_tracking(&zid_of_zip) { + Some(x) } else { - None + if !cfg.quiet { println!("Tracking: can't possibly find a match for this in corpus because one if the necessary zippers ZIDs doesnt exist in corpus")} + return None } + None => None }; - if !cfg.quiet { println!("Tracking setup: {:?}ms", tstart.elapsed().as_millis()) } @@ -1954,7 +1962,7 @@ pub fn construct_shared( let tdfa_global_annotations = TDFAGlobalAnnotations::new(cfg, &set, &roots, prev_results, &sym_var_info); - let single_hole = Pattern::single_hole(&corpus_span, cost_fn, &cost_of_node_all, &num_paths_to_node, &tdfa_global_annotations, &set, cfg); + let single_hole = Pattern::single_hole(&corpus_span, cost_fn, &cost_of_node_all, &num_paths_to_node, &tdfa_global_annotations, &set, cfg, follow); let mut azero_pruning_cutoff = 0; @@ -2118,6 +2126,7 @@ pub fn compression_step( very_first_cost: Cost, name_mapping: &[(String, String)], prev_results: &[CompressionStepResult], + follow: &Option, ) -> Vec { let tstart_total = std::time::Instant::now(); @@ -2129,6 +2138,7 @@ pub fn compression_step( tasks, weights, prev_results, + follow, ) else { return vec![]; }; @@ -2217,8 +2227,8 @@ pub fn compression_step( } if shared.cfg.follow_prune && !results.is_empty() { - if let Some(follow) = &shared.cfg.follow { - assert_eq!(follow, &results[0].inv.body.to_string(), "found something other than the followed abstraction somehow"); + if let Some(follow) = follow { + assert_eq!(follow.body.to_string(), results[0].inv.body.to_string(), "found something other than the followed abstraction somehow"); } } From 311c080525bbf15f115bd841d6246e2bdbeef10b Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Mon, 18 Aug 2025 19:50:36 -0400 Subject: [PATCH 04/47] clippy --- src/compression.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index d47322cb..c665773b 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -428,6 +428,7 @@ impl CostConfig { impl Pattern { /// create a single hole pattern `??` //#[inline(never)] + #[allow(clippy::too_many_arguments)] fn single_hole(corpus_span: &Span, cost_fn: &ExprCost, cost_of_node_all: &[Cost], num_paths_to_node: &[Cost], tdfa_global_annotations: &Option, set: &ExprSet, cfg: &CompressionStepConfig, follow: &Option) -> Self { let body_utility = 0; let mut match_locations: Vec = corpus_span.clone().collect(); @@ -732,11 +733,8 @@ impl Invention { } pub fn to_tracking(self, zid_of_zip: &FxHashMap, ZId>) -> Option { - if let Some(zids_of_ivar) = zids_of_ivar_of_expr(&self.body, &zid_of_zip) { - Some(Tracking { expr: self.body, zids_of_ivar }) - } else { - return None; - } + let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; + Some(Tracking { expr: self.body, zids_of_ivar }) } } From 7c23dda5fa8e9123cfdf8e5ce9e79aa7863e011f Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Mon, 18 Aug 2025 20:08:34 -0400 Subject: [PATCH 05/47] propagate variable types --- src/bin/rewrite.rs | 6 ++++++ src/compression.rs | 19 ++++++++++++------- src/pattern_args.rs | 21 ++++++++++++++++++--- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/bin/rewrite.rs b/src/bin/rewrite.rs index 6f47cc0c..89317eed 100644 --- a/src/bin/rewrite.rs +++ b/src/bin/rewrite.rs @@ -18,6 +18,7 @@ use serde_json::json; use std::collections::HashMap; use std::fs::File; use std::path::PathBuf; +use std::str::FromStr; use stitch_core::*; use serde_json::Value; @@ -93,6 +94,11 @@ fn main() { }, arity: invention["arity"].as_u64().unwrap() as usize, name: invention["name"].as_str().unwrap().parse().unwrap(), + variable_types: if let Some(var_types) = invention.get("variable_types") { + var_types.as_array().unwrap().iter().map(|v| VariableType::from_str(v.as_str().unwrap()).unwrap()).collect() + } else { + vec![VariableType::Metavar; invention["arity"].as_u64().unwrap() as usize] + } }) .collect(); println!("Number of inventions: {}", inventions.len()); diff --git a/src/compression.rs b/src/compression.rs index 6541f9eb..2e04907a 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -131,6 +131,10 @@ pub struct CompressionStepConfig { #[clap(long)] pub follow: Option, + /// Variable types for the `follow` invention. Use M for metavariable and S for symbolic variable. + #[clap(long)] + pub follow_types: Option>, + /// For use with `follow`, enables aggressive pruning. Useful for ensuring that it is *possible* to find a particular /// abstraction by guiding the search directly towards it. #[clap(long)] @@ -720,23 +724,24 @@ pub struct Invention { pub body: ExprOwned, // invention body (not wrapped in lambdas) pub arity: usize, pub name: String, + pub variable_types: Vec, // type of each variable } impl Invention { - pub fn new(body: ExprOwned, arity: usize, name: &str) -> Self { - Self { body, arity, name: String::from(name) } + pub fn new(body: ExprOwned, arity: usize, name: &str, variable_types: Vec) -> Self { + Self { body, arity, name: String::from(name), variable_types } } - pub fn from_string(name: &str, body: &str) -> Self { + pub fn from_string(name: &str, body: &str, variable_types: Option>) -> Self { let mut set = ExprSet::empty(Order::ChildFirst, false, false); let idx = set.parse_extend(body).unwrap(); let body = ExprOwned { set, idx }; let arity = AnalyzedExpr::new(IVarAnalysis).analyze_get(body.immut()).iter().max().map(|x|*x as usize + 1).unwrap_or(0); - Self { body, arity, name: String::from(name) } + Self { body, arity, name: String::from(name), variable_types: variable_types.unwrap_or_else(|| vec![VariableType::Metavar; arity]) } } pub fn to_tracking(self, zid_of_zip: &FxHashMap, ZId>) -> Option { let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; - Some(Tracking { expr: self.body, zids_of_ivar }) + Some(Tracking { expr: self.body, zids_of_ivar, type_of_ivar: self.variable_types }) } } @@ -1179,7 +1184,7 @@ impl FinishedPattern { self.pattern.to_expr(shared) } pub fn to_invention(&self, name: &str, shared: &SharedData) -> Invention { - Invention::new(self.to_expr(shared), self.arity, name) + Invention::new(self.to_expr(shared), self.arity, name, self.pattern.pattern_args.variable_types()) } pub fn info(&self, shared: &SharedData) -> String { format!("{} -> finished: utility={}, compressive_utility={}, arity={}, usages={}",self.pattern.info(shared), self.utility, self.compressive_utility, self.arity, self.usages) @@ -1801,7 +1806,7 @@ pub fn multistep_compression_internal( let (inv_name, follow_iter) = if let Some(follow) = &follow { (follow[i].name.clone(), Some(follow[i].clone())) } else { - (format!("{}{}", cfg.abstraction_prefix, cfg.previous_abstractions + step_results.len()), cfg.step.follow.as_ref().map(|x| Invention::from_string("inv", x))) + (format!("{}{}", cfg.abstraction_prefix, cfg.previous_abstractions + step_results.len()), cfg.step.follow.as_ref().map(|x| Invention::from_string("inv", x, cfg.step.follow_types.clone()))) }; // call actual compression diff --git a/src/pattern_args.rs b/src/pattern_args.rs index 7d90c16a..01b7b600 100644 --- a/src/pattern_args.rs +++ b/src/pattern_args.rs @@ -1,4 +1,4 @@ -use std::ops::DerefMut; +use std::{ops::DerefMut, str::FromStr}; use itertools::Itertools; use lambdas::*; @@ -6,12 +6,24 @@ use rustc_hash::FxHashMap; use crate::*; -#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy, PartialOrd, Ord)] +#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy, PartialOrd, Ord, serde::Serialize)] pub enum VariableType { Metavar, Symvar, } +impl FromStr for VariableType { + type Err = String; + fn from_str(s: &str) -> Result { + match s { + "M" => Ok(VariableType::Metavar), + "S" => Ok(VariableType::Symvar), + _ => Err(format!("Invalid variable type: {}", s)), + } + } +} + + #[derive(Debug, Clone, PartialEq, Eq, Hash, Default)] pub struct PatternArgs { arg_choices: Vec, // a hole gets moved into here when it becomes an abstraction argument, again these are in order of when they were added @@ -31,7 +43,6 @@ impl Ord for PatternArgs { } } - impl PatternArgs { pub fn arity(&self) -> usize { self.variables.len() @@ -62,6 +73,10 @@ impl PatternArgs { self.variables[ivar].1 } + pub fn variable_types(&self) -> Vec { + self.variables.iter().map(|(_,t)| *t).collect() + } + fn zippers(&self, shared: &SharedData) -> Vec> { self.arg_choices.iter().map(|lzid| shared.zip_of_zid[lzid.zid].clone() From c804960adc24ec7912777e43adc3bddeeac993c6 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Mon, 18 Aug 2025 23:49:15 -0400 Subject: [PATCH 06/47] more fixes --- src/compression.rs | 2 ++ src/expansion.rs | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 2e04907a..b43648ac 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -656,6 +656,7 @@ pub struct SharedData { pub tracking: Option, pub fused_lambda_tags: Option>, pub prev_results: Vec, + pub follow: Option, } pub fn invalid_metavar_location(shared : &SharedData, node: Idx) -> bool { @@ -2119,6 +2120,7 @@ pub fn construct_shared( tracking, fused_lambda_tags: fused_copy, prev_results: prev_results.to_vec(), + follow: follow.clone(), }); if !shared.cfg.quiet { println!("built SharedData: {:?}ms", tstart.elapsed().as_millis()) } diff --git a/src/expansion.rs b/src/expansion.rs index b246d69b..310f8985 100644 --- a/src/expansion.rs +++ b/src/expansion.rs @@ -4,7 +4,7 @@ use itertools::Itertools; use lambdas::{Idx, Node, Symbol, Tag, ZId, ZNode}; use rustc_hash::{FxHashMap, FxHashSet}; -use crate::{invalid_metavar_location, Arg, Cost, LocationsForReusableArgs, Pattern, PatternArgs, SharedData, SymvarInfo, VariableType, ZIdExtension}; +use crate::{invalid_metavar_location, Arg, Cost, Invention, LocationsForReusableArgs, Pattern, PatternArgs, SharedData, SymvarInfo, VariableType, ZIdExtension}; /// Tells us what a hole will expand into at this node. #[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)] @@ -139,13 +139,8 @@ pub fn tracked_expands_to(pattern: &Pattern, hole_zid: ZId, shared: &SharedData) match expands_to_of_node(&shared.tracking.as_ref().unwrap().expr.set[idx], Some((pattern, shared))) { ExpandsTo(ExpandsToInner::IVar(i, _)) => { let idx_in_corpus = shared.set.get(pattern.match_locations[0]).zip(zip).idx; - let is_sym = shared.sym_var_info.as_ref().is_some_and(|s| s.is_symvar_spot(idx_in_corpus)); - let vt = if is_sym { - assert!(invalid_metavar_location(shared, idx_in_corpus)); - VariableType::Symvar - } else { - VariableType::Metavar - }; + // let is_sym = shared.sym_var_info.as_ref().is_some_and(|s| s.is_symvar_spot(idx_in_corpus)); + let vt = shared.follow.as_ref().unwrap().variable_types[i as usize]; ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, vt)) } e => e From 9d1879b257a618c453aab9ae3a1c0238ab926703 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Mon, 18 Aug 2025 23:55:37 -0400 Subject: [PATCH 07/47] clippy --- src/compression.rs | 4 ++-- src/expansion.rs | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index b43648ac..3e951517 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -496,7 +496,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| expands_to_of_node(&set[*node], None).is_lam()); + match_locations.retain(|node| expands_to_of_node(&set[*node]).is_lam()); } let utility_upper_bound = utility_upper_bound(&match_locations, body_utility, cost_fn, cost_of_node_all, num_paths_to_node, cfg); @@ -1233,7 +1233,7 @@ fn get_zippers( let node = set.get(idx).node().clone(); arg_of_zid_node[EMPTY_ZID].insert(idx, - Arg { shifted_id: idx, unshifted_id: idx, shift: 0, cost: analyzed_cost[idx] as Cost, expands_to: expands_to_of_node(&node, None) }); + Arg { shifted_id: idx, unshifted_id: idx, shift: 0, cost: analyzed_cost[idx] as Cost, expands_to: expands_to_of_node(&node) }); match node { Node::IVar(_) => { unreachable!() } diff --git a/src/expansion.rs b/src/expansion.rs index 310f8985..fc0a662e 100644 --- a/src/expansion.rs +++ b/src/expansion.rs @@ -4,7 +4,7 @@ use itertools::Itertools; use lambdas::{Idx, Node, Symbol, Tag, ZId, ZNode}; use rustc_hash::{FxHashMap, FxHashSet}; -use crate::{invalid_metavar_location, Arg, Cost, Invention, LocationsForReusableArgs, Pattern, PatternArgs, SharedData, SymvarInfo, VariableType, ZIdExtension}; +use crate::{invalid_metavar_location, Arg, Cost, LocationsForReusableArgs, Pattern, PatternArgs, SharedData, SymvarInfo, VariableType, ZIdExtension}; /// Tells us what a hole will expand into at this node. #[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)] @@ -136,10 +136,8 @@ pub fn tracked_expands_to(pattern: &Pattern, hole_zid: ZId, shared: &SharedData) // this will expand into, then get the ExpandsTo of that let zip = &shared.zip_of_zid[hole_zid]; let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(zip).idx; - match expands_to_of_node(&shared.tracking.as_ref().unwrap().expr.set[idx], Some((pattern, shared))) { + match expands_to_of_node(&shared.tracking.as_ref().unwrap().expr.set[idx]) { ExpandsTo(ExpandsToInner::IVar(i, _)) => { - let idx_in_corpus = shared.set.get(pattern.match_locations[0]).zip(zip).idx; - // let is_sym = shared.sym_var_info.as_ref().is_some_and(|s| s.is_symvar_spot(idx_in_corpus)); let vt = shared.follow.as_ref().unwrap().variable_types[i as usize]; ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, vt)) } @@ -148,7 +146,7 @@ pub fn tracked_expands_to(pattern: &Pattern, hole_zid: ZId, shared: &SharedData) } -pub fn expands_to_of_node(node: &Node, pattern: Option<(&Pattern, &SharedData)>) -> ExpandsTo { +pub fn expands_to_of_node(node: &Node) -> ExpandsTo { // pattern only used if node is IVar, to map to the correct variable index in the pattern // it isn't used in other cases, so None is fine there ExpandsTo( From 601d1926e5d96700eebebb0fc5907175b5af1128 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Mon, 18 Aug 2025 23:56:02 -0400 Subject: [PATCH 08/47] remove unused --- src/compression.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 3e951517..6356937e 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -2128,22 +2128,6 @@ pub fn construct_shared( Some(shared) } -fn compute_tracking_from_config(cfg: &CompressionStepConfig, zid_of_zip: &FxHashMap, usize>) -> Option> { - if let Some(s) = &cfg.follow { - let mut set = ExprSet::empty(Order::ChildFirst, false, false); - let idx = set.parse_extend(s).unwrap(); - let expr = ExprOwned::new(set,idx); - if let Some(zids_of_ivar) = zids_of_ivar_of_expr(&expr, zid_of_zip) { - Some(Some(Tracking { expr, zids_of_ivar, type_of_ivar: vec![] })) - } else { - if !cfg.quiet { println!("Tracking: can't possibly find a match for this in corpus because one if the necessary zippers ZIDs doesnt exist in corpus")} - None - } - } else { - Some(None) - } -} - /// Takes a set of programs and does one full step of compresison. #[allow(clippy::too_many_arguments)] pub fn compression_step( From a0588603690986d7ed6b2be4055085a749ce588e Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 00:00:59 -0400 Subject: [PATCH 09/47] yet another clippy fix have to do this every time there's an update --- src/pattern_args.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pattern_args.rs b/src/pattern_args.rs index ae4d5ede..5edef856 100644 --- a/src/pattern_args.rs +++ b/src/pattern_args.rs @@ -168,7 +168,7 @@ pub struct LocationsForReusableArgs<'a> { } impl LocationsForReusableArgs<'_> { - pub fn new(all_locs: &Vec) -> LocationsForReusableArgs { + pub fn new<'a>(all_locs: &'a Vec) -> LocationsForReusableArgs<'a> { LocationsForReusableArgs { all_locs, sym_locs: None, From ed0808bdb88b81471279a7a9f4d63cc68ca823f0 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 00:13:36 -0400 Subject: [PATCH 10/47] undo extra --- src/compression.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 977df284..6356937e 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -744,18 +744,6 @@ impl Invention { let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; Some(Tracking { expr: self.body, zids_of_ivar, type_of_ivar: self.variable_types }) } - pub fn from_string(name: &str, body: &str) -> Self { - let mut set = ExprSet::empty(Order::ChildFirst, false, false); - let idx = set.parse_extend(body).unwrap(); - let body = ExprOwned { set, idx }; - let arity = AnalyzedExpr::new(IVarAnalysis).analyze_get(body.immut()).iter().max().map(|x|*x as usize + 1).unwrap_or(0); - Self { body, arity, name: String::from(name) } - } - - pub fn to_tracking(self, zid_of_zip: &FxHashMap, ZId>) -> Option { - let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; - Some(Tracking { expr: self.body, zids_of_ivar }) - } } impl Display for Invention { From 2cea350a59cbd6d2b4fcd3a5a2f67b15bce16861 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 00:35:16 -0400 Subject: [PATCH 11/47] clean up --- src/compression.rs | 6 +----- src/expansion.rs | 2 -- src/pattern_args.rs | 1 + src/rewriting.rs | 3 --- src/tdfa.rs | 1 - 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 6356937e..0598a2f2 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -975,11 +975,7 @@ fn stitch_search( { // for debugging let tracked = original_pattern.tracked && expands_to == tracked_expands_to(&original_pattern, hole_zid, &shared); - if tracked { - // println!("{} tracking expanding {} to {}", "[TRACK]".red().bold(), original_pattern.to_expr(&shared), zipper_replace(original_pattern.to_expr(&shared), &shared.zip_of_zid[hole_zid], Node::Prim(format!("<{expands_to}>").into()))); - // println!("Match locations containing fn_0: {:?}", locs.iter().map(|loc|shared.set.get(*loc).to_string()).filter(|x| x.contains("fn_0")).collect::>()); - found_tracked = true; - } + if tracked { found_tracked = true; } if shared.cfg.follow_prune && !tracked { continue 'expansion; } diff --git a/src/expansion.rs b/src/expansion.rs index fc0a662e..1438322a 100644 --- a/src/expansion.rs +++ b/src/expansion.rs @@ -147,8 +147,6 @@ pub fn tracked_expands_to(pattern: &Pattern, hole_zid: ZId, shared: &SharedData) pub fn expands_to_of_node(node: &Node) -> ExpandsTo { - // pattern only used if node is IVar, to map to the correct variable index in the pattern - // it isn't used in other cases, so None is fine there ExpandsTo( match node { Node::Var(i, tag) => ExpandsToInner::Var(*i, *tag), diff --git a/src/pattern_args.rs b/src/pattern_args.rs index 1d5bbdfe..06f2f1fa 100644 --- a/src/pattern_args.rs +++ b/src/pattern_args.rs @@ -43,6 +43,7 @@ impl Ord for PatternArgs { } } + impl PatternArgs { pub fn arity(&self) -> usize { self.variables.len() diff --git a/src/rewriting.rs b/src/rewriting.rs index 50394bde..e98bc082 100644 --- a/src/rewriting.rs +++ b/src/rewriting.rs @@ -194,9 +194,6 @@ pub fn rewrite_with_inventions_resumable( // cfg.step.rewritten_dreamcoder = true; // cfg.step.rewritten_intermediates = true; - println!("Rewriting!"); - println!("Following inventions: {:?}", follow.as_ref().unwrap()[0].body.to_string()); - let (step_results, json_res) = multistep_compression_resumable(programs, None, None, None, follow, &cfg, prev_results); // return the last one - note that if an abstraction wasn't used anywhere it will not be included in the step_results so this diff --git a/src/tdfa.rs b/src/tdfa.rs index 7f7b8cfa..0cf22eb2 100644 --- a/src/tdfa.rs +++ b/src/tdfa.rs @@ -204,7 +204,6 @@ impl TDFAInventionAnnotation { impl TDFA { pub fn new(root: String, dfa: String, valid_metavars: Vec, valid_roots: Vec, tdfa_non_eta_long_states: HashMap, prev_invs: Vec<(String, Option)>, split: Option) -> Self { - println!("Prev inventions: {:?}", prev_invs); let mut dfa: HashMap>> = serde_json::from_str(&dfa).unwrap(); for (name, tdfa_annotation) in prev_invs { if let Some(annotation) = tdfa_annotation { From 7f25ba9eac0239cb9c92f6d7f588e5f0fdec83f9 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 11:18:49 -0400 Subject: [PATCH 12/47] update --- src/bin/rewrite.rs | 15 +-------------- src/compression.rs | 23 ++++++++++++++++++++++- src/pattern_args.rs | 9 +++++++++ src/test_utils.rs | 19 ++++++++++++++++++- 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/src/bin/rewrite.rs b/src/bin/rewrite.rs index 89317eed..f23dcae7 100644 --- a/src/bin/rewrite.rs +++ b/src/bin/rewrite.rs @@ -86,20 +86,7 @@ fn main() { let inventions: Vec = inventions .iter() - .map(|invention| Invention { - body: { - let mut set = ExprSet::empty(Order::ChildFirst, false, false); - let idx = set.parse_extend(invention["body"].as_str().unwrap()).unwrap(); - ExprOwned::new(set, idx) - }, - arity: invention["arity"].as_u64().unwrap() as usize, - name: invention["name"].as_str().unwrap().parse().unwrap(), - variable_types: if let Some(var_types) = invention.get("variable_types") { - var_types.as_array().unwrap().iter().map(|v| VariableType::from_str(v.as_str().unwrap()).unwrap()).collect() - } else { - vec![VariableType::Metavar; invention["arity"].as_u64().unwrap() as usize] - } - }) + .map(Invention::from_compression_output) .collect(); println!("Number of inventions: {}", inventions.len()); diff --git a/src/compression.rs b/src/compression.rs index 0598a2f2..baa82e6a 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -6,8 +6,9 @@ use core::panic; use std::convert::TryInto; use std::fmt::{self, Formatter, Display}; use std::hash::{Hash, Hasher}; +use std::str::FromStr; use itertools::Itertools; -use serde_json::json; +use serde_json::{json, Value}; use clap::{Parser}; use serde::Serialize; use std::thread; @@ -744,6 +745,23 @@ impl Invention { let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; Some(Tracking { expr: self.body, zids_of_ivar, type_of_ivar: self.variable_types }) } + + pub fn from_compression_output(output: &Value) -> Invention { + Invention { + body: { + let mut set = ExprSet::empty(Order::ChildFirst, false, false); + let idx = set.parse_extend(output["body"].as_str().unwrap()).unwrap(); + ExprOwned::new(set, idx) + }, + arity: output["arity"].as_u64().unwrap() as usize, + name: output["name"].as_str().unwrap().parse().unwrap(), + variable_types: if let Some(var_types) = output.get("variable_types") { + var_types.as_array().unwrap().iter().map(|v| VariableType::from_str(v.as_str().unwrap()).unwrap()).collect() + } else { + vec![VariableType::Metavar; output["arity"].as_u64().unwrap() as usize] + } + } + } } impl Display for Invention { @@ -1432,6 +1450,8 @@ impl CompressionStepResult { let rewritten = if !cfg.rewritten_intermediates { None } else { Some(self.rewritten.iter().map(|p| p.to_string()).collect::>()) }; let rewritten_dreamcoder = if !cfg.rewritten_intermediates { &None } else { &self.rewritten_dreamcoder }; + let variable_types = self.inv.variable_types.iter().map(|ty| ty.to_string()).collect::>(); + json!({ "body": self.inv.body.to_string(), "dreamcoder": self.dc_inv_str, @@ -1447,6 +1467,7 @@ impl CompressionStepResult { "uses": all_uses, "dc_comparison_millis": self.dc_comparison_millis, "tdfa_annotation": self.tdfa_annotation, + // "variable_types": variable_types, }) } } diff --git a/src/pattern_args.rs b/src/pattern_args.rs index 06f2f1fa..61674629 100644 --- a/src/pattern_args.rs +++ b/src/pattern_args.rs @@ -23,6 +23,15 @@ impl FromStr for VariableType { } } +impl ToString for VariableType { + fn to_string(&self) -> String { + match self { + VariableType::Metavar => "M".to_string(), + VariableType::Symvar => "S".to_string(), + } + } +} + #[derive(Debug, Clone, PartialEq, Eq, Hash, Default)] pub struct PatternArgs { diff --git a/src/test_utils.rs b/src/test_utils.rs index 612b566f..0287e0b3 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -1,8 +1,9 @@ +use lambdas::{ExprOwned, ExprSet, Order}; use serde_json::Value; use clap::Parser; use std::path::Path; -use crate::{multistep_compression, Input, MultistepCompressionConfig, InputFormat}; +use crate::{multistep_compression, rewrite_with_inventions, Input, InputFormat, Invention, MultistepCompressionConfig}; use crate::util::timestamp; pub const CLOBBER: bool = false; @@ -45,6 +46,20 @@ pub fn compare_out_jsons_testing(file: &str, expected_out_file: &str, args: &str let output = run_compression_testing(&input, &cfg); + let invs: Vec = output["abstractions"].as_array().unwrap().iter().map( + |item| { + Invention::from_compression_output(item) + } + ).collect::>(); + + let (rewritten, _, _) = rewrite_with_inventions(&input.train_programs, &invs, &cfg); + if let Some(expected_rewritten) = output.get("rewritten") { + assert_eq!(rewritten, expected_rewritten.as_array().unwrap().iter().map(|v| v.as_str().unwrap()).collect::>(), + "Rewritten programs do not match expected output"); + } else { + panic!("Expected output does not contain 'rewritten' field"); + } + println!("{}", serde_json::to_string(&output).unwrap()); let expected_out_file_path = std::path::Path::new(expected_out_file); @@ -62,6 +77,8 @@ pub fn compare_out_jsons_testing(file: &str, expected_out_file: &str, args: &str check_eq(&output["abstractions"], &expected_output["abstractions"], vec!["abstractions".into()], &output, expected_out_file); check_eq(&output["rewritten"], &expected_output["rewritten"], vec!["rewritten".into()], &output, expected_out_file); + + } //todo add write_json_for_diff calls and also make it add a random suffix too From b340aedac07de1de7afb08394e2cd93e03b17b28 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 11:22:56 -0400 Subject: [PATCH 13/47] fix unwrap --- src/rewriting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rewriting.rs b/src/rewriting.rs index e98bc082..5e240b41 100644 --- a/src/rewriting.rs +++ b/src/rewriting.rs @@ -180,7 +180,7 @@ pub fn rewrite_with_inventions_resumable( // programs.to_vec() let follow = Some(invs.to_vec()); cfg.iterations = invs.len(); - cfg.step.max_arity = invs.iter().map(|inv| inv.arity).max().unwrap(); + cfg.step.max_arity = invs.iter().map(|inv| inv.arity).max().unwrap_or(0); cfg.silent = true; cfg.no_opt = true; cfg.step.allow_single_task = true; From 6be3f7615c4c041c7dd2a3b55eec87cff384cc4c Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 11:29:14 -0400 Subject: [PATCH 14/47] add variable types --- src/compression.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compression.rs b/src/compression.rs index baa82e6a..7fde993f 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -1467,7 +1467,7 @@ impl CompressionStepResult { "uses": all_uses, "dc_comparison_millis": self.dc_comparison_millis, "tdfa_annotation": self.tdfa_annotation, - // "variable_types": variable_types, + "variable_types": variable_types, }) } } From 10979ac35b9ecb9828b442f781b8dd870f9c1209 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 11:30:12 -0400 Subject: [PATCH 15/47] clippy --- src/pattern_args.rs | 8 ++++---- src/test_utils.rs | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pattern_args.rs b/src/pattern_args.rs index 61674629..04c2603d 100644 --- a/src/pattern_args.rs +++ b/src/pattern_args.rs @@ -23,11 +23,11 @@ impl FromStr for VariableType { } } -impl ToString for VariableType { - fn to_string(&self) -> String { +impl std::fmt::Display for VariableType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - VariableType::Metavar => "M".to_string(), - VariableType::Symvar => "S".to_string(), + VariableType::Metavar => write!(f, "M"), + VariableType::Symvar => write!(f, "S"), } } } diff --git a/src/test_utils.rs b/src/test_utils.rs index 0287e0b3..b9c87941 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -1,4 +1,3 @@ -use lambdas::{ExprOwned, ExprSet, Order}; use serde_json::Value; use clap::Parser; use std::path::Path; From cbef072b192618e2acf9a9b32acd639db431dfb7 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 11:34:19 -0400 Subject: [PATCH 16/47] export variable type --- src/compression.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compression.rs b/src/compression.rs index c665773b..c73495c2 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -1424,6 +1424,8 @@ impl CompressionStepResult { let rewritten = if !cfg.rewritten_intermediates { None } else { Some(self.rewritten.iter().map(|p| p.to_string()).collect::>()) }; let rewritten_dreamcoder = if !cfg.rewritten_intermediates { &None } else { &self.rewritten_dreamcoder }; + let variable_types = self.inv.variable_types.iter().map(|ty| ty.to_string()).collect::>(); + json!({ "body": self.inv.body.to_string(), "dreamcoder": self.dc_inv_str, @@ -1439,6 +1441,7 @@ impl CompressionStepResult { "uses": all_uses, "dc_comparison_millis": self.dc_comparison_millis, "tdfa_annotation": self.tdfa_annotation, + "variable_types": variable_types, }) } } From d0ffdce3b0cda4b8d34938eab39eb1558ec7ec36 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 12:58:20 -0400 Subject: [PATCH 17/47] add variable types to invention --- src/compression.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index c73495c2..d29198a0 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -718,18 +718,19 @@ pub struct Invention { pub body: ExprOwned, // invention body (not wrapped in lambdas) pub arity: usize, pub name: String, + pub variable_types: Vec, // type of each variable } impl Invention { - pub fn new(body: ExprOwned, arity: usize, name: &str) -> Self { - Self { body, arity, name: String::from(name) } + pub fn new(body: ExprOwned, arity: usize, name: &str, variable_types: Vec) -> Self { + Self { body, arity, name: String::from(name), variable_types } } - pub fn from_string(name: &str, body: &str) -> Self { + pub fn from_string(name: &str, body: &str, variable_types: Option>) -> Self { let mut set = ExprSet::empty(Order::ChildFirst, false, false); let idx = set.parse_extend(body).unwrap(); let body = ExprOwned { set, idx }; let arity = AnalyzedExpr::new(IVarAnalysis).analyze_get(body.immut()).iter().max().map(|x|*x as usize + 1).unwrap_or(0); - Self { body, arity, name: String::from(name) } + Self { body, arity, name: String::from(name), variable_types: variable_types.unwrap_or_else(|| vec![VariableType::Metavar; arity]) } } pub fn to_tracking(self, zid_of_zip: &FxHashMap, ZId>) -> Option { From 635129d5cf7c327040701f68f657b9e966d4c49c Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:01:20 -0400 Subject: [PATCH 18/47] update --- src/compression.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compression.rs b/src/compression.rs index d29198a0..002848c2 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -1174,7 +1174,7 @@ impl FinishedPattern { self.pattern.to_expr(shared) } pub fn to_invention(&self, name: &str, shared: &SharedData) -> Invention { - Invention::new(self.to_expr(shared), self.arity, name) + Invention::new(self.to_expr(shared), self.arity, name, self.pattern.pattern_args.variable_types()) } pub fn info(&self, shared: &SharedData) -> String { format!("{} -> finished: utility={}, compressive_utility={}, arity={}, usages={}",self.pattern.info(shared), self.utility, self.compressive_utility, self.arity, self.usages) From d6d4c100fde8a4360539b98c599931a462875b54 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:03:39 -0400 Subject: [PATCH 19/47] add from_compression_output --- src/bin/rewrite.rs | 10 +--------- src/compression.rs | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/bin/rewrite.rs b/src/bin/rewrite.rs index 6f47cc0c..bc1cc660 100644 --- a/src/bin/rewrite.rs +++ b/src/bin/rewrite.rs @@ -85,15 +85,7 @@ fn main() { let inventions: Vec = inventions .iter() - .map(|invention| Invention { - body: { - let mut set = ExprSet::empty(Order::ChildFirst, false, false); - let idx = set.parse_extend(invention["body"].as_str().unwrap()).unwrap(); - ExprOwned::new(set, idx) - }, - arity: invention["arity"].as_u64().unwrap() as usize, - name: invention["name"].as_str().unwrap().parse().unwrap(), - }) + .map(Invention::from_compression_output) .collect(); println!("Number of inventions: {}", inventions.len()); diff --git a/src/compression.rs b/src/compression.rs index 002848c2..6417da61 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -735,7 +735,24 @@ impl Invention { pub fn to_tracking(self, zid_of_zip: &FxHashMap, ZId>) -> Option { let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; - Some(Tracking { expr: self.body, zids_of_ivar }) + Some(Tracking { expr: self.body, zids_of_ivar, type_of_ivar: self.variable_types }) + } + + pub fn from_compression_output(output: &Value) -> Invention { + Invention { + body: { + let mut set = ExprSet::empty(Order::ChildFirst, false, false); + let idx = set.parse_extend(output["body"].as_str().unwrap()).unwrap(); + ExprOwned::new(set, idx) + }, + arity: output["arity"].as_u64().unwrap() as usize, + name: output["name"].as_str().unwrap().parse().unwrap(), + variable_types: if let Some(var_types) = output.get("variable_types") { + var_types.as_array().unwrap().iter().map(|v| VariableType::from_str(v.as_str().unwrap()).unwrap()).collect() + } else { + vec![VariableType::Metavar; output["arity"].as_u64().unwrap() as usize] + } + } } } From f474a3f3ba87beddd11b7c9e0234e3019946cfc1 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:04:18 -0400 Subject: [PATCH 20/47] use types here too --- src/compression.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compression.rs b/src/compression.rs index 6417da61..0bfdba90 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -1815,7 +1815,7 @@ pub fn multistep_compression_internal( let (inv_name, follow_iter) = if let Some(follow) = &follow { (follow[i].name.clone(), Some(follow[i].clone())) } else { - (format!("{}{}", cfg.abstraction_prefix, cfg.previous_abstractions + step_results.len()), cfg.step.follow.as_ref().map(|x| Invention::from_string("inv", x))) + (format!("{}{}", cfg.abstraction_prefix, cfg.previous_abstractions + step_results.len()), cfg.step.follow.as_ref().map(|x| Invention::from_string("inv", x, cfg.step.follow_types.clone()))) }; // call actual compression From 5b4983810994b6b27b13c47cba8617c6eccb5695 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:04:43 -0400 Subject: [PATCH 21/47] add field --- src/compression.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compression.rs b/src/compression.rs index 0bfdba90..3df834ad 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -131,6 +131,10 @@ pub struct CompressionStepConfig { #[clap(long)] pub follow: Option, + /// Variable types for the `follow` invention. Use M for metavariable and S for symbolic variable. + #[clap(long)] + pub follow_types: Option>, + /// For use with `follow`, enables aggressive pruning. Useful for ensuring that it is *possible* to find a particular /// abstraction by guiding the search directly towards it. #[clap(long)] From 25d0354b2031b52bbec3737c403f0265a6ce1b7d Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:05:20 -0400 Subject: [PATCH 22/47] add type constraints to variabletype --- src/pattern_args.rs | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/pattern_args.rs b/src/pattern_args.rs index 5edef856..b5bfc715 100644 --- a/src/pattern_args.rs +++ b/src/pattern_args.rs @@ -1,4 +1,4 @@ -use std::ops::DerefMut; +use std::{ops::DerefMut, str::FromStr}; use itertools::Itertools; use lambdas::*; @@ -6,12 +6,33 @@ use rustc_hash::FxHashMap; use crate::*; -#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy, PartialOrd, Ord)] +#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy, PartialOrd, Ord, serde::Serialize)] pub enum VariableType { Metavar, Symvar, } +impl FromStr for VariableType { + type Err = String; + fn from_str(s: &str) -> Result { + match s { + "M" => Ok(VariableType::Metavar), + "S" => Ok(VariableType::Symvar), + _ => Err(format!("Invalid variable type: {}", s)), + } + } +} + +impl std::fmt::Display for VariableType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + VariableType::Metavar => write!(f, "M"), + VariableType::Symvar => write!(f, "S"), + } + } +} + + #[derive(Debug, Clone, PartialEq, Eq, Hash, Default)] pub struct PatternArgs { arg_choices: Vec, // a hole gets moved into here when it becomes an abstraction argument, again these are in order of when they were added @@ -58,6 +79,10 @@ impl PatternArgs { } } + pub fn variable_types(&self) -> Vec { + self.variables.iter().map(|(_,t)| *t).collect() + } + fn zippers(&self, shared: &SharedData) -> Vec> { self.arg_choices.iter().map(|lzid| shared.zip_of_zid[lzid.zid].clone() From eaa317ca2ae97dfc50375efa942ef0ba1796eb1c Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:05:39 -0400 Subject: [PATCH 23/47] imports --- src/compression.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compression.rs b/src/compression.rs index 3df834ad..e96ce642 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -6,8 +6,9 @@ use core::panic; use std::convert::TryInto; use std::fmt::{self, Formatter, Display}; use std::hash::{Hash, Hasher}; +use std::str::FromStr; use itertools::Itertools; -use serde_json::json; +use serde_json::{json, Value}; use clap::{Parser}; use serde::Serialize; use std::thread; From f9b528bb0e5af7f54977ee37089c6aeec5333f01 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:06:15 -0400 Subject: [PATCH 24/47] add type of ivar to tracking --- src/compression.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compression.rs b/src/compression.rs index e96ce642..39c09079 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -682,6 +682,7 @@ fn fused_lambda_location(set : &ExprSet, fused_lambda_tags: &Option>, + pub type_of_ivar: Vec, } impl CriticalMultithreadData { From f6da2faaaf92a2d9bb19da68751042aeb12873ef Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:10:16 -0400 Subject: [PATCH 25/47] don't include in tracking --- src/compression.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 39c09079..2a1136ad 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -682,7 +682,6 @@ fn fused_lambda_location(set : &ExprSet, fused_lambda_tags: &Option>, - pub type_of_ivar: Vec, } impl CriticalMultithreadData { @@ -741,7 +740,7 @@ impl Invention { pub fn to_tracking(self, zid_of_zip: &FxHashMap, ZId>) -> Option { let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; - Some(Tracking { expr: self.body, zids_of_ivar, type_of_ivar: self.variable_types }) + Some(Tracking { expr: self.body, zids_of_ivar }) } pub fn from_compression_output(output: &Value) -> Invention { From 0a1c1dedbaff3346f0c16308489bd720d352c86d Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:15:12 -0400 Subject: [PATCH 26/47] extract function to load an invention from json --- src/bin/rewrite.rs | 10 +--------- src/compression.rs | 14 +++++++++++++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/bin/rewrite.rs b/src/bin/rewrite.rs index 6f47cc0c..bc1cc660 100644 --- a/src/bin/rewrite.rs +++ b/src/bin/rewrite.rs @@ -85,15 +85,7 @@ fn main() { let inventions: Vec = inventions .iter() - .map(|invention| Invention { - body: { - let mut set = ExprSet::empty(Order::ChildFirst, false, false); - let idx = set.parse_extend(invention["body"].as_str().unwrap()).unwrap(); - ExprOwned::new(set, idx) - }, - arity: invention["arity"].as_u64().unwrap() as usize, - name: invention["name"].as_str().unwrap().parse().unwrap(), - }) + .map(Invention::from_compression_output) .collect(); println!("Number of inventions: {}", inventions.len()); diff --git a/src/compression.rs b/src/compression.rs index c665773b..1d5dad15 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -7,7 +7,7 @@ use std::convert::TryInto; use std::fmt::{self, Formatter, Display}; use std::hash::{Hash, Hasher}; use itertools::Itertools; -use serde_json::json; +use serde_json::{json, Value}; use clap::{Parser}; use serde::Serialize; use std::thread; @@ -736,6 +736,18 @@ impl Invention { let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; Some(Tracking { expr: self.body, zids_of_ivar }) } + + pub fn from_compression_output(output: &Value) -> Invention { + Invention { + body: { + let mut set = ExprSet::empty(Order::ChildFirst, false, false); + let idx = set.parse_extend(output["body"].as_str().unwrap()).unwrap(); + ExprOwned::new(set, idx) + }, + arity: output["arity"].as_u64().unwrap() as usize, + name: output["name"].as_str().unwrap().parse().unwrap(), + } + } } impl Display for Invention { From 2afdb4ba664208eb66649f6da2745f524cfe2517 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:17:52 -0400 Subject: [PATCH 27/47] clean --- src/compression.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 2a1136ad..4dcfc1d9 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -744,18 +744,19 @@ impl Invention { } pub fn from_compression_output(output: &Value) -> Invention { + let arity = output["arity"].as_u64().unwrap() as usize; Invention { body: { let mut set = ExprSet::empty(Order::ChildFirst, false, false); let idx = set.parse_extend(output["body"].as_str().unwrap()).unwrap(); ExprOwned::new(set, idx) }, - arity: output["arity"].as_u64().unwrap() as usize, + arity, name: output["name"].as_str().unwrap().parse().unwrap(), variable_types: if let Some(var_types) = output.get("variable_types") { var_types.as_array().unwrap().iter().map(|v| VariableType::from_str(v.as_str().unwrap()).unwrap()).collect() } else { - vec![VariableType::Metavar; output["arity"].as_u64().unwrap() as usize] + vec![VariableType::Metavar; arity] } } } From 8bfa0cd62d6edc2e0c68bc2997189d00a6455c22 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:26:29 -0400 Subject: [PATCH 28/47] add variable type outputs --- data/expected_outputs/10.json | 69 +++++- data/expected_outputs/back-of-sequence.json | 35 +++- data/expected_outputs/bridge-a2-i10.json | 128 +++++++++++- data/expected_outputs/castle-a1-i1.json | 76 ++++++- data/expected_outputs/city-a1-i1.json | 76 ++++++- data/expected_outputs/dials-a2-i10.json | 126 ++++++++++- data/expected_outputs/front-of-sequence.json | 37 +++- data/expected_outputs/furniture-a2-i10.json | 130 +++++++++++- data/expected_outputs/fuzz/001_simple4.json | 8 +- data/expected_outputs/fuzz/002_identical.json | 6 +- data/expected_outputs/fuzz/003_house.json | 19 +- .../fuzz/004_ctx_thread_2.json | 13 +- data/expected_outputs/fuzz/005_dials.json | 24 ++- data/expected_outputs/fuzz/006_issue108.json | 3 +- data/expected_outputs/fuzz/007_dials.json | 23 +- .../expected_outputs/fuzz/008_nuts-bolts.json | 21 +- data/expected_outputs/fuzz/009_wheels.json | 24 ++- .../fuzz/010_tmp_minimal.json | 3 +- data/expected_outputs/fuzz/011_bridge.json | 20 +- data/expected_outputs/fuzz/012_furniture.json | 24 ++- data/expected_outputs/fuzz/013_simple4.json | 8 +- data/expected_outputs/fuzz/014_tmp_crash.json | 6 +- data/expected_outputs/fuzz/015_city.json | 22 +- .../expected_outputs/fuzz/016_simple_hof.json | 11 +- data/expected_outputs/fuzz/017_lio_test2.json | 3 +- data/expected_outputs/fuzz/018_identical.json | 6 +- data/expected_outputs/fuzz/019_dials.json | 22 +- data/expected_outputs/fuzz/020_lio_test2.json | 3 +- data/expected_outputs/fuzz/021_furniture.json | 24 ++- data/expected_outputs/fuzz/022_map.json | 19 +- data/expected_outputs/fuzz/023_furniture.json | 24 ++- data/expected_outputs/fuzz/024_simple5.json | 3 +- data/expected_outputs/fuzz/025_map.json | 13 +- data/expected_outputs/fuzz/026_simple2.json | 8 +- data/expected_outputs/fuzz/027_hof.json | 14 +- .../expected_outputs/fuzz/028_simple_hof.json | 8 +- data/expected_outputs/fuzz/029_simple5.json | 3 +- data/expected_outputs/fuzz/030_simple5.json | 3 +- .../fuzz/031_ctx_thread_1.json | 14 +- .../fuzz/032_ctx_thread_1.json | 13 +- data/expected_outputs/fuzz/033_simple4.json | 8 +- .../fuzz/034_map_minimal.json | 10 +- data/expected_outputs/fuzz/035_wheels.json | 24 ++- data/expected_outputs/fuzz/036_simple4.json | 8 +- data/expected_outputs/fuzz/037_house.json | 19 +- .../fuzz/038_symbol_weighting_test_1.json | 9 +- data/expected_outputs/fuzz/039_castle.json | 16 +- data/expected_outputs/fuzz/040_cex.json | 6 +- data/expected_outputs/fuzz/041_simple4.json | 8 +- .../fuzz/042_ctx_thread_1.json | 13 +- .../fuzz/043_symbol_weighting_test_2.json | 9 +- .../expected_outputs/fuzz/044_nuts-bolts.json | 22 +- data/expected_outputs/fuzz/045_identical.json | 6 +- .../fuzz/046_map_minimal.json | 10 +- .../fuzz/047_safe_ctx_thread_bug.json | 8 +- data/expected_outputs/fuzz/048_simple4.json | 8 +- data/expected_outputs/fuzz/049_furniture.json | 24 ++- data/expected_outputs/fuzz/050_tmp_crash.json | 6 +- .../fuzz/051_safe_ctx_thread_bug.json | 8 +- .../fuzz/052_safe_ctx_thread_bug.json | 8 +- .../fuzz/053_tmp_minimal.json | 3 +- data/expected_outputs/fuzz/054_furniture.json | 24 ++- .../fuzz/055_tmp_minimal.json | 3 +- data/expected_outputs/fuzz/056_simple1.json | 3 +- .../fuzz/057_safe_ctx_thread_bug.json | 8 +- .../expected_outputs/fuzz/058_simple_hof.json | 8 +- data/expected_outputs/fuzz/059_simple3.json | 8 +- data/expected_outputs/fuzz/060_simple5.json | 3 +- .../fuzz/061_ctx_thread_twice.json | 13 +- data/expected_outputs/fuzz/062_castle.json | 20 +- data/expected_outputs/fuzz/063_furniture.json | 24 ++- .../fuzz/064_symbol_weighting_test_1.json | 12 +- .../fuzz/065_symbol_weighting_test_1.json | 9 +- data/expected_outputs/fuzz/066_map.json | 19 +- data/expected_outputs/fuzz/067_map2.json | 13 +- data/expected_outputs/fuzz/068_lio_test1.json | 19 +- data/expected_outputs/fuzz/069_furniture.json | 24 ++- .../expected_outputs/fuzz/070_nuts-bolts.json | 21 +- .../expected_outputs/fuzz/071_issue108_2.json | 3 +- .../fuzz/072_ctx_thread_2.json | 13 +- data/expected_outputs/fuzz/073_city.json | 18 +- data/expected_outputs/fuzz/074_map2.json | 10 +- data/expected_outputs/fuzz/075_house.json | 19 +- data/expected_outputs/fuzz/076_lio_test1.json | 19 +- .../fuzz/077_symbol_weighting_test_2.json | 9 +- data/expected_outputs/fuzz/078_identical.json | 6 +- data/expected_outputs/fuzz/079_wheels.json | 24 ++- .../expected_outputs/fuzz/080_issue108_2.json | 3 +- data/expected_outputs/fuzz/081_castle.json | 24 ++- .../fuzz/082_map_minimal.json | 15 +- data/expected_outputs/fuzz/083_simple4.json | 8 +- data/expected_outputs/fuzz/084_house.json | 19 +- data/expected_outputs/fuzz/085_simple5.json | 3 +- data/expected_outputs/fuzz/086_map2.json | 10 +- data/expected_outputs/fuzz/087_house.json | 19 +- data/expected_outputs/fuzz/088_house.json | 20 +- data/expected_outputs/fuzz/089_bridge.json | 19 +- data/expected_outputs/fuzz/090_simple1.json | 8 +- .../fuzz/091_safe_ctx_thread_bug.json | 8 +- data/expected_outputs/fuzz/092_lio_test2.json | 3 +- data/expected_outputs/fuzz/093_hof.json | 14 +- data/expected_outputs/fuzz/094_cex.json | 6 +- .../fuzz/095_safe_ctx_thread_bug.json | 8 +- data/expected_outputs/fuzz/096_simple2.json | 8 +- .../fuzz/097_ctx_thread_1.json | 13 +- .../fuzz/098_safe_ctx_thread_bug.json | 8 +- data/expected_outputs/fuzz/099_cex.json | 6 +- data/expected_outputs/fuzz/100_simple5.json | 3 +- data/expected_outputs/house-a1-i1.json | 76 ++++++- .../logo_iteration_1-a3-i10.json | 99 ++++++++- .../multi-arg-function-basic.json | 29 ++- .../multi-arg-function-with-dfa.json | 33 ++- .../neurosym_match_at_tag.json | 189 +++++++++-------- .../neurosym_match_at_tag_excluded.json | 193 +++++++++-------- .../neurosym_metavariable_with_tag.json | 197 ++++++++++-------- ...urosym_metavariable_with_tag_excluded.json | 193 +++++++++-------- data/expected_outputs/nuts-bolts-a3-i10.json | 62 +++++- data/expected_outputs/origami_0-a3-i10.json | 102 ++++++++- data/expected_outputs/origami_1-a3-i10.json | 98 ++++++++- data/expected_outputs/origami_2-a3-i10.json | 85 +++++++- .../pick-up-on-abstractions-0-arity.json | 12 +- data/expected_outputs/simple1-a1-i1.json | 76 ++++++- data/expected_outputs/simple2-a1-i1.json | 76 ++++++- data/expected_outputs/simple3-a1-i1.json | 76 ++++++- data/expected_outputs/simple4-a1-i1.json | 74 ++++++- data/expected_outputs/simple5-a1-i1.json | 68 ++++++ data/expected_outputs/symbol-reuse-dfa.json | 16 +- data/expected_outputs/symbol-reuse.json | 24 ++- .../symbol_weighting_1_default.json | 18 +- .../symbol_weighting_1_h_200.json | 18 +- .../symbol_weighting_1_h_202.json | 18 +- .../symbol_weighting_2_default.json | 18 +- .../symbol_weighting_2_l_60.json | 18 +- .../symbol_weighting_2_l_67.json | 18 +- data/expected_outputs/symbols-alignment.json | 31 ++- .../symbols-cannot-be-literal-0-arity.json | 21 +- .../symbols-cannot-be-literal.json | 25 ++- data/expected_outputs/wheels-a2-i10.json | 127 ++++++++++- 138 files changed, 3196 insertions(+), 796 deletions(-) diff --git a/data/expected_outputs/10.json b/data/expected_outputs/10.json index 81682afc..dc55927a 100644 --- a/data/expected_outputs/10.json +++ b/data/expected_outputs/10.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-09cb50e8cd06ecd4 python_symbols_regression --nocapture", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 10, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -1029,7 +1030,11 @@ "E", "Name" ] - } + }, + "variable_types": [ + "M", + "S" + ] }, { "body": "(Name #0 Load)", @@ -1681,7 +1686,10 @@ "metavariable_states": [ "Name" ] - } + }, + "variable_types": [ + "S" + ] }, { "body": "(Call #1 (list (_starred_content #0)) nil)", @@ -2268,7 +2276,11 @@ "E", "E" ] - } + }, + "variable_types": [ + "M", + "M" + ] }, { "body": "(Assign (list (Subscript (fn_1 #2) (_slice_content #1) Store)) (fn_1 #0) None~TC)", @@ -2463,7 +2475,12 @@ "E", "Name" ] - } + }, + "variable_types": [ + "S", + "M", + "S" + ] }, { "body": "(FunctionDef #3 (arguments nil (list (arg #2 None~E None~TC) (arg #1 None~E None~TC)) None~A nil nil None~A nil) #0 nil None~E None~TC)", @@ -2542,7 +2559,13 @@ "Name", "Name" ] - } + }, + "variable_types": [ + "M", + "S", + "S", + "S" + ] }, { "body": "(FunctionDef #2 (arguments nil (list (arg #1 None~E None~TC)) None~A nil nil None~A nil) #0 nil None~E None~TC)", @@ -2629,7 +2652,12 @@ "Name", "Name" ] - } + }, + "variable_types": [ + "M", + "S", + "S" + ] }, { "body": "(Subscript (fn_1 #1) (_slice_content #0) Load)", @@ -2886,7 +2914,11 @@ "E", "Name" ] - } + }, + "variable_types": [ + "M", + "S" + ] }, { "body": "(/seq (fn_0 (fn_2 #2 (fn_1 #1)) #0))", @@ -3081,7 +3113,12 @@ "Name", "E" ] - } + }, + "variable_types": [ + "S", + "S", + "M" + ] }, { "body": "(FunctionDef #4 (arguments nil (list (arg #3 None~E None~TC) (arg #2 None~E None~TC) (arg #1 None~E None~TC)) None~A nil nil None~A nil) #0 nil None~E None~TC)", @@ -3134,7 +3171,14 @@ "Name", "Name" ] - } + }, + "variable_types": [ + "M", + "S", + "S", + "S", + "S" + ] }, { "body": "(Compare (fn_1 #0) (list Is) (list (Constant None~Const None~ConstKind)))", @@ -3213,7 +3257,10 @@ "metavariable_states": [ "Name" ] - } + }, + "variable_types": [ + "S" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/back-of-sequence.json b/data/expected_outputs/back-of-sequence.json index bbfcc491..f5d582c2 100644 --- a/data/expected_outputs/back-of-sequence.json +++ b/data/expected_outputs/back-of-sequence.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-e3a9d4911874cf31 tdfa_sequence", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 2, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -54,11 +55,15 @@ "tags": null }, "tdfa": { - "tdfa_json_path": "../Stitch.jl/data_for_testing/dfa_imp.json", + "tdfa_json_path": "test_data/dfa.json", "tdfa_root": "M", "valid_metavars": "[\"S\",\"E\",\"seqS\"]", "valid_roots": "[\"S\",\"E\",\"seqS\"]", - "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}" + "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}", + "tdfa_split": "~" + }, + "symvar": { + "symvar_prefix": null } } }, @@ -111,7 +116,18 @@ "fn_0 (Name g_z4 Load) (/seq (Expr (Name g_u Load)) (Expr (Name g_v Load)) (Expr (Name g_distraction Load)) (Expr (BinOp (BinOp (BinOp (Name g_distraction5 Load) Add (Constant i2 None)) Add (Constant i3 None)) Add (Constant i4 None))))": "(/seq (Expr (Name g_u Load)) (Expr (Name g_v Load)) (Expr (Name g_distraction Load)) (Expr (BinOp (BinOp (BinOp (Name g_distraction5 Load) Add (Constant i2 None)) Add (Constant i3 None)) Add (Constant i4 None))) (Expr (Call (Name g_function Load) (list (_starred_content (Name g_x Load)) (_starred_content (Name g_y Load)) (_starred_content (Name g_z4 Load))) nil)) (Expr (BinOp (BinOp (Constant i2 None) Add (Constant i3 None)) Add (Constant i4 None))))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": { + "root_state": "seqS", + "metavariable_states": [ + "E", + "seqS" + ] + }, + "variable_types": [ + "M", + "M" + ] }, { "body": "(Expr (BinOp (BinOp (BinOp #0 Add (Constant i2 None)) Add (Constant i3 None)) Add (Constant i4 None)))", @@ -139,7 +155,16 @@ "fn_1 (Name g_distraction7 Load)": "(Expr (BinOp (BinOp (BinOp (Name g_distraction7 Load) Add (Constant i2 None)) Add (Constant i3 None)) Add (Constant i4 None)))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": { + "root_state": "S", + "metavariable_states": [ + "E" + ] + }, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/bridge-a2-i10.json b/data/expected_outputs/bridge-a2-i10.json index 280c66a5..55223f2c 100644 --- a/data/expected_outputs/bridge-a2-i10.json +++ b/data/expected_outputs/bridge-a2-i10.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 10, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 2, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 3459707, "final_cost": 762704, "compression_ratio": 4.5361070611928085, @@ -510,7 +576,6 @@ "(fn_3 38 (fn_3 6 (fn_3 6 (fn_7 (fn_7 (fn_3 6 (fn_7 (fn_7 (fn_7 (fn_3 6 (fn_2 (fn_2 (fn_6 34 (fn_4 (fn_8 6 (fn_1 (fn_0 10 (fn_8 10 (fn_1 (fn_0 10 (fn_8 10 (fn_4 (fn_0 6 (l 1) (l 6)) fn_3)))))))) fn_3))) (l 35))) 10) 10) 6 (l 38))) 22) 6 (l 38)) (r 26)) (l 38)))" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(#1 t (r #0) t (l #0) t (r #0) t)", @@ -1053,6 +1118,12 @@ { "fn_0 6 (l 1)": "(l 1 t (r 6) t (l 6) t (r 6) t)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1164,6 +1235,11 @@ { "fn_1 (l 1 t (r 10) t)": "(l 1 t (r 10) t (l 9) h (r 2) h (r 6) h (l 2) h (l 6) h (r 4) h (r 4) h)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -3375,6 +3451,11 @@ { "fn_2 (l 1 t (r 14) t (l 13) h (r 12) h (l 10) h (r 8) h (l 6) h)": "(l 1 t (r 14) t (l 13) h (r 12) h (l 10) h (r 8) h (l 6) h (r 4) h)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -7392,6 +7473,12 @@ { "fn_3 14 (l 1)": "(l 1 t (r 14) t)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -7506,6 +7593,12 @@ { "fn_4 (l 1) fn_3": "(fn_2 (fn_3 6 (fn_0 6 (l 1) (l 6)) (l 5) h))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -7581,6 +7674,12 @@ { "fn_5 (l 1) fn_3": "(fn_2 (fn_3 14 (l 1) (l 13) h (r 12) h (l 10) h (r 8) h (l 6) h) (l 8) h (r 12) h)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -7818,6 +7917,12 @@ { "fn_6 26 (fn_5 (fn_5 (l 1) fn_3 (r 3)) fn_3)": "(fn_2 (fn_2 (fn_2 (fn_2 (fn_2 (fn_2 (fn_5 (fn_5 (l 1) fn_3 (r 3)) fn_3 (l 26) h)))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -8847,6 +8952,12 @@ { "fn_7 (fn_3 6 (fn_6 26 (fn_4 (fn_4 (fn_4 (fn_4 (l 1) fn_3 (r 3)) fn_3 (r 3)) fn_3 (r 3)) fn_3) (l 27))) 6": "(fn_3 6 (fn_3 6 (fn_6 26 (fn_4 (fn_4 (fn_4 (fn_4 (l 1) fn_3 (r 3)) fn_3 (r 3)) fn_3 (r 3)) fn_3) (l 27)) (r 2)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -8958,6 +9069,12 @@ { "fn_8 6 (fn_5 (fn_0 14 (l 1) (l 14)) fn_0)": "(fn_0 6 (fn_5 (fn_0 14 (l 1) (l 14)) fn_0 (r 3)) (l 6))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -9006,6 +9123,11 @@ { "fn_9 (l 1)": "(fn_2 (fn_0 6 (l 1) (l 5) h))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/castle-a1-i1.json b/data/expected_outputs/castle-a1-i1.json index 58bdfc75..31bb1f99 100644 --- a/data/expected_outputs/castle-a1-i1.json +++ b/data/expected_outputs/castle-a1-i1.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 1, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 4774323, "final_cost": 3985614, "compression_ratio": 1.1978889576361385, @@ -510,7 +576,6 @@ "(fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (r 1 t (r 3) h (l 1) t (l 3) h (r 1) t (r 3) h (l 1) t (l 3) h (r 1) t (r 3) h (l 1) t (l 3) h (r 1) t (r 3) h (l 1) t (l 3) h) (l 2) h (r 6) h (r 3) t (l 4) t (r 3) h (l 2) h (r 3) t (l 4) t (r 3) h (l 2) h (r 3) t (l 4) t (r 3) h (l 2) h (r 3) t (l 4) t (r 3)) (r 3) t (l 4) t (r 3) h (l 2) h (r 3) t (l 4) t (r 3) h (l 2) h (r 3) t (l 4) t (r 3) h (l 2) h (r 3) t (l 4) t (r 3) h (r 6) h (l 3) t (r 4) t (l 3) h (r 2) h (l 3) t (r 4) t (l 3) h (r 2) h (l 3) t (r 4) t (l 3) h (r 2) h (l 3) t (r 4) t (l 3) h (r 8) h (l 3) t (r 4) t (l 3) h (r 2) h (l 3) t (r 4) t (l 3) h (r 2) h (l 3) t (r 4) t (l 3) h (r 2) h (l 3) t (r 4) t (l 3) h (l 18)) (r 4)) (r 4)) (l 18)) (r 4)) (r 4) h (l 14)) (r 4)) (l 10)) (r 4) h (l 6)) (l 2) h (r 17) t (l 3) h (r 1) t (r 3) h (l 1) t (l 3) h (r 1) t (r 3) h (l 1) t (l 3) h (r 1) t (r 3) h (l 1) t (l 3) h (r 1) t (r 3) h (l 4)) (l 2) h)" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(#0 h (r 4) h)", @@ -8841,6 +8906,11 @@ { "fn_0 (r 2 h (l 2))": "(r 2 h (l 2) h (r 4) h)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/city-a1-i1.json b/data/expected_outputs/city-a1-i1.json index a400c565..5efe9a9d 100644 --- a/data/expected_outputs/city-a1-i1.json +++ b/data/expected_outputs/city-a1-i1.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 1, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 4082574, "final_cost": 3301440, "compression_ratio": 1.2366040273335273, @@ -510,7 +576,6 @@ "(fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (h (r 3) t (l 4) t (r 5) h (l 4) h (r 3) t (l 4) t (r 5) h (l 4) h (r 3) t (l 4) t (r 5) h (l 4) h (r 3) t (l 4) t (r 5)) (r 3) t (l 4) t (r 5) h (l 4) h (r 3) t (l 4) t (r 5) h (l 4) h (r 3) t (l 4) t (r 5) h (l 4) h (r 3) t (l 4) t (r 5) h (l 12)) (r 4)) (r 6) h h (r 1) t (l 2) t (r 6) t (l 2) t (r 1) h h (l 4) h h (r 1) t (l 2) t (r 6) t (l 2) t (r 1) h h (l 4) h h (r 1) t (l 2) t (r 6) t (l 2) t (r 1) h h (l 4) h h (r 1) t (l 2) t (r 6) t (l 2) t (r 1) h h (r 8) h h (l 1) t (r 2) t (l 6) t (r 2) t (l 1) h) h (l 1) t (r 2) t (l 6) t (r 2) t (l 1) h) h (l 1) t (r 2) t (l 6) t (r 2) t (l 1) h) h (l 1) t (r 2) t (l 6) t (r 2) t (l 1) h h (l 8)) (r 4)) (l 10)) (r 4) h (l 6)) (l 2) h)" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(#0 h (r 4) h)", @@ -6891,6 +6956,11 @@ { "fn_0 (r 2 h (l 2))": "(r 2 h (l 2) h (r 4) h)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/dials-a2-i10.json b/data/expected_outputs/dials-a2-i10.json index 57c6457f..4d165d43 100644 --- a/data/expected_outputs/dials-a2-i10.json +++ b/data/expected_outputs/dials-a2-i10.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 10, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 2, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 3606662, "final_cost": 891681, "compression_ratio": 4.044789560392113, @@ -510,7 +576,6 @@ "(C (C (C (fn_8 0 (r_s 9.5 4.5)) (fn_8 5.25 (r_s 1 2.25))) (fn_8 (- 0 (* 0.5 (+ (- (+ (* 3 (+ 2 0.5)) (* 4 0.5)) (* 0 (* 4 0.5))) (* 2 0.5)))) (r_s 1 2.25))) (fn_8 2.5 (fn_9 -2.5 (repeat (C (repeat c 1 (M 1.5 0 0 0)) (T (T (fn_8 -0.5 l) (M 1 (/ pi 2) 0 0)) (fn_1 (* 1 (* 0.5 (cos (/ pi 2)))) 0.5))) 2))))" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(C (C (T (T (T l (M 3 (/ pi 2) 0 -2)) (M 1 0 0 0)) (M 1 0 0 0)) (T (T (T l (M 1 0 -0.5 0)) (M 2 0 0 0)) (M 1 0 0 1))) (T (T (T l (M 1 0 -0.5 0)) (M #0 0 0 0)) (M 1 0 0 0)))", @@ -531,6 +596,11 @@ { "fn_0 2": "(C (C (T (T (T l (M 3 (/ pi 2) 0 -2)) (M 1 0 0 0)) (M 1 0 0 0)) (T (T (T l (M 1 0 -0.5 0)) (M 2 0 0 0)) (M 1 0 0 1))) (T (T (T l (M 1 0 -0.5 0)) (M 2 0 0 0)) (M 1 0 0 0)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -549,7 +619,10 @@ { "fn_1 ": "(M 1 0)" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(repeat (C #1 (T (T (T l (fn_1 -0.5 0)) (M #0 (/ pi 4) 0 0)) (fn_1 (* #0 (* 0.5 (cos (/ pi 4)))) (* #0 (* 0.5 (sin (/ pi 4))))))))", @@ -582,6 +655,12 @@ { "fn_2 2 (repeat c 1 (M 2.5 0 0 0))": "(repeat (C (repeat c 1 (M 2.5 0 0 0)) (T (T (T l (fn_1 -0.5 0)) (M 2 (/ pi 4) 0 0)) (fn_1 (* 2 (* 0.5 (cos (/ pi 4)))) (* 2 (* 0.5 (sin (/ pi 4))))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -603,6 +682,11 @@ { "fn_3 1": "(- (+ (* 5 (+ 2 0.5)) (* 4 0.5)) (* 1 (* 4 0.5)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -648,6 +732,12 @@ { "fn_4 r (fn_0 2)": "(C (C (fn_0 2) (T (T r (fn_1 -1.5 0.5)) (fn_1 0 0.5))) (T (T r (fn_1 1.5 0.5)) (fn_1 0 0.5)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -672,6 +762,12 @@ { "fn_5 7.5 9.5": "(C (C (T (r_s 9.5 4.5) (fn_1 0 0)) (T (r_s 7.5 2.25) (fn_1 0 (+ (* 0.5 0) (* 0.5 (+ (* (+ (* 1 (+ 2 0.5)) (* 4 0.5)) (pow 0.5 1)) (* (+ (* 1 (+ 2 0.5)) (* 4 0.5)) (pow 0.5 0)))))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -690,7 +786,10 @@ { "fn_6 ": "(C (T (T (T l (M 3 (/ pi 2) 0 -2)) (fn_1 0 0)) (fn_1 0 0)) (T (T (T l (fn_1 -0.5 0)) (M 2 0 0 0)) (fn_1 0 1)))" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(repeat (C (C (T c (fn_1 0 0)) (T #0 (M 1.5 0 0 0))) (T (T (T l (fn_1 -0.5 0)) (M 1 (/ pi 2) 0 0)) (fn_1 (* 1 (* 0.5 (cos (/ pi 2)))) 0.5))))", @@ -711,6 +810,11 @@ { "fn_7 r": "(repeat (C (C (T c (fn_1 0 0)) (T r (M 1.5 0 0 0))) (T (T (T l (fn_1 -0.5 0)) (M 1 (/ pi 2) 0 0)) (fn_1 (* 1 (* 0.5 (cos (/ pi 2)))) 0.5))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -942,6 +1046,12 @@ { "fn_8 -0.5 l": "(T l (fn_1 -0.5 0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1074,6 +1184,12 @@ { "fn_9 -2.5 (repeat (C (repeat c 1 (M 1.5 0 0 0)) (T (T (fn_8 -0.5 l) (M 1 (/ pi 2) 0 0)) (fn_1 (* 1 (* 0.5 (cos (/ pi 2)))) 0.5))) 6)": "(repeat (repeat (C (repeat c 1 (M 1.5 0 0 0)) (T (T (fn_8 -0.5 l) (M 1 (/ pi 2) 0 0)) (fn_1 (* 1 (* 0.5 (cos (/ pi 2)))) 0.5))) 6 (fn_1 -2.5 0)) 1 (fn_1 0 2.5))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] } ] diff --git a/data/expected_outputs/front-of-sequence.json b/data/expected_outputs/front-of-sequence.json index a91e83fb..da05036e 100644 --- a/data/expected_outputs/front-of-sequence.json +++ b/data/expected_outputs/front-of-sequence.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-e3a9d4911874cf31 tdfa_sequence", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 2, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -54,11 +55,15 @@ "tags": null }, "tdfa": { - "tdfa_json_path": "../Stitch.jl/data_for_testing/dfa_imp.json", + "tdfa_json_path": "test_data/dfa.json", "tdfa_root": "M", "valid_metavars": "[\"S\",\"E\",\"seqS\"]", "valid_roots": "[\"S\",\"E\",\"seqS\"]", - "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}" + "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}", + "tdfa_split": "~" + }, + "symvar": { + "symvar_prefix": null } } }, @@ -111,7 +116,16 @@ "fn_0 (Name g_z5 Load)": "(/seq (Expr (Call (Name g_function Load) (list (_starred_content (Name g_x Load)) (_starred_content (Name g_y Load)) (_starred_content (Name g_z5 Load))) nil)) (Expr (BinOp (BinOp (Constant i2 None) Add (Constant i3 None)) Add (Constant i4 None))))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": { + "root_state": "seqS", + "metavariable_states": [ + "E" + ] + }, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 #2 (Expr #1) (Expr (BinOp (BinOp (BinOp #0 Add (Constant i2 None)) Add (Constant i3 None)) Add (Constant i4 None))))", @@ -133,7 +147,20 @@ "fn_1 (Name g_distraction4 Load) (Name g_distraction3 Load) (Name g_z3 Load)": "(fn_0 (Name g_z3 Load) (Expr (Name g_distraction3 Load)) (Expr (BinOp (BinOp (BinOp (Name g_distraction4 Load) Add (Constant i2 None)) Add (Constant i3 None)) Add (Constant i4 None))))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": { + "root_state": "seqS", + "metavariable_states": [ + "E", + "E", + "E" + ] + }, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/furniture-a2-i10.json b/data/expected_outputs/furniture-a2-i10.json index 25887ea1..24e70b82 100644 --- a/data/expected_outputs/furniture-a2-i10.json +++ b/data/expected_outputs/furniture-a2-i10.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 10, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 2, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 4336185, "final_cost": 1017628, "compression_ratio": 4.261070843176485, @@ -510,7 +576,6 @@ "(C (C (fn_0 0 (fn_0 -0.5 (r_s 12 1))) (T (C (fn_0 0.5 (fn_0 0 (repeat (repeat (fn_0 1 (C (fn_0 0 (fn_0 0 (r_s 5 2))) empt)) 1 (fn_1 0)) 1 (fn_1 0)))) (fn_0 0 (fn_0 1.5 (r_s 6 3)))) (fn_1 3))) (fn_0 -1 (fn_4 12 (fn_5 (fn_0 0) -0.5) (fn_1 -6))))" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(T #1 (M 1 0 0 #0))", @@ -1074,6 +1139,12 @@ { "fn_0 -7.5 (repeat (repeat (T (C (T (T (r_s 9 4) (M 1 0 0 0)) (M 1 0 0 0)) empt) (M 1 0 0 0)) 1 (M 1 0 0 0)) 4 (M 1 0 0 5))": "(T (repeat (repeat (T (C (T (T (r_s 9 4) (M 1 0 0 0)) (M 1 0 0 0)) empt) (M 1 0 0 0)) 1 (M 1 0 0 0)) 4 (M 1 0 0 5)) (M 1 0 0 -7.5))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1263,6 +1334,11 @@ { "fn_1 8.25": "(M 1 0 8.25 0)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -1296,6 +1372,12 @@ { "fn_2 empt 15": "(C (fn_0 0.75 (fn_0 0 (repeat (repeat (fn_0 -3 (C (fn_0 0 (fn_0 0 (r_s 15 3))) empt)) 1 (fn_1 0)) 1 (fn_1 0)))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1365,6 +1447,12 @@ { "fn_3 1.125 r": "(T r (M 1.125 0 0 0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1530,6 +1618,12 @@ { "fn_4 6.375 (fn_0 0 (fn_3 0.84375 r))": "(T (repeat (repeat (fn_0 0 (fn_3 0.84375 r)) 2 (fn_1 6.375)) 1 (fn_1 0)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1557,6 +1651,12 @@ { "fn_5 (fn_3 6) -3": "(fn_0 -3 (fn_3 6 (T (T l (fn_1 -0.5)) (M 1 1.5708 0 0))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1614,6 +1714,12 @@ { "fn_6 5 empt": "(C (C (fn_0 0 (fn_0 -0.5 (r_s 20 1))) (T (C (fn_0 1 (fn_0 0 (repeat (repeat (fn_0 2 (C (fn_0 0 (fn_0 0 (r_s 8 4))) empt)) 1 (fn_1 0)) 1 (fn_1 0)))) (fn_0 0 (fn_0 3 (r_s 10 6)))) (fn_1 5))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1665,6 +1771,12 @@ { "fn_7 r (C (C (T (fn_0 1.5 (r_s 1.5 3)) (fn_1 -7.5)) (fn_0 0 (fn_0 1.5 (fn_3 13.5 empt)))) (T (fn_0 1.5 (r_s 1.5 3)) (fn_1 7.5)))": "(C (C (C (C (T (fn_0 1.5 (r_s 1.5 3)) (fn_1 -7.5)) (fn_0 0 (fn_0 1.5 (fn_3 13.5 empt)))) (T (fn_0 1.5 (r_s 1.5 3)) (fn_1 7.5))) (fn_2 (fn_4 6.375 (fn_0 0 (fn_3 0.84375 r)) (fn_1 -3.1875)) 15 (fn_0 0 (fn_0 -2.25 (r_s 16.5 4.5))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1716,6 +1828,12 @@ { "fn_8 r (C (C (T (fn_0 1.5 (r_s 1.5 3)) (fn_1 -6.75)) (fn_0 0 (fn_0 1.5 (fn_3 12 empt)))) (T (fn_0 1.5 (r_s 1.5 3)) (fn_1 6.75)))": "(C (C (C (C (T (fn_0 1.5 (r_s 1.5 3)) (fn_1 -6.75)) (fn_0 0 (fn_0 1.5 (fn_3 12 empt)))) (T (fn_0 1.5 (r_s 1.5 3)) (fn_1 6.75))) (fn_2 (fn_4 5.625 (fn_0 0 (fn_3 0.84375 r)) (fn_1 -2.8125)) 13.5 (fn_0 0 (fn_0 -2.25 (r_s 15 4.5))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1767,6 +1885,12 @@ { "fn_9 7.875 (r_s 0.75 1.5)": "(T (fn_0 0.75 (r_s 0.75 1.5)) (fn_1 7.875))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] } ] diff --git a/data/expected_outputs/fuzz/001_simple4.json b/data/expected_outputs/fuzz/001_simple4.json index bcbda348..afcb254a 100644 --- a/data/expected_outputs/fuzz/001_simple4.json +++ b/data/expected_outputs/fuzz/001_simple4.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/002_identical.json b/data/expected_outputs/fuzz/002_identical.json index 05ae6a16..93faa8ef 100644 --- a/data/expected_outputs/fuzz/002_identical.json +++ b/data/expected_outputs/fuzz/002_identical.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/003_house.json b/data/expected_outputs/fuzz/003_house.json index a93b4188..593621c6 100644 --- a/data/expected_outputs/fuzz/003_house.json +++ b/data/expected_outputs/fuzz/003_house.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -2613,7 +2614,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(#0 (r 4) h (l 20) h (r 4) h (r 4) h (r 4) h (r 4) h (r 4) h (l 18) h (r 4) h (r 4) h (r 4) h (r 4) h (l 14) h (r 4) h (r 4) h (r 4) h (l 10) h (r 4) h (r 4) h (l 6) h (r 4) h (l 2) h)", @@ -3131,7 +3136,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 3 #0 h (l 2) h (r 4) h)", @@ -3967,7 +3975,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/004_ctx_thread_2.json b/data/expected_outputs/fuzz/004_ctx_thread_2.json index 97aa0d98..5ce16ff7 100644 --- a/data/expected_outputs/fuzz/004_ctx_thread_2.json +++ b/data/expected_outputs/fuzz/004_ctx_thread_2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 (a b #0))", @@ -124,7 +128,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/005_dials.json b/data/expected_outputs/fuzz/005_dials.json index d535f36d..62dee09e 100644 --- a/data/expected_outputs/fuzz/005_dials.json +++ b/data/expected_outputs/fuzz/005_dials.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -603,7 +604,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M 1 0 #1 #0))", @@ -1151,7 +1157,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(fn_1 #2 (* #1 (* 0.5 (cos (/ pi #0)))) (T (fn_1 0 -0.5 l) (M #1 (/ pi #0) 0 0)))", @@ -1177,7 +1188,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/006_issue108.json b/data/expected_outputs/fuzz/006_issue108.json index 08a29de7..ed43e780 100644 --- a/data/expected_outputs/fuzz/006_issue108.json +++ b/data/expected_outputs/fuzz/006_issue108.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/007_dials.json b/data/expected_outputs/fuzz/007_dials.json index 8cf6f032..2ff1c5a0 100644 --- a/data/expected_outputs/fuzz/007_dials.json +++ b/data/expected_outputs/fuzz/007_dials.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -615,7 +616,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M 1 0 #1 #0))", @@ -1142,7 +1148,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (C (fn_1 0 0 (fn_1 0 0 (T l (M 3 (/ pi 2) 0 -2)))) (fn_0 1 0 (M 2 0))) (#1 0 #0))", @@ -1171,7 +1182,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/008_nuts-bolts.json b/data/expected_outputs/fuzz/008_nuts-bolts.json index 973673f4..c6081fe4 100644 --- a/data/expected_outputs/fuzz/008_nuts-bolts.json +++ b/data/expected_outputs/fuzz/008_nuts-bolts.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -615,7 +616,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(repeat (T (T #2 (M 0.5 0 0 0)) (M 1 0 (* #1 (cos (/ pi 4))) (* #1 (sin (/ pi 4))))) #0 (M 1 (/ (* 2 pi) #0) 0 0))", @@ -680,7 +685,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T (T c (M 2 0 0 0)) (M #0 0 0 0))", @@ -715,7 +725,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/009_wheels.json b/data/expected_outputs/fuzz/009_wheels.json index f2e93f96..9aa2e4bb 100644 --- a/data/expected_outputs/fuzz/009_wheels.json +++ b/data/expected_outputs/fuzz/009_wheels.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -1044,7 +1045,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(repeat (C #2 (repeat (T (T c (M 0.25 0 0 0)) (M 1 0 0.53033 0.53033)) #1 (M 1 #0 0 0))))", @@ -1109,7 +1115,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (C (C (C #2 #1) (T (r_s #0 1) (M 1 0 0 5))) (T (C (C (C (fn_0 0 0 (T (T l (M 3 1.5708 0 -2)))) (T (T (T l (M 1 0 -0.5 0)) (M 2 0 0 0)) (M 1 0 0 1))) (fn_0 0 0 (T (T l (M 1 0 -0.5 0))))) (T (T (T l (M 1 0 -0.5 0)) (M 0 0 0 0)) (M 1 0 0 -1))) (M 1 0 0 8))))", @@ -1138,7 +1149,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/010_tmp_minimal.json b/data/expected_outputs/fuzz/010_tmp_minimal.json index 3b932c8c..53bd57f8 100644 --- a/data/expected_outputs/fuzz/010_tmp_minimal.json +++ b/data/expected_outputs/fuzz/010_tmp_minimal.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/011_bridge.json b/data/expected_outputs/fuzz/011_bridge.json index 047bbd04..f3b708a0 100644 --- a/data/expected_outputs/fuzz/011_bridge.json +++ b/data/expected_outputs/fuzz/011_bridge.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -1140,7 +1141,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(#0 (r 4) h)", @@ -3545,7 +3551,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_1 (fn_1 (#0 h (r 2) h (r 6) h (l 2) h (l 6) h)))", @@ -3658,7 +3667,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/012_furniture.json b/data/expected_outputs/fuzz/012_furniture.json index 7993d233..d8b46778 100644 --- a/data/expected_outputs/fuzz/012_furniture.json +++ b/data/expected_outputs/fuzz/012_furniture.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -996,7 +997,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (T (fn_0 0 0 (repeat (repeat (T (C (fn_0 0 0 (T (r_s #2 3))) #1) (M 1 0 0 -3)) 1 (M 1 0 0 0)) 1)) (M 1 0 0 0.75)) (fn_0 0 -2.25 (T (r_s #0 4.5))))", @@ -1031,7 +1037,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M #1 0 0 #0))", @@ -1399,7 +1410,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/013_simple4.json b/data/expected_outputs/fuzz/013_simple4.json index 611d03e8..b11f17f1 100644 --- a/data/expected_outputs/fuzz/013_simple4.json +++ b/data/expected_outputs/fuzz/013_simple4.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/014_tmp_crash.json b/data/expected_outputs/fuzz/014_tmp_crash.json index eb8f8636..af1ffe33 100644 --- a/data/expected_outputs/fuzz/014_tmp_crash.json +++ b/data/expected_outputs/fuzz/014_tmp_crash.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/015_city.json b/data/expected_outputs/fuzz/015_city.json index c28f58cd..5e18ca4c 100644 --- a/data/expected_outputs/fuzz/015_city.json +++ b/data/expected_outputs/fuzz/015_city.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -8541,7 +8542,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(#2 (#0 1) t (#1 2) t (#0 6) t (#1 2) t (#0 1) h)", @@ -9311,7 +9316,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(fn_0 r (#1 (l #0) h))", @@ -12640,7 +12650,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/016_simple_hof.json b/data/expected_outputs/fuzz/016_simple_hof.json index fb1adb9b..8e96d117 100644 --- a/data/expected_outputs/fuzz/016_simple_hof.json +++ b/data/expected_outputs/fuzz/016_simple_hof.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "a", @@ -121,7 +125,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/017_lio_test2.json b/data/expected_outputs/fuzz/017_lio_test2.json index 4dbd9081..e2be9c82 100644 --- a/data/expected_outputs/fuzz/017_lio_test2.json +++ b/data/expected_outputs/fuzz/017_lio_test2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/018_identical.json b/data/expected_outputs/fuzz/018_identical.json index 2bbcecaa..f6f12bea 100644 --- a/data/expected_outputs/fuzz/018_identical.json +++ b/data/expected_outputs/fuzz/018_identical.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/019_dials.json b/data/expected_outputs/fuzz/019_dials.json index 159fef38..0798d937 100644 --- a/data/expected_outputs/fuzz/019_dials.json +++ b/data/expected_outputs/fuzz/019_dials.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -1131,7 +1132,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (C (fn_0 0 0 (fn_0 0 0 (T l (M 3 (/ pi 2) 0 -2)))) (fn_0 1 0 (T (fn_0 0 -0.5 l) (M 2 0 0 0)))) (fn_0 #1 0 #0))", @@ -1160,7 +1166,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(repeat (C #1 (fn_0 (* #0 (* 0.5 (sin (/ pi 4)))) (* #0 (* 0.5 (cos (/ pi 4)))) (T (fn_0 0 -0.5 l) (M #0 (/ pi 4) 0 0)))))", @@ -1195,7 +1205,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/020_lio_test2.json b/data/expected_outputs/fuzz/020_lio_test2.json index a35ea01c..b3584ef1 100644 --- a/data/expected_outputs/fuzz/020_lio_test2.json +++ b/data/expected_outputs/fuzz/020_lio_test2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/021_furniture.json b/data/expected_outputs/fuzz/021_furniture.json index 9afbf6b8..f7d95fdd 100644 --- a/data/expected_outputs/fuzz/021_furniture.json +++ b/data/expected_outputs/fuzz/021_furniture.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -996,7 +997,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (T (fn_0 0 0 (repeat (repeat (T (C (fn_0 0 0 (T (r_s #2 3))) #1) (M 1 0 0 -3)) 1 (M 1 0 0 0)) 1)) (M 1 0 0 0.75)) (fn_0 0 -2.25 (T (r_s #0 4.5))))", @@ -1031,7 +1037,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M #1 0 0 #0))", @@ -1399,7 +1410,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/022_map.json b/data/expected_outputs/fuzz/022_map.json index a9d46a77..c5ddcdd1 100644 --- a/data/expected_outputs/fuzz/022_map.json +++ b/data/expected_outputs/fuzz/022_map.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(app #1 (app car #0))", @@ -127,7 +133,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(app Y)", @@ -147,7 +157,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/023_furniture.json b/data/expected_outputs/fuzz/023_furniture.json index cfc08fa8..d1932ba1 100644 --- a/data/expected_outputs/fuzz/023_furniture.json +++ b/data/expected_outputs/fuzz/023_furniture.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -996,7 +997,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (T (fn_0 0 0 (repeat (repeat (T (C (fn_0 0 0 (T (r_s #2 3))) #1) (M 1 0 0 -3)) 1 (M 1 0 0 0)) 1)) (M 1 0 0 0.75)) (fn_0 0 -2.25 (T (r_s #0 4.5))))", @@ -1031,7 +1037,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M #1 0 0 #0))", @@ -1399,7 +1410,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/024_simple5.json b/data/expected_outputs/fuzz/024_simple5.json index df84db33..ee96f476 100644 --- a/data/expected_outputs/fuzz/024_simple5.json +++ b/data/expected_outputs/fuzz/024_simple5.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/025_map.json b/data/expected_outputs/fuzz/025_map.json index ff00941e..727380b5 100644 --- a/data/expected_outputs/fuzz/025_map.json +++ b/data/expected_outputs/fuzz/025_map.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(app (app (app if (app is_nil #0)) nil) (app (app cons #2) (app #1 (app cdr #0))))", @@ -121,7 +123,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/026_simple2.json b/data/expected_outputs/fuzz/026_simple2.json index 22c9f49a..cf055fc3 100644 --- a/data/expected_outputs/fuzz/026_simple2.json +++ b/data/expected_outputs/fuzz/026_simple2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/027_hof.json b/data/expected_outputs/fuzz/027_hof.json index a3ab249a..d1b6873e 100644 --- a/data/expected_outputs/fuzz/027_hof.json +++ b/data/expected_outputs/fuzz/027_hof.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -106,7 +107,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(lam (fn_0 $0 #0))", @@ -132,7 +137,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/028_simple_hof.json b/data/expected_outputs/fuzz/028_simple_hof.json index 6f4c069f..68de1269 100644 --- a/data/expected_outputs/fuzz/028_simple_hof.json +++ b/data/expected_outputs/fuzz/028_simple_hof.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/029_simple5.json b/data/expected_outputs/fuzz/029_simple5.json index 9bf25766..f0271b09 100644 --- a/data/expected_outputs/fuzz/029_simple5.json +++ b/data/expected_outputs/fuzz/029_simple5.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/030_simple5.json b/data/expected_outputs/fuzz/030_simple5.json index cb0c6db0..daf78694 100644 --- a/data/expected_outputs/fuzz/030_simple5.json +++ b/data/expected_outputs/fuzz/030_simple5.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/031_ctx_thread_1.json b/data/expected_outputs/fuzz/031_ctx_thread_1.json index 37b311db..d8e2591b 100644 --- a/data/expected_outputs/fuzz/031_ctx_thread_1.json +++ b/data/expected_outputs/fuzz/031_ctx_thread_1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(A (lam (lam (+ (fn_0 $0 #0) (fn_0 $0 #0)))))", @@ -124,7 +129,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/032_ctx_thread_1.json b/data/expected_outputs/fuzz/032_ctx_thread_1.json index 12ea407e..42bb5d16 100644 --- a/data/expected_outputs/fuzz/032_ctx_thread_1.json +++ b/data/expected_outputs/fuzz/032_ctx_thread_1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 (a b #0))", @@ -124,7 +128,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/033_simple4.json b/data/expected_outputs/fuzz/033_simple4.json index 39a31d71..2f5154cd 100644 --- a/data/expected_outputs/fuzz/033_simple4.json +++ b/data/expected_outputs/fuzz/033_simple4.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/034_map_minimal.json b/data/expected_outputs/fuzz/034_map_minimal.json index e6742289..6449b2e8 100644 --- a/data/expected_outputs/fuzz/034_map_minimal.json +++ b/data/expected_outputs/fuzz/034_map_minimal.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/035_wheels.json b/data/expected_outputs/fuzz/035_wheels.json index 54e26b73..7a311354 100644 --- a/data/expected_outputs/fuzz/035_wheels.json +++ b/data/expected_outputs/fuzz/035_wheels.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -1044,7 +1045,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(repeat (C #2 (repeat (T (T c (M 0.25 0 0 0)) (M 1 0 0.53033 0.53033)) #1 (M 1 #0 0 0))))", @@ -1109,7 +1115,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (C (C (C #2 #1) (T (r_s #0 1) (M 1 0 0 5))) (T (C (C (C (fn_0 0 0 (T (T l (M 3 1.5708 0 -2)))) (T (T (T l (M 1 0 -0.5 0)) (M 2 0 0 0)) (M 1 0 0 1))) (fn_0 0 0 (T (T l (M 1 0 -0.5 0))))) (T (T (T l (M 1 0 -0.5 0)) (M 0 0 0 0)) (M 1 0 0 -1))) (M 1 0 0 8))))", @@ -1138,7 +1149,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/036_simple4.json b/data/expected_outputs/fuzz/036_simple4.json index 9332dbe3..fda15cf3 100644 --- a/data/expected_outputs/fuzz/036_simple4.json +++ b/data/expected_outputs/fuzz/036_simple4.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/037_house.json b/data/expected_outputs/fuzz/037_house.json index 839123ca..0c59653a 100644 --- a/data/expected_outputs/fuzz/037_house.json +++ b/data/expected_outputs/fuzz/037_house.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -14019,7 +14020,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 (fn_0 (#1 (l 5) t (r 6) t (l 3) h h (l 2)) #0))", @@ -15071,7 +15075,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (#0 (r 4)) (r 4)) (l 18)) (r 4)) (r 4) h (l 14)) (r 4)) (l 10)) (r 4) h (l 6)) (l 2) h)", @@ -15607,7 +15615,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/038_symbol_weighting_test_1.json b/data/expected_outputs/fuzz/038_symbol_weighting_test_1.json index e2eb2f43..b3cd913b 100644 --- a/data/expected_outputs/fuzz/038_symbol_weighting_test_1.json +++ b/data/expected_outputs/fuzz/038_symbol_weighting_test_1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -102,7 +103,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(* (/ 5 6) (& H))", @@ -122,7 +124,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/039_castle.json b/data/expected_outputs/fuzz/039_castle.json index 23622903..938f6614 100644 --- a/data/expected_outputs/fuzz/039_castle.json +++ b/data/expected_outputs/fuzz/039_castle.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -594,7 +595,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "3", @@ -614,7 +616,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(#2 (r #1) h (l #0) h)", @@ -7387,7 +7390,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/040_cex.json b/data/expected_outputs/fuzz/040_cex.json index 6a10ec69..6a714dc1 100644 --- a/data/expected_outputs/fuzz/040_cex.json +++ b/data/expected_outputs/fuzz/040_cex.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/041_simple4.json b/data/expected_outputs/fuzz/041_simple4.json index 8ae0e132..d127fcbb 100644 --- a/data/expected_outputs/fuzz/041_simple4.json +++ b/data/expected_outputs/fuzz/041_simple4.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/042_ctx_thread_1.json b/data/expected_outputs/fuzz/042_ctx_thread_1.json index 9c9ff04a..6995b559 100644 --- a/data/expected_outputs/fuzz/042_ctx_thread_1.json +++ b/data/expected_outputs/fuzz/042_ctx_thread_1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 (a b #0))", @@ -124,7 +128,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/043_symbol_weighting_test_2.json b/data/expected_outputs/fuzz/043_symbol_weighting_test_2.json index 70848436..7cafdf0a 100644 --- a/data/expected_outputs/fuzz/043_symbol_weighting_test_2.json +++ b/data/expected_outputs/fuzz/043_symbol_weighting_test_2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -102,7 +103,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(+ (+ 1 2) (+ 3 4))", @@ -122,7 +124,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/044_nuts-bolts.json b/data/expected_outputs/fuzz/044_nuts-bolts.json index 57f34d5d..2fb21eb0 100644 --- a/data/expected_outputs/fuzz/044_nuts-bolts.json +++ b/data/expected_outputs/fuzz/044_nuts-bolts.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -615,7 +616,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(repeat (T (T #2 (M 0.5 0 0 0)) (M 1 0 (* #1 (cos (/ pi 4))) (* #1 (sin (/ pi 4))))) #0 (M 1 (/ (* 2 pi) #0) 0 0))", @@ -680,7 +685,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #1 (M #0 0 0 0))", @@ -727,7 +737,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/045_identical.json b/data/expected_outputs/fuzz/045_identical.json index 88bb1c08..246a5f1e 100644 --- a/data/expected_outputs/fuzz/045_identical.json +++ b/data/expected_outputs/fuzz/045_identical.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/046_map_minimal.json b/data/expected_outputs/fuzz/046_map_minimal.json index a5f35c2e..96bf1ab4 100644 --- a/data/expected_outputs/fuzz/046_map_minimal.json +++ b/data/expected_outputs/fuzz/046_map_minimal.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/047_safe_ctx_thread_bug.json b/data/expected_outputs/fuzz/047_safe_ctx_thread_bug.json index 0777417d..a2ca2011 100644 --- a/data/expected_outputs/fuzz/047_safe_ctx_thread_bug.json +++ b/data/expected_outputs/fuzz/047_safe_ctx_thread_bug.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/048_simple4.json b/data/expected_outputs/fuzz/048_simple4.json index be7b8b3e..9e136e0c 100644 --- a/data/expected_outputs/fuzz/048_simple4.json +++ b/data/expected_outputs/fuzz/048_simple4.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/049_furniture.json b/data/expected_outputs/fuzz/049_furniture.json index e9da409b..ba851444 100644 --- a/data/expected_outputs/fuzz/049_furniture.json +++ b/data/expected_outputs/fuzz/049_furniture.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -996,7 +997,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (T (fn_0 0 0 (repeat (repeat (T (C (fn_0 0 0 (T (r_s #2 3))) #1) (M 1 0 0 -3)) 1 (M 1 0 0 0)) 1)) (M 1 0 0 0.75)) (fn_0 0 -2.25 (T (r_s #0 4.5))))", @@ -1031,7 +1037,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M #1 0 0 #0))", @@ -1399,7 +1410,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/050_tmp_crash.json b/data/expected_outputs/fuzz/050_tmp_crash.json index e43ff0d9..71fabbbb 100644 --- a/data/expected_outputs/fuzz/050_tmp_crash.json +++ b/data/expected_outputs/fuzz/050_tmp_crash.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/051_safe_ctx_thread_bug.json b/data/expected_outputs/fuzz/051_safe_ctx_thread_bug.json index e16bd854..a63df9fc 100644 --- a/data/expected_outputs/fuzz/051_safe_ctx_thread_bug.json +++ b/data/expected_outputs/fuzz/051_safe_ctx_thread_bug.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/052_safe_ctx_thread_bug.json b/data/expected_outputs/fuzz/052_safe_ctx_thread_bug.json index 5fa3ee86..0ce21e7a 100644 --- a/data/expected_outputs/fuzz/052_safe_ctx_thread_bug.json +++ b/data/expected_outputs/fuzz/052_safe_ctx_thread_bug.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/053_tmp_minimal.json b/data/expected_outputs/fuzz/053_tmp_minimal.json index 15302fec..1e390916 100644 --- a/data/expected_outputs/fuzz/053_tmp_minimal.json +++ b/data/expected_outputs/fuzz/053_tmp_minimal.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/054_furniture.json b/data/expected_outputs/fuzz/054_furniture.json index 6e1cddd6..29fe81bd 100644 --- a/data/expected_outputs/fuzz/054_furniture.json +++ b/data/expected_outputs/fuzz/054_furniture.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -996,7 +997,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (T (fn_0 0 0 (repeat (repeat (T (C (fn_0 0 0 (T (r_s #2 3))) #1) (M 1 0 0 -3)) 1 (M 1 0 0 0)) 1)) (M 1 0 0 0.75)) (fn_0 0 -2.25 (T (r_s #0 4.5))))", @@ -1031,7 +1037,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M #1 0 0 #0))", @@ -1399,7 +1410,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/055_tmp_minimal.json b/data/expected_outputs/fuzz/055_tmp_minimal.json index 4c30cf68..cd7ec6b8 100644 --- a/data/expected_outputs/fuzz/055_tmp_minimal.json +++ b/data/expected_outputs/fuzz/055_tmp_minimal.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/056_simple1.json b/data/expected_outputs/fuzz/056_simple1.json index 14564407..4062b7fc 100644 --- a/data/expected_outputs/fuzz/056_simple1.json +++ b/data/expected_outputs/fuzz/056_simple1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/057_safe_ctx_thread_bug.json b/data/expected_outputs/fuzz/057_safe_ctx_thread_bug.json index 402be0f2..1dc0d19f 100644 --- a/data/expected_outputs/fuzz/057_safe_ctx_thread_bug.json +++ b/data/expected_outputs/fuzz/057_safe_ctx_thread_bug.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/058_simple_hof.json b/data/expected_outputs/fuzz/058_simple_hof.json index 5ec0bc7b..cfe8d3d7 100644 --- a/data/expected_outputs/fuzz/058_simple_hof.json +++ b/data/expected_outputs/fuzz/058_simple_hof.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/059_simple3.json b/data/expected_outputs/fuzz/059_simple3.json index fa2ad750..7e0f7148 100644 --- a/data/expected_outputs/fuzz/059_simple3.json +++ b/data/expected_outputs/fuzz/059_simple3.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/060_simple5.json b/data/expected_outputs/fuzz/060_simple5.json index 824e409e..0b4464d8 100644 --- a/data/expected_outputs/fuzz/060_simple5.json +++ b/data/expected_outputs/fuzz/060_simple5.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/061_ctx_thread_twice.json b/data/expected_outputs/fuzz/061_ctx_thread_twice.json index 74a1f68f..d6bc4a66 100644 --- a/data/expected_outputs/fuzz/061_ctx_thread_twice.json +++ b/data/expected_outputs/fuzz/061_ctx_thread_twice.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 (a b #0))", @@ -124,7 +128,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/062_castle.json b/data/expected_outputs/fuzz/062_castle.json index 46b8c042..f38e132b 100644 --- a/data/expected_outputs/fuzz/062_castle.json +++ b/data/expected_outputs/fuzz/062_castle.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -594,7 +595,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(#2 (r #1) h (fn_0 #0) h)", @@ -7367,7 +7369,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(#2 h (#0 1) t (#1 2) t (#0 6) t (#1 2) t (#0 1) h)", @@ -8314,7 +8321,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/063_furniture.json b/data/expected_outputs/fuzz/063_furniture.json index 7c0b8b7d..7d532e51 100644 --- a/data/expected_outputs/fuzz/063_furniture.json +++ b/data/expected_outputs/fuzz/063_furniture.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -996,7 +997,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (T (fn_0 0 0 (repeat (repeat (T (C (fn_0 0 0 (T (r_s #2 3))) #1) (M 1 0 0 -3)) 1 (M 1 0 0 0)) 1)) (M 1 0 0 0.75)) (fn_0 0 -2.25 (T (r_s #0 4.5))))", @@ -1031,7 +1037,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M #1 0 0 #0))", @@ -1399,7 +1410,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/064_symbol_weighting_test_1.json b/data/expected_outputs/fuzz/064_symbol_weighting_test_1.json index 7a56ab0e..e2ada9bb 100644 --- a/data/expected_outputs/fuzz/064_symbol_weighting_test_1.json +++ b/data/expected_outputs/fuzz/064_symbol_weighting_test_1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -102,7 +103,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(fn_0 (fn_0 1 2) (fn_0 3 4))", @@ -122,7 +124,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(* (/ 5 6) (& H))", @@ -142,7 +145,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/065_symbol_weighting_test_1.json b/data/expected_outputs/fuzz/065_symbol_weighting_test_1.json index ac7a2fb6..c94a1746 100644 --- a/data/expected_outputs/fuzz/065_symbol_weighting_test_1.json +++ b/data/expected_outputs/fuzz/065_symbol_weighting_test_1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -102,7 +103,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(+ (+ 1 2) (+ 3 4))", @@ -122,7 +124,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/066_map.json b/data/expected_outputs/fuzz/066_map.json index 70a1cea4..aee08ed1 100644 --- a/data/expected_outputs/fuzz/066_map.json +++ b/data/expected_outputs/fuzz/066_map.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(app #1 (app car #0))", @@ -127,7 +133,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(app Y)", @@ -147,7 +157,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/067_map2.json b/data/expected_outputs/fuzz/067_map2.json index 5b9b501c..c65d6395 100644 --- a/data/expected_outputs/fuzz/067_map2.json +++ b/data/expected_outputs/fuzz/067_map2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(if (nil? #0) nil (cons (#2 (fn_0 #0) #1) (r (cdr #0))))", @@ -121,7 +123,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/068_lio_test1.json b/data/expected_outputs/fuzz/068_lio_test1.json index cf009592..840b707e 100644 --- a/data/expected_outputs/fuzz/068_lio_test1.json +++ b/data/expected_outputs/fuzz/068_lio_test1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -106,7 +107,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(fn_0 (T (T (T (fn_0 (r_s 12 5) (T (repeat (T r (M 0.84375 0 0 0)) 2 (M 1 0 4.875 0)) (M 1 0 -2.4375 -0))) (M 1 0 0 #1)) (M 1 0 -0 0)) (M 1 0 0 1.25)) (T (r_s 14.5 7.5) (M 1 0 0 #0)))", @@ -129,7 +131,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(T (repeat (T (T (T (T l (M 1 0 -0.5 0)) (M 1 1.5708 0 0)) (M 6 0 0 0)) (M 1 0 0 -3)) #2 (M 1 0 #1 0)) (M 1 0 #0 0))", @@ -158,7 +164,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/069_furniture.json b/data/expected_outputs/fuzz/069_furniture.json index 91e048bc..672fc328 100644 --- a/data/expected_outputs/fuzz/069_furniture.json +++ b/data/expected_outputs/fuzz/069_furniture.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -996,7 +997,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (T (fn_0 0 0 (repeat (repeat (T (C (fn_0 0 0 (T (r_s #2 3))) #1) (M 1 0 0 -3)) 1 (M 1 0 0 0)) 1)) (M 1 0 0 0.75)) (fn_0 0 -2.25 (T (r_s #0 4.5))))", @@ -1031,7 +1037,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T #2 (M #1 0 0 #0))", @@ -1399,7 +1410,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/070_nuts-bolts.json b/data/expected_outputs/fuzz/070_nuts-bolts.json index 33aaf9d2..f3bd2764 100644 --- a/data/expected_outputs/fuzz/070_nuts-bolts.json +++ b/data/expected_outputs/fuzz/070_nuts-bolts.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -615,7 +616,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(repeat (T (T #2 (M 0.5 0 0 0)) (M 1 0 (* #1 (cos (/ pi 4))) (* #1 (sin (/ pi 4))))) #0 (M 1 (/ (* 2 pi) #0) 0 0))", @@ -680,7 +685,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T (T c (M 2 0 0 0)) (M #0 0 0 0))", @@ -715,7 +725,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/071_issue108_2.json b/data/expected_outputs/fuzz/071_issue108_2.json index aecc87e4..9170f3aa 100644 --- a/data/expected_outputs/fuzz/071_issue108_2.json +++ b/data/expected_outputs/fuzz/071_issue108_2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/072_ctx_thread_2.json b/data/expected_outputs/fuzz/072_ctx_thread_2.json index f4fca398..5cf6c2b6 100644 --- a/data/expected_outputs/fuzz/072_ctx_thread_2.json +++ b/data/expected_outputs/fuzz/072_ctx_thread_2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 (a b #0))", @@ -124,7 +128,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/073_city.json b/data/expected_outputs/fuzz/073_city.json index a3bf777a..7591a0f0 100644 --- a/data/expected_outputs/fuzz/073_city.json +++ b/data/expected_outputs/fuzz/073_city.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -6957,7 +6958,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(#2 (#0 1) t (#1 2) t (#0 6) t (#1 2) t (#0 1))", @@ -7727,7 +7731,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "r", @@ -7747,7 +7756,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/074_map2.json b/data/expected_outputs/fuzz/074_map2.json index 604ab30a..d85990fc 100644 --- a/data/expected_outputs/fuzz/074_map2.json +++ b/data/expected_outputs/fuzz/074_map2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/075_house.json b/data/expected_outputs/fuzz/075_house.json index 6ff11f49..59aa902a 100644 --- a/data/expected_outputs/fuzz/075_house.json +++ b/data/expected_outputs/fuzz/075_house.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -1614,7 +1615,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(#1 (l #0) h (r 4) h (r 4) h (r 4) h (r 4) h (r 4) h (l 18) h (r 4) h (r 4) h (r 4) h (r 4) h (l 14) h (r 4) h (r 4) h (r 4) h (l 10) h (r 4) h (r 4) h (l 6) h (r 4) h (l 2) h)", @@ -2150,7 +2154,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(#0 (r 4) h (l 5) t (r 6) t (l 5) h (r 4) h)", @@ -3166,7 +3174,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/076_lio_test1.json b/data/expected_outputs/fuzz/076_lio_test1.json index 0bd05705..27dc1ada 100644 --- a/data/expected_outputs/fuzz/076_lio_test1.json +++ b/data/expected_outputs/fuzz/076_lio_test1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -106,7 +107,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(T (repeat (T (T (T (T l (fn_0 -0.5 0)) (M 1 1.5708 0 0)) (M 6 0 0 0)) (fn_0 0 -3)) #2 (fn_0 #1 0)) (fn_0 #0 0))", @@ -135,7 +137,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (T (T (T (C (r_s 12 5) (T (repeat (T r (M 0.84375 0 0 0)) 2 (fn_0 4.875 0)) (fn_0 -2.4375 -0))) (fn_0 0 #1)) (fn_0 -0 0)) (fn_0 0 1.25)) (T (r_s 14.5 7.5) (fn_0 0 #0)))", @@ -158,7 +165,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/077_symbol_weighting_test_2.json b/data/expected_outputs/fuzz/077_symbol_weighting_test_2.json index 297040b0..1a46a2d8 100644 --- a/data/expected_outputs/fuzz/077_symbol_weighting_test_2.json +++ b/data/expected_outputs/fuzz/077_symbol_weighting_test_2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -102,7 +103,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(* (/ 5 6) (& L1 L2 L3))", @@ -122,7 +124,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/078_identical.json b/data/expected_outputs/fuzz/078_identical.json index bda7c587..c1a9c6c9 100644 --- a/data/expected_outputs/fuzz/078_identical.json +++ b/data/expected_outputs/fuzz/078_identical.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/079_wheels.json b/data/expected_outputs/fuzz/079_wheels.json index d46ac1f7..b61f134f 100644 --- a/data/expected_outputs/fuzz/079_wheels.json +++ b/data/expected_outputs/fuzz/079_wheels.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -1044,7 +1045,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(repeat (C #2 (repeat (T (T c (M 0.25 0 0 0)) (M 1 0 0.53033 0.53033)) #1 (M 1 #0 0 0))))", @@ -1109,7 +1115,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C (C (C (C #2 #1) (T (r_s #0 1) (M 1 0 0 5))) (T (C (C (C (fn_0 0 0 (T (T l (M 3 1.5708 0 -2)))) (T (T (T l (M 1 0 -0.5 0)) (M 2 0 0 0)) (M 1 0 0 1))) (fn_0 0 0 (T (T l (M 1 0 -0.5 0))))) (T (T (T l (M 1 0 -0.5 0)) (M 0 0 0 0)) (M 1 0 0 -1))) (M 1 0 0 8))))", @@ -1138,7 +1149,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/080_issue108_2.json b/data/expected_outputs/fuzz/080_issue108_2.json index a3dbba1d..7aa22de1 100644 --- a/data/expected_outputs/fuzz/080_issue108_2.json +++ b/data/expected_outputs/fuzz/080_issue108_2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/081_castle.json b/data/expected_outputs/fuzz/081_castle.json index 672cc1d6..c5c6f89f 100644 --- a/data/expected_outputs/fuzz/081_castle.json +++ b/data/expected_outputs/fuzz/081_castle.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -6483,7 +6484,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(#2 (#0 1) t (#1 2) t (#0 6) t (#1 2) t (#0 1))", @@ -7346,7 +7352,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(fn_0 2 h (fn_0 6 h (fn_0 10 h (#2 h #1 h (r 4) h (r 4)) h (r 4))) h (r #0))", @@ -8047,7 +8058,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/082_map_minimal.json b/data/expected_outputs/fuzz/082_map_minimal.json index bdd31fe8..5fc6ef25 100644 --- a/data/expected_outputs/fuzz/082_map_minimal.json +++ b/data/expected_outputs/fuzz/082_map_minimal.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -104,7 +105,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(app (app cons #1) (app rec (app cdr #0)))", @@ -127,7 +132,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/083_simple4.json b/data/expected_outputs/fuzz/083_simple4.json index 30ff241c..c4b056b6 100644 --- a/data/expected_outputs/fuzz/083_simple4.json +++ b/data/expected_outputs/fuzz/083_simple4.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/084_house.json b/data/expected_outputs/fuzz/084_house.json index 761613b9..1d36a616 100644 --- a/data/expected_outputs/fuzz/084_house.json +++ b/data/expected_outputs/fuzz/084_house.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -14022,7 +14023,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 #1 (l 5) t (r 6) t (l #0) h)", @@ -16061,7 +16065,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 #0 (l 20) h))))) (l 18) h)))) (l 14) h))) (l 10) h)) (l 6) h) (l 2) h)", @@ -16579,7 +16587,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/085_simple5.json b/data/expected_outputs/fuzz/085_simple5.json index 9942459a..84a5a2c1 100644 --- a/data/expected_outputs/fuzz/085_simple5.json +++ b/data/expected_outputs/fuzz/085_simple5.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/086_map2.json b/data/expected_outputs/fuzz/086_map2.json index 21711664..b2b47911 100644 --- a/data/expected_outputs/fuzz/086_map2.json +++ b/data/expected_outputs/fuzz/086_map2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/087_house.json b/data/expected_outputs/fuzz/087_house.json index 589a38b0..265061e3 100644 --- a/data/expected_outputs/fuzz/087_house.json +++ b/data/expected_outputs/fuzz/087_house.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -1614,7 +1615,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(#1 (l #0) h (r 4) h (r 4) h (r 4) h (r 4) h (r 4) h (l 18) h (r 4) h (r 4) h (r 4) h (r 4) h (l 14) h (r 4) h (r 4) h (r 4) h (l 10) h (r 4) h (r 4) h (l 6) h (r 4) h (l 2) h)", @@ -2150,7 +2154,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(#0 (r 4) h (l 5) t (r 6) t (l 5) h (r 4) h)", @@ -3166,7 +3174,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/088_house.json b/data/expected_outputs/fuzz/088_house.json index 4b0e1026..b7eb13b1 100644 --- a/data/expected_outputs/fuzz/088_house.json +++ b/data/expected_outputs/fuzz/088_house.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -2613,7 +2614,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(#0 (r 4) h (l 20) h (r 4) h (r 4) h (r 4) h (r 4) h (r 4) h (l 18) h (r 4) h (r 4) h (r 4) h (r 4) h (l 14) h (r 4) h (r 4) h (r 4) h (l 10) h (r 4) h (r 4) h (l 6) h (r 4) h (l 2) h)", @@ -3131,7 +3136,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 3 #1 h (l 2) h (r 4) h #0 h)", @@ -3979,7 +3987,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/089_bridge.json b/data/expected_outputs/fuzz/089_bridge.json index e630fa12..b080f437 100644 --- a/data/expected_outputs/fuzz/089_bridge.json +++ b/data/expected_outputs/fuzz/089_bridge.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -5238,7 +5239,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(fn_0 10 #0 (l 9) h (r 2) h (r 6) h (l 2) h (l 6) h (r 4) h (r 4) h)", @@ -5351,7 +5356,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 6 (fn_0 6 (fn_0 6 #0 (l 6)) (l 6)) (l 5) h (r 4) h)", @@ -5467,7 +5475,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/090_simple1.json b/data/expected_outputs/fuzz/090_simple1.json index 203acc28..0e2770dc 100644 --- a/data/expected_outputs/fuzz/090_simple1.json +++ b/data/expected_outputs/fuzz/090_simple1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/091_safe_ctx_thread_bug.json b/data/expected_outputs/fuzz/091_safe_ctx_thread_bug.json index d78337e6..274287c1 100644 --- a/data/expected_outputs/fuzz/091_safe_ctx_thread_bug.json +++ b/data/expected_outputs/fuzz/091_safe_ctx_thread_bug.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/092_lio_test2.json b/data/expected_outputs/fuzz/092_lio_test2.json index 60c77f2e..87c03370 100644 --- a/data/expected_outputs/fuzz/092_lio_test2.json +++ b/data/expected_outputs/fuzz/092_lio_test2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/fuzz/093_hof.json b/data/expected_outputs/fuzz/093_hof.json index e69999d3..4f7af51e 100644 --- a/data/expected_outputs/fuzz/093_hof.json +++ b/data/expected_outputs/fuzz/093_hof.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -106,7 +107,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(lam (fn_0 $0 #0))", @@ -132,7 +137,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/094_cex.json b/data/expected_outputs/fuzz/094_cex.json index a92265c8..a1bab7c1 100644 --- a/data/expected_outputs/fuzz/094_cex.json +++ b/data/expected_outputs/fuzz/094_cex.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/095_safe_ctx_thread_bug.json b/data/expected_outputs/fuzz/095_safe_ctx_thread_bug.json index 9631e10c..50203b37 100644 --- a/data/expected_outputs/fuzz/095_safe_ctx_thread_bug.json +++ b/data/expected_outputs/fuzz/095_safe_ctx_thread_bug.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/096_simple2.json b/data/expected_outputs/fuzz/096_simple2.json index 37ee8b1f..443e8505 100644 --- a/data/expected_outputs/fuzz/096_simple2.json +++ b/data/expected_outputs/fuzz/096_simple2.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/097_ctx_thread_1.json b/data/expected_outputs/fuzz/097_ctx_thread_1.json index 91d0673b..42272004 100644 --- a/data/expected_outputs/fuzz/097_ctx_thread_1.json +++ b/data/expected_outputs/fuzz/097_ctx_thread_1.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(fn_0 (a b #0))", @@ -124,7 +128,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/098_safe_ctx_thread_bug.json b/data/expected_outputs/fuzz/098_safe_ctx_thread_bug.json index 46719daa..e7eebca1 100644 --- a/data/expected_outputs/fuzz/098_safe_ctx_thread_bug.json +++ b/data/expected_outputs/fuzz/098_safe_ctx_thread_bug.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -101,7 +102,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/099_cex.json b/data/expected_outputs/fuzz/099_cex.json index fc8c475e..f5391bf9 100644 --- a/data/expected_outputs/fuzz/099_cex.json +++ b/data/expected_outputs/fuzz/099_cex.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, @@ -98,7 +99,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/fuzz/100_simple5.json b/data/expected_outputs/fuzz/100_simple5.json index cde652fd..c1b57599 100644 --- a/data/expected_outputs/fuzz/100_simple5.json +++ b/data/expected_outputs/fuzz/100_simple5.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-bb90388a4968aabc", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/fuzz_symbol_weighting_test-4586e884de5054b3", "args": { "iterations": 3, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": true, diff --git a/data/expected_outputs/house-a1-i1.json b/data/expected_outputs/house-a1-i1.json index 62f29147..f829dddb 100644 --- a/data/expected_outputs/house-a1-i1.json +++ b/data/expected_outputs/house-a1-i1.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 1, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 4245083, "final_cost": 2906126, "compression_ratio": 1.4607360451680347, @@ -510,7 +576,6 @@ "(fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (fn_0 (h (r 4) h (l 5) t (r 6) t (l 3) h h (l 2)) (r 4)) (l 5) t (r 6) t (l 3) h h (l 2)) (r 4)) (l 5) t (r 6) t (l 5)) (l 20)) (l 5) t (r 6) t (l 3) h h (l 2)) (r 4)) (l 5) t (r 6) t (l 3) h h (l 2)) (r 4)) (l 5) t (r 6) t (l 5)) (l 20)) (l 5) t (r 6) t (l 5)) (r 4)) (l 5) t (r 6) t (l 5)) (r 4)) (l 5) t (r 6) t (l 3) h h (l 2)) (l 20)) (r 4)) (r 4)) (l 18)) (r 4)) (r 4) h (l 14)) (r 4)) (l 10)) (r 4) h (l 6)) (l 2) h)" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(#0 h (r 4) h)", @@ -13953,6 +14018,11 @@ { "fn_0 (l 1 t t (r 6) t t (r 3))": "(l 1 t t (r 6) t t (r 3) h (r 4) h)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/logo_iteration_1-a3-i10.json b/data/expected_outputs/logo_iteration_1-a3-i10.json index c0b71994..1706c200 100644 --- a/data/expected_outputs/logo_iteration_1-a3-i10.json +++ b/data/expected_outputs/logo_iteration_1-a3-i10.json @@ -1,5 +1,5 @@ { - "cmd": "/Users/matthewbowers/proj/rust/stitch/target/release/deps/integration_tests-38d27ecd504c7478", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 10, "abstraction_prefix": "fn_", @@ -8,23 +8,29 @@ "truncate": null, "no_opt": false, "silent": false, + "verbose_rewrite": false, "step": { "max_arity": 3, "threads": 1, "no_stats": false, "batch": 1, "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, "inv_candidates": 1, "hole_choice": "DepthFirst", - "cost": "Dreamcoder", - "cost_lam": null, - "cost_app": null, - "cost_var": null, - "cost_ivar": null, - "cost_prim_default": null, + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, "no_mismatch_check": false, - "no_top_lambda": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -33,17 +39,32 @@ "rewritten_dreamcoder": false, "rewritten_intermediates": false, "inv_arg_cap": false, - "no_opt_single_use": false, "allow_single_task": false, + "no_opt_single_use": false, "no_opt_upper_bound": false, "no_opt_force_multiuse": false, "no_opt_useless_abstract": false, "no_opt_arity_zero": false, "no_other_util": false, + "structure_penalty": 1.0, "rewrite_check": true, "utility_by_rewrite": false, "dreamcoder_comparison": false, - "quiet": false + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } } }, "original_cost": 71510, @@ -850,6 +871,12 @@ { "fn_9 7 3": "(lam (logo_forLoop 7 (lam (lam (logo_FWRT (logo_MULL logo_UL 3) (logo_DIVA logo_UA 7) $0))) $0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1516,6 +1543,12 @@ { "fn_10 (lam (lam (logo_PT (lam $0) (logo_FWRT (logo_MULL logo_epsL 5) logo_epsA $0)))) logo_IFTY": "(lam (logo_forLoop logo_IFTY (lam (lam (logo_PT (lam $0) (logo_FWRT (logo_MULL logo_epsL 5) logo_epsA $0)))) $0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1576,6 +1609,12 @@ { "fn_11 6 logo_epsA": "(fn_10 (lam (lam (logo_GETSET (lam (logo_FWRT logo_UL logo_epsA $0)) (logo_FWRT logo_ZL (logo_DIVA logo_UA 6) $0)))) 6)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1675,6 +1714,12 @@ { "fn_12 logo_UA logo_IFTY": "(lam (logo_FWRT (logo_MULL logo_epsL logo_IFTY) logo_UA $0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1693,7 +1738,10 @@ { "fn_13 ": "(logo_FWRT logo_UL logo_UA)" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(lam (logo_FWRT logo_ZL (logo_DIVA logo_UA #1) (#0 $0)))", @@ -1738,6 +1786,12 @@ { "fn_14 (dreamcoder_abstraction_3 logo_epsL) 8": "(lam (logo_FWRT logo_ZL (logo_DIVA logo_UA 8) (dreamcoder_abstraction_3 logo_epsL $0)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1774,6 +1828,11 @@ { "fn_15 (logo_FWRT (logo_MULL logo_epsL logo_IFTY) logo_UA)": "(fn_10 (lam (lam (logo_FWRT (logo_MULL logo_epsL logo_IFTY) logo_UA (logo_PT (lam (fn_13 $0)) $0)))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -1828,6 +1887,13 @@ { "fn_16 4 (logo_SUBA (logo_MULA (logo_DIVA logo_UA 9) 4) logo_UA) 9": "(lam (dreamcoder_abstraction_1 9 (logo_SUBA (logo_MULA (logo_DIVA logo_UA 9) 4) logo_UA) (logo_MULL logo_UL 4) $0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" ] }, { @@ -1942,6 +2008,12 @@ { "fn_17 (logo_MULA (logo_DIVA logo_UA 4) 9) 5": "(lam (logo_FWRT (logo_MULL logo_UL 5) (logo_MULA (logo_DIVA logo_UA 4) 9) $0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1966,6 +2038,11 @@ { "fn_18 3": "(lam (dreamcoder_abstraction_3 (logo_MULL logo_epsL 3) (dreamcoder_abstraction_8 3 $0)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/multi-arg-function-basic.json b/data/expected_outputs/multi-arg-function-basic.json index 13b73136..20d221d5 100644 --- a/data/expected_outputs/multi-arg-function-basic.json +++ b/data/expected_outputs/multi-arg-function-basic.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-e3a9d4911874cf31 basic_tdfa", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 2, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -54,11 +55,15 @@ "tags": null }, "tdfa": { - "tdfa_json_path": "", - "tdfa_root": "", - "valid_metavars": "", - "valid_roots": "", - "tdfa_non_eta_long_states": "" + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null } } }, @@ -102,7 +107,11 @@ "fn_0 g_func2": "(Call (Name g_func2 Load) (list (_starred_content (Name g_x Load)) (_starred_content (Name g_y Load)) (_starred_content (Name g_z Load)) (_starred_content (Name g_a Load)) (_starred_content (Name g_b Load)) (_starred_content (Name g_c Load))) nil)" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(Module (/seq (Expr (BinOp #0 Add (Constant i10 None)))) nil)", @@ -130,7 +139,11 @@ "fn_1 (fn_0 g_func1)": "(Module (/seq (Expr (BinOp (fn_0 g_func1) Add (Constant i10 None)))) nil)" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/multi-arg-function-with-dfa.json b/data/expected_outputs/multi-arg-function-with-dfa.json index 9245000d..234bc8d4 100644 --- a/data/expected_outputs/multi-arg-function-with-dfa.json +++ b/data/expected_outputs/multi-arg-function-with-dfa.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-e3a9d4911874cf31 basic_tdfa", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 2, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -54,11 +55,15 @@ "tags": null }, "tdfa": { - "tdfa_json_path": "../Stitch.jl/data_for_testing/dfa_imp.json", + "tdfa_json_path": "test_data/dfa.json", "tdfa_root": "M", "valid_metavars": "[\"S\",\"E\",\"seqS\"]", "valid_roots": "[\"S\",\"E\",\"seqS\"]", - "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}" + "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}", + "tdfa_split": "~" + }, + "symvar": { + "symvar_prefix": null } } }, @@ -102,7 +107,16 @@ "fn_0 (Name g_func2 Load)": "(Call (Name g_func2 Load) (list (_starred_content (Name g_x Load)) (_starred_content (Name g_y Load)) (_starred_content (Name g_z Load)) (_starred_content (Name g_a Load)) (_starred_content (Name g_b Load)) (_starred_content (Name g_c Load))) nil)" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": { + "root_state": "E", + "metavariable_states": [ + "E" + ] + }, + "variable_types": [ + "M" + ] }, { "body": "(/seq (Expr (BinOp #0 Add (Constant i10 None))))", @@ -130,7 +144,16 @@ "fn_1 (fn_0 (Name g_func1 Load))": "(/seq (Expr (BinOp (fn_0 (Name g_func1 Load)) Add (Constant i10 None))))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": { + "root_state": "seqS", + "metavariable_states": [ + "E" + ] + }, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/neurosym_match_at_tag.json b/data/expected_outputs/neurosym_match_at_tag.json index 76c7b2bd..b111e6c3 100644 --- a/data/expected_outputs/neurosym_match_at_tag.json +++ b/data/expected_outputs/neurosym_match_at_tag.json @@ -1,91 +1,106 @@ { - "cmd": "/home/kavi/mit/stitch/target/release/deps/integration_tests-782ce716bce4ad30", - "args": { - "iterations": 3, - "abstraction_prefix": "fn_", - "previous_abstractions": 0, - "shuffle": false, - "truncate": null, - "no_opt": false, - "silent": false, - "verbose_rewrite": false, - "step": { - "max_arity": 2, - "threads": 1, - "no_stats": false, - "batch": 1, - "dynamic_batch": false, - "eta_long": false, - "no_curried_metavars": false, - "no_curried_bodies": false, - "inv_candidates": 1, - "hole_choice": "DepthFirst", - "cost": { - "cost_lam": 1, - "cost_app": 1, - "cost_var": 100, - "cost_ivar": 100, - "cost_prim_default": 100 - }, - "no_mismatch_check": false, - "follow": null, - "follow_prune": false, - "verbose_worklist": false, - "verbose_best": false, - "print_stats": 0, - "show_rewritten": false, - "rewritten_dreamcoder": false, - "rewritten_intermediates": false, - "inv_arg_cap": false, - "allow_single_task": false, - "no_opt_single_use": false, - "no_opt_upper_bound": false, - "no_opt_force_multiuse": false, - "no_opt_useless_abstract": false, - "no_opt_arity_zero": false, - "no_other_util": false, - "structure_penalty": 1.0, - "rewrite_check": false, - "utility_by_rewrite": false, - "dreamcoder_comparison": false, - "quiet": false, - "fused_lambda_tags": { - "tags": null - } - } - }, - "original_cost": 810, - "final_cost": 202, - "compression_ratio": 4.00990099009901, - "num_abstractions": 1, - "original": [ - "(lam_1 (lam_2 (+ a b c)))", - "(lam_3 (lam_2 (+ a b c)))" - ], - "rewritten": [ - "(lam_1 fn_0)", - "(lam_3 fn_0)" - ], - "rewritten_dreamcoder": null, - "abstractions": [ + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 3, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 2, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": false, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, + "original_cost": 810, + "final_cost": 202, + "compression_ratio": 4.00990099009901, + "num_abstractions": 1, + "original": [ + "(lam_1 (lam_2 (+ a b c)))", + "(lam_3 (lam_2 (+ a b c)))" + ], + "rewritten": [ + "(lam_1 fn_0)", + "(lam_3 fn_0)" + ], + "rewritten_dreamcoder": null, + "abstractions": [ + { + "body": "(lam_2 (+ a b c))", + "dreamcoder": "#(lambda_2 (+ a b c))", + "arity": 0, + "name": "fn_0", + "utility": 204, + "final_cost": 202, + "compression_ratio": 4.00990099009901, + "cumulative_compression_ratio": 4.00990099009901, + "num_uses": 2, + "rewritten": null, + "rewritten_dreamcoder": null, + "uses": [ { - "body": "(lam_2 (+ a b c))", - "dreamcoder": "#(lambda_2 (+ a b c))", - "arity": 0, - "name": "fn_0", - "utility": 204, - "final_cost": 202, - "compression_ratio": 4.00990099009901, - "cumulative_compression_ratio": 4.00990099009901, - "num_uses": 2, - "rewritten": null, - "rewritten_dreamcoder": null, - "uses": [ - { - "fn_0 ": "(lam_2 (+ a b c))" - } - ], - "dc_comparison_millis": null + "fn_0 ": "(lam_2 (+ a b c))" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] + } + ] } \ No newline at end of file diff --git a/data/expected_outputs/neurosym_match_at_tag_excluded.json b/data/expected_outputs/neurosym_match_at_tag_excluded.json index c215bb22..f35f7092 100644 --- a/data/expected_outputs/neurosym_match_at_tag_excluded.json +++ b/data/expected_outputs/neurosym_match_at_tag_excluded.json @@ -1,93 +1,108 @@ { - "cmd": "/home/kavi/mit/stitch/target/release/deps/integration_tests-782ce716bce4ad30", - "args": { - "iterations": 3, - "abstraction_prefix": "fn_", - "previous_abstractions": 0, - "shuffle": false, - "truncate": null, - "no_opt": false, - "silent": false, - "verbose_rewrite": false, - "step": { - "max_arity": 2, - "threads": 1, - "no_stats": false, - "batch": 1, - "dynamic_batch": false, - "eta_long": false, - "no_curried_metavars": false, - "no_curried_bodies": false, - "inv_candidates": 1, - "hole_choice": "DepthFirst", - "cost": { - "cost_lam": 1, - "cost_app": 1, - "cost_var": 100, - "cost_ivar": 100, - "cost_prim_default": 100 - }, - "no_mismatch_check": false, - "follow": null, - "follow_prune": false, - "verbose_worklist": false, - "verbose_best": false, - "print_stats": 0, - "show_rewritten": false, - "rewritten_dreamcoder": false, - "rewritten_intermediates": false, - "inv_arg_cap": false, - "allow_single_task": false, - "no_opt_single_use": false, - "no_opt_upper_bound": false, - "no_opt_force_multiuse": false, - "no_opt_useless_abstract": false, - "no_opt_arity_zero": false, - "no_other_util": false, - "structure_penalty": 1.0, - "rewrite_check": false, - "utility_by_rewrite": false, - "dreamcoder_comparison": false, - "quiet": false, - "fused_lambda_tags": { - "tags": [ - 2 - ] - } - } - }, - "original_cost": 810, - "final_cost": 204, - "compression_ratio": 3.9705882352941178, - "num_abstractions": 1, - "original": [ - "(lam_1 (lam_2 (+ a b c)))", - "(lam_3 (lam_2 (+ a b c)))" - ], - "rewritten": [ - "(lam_1 (lam_2 fn_0))", - "(lam_3 (lam_2 fn_0))" - ], - "rewritten_dreamcoder": null, - "abstractions": [ + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 3, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 2, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": false, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": [ + 2 + ] + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, + "original_cost": 810, + "final_cost": 204, + "compression_ratio": 3.9705882352941178, + "num_abstractions": 1, + "original": [ + "(lam_1 (lam_2 (+ a b c)))", + "(lam_3 (lam_2 (+ a b c)))" + ], + "rewritten": [ + "(lam_1 (lam_2 fn_0))", + "(lam_3 (lam_2 fn_0))" + ], + "rewritten_dreamcoder": null, + "abstractions": [ + { + "body": "(+ a b c)", + "dreamcoder": "#(+ a b c)", + "arity": 0, + "name": "fn_0", + "utility": 203, + "final_cost": 204, + "compression_ratio": 3.9705882352941178, + "cumulative_compression_ratio": 3.9705882352941178, + "num_uses": 2, + "rewritten": null, + "rewritten_dreamcoder": null, + "uses": [ { - "body": "(+ a b c)", - "dreamcoder": "#(+ a b c)", - "arity": 0, - "name": "fn_0", - "utility": 203, - "final_cost": 204, - "compression_ratio": 3.9705882352941178, - "cumulative_compression_ratio": 3.9705882352941178, - "num_uses": 2, - "rewritten": null, - "rewritten_dreamcoder": null, - "uses": [ - { - "fn_0 ": "(+ a b c)" - } - ], - "dc_comparison_millis": null + "fn_0 ": "(+ a b c)" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] + } + ] } \ No newline at end of file diff --git a/data/expected_outputs/neurosym_metavariable_with_tag.json b/data/expected_outputs/neurosym_metavariable_with_tag.json index 8006782e..84bdc14d 100644 --- a/data/expected_outputs/neurosym_metavariable_with_tag.json +++ b/data/expected_outputs/neurosym_metavariable_with_tag.json @@ -1,94 +1,111 @@ { - "cmd": "/home/kavi/mit/stitch/target/release/deps/integration_tests-782ce716bce4ad30", - "args": { - "iterations": 3, - "abstraction_prefix": "fn_", - "previous_abstractions": 0, - "shuffle": false, - "truncate": null, - "no_opt": false, - "silent": false, - "verbose_rewrite": false, - "step": { - "max_arity": 2, - "threads": 1, - "no_stats": false, - "batch": 1, - "dynamic_batch": false, - "eta_long": false, - "no_curried_metavars": false, - "no_curried_bodies": false, - "inv_candidates": 1, - "hole_choice": "DepthFirst", - "cost": { - "cost_lam": 1, - "cost_app": 1, - "cost_var": 100, - "cost_ivar": 100, - "cost_prim_default": 100 - }, - "no_mismatch_check": false, - "follow": null, - "follow_prune": false, - "verbose_worklist": false, - "verbose_best": false, - "print_stats": 0, - "show_rewritten": false, - "rewritten_dreamcoder": false, - "rewritten_intermediates": false, - "inv_arg_cap": false, - "allow_single_task": false, - "no_opt_single_use": false, - "no_opt_upper_bound": false, - "no_opt_force_multiuse": false, - "no_opt_useless_abstract": false, - "no_opt_arity_zero": false, - "no_other_util": false, - "structure_penalty": 1.0, - "rewrite_check": false, - "utility_by_rewrite": false, - "dreamcoder_comparison": false, - "quiet": false, - "fused_lambda_tags": { - "tags": null - } - } - }, - "original_cost": 1214, - "final_cost": 404, - "compression_ratio": 3.004950495049505, - "num_abstractions": 1, - "original": [ - "(lam_1 (+ 2 3 4 (lam_2 a) 5))", - "(lam_1 (+ 2 3 4 (lam_3 b) 5))" - ], - "rewritten": [ - "(fn_0 (lam_2 a))", - "(fn_0 (lam_3 b))" - ], - "rewritten_dreamcoder": null, - "abstractions": [ + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 3, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 2, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": false, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, + "original_cost": 1214, + "final_cost": 404, + "compression_ratio": 3.004950495049505, + "num_abstractions": 1, + "original": [ + "(lam_1 (+ 2 3 4 (lam_2 a) 5))", + "(lam_1 (+ 2 3 4 (lam_3 b) 5))" + ], + "rewritten": [ + "(fn_0 (lam_2 a))", + "(fn_0 (lam_3 b))" + ], + "rewritten_dreamcoder": null, + "abstractions": [ + { + "body": "(lam_1 (+ 2 3 4 #0 5))", + "dreamcoder": "#(lambda (lambda_1 (+ 2 3 4 $1 5)))", + "arity": 1, + "name": "fn_0", + "utility": 304, + "final_cost": 404, + "compression_ratio": 3.004950495049505, + "cumulative_compression_ratio": 3.004950495049505, + "num_uses": 2, + "rewritten": null, + "rewritten_dreamcoder": null, + "uses": [ + { + "fn_0 (lam_2 a)": "(lam_1 (+ 2 3 4 (lam_2 a) 5))" + }, { - "body": "(lam_1 (+ 2 3 4 #0 5))", - "dreamcoder": "#(lambda (lambda_1 (+ 2 3 4 $1 5)))", - "arity": 1, - "name": "fn_0", - "utility": 304, - "final_cost": 404, - "compression_ratio": 3.004950495049505, - "cumulative_compression_ratio": 3.004950495049505, - "num_uses": 2, - "rewritten": null, - "rewritten_dreamcoder": null, - "uses": [ - { - "fn_0 (lam_2 a)": "(lam_1 (+ 2 3 4 (lam_2 a) 5))" - }, - { - "fn_0 (lam_3 b)": "(lam_1 (+ 2 3 4 (lam_3 b) 5))" - } - ], - "dc_comparison_millis": null + "fn_0 (lam_3 b)": "(lam_1 (+ 2 3 4 (lam_3 b) 5))" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" + ] + } + ] } \ No newline at end of file diff --git a/data/expected_outputs/neurosym_metavariable_with_tag_excluded.json b/data/expected_outputs/neurosym_metavariable_with_tag_excluded.json index d2f3cc8e..d9268b69 100644 --- a/data/expected_outputs/neurosym_metavariable_with_tag_excluded.json +++ b/data/expected_outputs/neurosym_metavariable_with_tag_excluded.json @@ -1,93 +1,108 @@ { - "cmd": "/home/kavi/mit/stitch/target/release/deps/integration_tests-782ce716bce4ad30", - "args": { - "iterations": 3, - "abstraction_prefix": "fn_", - "previous_abstractions": 0, - "shuffle": false, - "truncate": null, - "no_opt": false, - "silent": false, - "verbose_rewrite": false, - "step": { - "max_arity": 2, - "threads": 1, - "no_stats": false, - "batch": 1, - "dynamic_batch": false, - "eta_long": false, - "no_curried_metavars": false, - "no_curried_bodies": false, - "inv_candidates": 1, - "hole_choice": "DepthFirst", - "cost": { - "cost_lam": 1, - "cost_app": 1, - "cost_var": 100, - "cost_ivar": 100, - "cost_prim_default": 100 - }, - "no_mismatch_check": false, - "follow": null, - "follow_prune": false, - "verbose_worklist": false, - "verbose_best": false, - "print_stats": 0, - "show_rewritten": false, - "rewritten_dreamcoder": false, - "rewritten_intermediates": false, - "inv_arg_cap": false, - "allow_single_task": false, - "no_opt_single_use": false, - "no_opt_upper_bound": false, - "no_opt_force_multiuse": false, - "no_opt_useless_abstract": false, - "no_opt_arity_zero": false, - "no_other_util": false, - "structure_penalty": 1.0, - "rewrite_check": false, - "utility_by_rewrite": false, - "dreamcoder_comparison": false, - "quiet": false, - "fused_lambda_tags": { - "tags": [ - 2 - ] - } - } - }, - "original_cost": 1214, - "final_cost": 608, - "compression_ratio": 1.9967105263157894, - "num_abstractions": 1, - "original": [ - "(lam_1 (+ 2 3 4 (lam_2 a) 5))", - "(lam_1 (+ 2 3 4 (lam_3 b) 5))" - ], - "rewritten": [ - "(lam_1 (fn_0 (lam_2 a) 5))", - "(lam_1 (fn_0 (lam_3 b) 5))" - ], - "rewritten_dreamcoder": null, - "abstractions": [ + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 3, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 2, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": false, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": [ + 2 + ] + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, + "original_cost": 1214, + "final_cost": 608, + "compression_ratio": 1.9967105263157894, + "num_abstractions": 1, + "original": [ + "(lam_1 (+ 2 3 4 (lam_2 a) 5))", + "(lam_1 (+ 2 3 4 (lam_3 b) 5))" + ], + "rewritten": [ + "(lam_1 (fn_0 (lam_2 a) 5))", + "(lam_1 (fn_0 (lam_3 b) 5))" + ], + "rewritten_dreamcoder": null, + "abstractions": [ + { + "body": "(+ 2 3 4)", + "dreamcoder": "#(+ 2 3 4)", + "arity": 0, + "name": "fn_0", + "utility": 203, + "final_cost": 608, + "compression_ratio": 1.9967105263157894, + "cumulative_compression_ratio": 1.9967105263157894, + "num_uses": 2, + "rewritten": null, + "rewritten_dreamcoder": null, + "uses": [ { - "body": "(+ 2 3 4)", - "dreamcoder": "#(+ 2 3 4)", - "arity": 0, - "name": "fn_0", - "utility": 203, - "final_cost": 608, - "compression_ratio": 1.9967105263157894, - "cumulative_compression_ratio": 1.9967105263157894, - "num_uses": 2, - "rewritten": null, - "rewritten_dreamcoder": null, - "uses": [ - { - "fn_0 ": "(+ 2 3 4)" - } - ], - "dc_comparison_millis": null + "fn_0 ": "(+ 2 3 4)" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] + } + ] } \ No newline at end of file diff --git a/data/expected_outputs/nuts-bolts-a3-i10.json b/data/expected_outputs/nuts-bolts-a3-i10.json index 2d3626f6..61aaeb78 100644 --- a/data/expected_outputs/nuts-bolts-a3-i10.json +++ b/data/expected_outputs/nuts-bolts-a3-i10.json @@ -1,5 +1,5 @@ { - "cmd": "/Users/maddy/proj/rust/stitch/target/release/deps/integration_tests-86577b075cb41836", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 10, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -615,7 +616,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(repeat (T (T #2 (M 0.5 0 0 0)) (M 1 0 (* #1 (cos (/ pi 4))) (* #1 (sin (/ pi 4))))) #0 (M 1 (/ (* 2 pi) #0) 0 0))", @@ -680,7 +685,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(T (T c (M 2 0 0 0)) (M #0 0 0 0))", @@ -715,7 +725,10 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M" + ] }, { "body": "(C #1 (T r (M #0 0 0 0)))", @@ -792,7 +805,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(C (fn_0 4 #1) (fn_0 #0 6))", @@ -824,7 +841,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(C #2 (fn_1 #1 1.5 #0))", @@ -1126,7 +1147,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C #2 (fn_1 #1 3 #0))", @@ -1428,7 +1454,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" + ] }, { "body": "(C #1 (fn_0 #0 6))", @@ -1496,7 +1527,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(C (fn_0 4 #1) (fn_2 #0))", @@ -1525,7 +1560,11 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" + ] }, { "body": "(fn_4 4.25 6)", @@ -1545,7 +1584,8 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/origami_0-a3-i10.json b/data/expected_outputs/origami_0-a3-i10.json index 98e35b0e..6c3d3897 100644 --- a/data/expected_outputs/origami_0-a3-i10.json +++ b/data/expected_outputs/origami_0-a3-i10.json @@ -1,5 +1,5 @@ { - "cmd": "/Users/matthewbowers/proj/rust/stitch/target/release/deps/integration_tests-38d27ecd504c7478", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 10, "abstraction_prefix": "fn_", @@ -8,23 +8,29 @@ "truncate": null, "no_opt": false, "silent": false, + "verbose_rewrite": false, "step": { "max_arity": 3, "threads": 1, "no_stats": false, "batch": 1, "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, "inv_candidates": 1, "hole_choice": "DepthFirst", - "cost": "Dreamcoder", - "cost_lam": null, - "cost_app": null, - "cost_var": null, - "cost_ivar": null, - "cost_prim_default": null, + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, "no_mismatch_check": false, - "no_top_lambda": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -33,17 +39,32 @@ "rewritten_dreamcoder": false, "rewritten_intermediates": false, "inv_arg_cap": false, - "no_opt_single_use": false, "allow_single_task": false, + "no_opt_single_use": false, "no_opt_upper_bound": false, "no_opt_force_multiuse": false, "no_opt_useless_abstract": false, "no_opt_arity_zero": false, "no_other_util": false, + "structure_penalty": 1.0, "rewrite_check": true, "utility_by_rewrite": false, "dreamcoder_comparison": false, - "quiet": false + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } } }, "original_cost": 15273, @@ -176,6 +197,13 @@ { "fn_0 $0 $1 empty": "(if (empty? (cdr $0)) empty ($1 (cdr $0)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" ] }, { @@ -197,6 +225,12 @@ { "fn_1 + (- 0)": "(lam (fix1 $0 (lam (lam (if (eq? 0 $0) empty (cons (- 0 $0) ($1 (+ $0 1))))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -353,6 +387,11 @@ { "fn_2 (lam (lam (if (gt? 0 $0) (cons (- 0 $0) ($1 (+ 1 $0))) empty)))": "(lam (fix1 $0 (lam (lam (if (gt? 0 $0) (cons (- 0 $0) ($1 (+ 1 $0))) empty)))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -377,6 +416,13 @@ { "fn_3 $0 $1 (- 0)": "(if (empty? $0) $0 (cons (- 0 (car $0)) ($1 (cdr $0))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" ] }, { @@ -398,6 +444,13 @@ { "fn_4 $0 $1 (cons (car $0))": "(if (empty? $0) $0 (cons (car $0) (cons (car $0) ($1 (cdr $0)))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" ] }, { @@ -419,6 +472,12 @@ { "fn_5 (cons 0 empty) cons": "(fn_2 (lam (lam (cons (car $0) (fn_0 $0 $1 (cons 0 empty))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -440,6 +499,12 @@ { "fn_6 cons fn_4": "(fn_2 (lam (lam (fn_4 $0 $1 (cons (car $0))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -461,6 +526,11 @@ { "fn_7 (- 0)": "(fn_2 (lam (lam (fn_3 $0 $1 (- 0)))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -479,7 +549,10 @@ { "fn_8 ": "(+ 1)" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(if (empty? #0) empty (#2 (#1 #0)))", @@ -500,6 +573,13 @@ { "fn_9 (cdr $0) $1 (cons (car $0))": "(if (empty? (cdr $0)) empty (cons (car $0) ($1 (cdr $0))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" ] } ] diff --git a/data/expected_outputs/origami_1-a3-i10.json b/data/expected_outputs/origami_1-a3-i10.json index 85701149..fd3c4c9e 100644 --- a/data/expected_outputs/origami_1-a3-i10.json +++ b/data/expected_outputs/origami_1-a3-i10.json @@ -1,5 +1,5 @@ { - "cmd": "/Users/matthewbowers/proj/rust/stitch/target/release/deps/integration_tests-38d27ecd504c7478", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 10, "abstraction_prefix": "fn_", @@ -8,23 +8,29 @@ "truncate": null, "no_opt": false, "silent": false, + "verbose_rewrite": false, "step": { "max_arity": 3, "threads": 1, "no_stats": false, "batch": 1, "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, "inv_candidates": 1, "hole_choice": "DepthFirst", - "cost": "Dreamcoder", - "cost_lam": null, - "cost_app": null, - "cost_var": null, - "cost_ivar": null, - "cost_prim_default": null, + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, "no_mismatch_check": false, - "no_top_lambda": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -33,17 +39,32 @@ "rewritten_dreamcoder": false, "rewritten_intermediates": false, "inv_arg_cap": false, - "no_opt_single_use": false, "allow_single_task": false, + "no_opt_single_use": false, "no_opt_upper_bound": false, "no_opt_force_multiuse": false, "no_opt_useless_abstract": false, "no_opt_arity_zero": false, "no_other_util": false, + "structure_penalty": 1.0, "rewrite_check": true, "utility_by_rewrite": false, "dreamcoder_comparison": false, - "quiet": false + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } } }, "original_cost": 13267, @@ -247,6 +268,13 @@ { "fn_3 (+ $0 1) + 0": "(dreamcoder_abstraction_1 0 (lam (+ $0 1)) (lam $0) (lam (eq? $0 (+ $1 1))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M", + "M" ] }, { @@ -268,6 +296,12 @@ { "fn_4 1 gt?": "(lam (dreamcoder_abstraction_0 $0 (lam (lam (if (gt? $0 1) $1 (cons $0 $1)))) empty))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -286,7 +320,10 @@ { "fn_5 ": "(lam (dreamcoder_abstraction_0 $0 (lam (lam (+ $1 1))) 0))" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(lam (fn_3 #0 - (#1 #0 $0)))", @@ -307,6 +344,12 @@ { "fn_6 1 +": "(lam (fn_3 1 - (+ 1 $0)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -373,6 +416,11 @@ { "fn_7 fn_5": "(lam (dreamcoder_abstraction_2 $0 fn_5))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -406,6 +454,12 @@ { "fn_8 (cons 0 empty) cons": "(lam (dreamcoder_abstraction_0 $0 (lam (lam (cons $0 $1))) (cons 0 empty)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -433,6 +487,12 @@ { "fn_9 (lam (empty? (cdr $0))) (lam (dreamcoder_abstraction_2 (cdr $0) (lam $0)))": "(lam (dreamcoder_abstraction_1 $0 (lam (dreamcoder_abstraction_2 (cdr $0) (lam $0))) (lam (car $0)) (lam (empty? (cdr $0)))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -454,6 +514,11 @@ { "fn_10 (+ $0 1)": "(fn_3 (+ $0 1) + 0)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -481,6 +546,12 @@ { "fn_11 (dreamcoder_abstraction_2 $1 (lam $0)) (cons $0)": "(cons $0 (cons $0 (dreamcoder_abstraction_2 $1 (lam $0))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -508,6 +579,11 @@ { "fn_12 (- 0)": "(fn_7 (lam (- 0 $0)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/origami_2-a3-i10.json b/data/expected_outputs/origami_2-a3-i10.json index 078a3265..361102f9 100644 --- a/data/expected_outputs/origami_2-a3-i10.json +++ b/data/expected_outputs/origami_2-a3-i10.json @@ -1,5 +1,5 @@ { - "cmd": "/Users/matthewbowers/proj/rust/stitch/target/release/deps/integration_tests-38d27ecd504c7478", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 10, "abstraction_prefix": "fn_", @@ -8,23 +8,29 @@ "truncate": null, "no_opt": false, "silent": false, + "verbose_rewrite": false, "step": { "max_arity": 3, "threads": 1, "no_stats": false, "batch": 1, "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, "inv_candidates": 1, "hole_choice": "DepthFirst", - "cost": "Dreamcoder", - "cost_lam": null, - "cost_app": null, - "cost_var": null, - "cost_ivar": null, - "cost_prim_default": null, + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, "no_mismatch_check": false, - "no_top_lambda": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -33,17 +39,32 @@ "rewritten_dreamcoder": false, "rewritten_intermediates": false, "inv_arg_cap": false, - "no_opt_single_use": false, "allow_single_task": false, + "no_opt_single_use": false, "no_opt_upper_bound": false, "no_opt_force_multiuse": false, "no_opt_useless_abstract": false, "no_opt_arity_zero": false, "no_other_util": false, + "structure_penalty": 1.0, "rewrite_check": true, "utility_by_rewrite": false, "dreamcoder_comparison": false, - "quiet": false + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } } }, "original_cost": 9923, @@ -255,6 +276,11 @@ { "fn_9 1": "(lam (lam (car (dreamcoder_abstraction_0 (dreamcoder_abstraction_8 (lam $2) 1) (lam (lam (cdr $1))) $0))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -321,6 +347,11 @@ { "fn_10 (lam (dreamcoder_abstraction_2 (dreamcoder_abstraction_7 (dreamcoder_abstraction_2 $0))))": "(lam (dreamcoder_abstraction_3 $0 (lam (dreamcoder_abstraction_2 (dreamcoder_abstraction_7 (dreamcoder_abstraction_2 $0))))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -354,6 +385,12 @@ { "fn_11 (cons 0 empty) cons": "(lam (dreamcoder_abstraction_0 $0 (lam (lam (cons $0 $1))) (cons 0 empty)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -384,6 +421,11 @@ { "fn_12 dreamcoder_abstraction_2": "(fn_10 (lam (dreamcoder_abstraction_2 $0)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] }, { @@ -408,6 +450,12 @@ { "fn_13 1 gt?": "(lam (dreamcoder_abstraction_5 (lam (gt? $0 1)) $0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -429,6 +477,12 @@ { "fn_14 0 -": "(lam (dreamcoder_abstraction_8 (lam (- $0 $1)) 0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -456,6 +510,12 @@ { "fn_15 (dreamcoder_abstraction_3 $1 (lam $0)) (cons $0)": "(cons $0 (cons $0 (dreamcoder_abstraction_3 $1 (lam $0))))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -474,7 +534,10 @@ { "fn_16 ": "(+ 1)" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/pick-up-on-abstractions-0-arity.json b/data/expected_outputs/pick-up-on-abstractions-0-arity.json index fa35a2b1..e4aa3bfe 100644 --- a/data/expected_outputs/pick-up-on-abstractions-0-arity.json +++ b/data/expected_outputs/pick-up-on-abstractions-0-arity.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-56fda90633a32865 symbols_basic", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -58,7 +59,8 @@ "tdfa_root": "M", "valid_metavars": "[\"S\",\"E\",\"seqS\"]", "valid_roots": "[\"S\",\"E\",\"seqS\"]", - "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}" + "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}", + "tdfa_split": "~" }, "symvar": { "symvar_prefix": "&" @@ -103,7 +105,11 @@ "Name", "Name" ] - } + }, + "variable_types": [ + "S", + "S" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/simple1-a1-i1.json b/data/expected_outputs/simple1-a1-i1.json index d7277d3a..874689ca 100644 --- a/data/expected_outputs/simple1-a1-i1.json +++ b/data/expected_outputs/simple1-a1-i1.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 1, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 604, "final_cost": 402, "compression_ratio": 1.5024875621890548, @@ -14,7 +80,6 @@ "(fn_0 b)" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(#0 #0 #0)", @@ -35,6 +100,11 @@ { "fn_0 b": "(b b b)" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/simple2-a1-i1.json b/data/expected_outputs/simple2-a1-i1.json index 9c5390e5..c173cb40 100644 --- a/data/expected_outputs/simple2-a1-i1.json +++ b/data/expected_outputs/simple2-a1-i1.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 1, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 606, "final_cost": 402, "compression_ratio": 1.507462686567164, @@ -14,7 +80,6 @@ "(fn_0 b)" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(#0 (lam (#0 #0)))", @@ -35,6 +100,11 @@ { "fn_0 b": "(b (lam (b b)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/simple3-a1-i1.json b/data/expected_outputs/simple3-a1-i1.json index 7bb76877..95fecb5c 100644 --- a/data/expected_outputs/simple3-a1-i1.json +++ b/data/expected_outputs/simple3-a1-i1.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 1, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 606, "final_cost": 402, "compression_ratio": 1.507462686567164, @@ -14,7 +80,6 @@ "(fn_0 b)" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(#0 (lam_1 (#0 #0)))", @@ -35,6 +100,11 @@ { "fn_0 b": "(b (lam_1 (b b)))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" ] } ] diff --git a/data/expected_outputs/simple4-a1-i1.json b/data/expected_outputs/simple4-a1-i1.json index 14827275..968cde99 100644 --- a/data/expected_outputs/simple4-a1-i1.json +++ b/data/expected_outputs/simple4-a1-i1.json @@ -1,4 +1,72 @@ { + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 1, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 808, "final_cost": 402, "compression_ratio": 2.009950248756219, @@ -33,7 +101,11 @@ "fn_0 b": "(b (lam_1 (b $0_1 $0_1)))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/simple5-a1-i1.json b/data/expected_outputs/simple5-a1-i1.json index fac27766..8d95496a 100644 --- a/data/expected_outputs/simple5-a1-i1.json +++ b/data/expected_outputs/simple5-a1-i1.json @@ -1,4 +1,72 @@ { + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 1, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 808, "final_cost": 808, "compression_ratio": 1.0, diff --git a/data/expected_outputs/symbol-reuse-dfa.json b/data/expected_outputs/symbol-reuse-dfa.json index 106b6c10..5332a0bb 100644 --- a/data/expected_outputs/symbol-reuse-dfa.json +++ b/data/expected_outputs/symbol-reuse-dfa.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-e3a9d4911874cf31 symbols_basic", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -58,7 +59,11 @@ "tdfa_root": "M", "valid_metavars": "[\"S\",\"E\",\"seqS\"]", "valid_roots": "[\"S\",\"E\",\"seqS\"]", - "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}" + "tdfa_non_eta_long_states": "{\"seqS\":\"S\"}", + "tdfa_split": "~" + }, + "symvar": { + "symvar_prefix": "&" } } }, @@ -104,7 +109,12 @@ "Name", "Name" ] - } + }, + "variable_types": [ + "S", + "S", + "S" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbol-reuse.json b/data/expected_outputs/symbol-reuse.json index 16f2a46d..e0be7bb3 100644 --- a/data/expected_outputs/symbol-reuse.json +++ b/data/expected_outputs/symbol-reuse.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-e3a9d4911874cf31 symbols_basic", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -54,11 +55,15 @@ "tags": null }, "tdfa": { - "tdfa_json_path": "", - "tdfa_root": "", - "valid_metavars": "", - "valid_roots": "", - "tdfa_non_eta_long_states": "" + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": "&" } } }, @@ -99,7 +104,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "S", + "S", + "S" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbol_weighting_1_default.json b/data/expected_outputs/symbol_weighting_1_default.json index 97c771b0..c9abd6c7 100644 --- a/data/expected_outputs/symbol_weighting_1_default.json +++ b/data/expected_outputs/symbol_weighting_1_default.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-f95e5967f904c08a symbol_weighting_test", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -52,6 +53,17 @@ "quiet": false, "fused_lambda_tags": { "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null } } }, @@ -90,7 +102,9 @@ "fn_0 ": "(+ (+ 1 2) (+ 3 4))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbol_weighting_1_h_200.json b/data/expected_outputs/symbol_weighting_1_h_200.json index 948bbd90..387e4a50 100644 --- a/data/expected_outputs/symbol_weighting_1_h_200.json +++ b/data/expected_outputs/symbol_weighting_1_h_200.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-f95e5967f904c08a symbol_weighting_test", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -52,6 +53,17 @@ "quiet": false, "fused_lambda_tags": { "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null } } }, @@ -90,7 +102,9 @@ "fn_0 ": "(+ (+ 1 2) (+ 3 4))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbol_weighting_1_h_202.json b/data/expected_outputs/symbol_weighting_1_h_202.json index ade6bb95..076f950f 100644 --- a/data/expected_outputs/symbol_weighting_1_h_202.json +++ b/data/expected_outputs/symbol_weighting_1_h_202.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-f95e5967f904c08a symbol_weighting_test", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -52,6 +53,17 @@ "quiet": false, "fused_lambda_tags": { "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null } } }, @@ -90,7 +102,9 @@ "fn_0 ": "(* (/ 5 6) (& H))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbol_weighting_2_default.json b/data/expected_outputs/symbol_weighting_2_default.json index 4457b8bc..5736b27a 100644 --- a/data/expected_outputs/symbol_weighting_2_default.json +++ b/data/expected_outputs/symbol_weighting_2_default.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-f95e5967f904c08a symbol_weighting_test_lower_weight", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -52,6 +53,17 @@ "quiet": false, "fused_lambda_tags": { "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null } } }, @@ -90,7 +102,9 @@ "fn_0 ": "(* (/ 5 6) (& L1 L2 L3))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbol_weighting_2_l_60.json b/data/expected_outputs/symbol_weighting_2_l_60.json index 02319ca3..d6aa5599 100644 --- a/data/expected_outputs/symbol_weighting_2_l_60.json +++ b/data/expected_outputs/symbol_weighting_2_l_60.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-f95e5967f904c08a symbol_weighting_test_lower_weight", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -52,6 +53,17 @@ "quiet": false, "fused_lambda_tags": { "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null } } }, @@ -90,7 +102,9 @@ "fn_0 ": "(+ (+ 1 2) (+ 3 4))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbol_weighting_2_l_67.json b/data/expected_outputs/symbol_weighting_2_l_67.json index 937a7e89..e7f24ece 100644 --- a/data/expected_outputs/symbol_weighting_2_l_67.json +++ b/data/expected_outputs/symbol_weighting_2_l_67.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-f95e5967f904c08a symbol_weighting_test_lower_weight", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 1, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -52,6 +53,17 @@ "quiet": false, "fused_lambda_tags": { "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null } } }, @@ -90,7 +102,9 @@ "fn_0 ": "(* (/ 5 6) (& L1 L2 L3))" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbols-alignment.json b/data/expected_outputs/symbols-alignment.json index 00f877be..86d1da91 100644 --- a/data/expected_outputs/symbols-alignment.json +++ b/data/expected_outputs/symbols-alignment.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-e3a9d4911874cf31 symbols_basic", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 2, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -54,11 +55,15 @@ "tags": null }, "tdfa": { - "tdfa_json_path": "", - "tdfa_root": "", - "valid_metavars": "", - "valid_roots": "", - "tdfa_non_eta_long_states": "" + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": "&" } } }, @@ -96,7 +101,19 @@ "fn_0 &y9 &y8 &y7 &y6 &y5 &y4 &y3 &y2 &y1": "(+ 1 &y1 2 &y2 3 &y3 4 &y4 5 &y5 6 &y6 7 &y7 8 &y8 9 &y9 10)" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "S", + "S", + "M", + "S", + "S", + "S", + "M", + "S" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbols-cannot-be-literal-0-arity.json b/data/expected_outputs/symbols-cannot-be-literal-0-arity.json index 5228b916..d5705a85 100644 --- a/data/expected_outputs/symbols-cannot-be-literal-0-arity.json +++ b/data/expected_outputs/symbols-cannot-be-literal-0-arity.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-56fda90633a32865 symbols_basic", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 2, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -54,11 +55,12 @@ "tags": null }, "tdfa": { - "tdfa_json_path": "", - "tdfa_root": "", - "valid_metavars": "", - "valid_roots": "", - "tdfa_non_eta_long_states": "" + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null }, "symvar": { "symvar_prefix": "&" @@ -97,7 +99,12 @@ } ], "dc_comparison_millis": null, - "tdfa_annotation": null + "tdfa_annotation": null, + "variable_types": [ + "S", + "S", + "S" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/symbols-cannot-be-literal.json b/data/expected_outputs/symbols-cannot-be-literal.json index 641c72da..42b7fb40 100644 --- a/data/expected_outputs/symbols-cannot-be-literal.json +++ b/data/expected_outputs/symbols-cannot-be-literal.json @@ -1,5 +1,5 @@ { - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-e3a9d4911874cf31 symbols_basic", + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", "args": { "iterations": 2, "abstraction_prefix": "fn_", @@ -30,6 +30,7 @@ }, "no_mismatch_check": false, "follow": null, + "follow_types": null, "follow_prune": false, "verbose_worklist": false, "verbose_best": false, @@ -54,11 +55,15 @@ "tags": null }, "tdfa": { - "tdfa_json_path": "", - "tdfa_root": "", - "valid_metavars": "", - "valid_roots": "", - "tdfa_non_eta_long_states": "" + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": "&" } } }, @@ -96,7 +101,13 @@ "fn_0 &c2 &b &a": "(+ 1 2 3 &a &b &c2 4 5 6 7 8 9 10)" } ], - "dc_comparison_millis": null + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "S", + "S" + ] } ] } \ No newline at end of file diff --git a/data/expected_outputs/wheels-a2-i10.json b/data/expected_outputs/wheels-a2-i10.json index 3fcbf443..d9cf38d9 100644 --- a/data/expected_outputs/wheels-a2-i10.json +++ b/data/expected_outputs/wheels-a2-i10.json @@ -1,6 +1,72 @@ { - "cmd": null, - "args": null, + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-21175b69aaefd7be", + "args": { + "iterations": 10, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 2, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": null, + "follow_types": null, + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": true, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": null + } + } + }, "original_cost": 3577776, "final_cost": 974804, "compression_ratio": 3.6702516608466933, @@ -510,7 +576,6 @@ "(C (C (C (C (fn_2 -6 (fn_6 1.6875 (r_s 2 3.375))) (fn_2 0 (fn_6 2.25 (r_s 10 4.5)))) (fn_2 6 (fn_6 1.6875 (r_s 2 3.375)))) (fn_6 5 (r_s 7.5 1))) (fn_2 -3.375 (fn_5 6.75 (repeat (C (C (C (fn_1 2.25 c) (fn_1 2.75 c)) (fn_1 0.5 r)) (fn_3 1.5708 4)) 2))))" ], "rewritten_dreamcoder": null, - "test_output": null, "abstractions": [ { "body": "(M 1 0)", @@ -528,7 +593,10 @@ { "fn_0 ": "(M 1 0)" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(T #1 (M #0 0 0 0))", @@ -579,6 +647,12 @@ { "fn_1 1.5 r": "(T r (M 1.5 0 0 0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1086,6 +1160,12 @@ { "fn_2 -0.5 l": "(T l (fn_0 -0.5 0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1107,6 +1187,12 @@ { "fn_3 0.785398 8": "(repeat (T (fn_1 0.25 c) (fn_0 0.53033 0.53033)) 8 (M 1 0.785398 0 0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1128,6 +1214,12 @@ { "fn_4 0 fn_2": "(T (C (C (C (fn_2 0 (fn_2 0 (T l (M 3 1.5708 0 -2)))) (T (fn_1 2 (fn_2 -0.5 l)) (fn_0 0 1))) (fn_2 0 (fn_2 0 (fn_2 -0.5 l)))) (T (fn_1 0 (fn_2 -0.5 l)) (fn_0 0 -1))) (fn_0 0 8))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1512,6 +1604,12 @@ { "fn_5 17 (repeat (fn_2 -1.625 (repeat (C (C (C (fn_1 2.25 c) (fn_1 2.75 c)) (fn_1 0.5 r)) (fn_3 1.5708 4)) 2 (fn_0 3.25 0))) 2)": "(repeat (repeat (fn_2 -1.625 (repeat (C (C (C (fn_1 2.25 c) (fn_1 2.75 c)) (fn_1 0.5 r)) (fn_3 1.5708 4)) 2 (fn_0 3.25 0))) 2 (fn_0 17 0)) 1 (fn_0 0 0))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1578,6 +1676,12 @@ { "fn_6 2.5 (r_s 9 5)": "(T (r_s 9 5) (fn_0 0 2.5))" } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "M", + "M" ] }, { @@ -1596,7 +1700,10 @@ { "fn_7 ": "(C (C (C (C (C (fn_2 -11.75 (fn_6 1.875 (r_s 1.5 3.75))) (fn_2 -7.25 (fn_6 2.5 (r_s 7 5)))) (fn_2 0 (fn_6 2.5 (r_s 7 5)))) (fn_2 7.25 (fn_6 2.5 (r_s 7 5)))) (fn_2 11.75 (fn_6 1.875 (r_s 1.5 3.75)))))" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(C (C (C (C (fn_2 -8.125 (fn_6 1.875 (r_s 1.5 3.75))) (fn_2 -3.625 (fn_6 2.5 (r_s 7 5)))) (fn_2 3.625 (fn_6 2.5 (r_s 7 5)))) (fn_2 8.125 (fn_6 1.875 (r_s 1.5 3.75)))))", @@ -1614,7 +1721,10 @@ { "fn_8 ": "(C (C (C (C (fn_2 -8.125 (fn_6 1.875 (r_s 1.5 3.75))) (fn_2 -3.625 (fn_6 2.5 (r_s 7 5)))) (fn_2 3.625 (fn_6 2.5 (r_s 7 5)))) (fn_2 8.125 (fn_6 1.875 (r_s 1.5 3.75)))))" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] }, { "body": "(C (C (C (C (fn_2 -10.125 (fn_6 1.875 (r_s 1.5 3.75))) (fn_2 -4.625 (fn_6 2.5 (r_s 9 5)))) (fn_2 4.625 (fn_6 2.5 (r_s 9 5)))) (fn_2 10.125 (fn_6 1.875 (r_s 1.5 3.75)))))", @@ -1632,7 +1742,10 @@ { "fn_9 ": "(C (C (C (C (fn_2 -10.125 (fn_6 1.875 (r_s 1.5 3.75))) (fn_2 -4.625 (fn_6 2.5 (r_s 9 5)))) (fn_2 4.625 (fn_6 2.5 (r_s 9 5)))) (fn_2 10.125 (fn_6 1.875 (r_s 1.5 3.75)))))" } - ] + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [] } ] } \ No newline at end of file From 31b7057c4a7e46f9e3b988cf706f725e3087a4c1 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:38:22 -0400 Subject: [PATCH 29/47] render variable types --- src/compression.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 4dcfc1d9..91fd7cab 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -133,7 +133,7 @@ pub struct CompressionStepConfig { pub follow: Option, /// Variable types for the `follow` invention. Use M for metavariable and S for symbolic variable. - #[clap(long)] + #[clap(long, value_parser, value_delimiter = ' ')] pub follow_types: Option>, /// For use with `follow`, enables aggressive pruning. Useful for ensuring that it is *possible* to find a particular @@ -764,7 +764,11 @@ impl Invention { impl Display for Invention { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - write!(f, "[{} arity={}: {}]", self.name, self.arity, self.body.immut()) + write!(f, "[{} arity={}: {}", self.name, self.arity, self.body.immut())?; + if self.variable_types.iter().any(|x| *x != VariableType::Metavar) { + write!(f, ", variable_types={}", self.variable_types.iter().map(|t| t.to_string()).collect::>().join(" "))?; + } + write!(f, "]") } } From 3de4e09abdaf2823c099da512c59b1c081831ab0 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 13:47:41 -0400 Subject: [PATCH 30/47] delete duplicate --- src/compression.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 153c95af..78ea8002 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -746,23 +746,6 @@ impl Invention { Some(Tracking { expr: self.body, zids_of_ivar, type_of_ivar: self.variable_types }) } - pub fn from_compression_output(output: &Value) -> Invention { - Invention { - body: { - let mut set = ExprSet::empty(Order::ChildFirst, false, false); - let idx = set.parse_extend(output["body"].as_str().unwrap()).unwrap(); - ExprOwned::new(set, idx) - }, - arity: output["arity"].as_u64().unwrap() as usize, - name: output["name"].as_str().unwrap().parse().unwrap(), - variable_types: if let Some(var_types) = output.get("variable_types") { - var_types.as_array().unwrap().iter().map(|v| VariableType::from_str(v.as_str().unwrap()).unwrap()).collect() - } else { - vec![VariableType::Metavar; output["arity"].as_u64().unwrap() as usize] - } - } - } - pub fn from_compression_output(output: &Value) -> Invention { let arity = output["arity"].as_u64().unwrap() as usize; Invention { From 9fc7de21f6a1c0968a6925b9109e6aced85194e7 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 14:29:35 -0400 Subject: [PATCH 31/47] delete unused field --- src/compression.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 78ea8002..506c420e 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -684,7 +684,6 @@ fn fused_lambda_location(set : &ExprSet, fused_lambda_tags: &Option>, - pub type_of_ivar: Vec, } impl CriticalMultithreadData { @@ -743,7 +742,7 @@ impl Invention { pub fn to_tracking(self, zid_of_zip: &FxHashMap, ZId>) -> Option { let zids_of_ivar = zids_of_ivar_of_expr(&self.body, zid_of_zip)?; - Some(Tracking { expr: self.body, zids_of_ivar, type_of_ivar: self.variable_types }) + Some(Tracking { expr: self.body, zids_of_ivar }) } pub fn from_compression_output(output: &Value) -> Invention { From e62307070a1cf9a23d97b98889d67849dceffa6a Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 14:30:02 -0400 Subject: [PATCH 32/47] update --- src/pattern_args.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pattern_args.rs b/src/pattern_args.rs index 21b34575..04c2603d 100644 --- a/src/pattern_args.rs +++ b/src/pattern_args.rs @@ -87,10 +87,6 @@ impl PatternArgs { self.variables.iter().map(|(_,t)| *t).collect() } - pub fn type_of(&self, ivar: usize) -> VariableType { - self.variables[ivar].1 - } - fn zippers(&self, shared: &SharedData) -> Vec> { self.arg_choices.iter().map(|lzid| shared.zip_of_zid[lzid.zid].clone() From 5abf8d93eba15999ed22c03e54febb18b9135c1c Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 14:44:54 -0400 Subject: [PATCH 33/47] actually use follow types --- src/compression.rs | 2 ++ src/expansion.rs | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 91fd7cab..4ab1956a 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -656,6 +656,7 @@ pub struct SharedData { pub multistep_cfg: MultistepCompressionConfig, pub tracking: Option, pub fused_lambda_tags: Option>, + pub follow: Option, } pub fn invalid_metavar_location(shared : &SharedData, node: Idx) -> bool { @@ -2137,6 +2138,7 @@ pub fn construct_shared( multistep_cfg: multistep_cfg.clone(), tracking, fused_lambda_tags: fused_copy, + follow: follow.clone(), }); if !shared.cfg.quiet { println!("built SharedData: {:?}ms", tstart.elapsed().as_millis()) } diff --git a/src/expansion.rs b/src/expansion.rs index 4952db9f..1438322a 100644 --- a/src/expansion.rs +++ b/src/expansion.rs @@ -134,10 +134,12 @@ impl std::fmt::Display for ExpandsTo { pub fn tracked_expands_to(pattern: &Pattern, hole_zid: ZId, shared: &SharedData) -> ExpandsTo { // apply the hole zipper to the original expr being tracked to get the subtree // this will expand into, then get the ExpandsTo of that - let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(&shared.zip_of_zid[hole_zid]).idx; + let zip = &shared.zip_of_zid[hole_zid]; + let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(zip).idx; match expands_to_of_node(&shared.tracking.as_ref().unwrap().expr.set[idx]) { - ExpandsTo(ExpandsToInner::IVar(i, VariableType::Metavar)) => { - ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, VariableType::Metavar)) + ExpandsTo(ExpandsToInner::IVar(i, _)) => { + let vt = shared.follow.as_ref().unwrap().variable_types[i as usize]; + ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, vt)) } e => e } @@ -151,7 +153,7 @@ pub fn expands_to_of_node(node: &Node) -> ExpandsTo { Node::Prim(p) => ExpandsToInner::Prim(p.clone()), Node::Lam(_, tag) => ExpandsToInner::Lam(*tag), Node::App(_,_) => ExpandsToInner::App, - Node::IVar(i) => ExpandsToInner::IVar(*i, VariableType::Metavar), + Node::IVar(i) => ExpandsToInner::IVar(*i, /*placeholder, will be determined by caller*/ VariableType::Metavar), } ) } From 693d0fcaf8b4921ca630d7f9334be4df129c740f Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 14:52:10 -0400 Subject: [PATCH 34/47] add test for symbol following --- tests/integration_tests.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 44cd3f26..3cb07c00 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -150,6 +150,13 @@ fn symbols_basic() { compare_out_jsons_testing("data/python/pick-up-on-abstractions-0-arity.json", "data/expected_outputs/pick-up-on-abstractions-0-arity.json", &("-i1 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); } +#[test] +fn symbols_following() { + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-sss.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S S' ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-ssm.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S M' ", InputFormat::ProgramsList); +} + #[test] #[should_panic(expected = "Inconsistent symbols: \"NameStr\" and \"Name\" for expr &os:0")] fn symbols_basic_inconsistent_symbols() { From 6a5425fff07af813322e390b51ac118cb24f33ae Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 15:07:16 -0400 Subject: [PATCH 35/47] add expected outputs --- data/expected_outputs/symbol-reuse-ssm.json | 122 ++++++++++++++++++++ data/expected_outputs/symbol-reuse-sss.json | 122 ++++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 data/expected_outputs/symbol-reuse-ssm.json create mode 100644 data/expected_outputs/symbol-reuse-sss.json diff --git a/data/expected_outputs/symbol-reuse-ssm.json b/data/expected_outputs/symbol-reuse-ssm.json new file mode 100644 index 00000000..04fa2a19 --- /dev/null +++ b/data/expected_outputs/symbol-reuse-ssm.json @@ -0,0 +1,122 @@ +{ + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-6cddd9da19e4976e symbols_following", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 6, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": "(+ 1 #2 #2 #1 #0 2 3 4)", + "follow_types": [ + "Symvar", + "Symvar", + "Metavar" + ], + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": false, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": "&" + } + } + }, + "original_cost": 2724, + "final_cost": 1209, + "compression_ratio": 2.2531017369727047, + "num_abstractions": 1, + "original": [ + "(+ 1 &x &x &y &z 2 3 4)", + "(+ 1 &y &y &x &z 2 3 4)", + "(+ 1 &x &x &x &z 2 3 4)" + ], + "rewritten": [ + "(fn_0 &z &y &x)", + "(fn_0 &z &x &y)", + "(fn_0 &z &x &x)" + ], + "rewritten_dreamcoder": null, + "abstractions": [ + { + "body": "(+ 1 #2 #2 #1 #0 2 3 4)", + "dreamcoder": "#(lambda (lambda (lambda (+ 1 $0 $0 $1 $2 2 3 4))))", + "arity": 3, + "name": "fn_0", + "utility": 1007, + "final_cost": 1209, + "compression_ratio": 2.2531017369727047, + "cumulative_compression_ratio": 2.2531017369727047, + "num_uses": 3, + "rewritten": null, + "rewritten_dreamcoder": null, + "uses": [ + { + "fn_0 &z &x &x": "(+ 1 &x &x &x &z 2 3 4)" + }, + { + "fn_0 &z &y &x": "(+ 1 &x &x &y &z 2 3 4)" + }, + { + "fn_0 &z &x &y": "(+ 1 &y &y &x &z 2 3 4)" + } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "S", + "M", + "M" + ] + } + ] +} \ No newline at end of file diff --git a/data/expected_outputs/symbol-reuse-sss.json b/data/expected_outputs/symbol-reuse-sss.json new file mode 100644 index 00000000..3e43b45a --- /dev/null +++ b/data/expected_outputs/symbol-reuse-sss.json @@ -0,0 +1,122 @@ +{ + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-6cddd9da19e4976e symbols_following", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 6, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": "(+ 1 #2 #2 #1 #0 2 3 4)", + "follow_types": [ + "Symvar", + "Symvar", + "Symvar" + ], + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": false, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": "&" + } + } + }, + "original_cost": 2724, + "final_cost": 1209, + "compression_ratio": 2.2531017369727047, + "num_abstractions": 1, + "original": [ + "(+ 1 &x &x &y &z 2 3 4)", + "(+ 1 &y &y &x &z 2 3 4)", + "(+ 1 &x &x &x &z 2 3 4)" + ], + "rewritten": [ + "(fn_0 &z &y &x)", + "(fn_0 &z &x &y)", + "(fn_0 &z &x &x)" + ], + "rewritten_dreamcoder": null, + "abstractions": [ + { + "body": "(+ 1 #2 #2 #1 #0 2 3 4)", + "dreamcoder": "#(lambda (lambda (lambda (+ 1 $0 $0 $1 $2 2 3 4))))", + "arity": 3, + "name": "fn_0", + "utility": 1007, + "final_cost": 1209, + "compression_ratio": 2.2531017369727047, + "cumulative_compression_ratio": 2.2531017369727047, + "num_uses": 3, + "rewritten": null, + "rewritten_dreamcoder": null, + "uses": [ + { + "fn_0 &z &x &x": "(+ 1 &x &x &x &z 2 3 4)" + }, + { + "fn_0 &z &y &x": "(+ 1 &x &x &y &z 2 3 4)" + }, + { + "fn_0 &z &x &y": "(+ 1 &y &y &x &z 2 3 4)" + } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "S", + "M", + "M" + ] + } + ] +} \ No newline at end of file From c949f3cad0e10f5cd368d568a168a4eab03af76f Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 15:11:47 -0400 Subject: [PATCH 36/47] actually use follow types (#261) --- data/expected_outputs/symbol-reuse-ssm.json | 122 ++++++++++++++++++++ data/expected_outputs/symbol-reuse-sss.json | 122 ++++++++++++++++++++ src/compression.rs | 2 + src/expansion.rs | 10 +- tests/integration_tests.rs | 7 ++ 5 files changed, 259 insertions(+), 4 deletions(-) create mode 100644 data/expected_outputs/symbol-reuse-ssm.json create mode 100644 data/expected_outputs/symbol-reuse-sss.json diff --git a/data/expected_outputs/symbol-reuse-ssm.json b/data/expected_outputs/symbol-reuse-ssm.json new file mode 100644 index 00000000..04fa2a19 --- /dev/null +++ b/data/expected_outputs/symbol-reuse-ssm.json @@ -0,0 +1,122 @@ +{ + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-6cddd9da19e4976e symbols_following", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 6, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": "(+ 1 #2 #2 #1 #0 2 3 4)", + "follow_types": [ + "Symvar", + "Symvar", + "Metavar" + ], + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": false, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": "&" + } + } + }, + "original_cost": 2724, + "final_cost": 1209, + "compression_ratio": 2.2531017369727047, + "num_abstractions": 1, + "original": [ + "(+ 1 &x &x &y &z 2 3 4)", + "(+ 1 &y &y &x &z 2 3 4)", + "(+ 1 &x &x &x &z 2 3 4)" + ], + "rewritten": [ + "(fn_0 &z &y &x)", + "(fn_0 &z &x &y)", + "(fn_0 &z &x &x)" + ], + "rewritten_dreamcoder": null, + "abstractions": [ + { + "body": "(+ 1 #2 #2 #1 #0 2 3 4)", + "dreamcoder": "#(lambda (lambda (lambda (+ 1 $0 $0 $1 $2 2 3 4))))", + "arity": 3, + "name": "fn_0", + "utility": 1007, + "final_cost": 1209, + "compression_ratio": 2.2531017369727047, + "cumulative_compression_ratio": 2.2531017369727047, + "num_uses": 3, + "rewritten": null, + "rewritten_dreamcoder": null, + "uses": [ + { + "fn_0 &z &x &x": "(+ 1 &x &x &x &z 2 3 4)" + }, + { + "fn_0 &z &y &x": "(+ 1 &x &x &y &z 2 3 4)" + }, + { + "fn_0 &z &x &y": "(+ 1 &y &y &x &z 2 3 4)" + } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "S", + "M", + "M" + ] + } + ] +} \ No newline at end of file diff --git a/data/expected_outputs/symbol-reuse-sss.json b/data/expected_outputs/symbol-reuse-sss.json new file mode 100644 index 00000000..3e43b45a --- /dev/null +++ b/data/expected_outputs/symbol-reuse-sss.json @@ -0,0 +1,122 @@ +{ + "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-6cddd9da19e4976e symbols_following", + "args": { + "iterations": 1, + "abstraction_prefix": "fn_", + "previous_abstractions": 0, + "shuffle": false, + "truncate": null, + "no_opt": false, + "silent": false, + "verbose_rewrite": false, + "step": { + "max_arity": 6, + "threads": 1, + "no_stats": false, + "batch": 1, + "dynamic_batch": false, + "eta_long": false, + "no_curried_metavars": false, + "no_curried_bodies": false, + "inv_candidates": 1, + "hole_choice": "DepthFirst", + "cost": { + "cost_lam": 1, + "cost_app": 1, + "cost_var": 100, + "cost_ivar": 100, + "cost_prim_default": 100, + "cost_prim": "{}" + }, + "no_mismatch_check": false, + "follow": "(+ 1 #2 #2 #1 #0 2 3 4)", + "follow_types": [ + "Symvar", + "Symvar", + "Symvar" + ], + "follow_prune": false, + "verbose_worklist": false, + "verbose_best": false, + "print_stats": 0, + "show_rewritten": false, + "rewritten_dreamcoder": false, + "rewritten_intermediates": false, + "inv_arg_cap": false, + "allow_single_task": false, + "no_opt_single_use": false, + "no_opt_upper_bound": false, + "no_opt_force_multiuse": false, + "no_opt_useless_abstract": false, + "no_opt_arity_zero": false, + "no_other_util": false, + "structure_penalty": 1.0, + "rewrite_check": false, + "utility_by_rewrite": false, + "dreamcoder_comparison": false, + "quiet": false, + "fused_lambda_tags": { + "tags": null + }, + "tdfa": { + "tdfa_json_path": null, + "tdfa_root": null, + "valid_metavars": null, + "valid_roots": null, + "tdfa_non_eta_long_states": null, + "tdfa_split": null + }, + "symvar": { + "symvar_prefix": "&" + } + } + }, + "original_cost": 2724, + "final_cost": 1209, + "compression_ratio": 2.2531017369727047, + "num_abstractions": 1, + "original": [ + "(+ 1 &x &x &y &z 2 3 4)", + "(+ 1 &y &y &x &z 2 3 4)", + "(+ 1 &x &x &x &z 2 3 4)" + ], + "rewritten": [ + "(fn_0 &z &y &x)", + "(fn_0 &z &x &y)", + "(fn_0 &z &x &x)" + ], + "rewritten_dreamcoder": null, + "abstractions": [ + { + "body": "(+ 1 #2 #2 #1 #0 2 3 4)", + "dreamcoder": "#(lambda (lambda (lambda (+ 1 $0 $0 $1 $2 2 3 4))))", + "arity": 3, + "name": "fn_0", + "utility": 1007, + "final_cost": 1209, + "compression_ratio": 2.2531017369727047, + "cumulative_compression_ratio": 2.2531017369727047, + "num_uses": 3, + "rewritten": null, + "rewritten_dreamcoder": null, + "uses": [ + { + "fn_0 &z &x &x": "(+ 1 &x &x &x &z 2 3 4)" + }, + { + "fn_0 &z &y &x": "(+ 1 &x &x &y &z 2 3 4)" + }, + { + "fn_0 &z &x &y": "(+ 1 &y &y &x &z 2 3 4)" + } + ], + "dc_comparison_millis": null, + "tdfa_annotation": null, + "variable_types": [ + "S", + "M", + "M" + ] + } + ] +} \ No newline at end of file diff --git a/src/compression.rs b/src/compression.rs index 91fd7cab..4ab1956a 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -656,6 +656,7 @@ pub struct SharedData { pub multistep_cfg: MultistepCompressionConfig, pub tracking: Option, pub fused_lambda_tags: Option>, + pub follow: Option, } pub fn invalid_metavar_location(shared : &SharedData, node: Idx) -> bool { @@ -2137,6 +2138,7 @@ pub fn construct_shared( multistep_cfg: multistep_cfg.clone(), tracking, fused_lambda_tags: fused_copy, + follow: follow.clone(), }); if !shared.cfg.quiet { println!("built SharedData: {:?}ms", tstart.elapsed().as_millis()) } diff --git a/src/expansion.rs b/src/expansion.rs index 4952db9f..1438322a 100644 --- a/src/expansion.rs +++ b/src/expansion.rs @@ -134,10 +134,12 @@ impl std::fmt::Display for ExpandsTo { pub fn tracked_expands_to(pattern: &Pattern, hole_zid: ZId, shared: &SharedData) -> ExpandsTo { // apply the hole zipper to the original expr being tracked to get the subtree // this will expand into, then get the ExpandsTo of that - let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(&shared.zip_of_zid[hole_zid]).idx; + let zip = &shared.zip_of_zid[hole_zid]; + let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(zip).idx; match expands_to_of_node(&shared.tracking.as_ref().unwrap().expr.set[idx]) { - ExpandsTo(ExpandsToInner::IVar(i, VariableType::Metavar)) => { - ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, VariableType::Metavar)) + ExpandsTo(ExpandsToInner::IVar(i, _)) => { + let vt = shared.follow.as_ref().unwrap().variable_types[i as usize]; + ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, vt)) } e => e } @@ -151,7 +153,7 @@ pub fn expands_to_of_node(node: &Node) -> ExpandsTo { Node::Prim(p) => ExpandsToInner::Prim(p.clone()), Node::Lam(_, tag) => ExpandsToInner::Lam(*tag), Node::App(_,_) => ExpandsToInner::App, - Node::IVar(i) => ExpandsToInner::IVar(*i, VariableType::Metavar), + Node::IVar(i) => ExpandsToInner::IVar(*i, /*placeholder, will be determined by caller*/ VariableType::Metavar), } ) } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index b390c7ff..6236b6cb 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -150,6 +150,13 @@ fn symbols_basic() { compare_out_jsons_testing("data/python/pick-up-on-abstractions-0-arity.json", "data/expected_outputs/pick-up-on-abstractions-0-arity.json", &("-i1 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); } +#[test] +fn symbols_following() { + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-sss.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S S' ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-ssm.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S M' ", InputFormat::ProgramsList); +} + #[test] #[should_panic(expected = "Inconsistent symbols: \"NameStr\" and \"Name\" for expr &os:0")] fn symbols_basic_inconsistent_symbols() { From 8f99a58475616e2979192b2bca722a345c5c8205 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 15:12:25 -0400 Subject: [PATCH 37/47] Revert "actually use follow types (#261)" This reverts commit c949f3cad0e10f5cd368d568a168a4eab03af76f. --- data/expected_outputs/symbol-reuse-ssm.json | 122 -------------------- data/expected_outputs/symbol-reuse-sss.json | 122 -------------------- src/compression.rs | 2 - src/expansion.rs | 10 +- tests/integration_tests.rs | 7 -- 5 files changed, 4 insertions(+), 259 deletions(-) delete mode 100644 data/expected_outputs/symbol-reuse-ssm.json delete mode 100644 data/expected_outputs/symbol-reuse-sss.json diff --git a/data/expected_outputs/symbol-reuse-ssm.json b/data/expected_outputs/symbol-reuse-ssm.json deleted file mode 100644 index 04fa2a19..00000000 --- a/data/expected_outputs/symbol-reuse-ssm.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-6cddd9da19e4976e symbols_following", - "args": { - "iterations": 1, - "abstraction_prefix": "fn_", - "previous_abstractions": 0, - "shuffle": false, - "truncate": null, - "no_opt": false, - "silent": false, - "verbose_rewrite": false, - "step": { - "max_arity": 6, - "threads": 1, - "no_stats": false, - "batch": 1, - "dynamic_batch": false, - "eta_long": false, - "no_curried_metavars": false, - "no_curried_bodies": false, - "inv_candidates": 1, - "hole_choice": "DepthFirst", - "cost": { - "cost_lam": 1, - "cost_app": 1, - "cost_var": 100, - "cost_ivar": 100, - "cost_prim_default": 100, - "cost_prim": "{}" - }, - "no_mismatch_check": false, - "follow": "(+ 1 #2 #2 #1 #0 2 3 4)", - "follow_types": [ - "Symvar", - "Symvar", - "Metavar" - ], - "follow_prune": false, - "verbose_worklist": false, - "verbose_best": false, - "print_stats": 0, - "show_rewritten": false, - "rewritten_dreamcoder": false, - "rewritten_intermediates": false, - "inv_arg_cap": false, - "allow_single_task": false, - "no_opt_single_use": false, - "no_opt_upper_bound": false, - "no_opt_force_multiuse": false, - "no_opt_useless_abstract": false, - "no_opt_arity_zero": false, - "no_other_util": false, - "structure_penalty": 1.0, - "rewrite_check": false, - "utility_by_rewrite": false, - "dreamcoder_comparison": false, - "quiet": false, - "fused_lambda_tags": { - "tags": null - }, - "tdfa": { - "tdfa_json_path": null, - "tdfa_root": null, - "valid_metavars": null, - "valid_roots": null, - "tdfa_non_eta_long_states": null, - "tdfa_split": null - }, - "symvar": { - "symvar_prefix": "&" - } - } - }, - "original_cost": 2724, - "final_cost": 1209, - "compression_ratio": 2.2531017369727047, - "num_abstractions": 1, - "original": [ - "(+ 1 &x &x &y &z 2 3 4)", - "(+ 1 &y &y &x &z 2 3 4)", - "(+ 1 &x &x &x &z 2 3 4)" - ], - "rewritten": [ - "(fn_0 &z &y &x)", - "(fn_0 &z &x &y)", - "(fn_0 &z &x &x)" - ], - "rewritten_dreamcoder": null, - "abstractions": [ - { - "body": "(+ 1 #2 #2 #1 #0 2 3 4)", - "dreamcoder": "#(lambda (lambda (lambda (+ 1 $0 $0 $1 $2 2 3 4))))", - "arity": 3, - "name": "fn_0", - "utility": 1007, - "final_cost": 1209, - "compression_ratio": 2.2531017369727047, - "cumulative_compression_ratio": 2.2531017369727047, - "num_uses": 3, - "rewritten": null, - "rewritten_dreamcoder": null, - "uses": [ - { - "fn_0 &z &x &x": "(+ 1 &x &x &x &z 2 3 4)" - }, - { - "fn_0 &z &y &x": "(+ 1 &x &x &y &z 2 3 4)" - }, - { - "fn_0 &z &x &y": "(+ 1 &y &y &x &z 2 3 4)" - } - ], - "dc_comparison_millis": null, - "tdfa_annotation": null, - "variable_types": [ - "S", - "M", - "M" - ] - } - ] -} \ No newline at end of file diff --git a/data/expected_outputs/symbol-reuse-sss.json b/data/expected_outputs/symbol-reuse-sss.json deleted file mode 100644 index 3e43b45a..00000000 --- a/data/expected_outputs/symbol-reuse-sss.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "cmd": "/home/kavi/mit/stitch/target/debug/deps/integration_tests-6cddd9da19e4976e symbols_following", - "args": { - "iterations": 1, - "abstraction_prefix": "fn_", - "previous_abstractions": 0, - "shuffle": false, - "truncate": null, - "no_opt": false, - "silent": false, - "verbose_rewrite": false, - "step": { - "max_arity": 6, - "threads": 1, - "no_stats": false, - "batch": 1, - "dynamic_batch": false, - "eta_long": false, - "no_curried_metavars": false, - "no_curried_bodies": false, - "inv_candidates": 1, - "hole_choice": "DepthFirst", - "cost": { - "cost_lam": 1, - "cost_app": 1, - "cost_var": 100, - "cost_ivar": 100, - "cost_prim_default": 100, - "cost_prim": "{}" - }, - "no_mismatch_check": false, - "follow": "(+ 1 #2 #2 #1 #0 2 3 4)", - "follow_types": [ - "Symvar", - "Symvar", - "Symvar" - ], - "follow_prune": false, - "verbose_worklist": false, - "verbose_best": false, - "print_stats": 0, - "show_rewritten": false, - "rewritten_dreamcoder": false, - "rewritten_intermediates": false, - "inv_arg_cap": false, - "allow_single_task": false, - "no_opt_single_use": false, - "no_opt_upper_bound": false, - "no_opt_force_multiuse": false, - "no_opt_useless_abstract": false, - "no_opt_arity_zero": false, - "no_other_util": false, - "structure_penalty": 1.0, - "rewrite_check": false, - "utility_by_rewrite": false, - "dreamcoder_comparison": false, - "quiet": false, - "fused_lambda_tags": { - "tags": null - }, - "tdfa": { - "tdfa_json_path": null, - "tdfa_root": null, - "valid_metavars": null, - "valid_roots": null, - "tdfa_non_eta_long_states": null, - "tdfa_split": null - }, - "symvar": { - "symvar_prefix": "&" - } - } - }, - "original_cost": 2724, - "final_cost": 1209, - "compression_ratio": 2.2531017369727047, - "num_abstractions": 1, - "original": [ - "(+ 1 &x &x &y &z 2 3 4)", - "(+ 1 &y &y &x &z 2 3 4)", - "(+ 1 &x &x &x &z 2 3 4)" - ], - "rewritten": [ - "(fn_0 &z &y &x)", - "(fn_0 &z &x &y)", - "(fn_0 &z &x &x)" - ], - "rewritten_dreamcoder": null, - "abstractions": [ - { - "body": "(+ 1 #2 #2 #1 #0 2 3 4)", - "dreamcoder": "#(lambda (lambda (lambda (+ 1 $0 $0 $1 $2 2 3 4))))", - "arity": 3, - "name": "fn_0", - "utility": 1007, - "final_cost": 1209, - "compression_ratio": 2.2531017369727047, - "cumulative_compression_ratio": 2.2531017369727047, - "num_uses": 3, - "rewritten": null, - "rewritten_dreamcoder": null, - "uses": [ - { - "fn_0 &z &x &x": "(+ 1 &x &x &x &z 2 3 4)" - }, - { - "fn_0 &z &y &x": "(+ 1 &x &x &y &z 2 3 4)" - }, - { - "fn_0 &z &x &y": "(+ 1 &y &y &x &z 2 3 4)" - } - ], - "dc_comparison_millis": null, - "tdfa_annotation": null, - "variable_types": [ - "S", - "M", - "M" - ] - } - ] -} \ No newline at end of file diff --git a/src/compression.rs b/src/compression.rs index 4ab1956a..91fd7cab 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -656,7 +656,6 @@ pub struct SharedData { pub multistep_cfg: MultistepCompressionConfig, pub tracking: Option, pub fused_lambda_tags: Option>, - pub follow: Option, } pub fn invalid_metavar_location(shared : &SharedData, node: Idx) -> bool { @@ -2138,7 +2137,6 @@ pub fn construct_shared( multistep_cfg: multistep_cfg.clone(), tracking, fused_lambda_tags: fused_copy, - follow: follow.clone(), }); if !shared.cfg.quiet { println!("built SharedData: {:?}ms", tstart.elapsed().as_millis()) } diff --git a/src/expansion.rs b/src/expansion.rs index 1438322a..4952db9f 100644 --- a/src/expansion.rs +++ b/src/expansion.rs @@ -134,12 +134,10 @@ impl std::fmt::Display for ExpandsTo { pub fn tracked_expands_to(pattern: &Pattern, hole_zid: ZId, shared: &SharedData) -> ExpandsTo { // apply the hole zipper to the original expr being tracked to get the subtree // this will expand into, then get the ExpandsTo of that - let zip = &shared.zip_of_zid[hole_zid]; - let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(zip).idx; + let idx = shared.tracking.as_ref().unwrap().expr.immut().zip(&shared.zip_of_zid[hole_zid]).idx; match expands_to_of_node(&shared.tracking.as_ref().unwrap().expr.set[idx]) { - ExpandsTo(ExpandsToInner::IVar(i, _)) => { - let vt = shared.follow.as_ref().unwrap().variable_types[i as usize]; - ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, vt)) + ExpandsTo(ExpandsToInner::IVar(i, VariableType::Metavar)) => { + ExpandsTo(ExpandsToInner::IVar(pattern.pattern_args.find_variable(shared, i as usize) as i32, VariableType::Metavar)) } e => e } @@ -153,7 +151,7 @@ pub fn expands_to_of_node(node: &Node) -> ExpandsTo { Node::Prim(p) => ExpandsToInner::Prim(p.clone()), Node::Lam(_, tag) => ExpandsToInner::Lam(*tag), Node::App(_,_) => ExpandsToInner::App, - Node::IVar(i) => ExpandsToInner::IVar(*i, /*placeholder, will be determined by caller*/ VariableType::Metavar), + Node::IVar(i) => ExpandsToInner::IVar(*i, VariableType::Metavar), } ) } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 6236b6cb..b390c7ff 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -150,13 +150,6 @@ fn symbols_basic() { compare_out_jsons_testing("data/python/pick-up-on-abstractions-0-arity.json", "data/expected_outputs/pick-up-on-abstractions-0-arity.json", &("-i1 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); } -#[test] -fn symbols_following() { - compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-sss.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S S' ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-ssm.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S M' ", InputFormat::ProgramsList); -} - #[test] #[should_panic(expected = "Inconsistent symbols: \"NameStr\" and \"Name\" for expr &os:0")] fn symbols_basic_inconsistent_symbols() { From 85c080cda1ef573dfe077213f0e69fda8cca3d7e Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 15:17:51 -0400 Subject: [PATCH 38/47] bump From e1581574e3b0d2cf604f3324d7ca47f7002d0ab5 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 15:53:08 -0400 Subject: [PATCH 39/47] bump From 20c835c429e7eff2359ae3a665b5821b2d289939 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Tue, 19 Aug 2025 15:56:09 -0400 Subject: [PATCH 40/47] check the variable type outputs in addition to other stuff --- src/test_utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test_utils.rs b/src/test_utils.rs index 7f01ad16..d8a4e1a3 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -61,6 +61,7 @@ pub fn compare_out_jsons_testing(file: &str, expected_out_file: &str, args: &str check_eq(&output["num_abstractions"], &expected_output["num_abstractions"], vec!["num_abstractions".into()], &output, expected_out_file); check_eq(&output["abstractions"], &expected_output["abstractions"], vec!["abstractions".into()], &output, expected_out_file); check_eq(&output["rewritten"], &expected_output["rewritten"], vec!["rewritten".into()], &output, expected_out_file); + check_eq(&output["variable_types"], &expected_output["variable_types"], vec!["rewritten".into()], &output, expected_out_file); } From dc6176f0fcb01fcf52d9cc0a4a535e86186009f2 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Fri, 29 Aug 2025 15:14:55 -0400 Subject: [PATCH 41/47] make compression resumable --- src/compression.rs | 26 ++++++++++++++++++++++---- src/rewriting.rs | 11 ++++++++++- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 4ab1956a..506c420e 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -656,6 +656,7 @@ pub struct SharedData { pub multistep_cfg: MultistepCompressionConfig, pub tracking: Option, pub fused_lambda_tags: Option>, + pub prev_results: Vec, pub follow: Option, } @@ -1102,7 +1103,7 @@ fn stitch_search( if shared.cfg.rewrite_check { // run rewriting just to make sure the assert in it passes let rw_fast = rewrite_fast(&finished_pattern, &shared, &Node::Prim("fake_inv".into()), &shared.cost_fn); - let (rw_slow, _, _) = rewrite_with_inventions(&shared.programs.iter().map(|p|p.to_string()).collect::>(), &[finished_pattern.clone().to_invention("fake_inv", &shared)], &shared.multistep_cfg); + let (rw_slow, _, _) = rewrite_with_inventions_resumable(&shared.programs.iter().map(|p|p.to_string()).collect::>(), &[finished_pattern.clone().to_invention("fake_inv", &shared)], &shared.multistep_cfg, &shared.prev_results); for (fast,slow) in rw_fast.iter().zip(rw_slow.iter()) { assert_eq!(fast.to_string(), slow.to_string()); } @@ -1785,11 +1786,12 @@ pub fn multistep_compression_internal( weights: Option>, name_mapping: Option>, follow: Option>, - cfg: &MultistepCompressionConfig + cfg: &MultistepCompressionConfig, + prev_results: &[CompressionStepResult] ) -> Vec { let mut rewritten: Vec = train_programs.to_vec(); - let mut step_results: Vec = Default::default(); + let mut step_results: Vec = prev_results.to_vec(); let cost_fn = &cfg.step.cost.expr_cost(); let tstart = std::time::Instant::now(); @@ -2138,6 +2140,7 @@ pub fn construct_shared( multistep_cfg: multistep_cfg.clone(), tracking, fused_lambda_tags: fused_copy, + prev_results: prev_results.to_vec(), follow: follow.clone(), }); @@ -2276,6 +2279,20 @@ pub fn multistep_compression( name_mapping: Option>, follow: Option>, cfg: &MultistepCompressionConfig +)-> (Vec, serde_json::Value) { + multistep_compression_resumable(programs, tasks, weights, name_mapping, follow, cfg, &[]) +} + + +// Like `multistep_compression` but allows for resumable compression, where you can provide the prior inventions +pub fn multistep_compression_resumable( + programs: &[String], + tasks: Option>, + weights: Option>, + name_mapping: Option>, + follow: Option>, + cfg: &MultistepCompressionConfig, + prev_results: &[CompressionStepResult] )-> (Vec, serde_json::Value) { let mut programs = programs.to_vec(); let mut cfg = cfg.clone(); @@ -2321,7 +2338,8 @@ pub fn multistep_compression( weights.clone(), name_mapping, follow, - &cfg, + &cfg, + prev_results, ); // write everything to json diff --git a/src/rewriting.rs b/src/rewriting.rs index 535952bc..5e240b41 100644 --- a/src/rewriting.rs +++ b/src/rewriting.rs @@ -161,6 +161,15 @@ pub fn rewrite_with_inventions( invs: &[Invention], cfg: &MultistepCompressionConfig, ) -> (Vec, Vec, serde_json::Value) { + rewrite_with_inventions_resumable(programs, invs, cfg, &[]) +} + +pub fn rewrite_with_inventions_resumable( + programs: &[String], + invs: &[Invention], + cfg: &MultistepCompressionConfig, + prev_results: &[CompressionStepResult] +) -> (Vec, Vec, serde_json::Value) { // if invs.is_empty() { // return programs.to_vec() @@ -185,7 +194,7 @@ pub fn rewrite_with_inventions( // cfg.step.rewritten_dreamcoder = true; // cfg.step.rewritten_intermediates = true; - let (step_results, json_res) = multistep_compression(programs, None, None, None, follow, &cfg); + let (step_results, json_res) = multistep_compression_resumable(programs, None, None, None, follow, &cfg, prev_results); // return the last one - note that if an abstraction wasn't used anywhere it will not be included in the step_results so this // may be shorter than invs.len(), however we do ensure that we continue searching for the rest of the abstractions if this happens From d72f534b9d4995988c3f84c90f2dbd9a889a290d Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Fri, 29 Aug 2025 15:23:37 -0400 Subject: [PATCH 42/47] add rewrite check to some experimentns --- tests/fuzz_symbol_weighting_test.rs | 2 +- tests/integration_tests.rs | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/fuzz_symbol_weighting_test.rs b/tests/fuzz_symbol_weighting_test.rs index d7906988..aac540aa 100644 --- a/tests/fuzz_symbol_weighting_test.rs +++ b/tests/fuzz_symbol_weighting_test.rs @@ -73,7 +73,7 @@ fn generate_random_weights(selected_symbols: &[&String], rng: &mut ChaCha8Rng) - fn run_fuzz_compression(cost_prims: &serde_json::Value, test_file: &String, seed: u64) { let cost_prims_str = cost_prims.to_string(); - let args = format!("-i3 -a3 --verbose-best --cost-prim {}", shlex::try_quote(&cost_prims_str).unwrap()); + let args = format!("-i3 -a3 --rewrite-check --verbose-best --cost-prim {}", shlex::try_quote(&cost_prims_str).unwrap()); let output_file = format!("data/expected_outputs/fuzz/{:0>3}_{}.json", seed, test_file.split("/").last().unwrap().split(".").next().unwrap()); compare_out_jsons_testing(test_file, &output_file, &args, InputFormat::ProgramsList); } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index b390c7ff..6747fe22 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -91,32 +91,32 @@ fn origami_2_a3_i10() { #[test] fn neurosym_match_at_tag() { - compare_out_jsons_testing("data/neurosym/match_at_tag.json", "data/expected_outputs/neurosym_match_at_tag.json", "", InputFormat::ProgramsList); - compare_out_jsons_testing("data/neurosym/match_at_tag.json", "data/expected_outputs/neurosym_match_at_tag_excluded.json", "--fused-lambda-tags 2", InputFormat::ProgramsList); + compare_out_jsons_testing("data/neurosym/match_at_tag.json", "data/expected_outputs/neurosym_match_at_tag.json", " --rewrite-check", InputFormat::ProgramsList); + compare_out_jsons_testing("data/neurosym/match_at_tag.json", "data/expected_outputs/neurosym_match_at_tag_excluded.json", "--fused-lambda-tags 2 --rewrite-check", InputFormat::ProgramsList); } #[test] fn neurosym_metavariable_with_tag() { compare_out_jsons_testing("data/neurosym/metavariable_with_tag.json", "data/expected_outputs/neurosym_metavariable_with_tag.json", "", InputFormat::ProgramsList); - compare_out_jsons_testing("data/neurosym/metavariable_with_tag.json", "data/expected_outputs/neurosym_metavariable_with_tag_excluded.json", "--fused-lambda-tags 2", InputFormat::ProgramsList); + compare_out_jsons_testing("data/neurosym/metavariable_with_tag.json", "data/expected_outputs/neurosym_metavariable_with_tag_excluded.json", "--fused-lambda-tags 2 --rewrite-check", InputFormat::ProgramsList); } #[test] fn symbol_weighting_test_higher_weight() { - compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_default.json", "-i1 -a3", InputFormat::ProgramsList); - compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_h_200.json", "-i1 -a3 --cost-prim '{\"H\":200}'", InputFormat::ProgramsList); - compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_h_202.json", "-i1 -a3 --cost-prim '{\"H\":202}'", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_default.json", "-i1 -a3 --rewrite-check", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_h_200.json", "-i1 -a3 --rewrite-check --cost-prim '{\"H\":200}'", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_1.json", "data/expected_outputs/symbol_weighting_1_h_202.json", "-i1 -a3 --rewrite-check --cost-prim '{\"H\":202}'", InputFormat::ProgramsList); } #[test] fn symbol_weighting_test_lower_weight() { - compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_default.json", "-i1 -a3", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_default.json", "-i1 -a3 --rewrite-check", InputFormat::ProgramsList); // l1,l2,l3 all should have value 60 in the following test - compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_l_60.json", "-i1 -a3 --cost-prim '{\"L1\":60,\"L2\":60,\"L3\":60}'", InputFormat::ProgramsList); - compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_l_67.json", "-i1 -a3 --cost-prim '{\"L1\":67,\"L2\":67,\"L3\":67}'", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_l_60.json", "-i1 -a3 --rewrite-check --cost-prim '{\"L1\":60,\"L2\":60,\"L3\":60}'", InputFormat::ProgramsList); + compare_out_jsons_testing("data/basic/symbol_weighting_test_2.json", "data/expected_outputs/symbol_weighting_2_l_67.json", "-i1 -a3 --rewrite-check --cost-prim '{\"L1\":67,\"L2\":67,\"L3\":67}'", InputFormat::ProgramsList); } -const DFA_ARGS: &str = r#"--tdfa-json-path test_data/dfa.json --tdfa-root M --valid-metavars '["S","E","seqS"]' --valid-roots '["S","E","seqS"]' --tdfa-non-eta-long-states '{"seqS":"S"}' --tdfa-split ~"#; +const DFA_ARGS: &str = r#" --tdfa-json-path test_data/dfa.json --tdfa-root M --valid-metavars '["S","E","seqS"]' --valid-roots '["S","E","seqS"]' --tdfa-non-eta-long-states '{"seqS":"S"}' --tdfa-split ~"#; #[test] fn tdfa_multi_arg_function() { @@ -153,7 +153,7 @@ fn symbols_basic() { #[test] #[should_panic(expected = "Inconsistent symbols: \"NameStr\" and \"Name\" for expr &os:0")] fn symbols_basic_inconsistent_symbols() { - compare_out_jsons_testing("data/python/non-working-import-and-number-in-same-spot.json", "data/expected_outputs/non-working-import-and-number-in-same-spot.json", &("-i3 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/non-working-import-and-number-in-same-spot.json", "data/expected_outputs/non-working-import-and-number-in-same-spot.json", &("-i3 -a0 --rewrite-check ".to_owned() + &python_args()), InputFormat::ProgramsList); } From a5742abc9cf973ff05006801b5591f7406442872 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Fri, 29 Aug 2025 15:26:24 -0400 Subject: [PATCH 43/47] update --- tests/integration_tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 6fa2ae3f..867f7215 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -152,9 +152,9 @@ fn symbols_basic() { #[test] fn symbols_following() { - compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-sss.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S S' ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-ssm.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S M' ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --symvar-prefix & --rewrite-check ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-sss.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S S' --rewrite-check ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse-ssm.json", "-i1 -a6 --symvar-prefix & --follow '(+ 1 #2 #2 #1 #0 2 3 4)' --follow-types 'S S M' --rewrite-check ", InputFormat::ProgramsList); } #[test] From d2465d774c05a8dbb2eff5fa05943f82cb69a99a Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Fri, 29 Aug 2025 15:27:42 -0400 Subject: [PATCH 44/47] add relevant rewrite checks --- tests/integration_tests.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 867f7215..300251bd 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -142,12 +142,12 @@ fn python_symbols_regression() { #[test] fn symbols_basic() { - compare_out_jsons_testing("data/python/symbols-alignment.json", "data/expected_outputs/symbols-alignment.json", "-i2 -a3 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbols-cannot-be-literal.json", "data/expected_outputs/symbols-cannot-be-literal.json", "-i2 -a3 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbols-cannot-be-literal-0-arity.json", "data/expected_outputs/symbols-cannot-be-literal-0-arity.json", "-i2 -a3 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --symvar-prefix & ", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/symbol-reuse-dfa.json", "data/expected_outputs/symbol-reuse-dfa.json", &("-i1 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/pick-up-on-abstractions-0-arity.json", "data/expected_outputs/pick-up-on-abstractions-0-arity.json", &("-i1 -a0 ".to_owned() + &python_args()), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbols-alignment.json", "data/expected_outputs/symbols-alignment.json", "-i2 -a3 --rewrite-check --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbols-cannot-be-literal.json", "data/expected_outputs/symbols-cannot-be-literal.json", "-i2 -a3 --rewrite-check --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbols-cannot-be-literal-0-arity.json", "data/expected_outputs/symbols-cannot-be-literal-0-arity.json", "-i2 -a3 --rewrite-check --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse.json", "data/expected_outputs/symbol-reuse.json", "-i1 -a0 --rewrite-check --symvar-prefix & ", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/symbol-reuse-dfa.json", "data/expected_outputs/symbol-reuse-dfa.json", &("-i1 -a0 --rewrite-check ".to_owned() + &python_args()), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/pick-up-on-abstractions-0-arity.json", "data/expected_outputs/pick-up-on-abstractions-0-arity.json", &("-i1 -a0 --rewrite-check ".to_owned() + &python_args()), InputFormat::ProgramsList); } #[test] From cf3e78c7f305d91bae25051efca5f55be9f85671 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Wed, 3 Sep 2025 16:37:49 -0400 Subject: [PATCH 45/47] add rewrite checks --- tests/integration_tests.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 300251bd..0d20b5f5 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -120,14 +120,14 @@ const DFA_ARGS: &str = r#" --tdfa-json-path test_data/dfa.json --tdfa-root M --v #[test] fn tdfa_multi_arg_function() { - compare_out_jsons_testing("data/python/multi-arg-function.json", "data/expected_outputs/multi-arg-function-basic.json", "-i2 -a3", InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/multi-arg-function.json", "data/expected_outputs/multi-arg-function-with-dfa.json", &("-i2 -a3 ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/multi-arg-function.json", "data/expected_outputs/multi-arg-function-basic.json", "-i2 -a3 --rewrite-check", InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/multi-arg-function.json", "data/expected_outputs/multi-arg-function-with-dfa.json", &("-i2 -a3 --rewrite-check ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); } #[test] fn tdfa_sequence() { - compare_out_jsons_testing("data/python/front-of-sequence.json", "data/expected_outputs/front-of-sequence.json", &("-i2 -a3 ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); - compare_out_jsons_testing("data/python/back-of-sequence.json", "data/expected_outputs/back-of-sequence.json", &("-i2 -a3 ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/front-of-sequence.json", "data/expected_outputs/front-of-sequence.json", &("-i2 -a3 --rewrite-check ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/back-of-sequence.json", "data/expected_outputs/back-of-sequence.json", &("-i2 -a3 --rewrite-check ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); } fn python_args() -> String { @@ -136,7 +136,7 @@ fn python_args() -> String { #[test] fn python_symbols_regression() { - compare_out_jsons_testing("data/python/10.json", "data/expected_outputs/10.json", &("-i10 -a2 --symvar-prefix & ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); + compare_out_jsons_testing("data/python/10.json", "data/expected_outputs/10.json", &("-i10 -a2 --rewrite-check --symvar-prefix & ".to_owned() + DFA_ARGS), InputFormat::ProgramsList); } From a3d666ba106df777dea75320653752c96df5ed2c Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Wed, 3 Sep 2025 16:39:31 -0400 Subject: [PATCH 46/47] fix everything --- src/bin/rewrite.rs | 1 - src/pattern_args.rs | 8 ++++---- src/test_utils.rs | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/bin/rewrite.rs b/src/bin/rewrite.rs index f23dcae7..bc1cc660 100644 --- a/src/bin/rewrite.rs +++ b/src/bin/rewrite.rs @@ -18,7 +18,6 @@ use serde_json::json; use std::collections::HashMap; use std::fs::File; use std::path::PathBuf; -use std::str::FromStr; use stitch_core::*; use serde_json::Value; diff --git a/src/pattern_args.rs b/src/pattern_args.rs index 04c2603d..2f827294 100644 --- a/src/pattern_args.rs +++ b/src/pattern_args.rs @@ -79,14 +79,14 @@ impl PatternArgs { } } - pub fn type_of(&self, ivar: usize) -> VariableType { - self.variables[ivar].1 - } - pub fn variable_types(&self) -> Vec { self.variables.iter().map(|(_,t)| *t).collect() } + pub fn type_of(&self, ivar: usize) -> VariableType { + self.variables[ivar].1 + } + fn zippers(&self, shared: &SharedData) -> Vec> { self.arg_choices.iter().map(|lzid| shared.zip_of_zid[lzid.zid].clone() diff --git a/src/test_utils.rs b/src/test_utils.rs index a26dc127..d189f408 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -77,8 +77,6 @@ pub fn compare_out_jsons_testing(file: &str, expected_out_file: &str, args: &str check_eq(&output["rewritten"], &expected_output["rewritten"], vec!["rewritten".into()], &output, expected_out_file); check_eq(&output["variable_types"], &expected_output["variable_types"], vec!["rewritten".into()], &output, expected_out_file); - - } //todo add write_json_for_diff calls and also make it add a random suffix too From 61043eea64b5a00d7be93d3df8146479b63321b0 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Wed, 3 Sep 2025 16:53:20 -0400 Subject: [PATCH 47/47] fix --- src/compression.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compression.rs b/src/compression.rs index 506c420e..17c0642c 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -656,7 +656,7 @@ pub struct SharedData { pub multistep_cfg: MultistepCompressionConfig, pub tracking: Option, pub fused_lambda_tags: Option>, - pub prev_results: Vec, + pub prev_results: Vec, // necessary for TDFA pub follow: Option, }