Skip to content

Dynamic type errors in "eager" mergesort labs #7

Open

Description

@matthewhammer

The "eager" versions of mergesort in the lab catalog have dynamic type errors. Just discovered this, after adding dynamic type checking to Adapton engine recently.

Running lab: list-eager-mergesort1
thread '<unnamed>' panicked at 'Adapton engine: Detected a dynamic type error, possibly due to an ambiguous name:
	              at location: Loc { path:[,String("compute"),String("tree_of_list2")], id:ForkR(ForkR(ForkR(ForkL(Usize(8))))) }
	 location has result type: TypeId { t: 5100241585221884983 }
	but context expected type: TypeId { t: 12579407317080590652 }', /Users/hammer/.cargo/git/checkouts/adapton.rust-b16351c49ab23a81/d27287b/src/engine.rs:831
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: adapton::engine::assert_graphnode_res_type
   1: adapton::engine::res_node_of_loc
   2: <adapton::engine::DCG as adapton::engine::Adapton>::cell
   3: adapton::engine::cell::{{closure}}
   4: <std::thread::local::LocalKey<T>>::with
   5: adapton::engine::cell
   6: adapton::collections::tree_of_list_rec::{{closure}}
   7: <adapton::collections::List<X> as adapton::collections::ListElim<X>>::elim_arg
   8: adapton::collections::tree_of_list_rec
   9: adapton::collections::tree_of_list_rec::{{closure}}
  10: <adapton::collections::List<X> as adapton::collections::ListElim<X>>::elim_arg
  11: adapton::collections::tree_of_list_rec
  12: adapton::collections::tree_of_list_rec::{{closure}}::{{closure}}
  13: <adapton::engine::App<Arg, Spurious, Res> as adapton::engine::Producer<Res>>::produce
  14: adapton::engine::loc_produce
  15: adapton::engine::clean_comp
  16: <adapton::engine::ForceDep<Res> as adapton::engine::DCGDep>::clean
  17: <adapton::engine::DCG as adapton::engine::Adapton>::force
  18: adapton::engine::force::{{closure}}
  19: <std::thread::local::LocalKey<T>>::with
  20: adapton::engine::force
  21: adapton::collections::tree_of_list_rec::{{closure}}
  22: <adapton::collections::List<X> as adapton::collections::ListElim<X>>::elim_arg
  23: adapton::collections::tree_of_list_rec
  24: adapton::collections::tree_of_list_rec::{{closure}}
  25: <adapton::collections::List<X> as adapton::collections::ListElim<X>>::elim_arg
  26: adapton::collections::tree_of_list_rec
  27: adapton::collections::tree_of_list_rec::{{closure}}::{{closure}}
  28: <adapton::engine::App<Arg, Spurious, Res> as adapton::engine::Producer<Res>>::produce
  29: adapton::engine::loc_produce
  30: <adapton::engine::DCG as adapton::engine::Adapton>::force
  31: adapton::engine::force::{{closure}}
  32: <std::thread::local::LocalKey<T>>::with
  33: adapton::engine::force
  34: adapton::collections::tree_of_list_rec::{{closure}}
  35: <adapton::collections::List<X> as adapton::collections::ListElim<X>>::elim_arg
  36: adapton::collections::tree_of_list_rec
  37: adapton::collections::tree_of_list_rec::{{closure}}
  38: <adapton::collections::List<X> as adapton::collections::ListElim<X>>::elim_arg
  39: adapton::collections::tree_of_list_rec
  40: adapton::collections::tree_of_list_rec::{{closure}}::{{closure}}
  41: <adapton::engine::App<Arg, Spurious, Res> as adapton::engine::Producer<Res>>::produce
  42: adapton::engine::loc_produce
  43: adapton::engine::clean_comp
  44: <adapton::engine::ForceDep<Res> as adapton::engine::DCGDep>::clean
  45: adapton::engine::clean_comp
  46: <adapton::engine::ForceDep<Res> as adapton::engine::DCGDep>::clean
  47: <adapton::engine::DCG as adapton::engine::Adapton>::force
  48: adapton::engine::force::{{closure}}
  49: <std::thread::local::LocalKey<T>>::with
  50: adapton::engine::force
  51: adapton::collections::tree_of_list_rec::{{closure}}
  52: <adapton::collections::List<X> as adapton::collections::ListElim<X>>::elim_arg
  53: adapton::collections::tree_of_list_rec
  54: adapton::collections::tree_of_list
  55: <main::catalog::EagerMergesort1 as adapton_lab::labdef::Compute<adapton::collections::List<usize>, adapton::collections::List<usize>>>::compute::{{closure}}
  56: <adapton::engine::DCG as adapton::engine::Adapton>::ns
  57: adapton::engine::ns::{{closure}}
  58: <std::thread::local::LocalKey<T>>::with
  59: adapton::engine::ns
  60: <main::catalog::EagerMergesort1 as adapton_lab::labdef::Compute<adapton::collections::List<usize>, adapton::collections::List<usize>>>::compute
  61: <X as adapton_lab::labdef::ComputeDemand<Input, Output>>::compute
  62: adapton_lab::labrun::get_engine_sample::{{closure}}::{{closure}}
  63: <adapton::engine::DCG as adapton::engine::Adapton>::cnt
  64: adapton::engine::manage::cnt::{{closure}}
  65: <std::thread::local::LocalKey<T>>::with
  66: adapton::engine::manage::cnt
  67: adapton_lab::labrun::get_engine_metrics
  68: adapton_lab::labrun::get_engine_sample::{{closure}}
  69: <adapton::engine::DCG as adapton::engine::Adapton>::ns
  70: adapton::engine::ns::{{closure}}
  71: <std::thread::local::LocalKey<T>>::with
  72: adapton::engine::ns
  73: adapton_lab::labrun::get_engine_sample
  74: <adapton_lab::labrun::LabState<rand::StdRng, Input, EditSt, Output, Editor, Archivist> as adapton_lab::labrun::SampleGen>::sample
  75: adapton_lab::labrun::<impl adapton_lab::labdef::Lab for adapton_lab::labdef::LabDef<Input, EditSt, Output, Editor, Archivist>>::run
  76: main::run_lab
  77: main::run_all_labs
  78: main::main2
  79: main::main::{{closure}}
  80: <std::panic::AssertUnwindSafe<F> as core::ops::FnOnce<()>>::call_once
  81: std::panicking::try::do_call
  82: __rust_maybe_catch_panic
  83: std::panicking::try
  84: std::panic::catch_unwind
  85: std::thread::Builder::spawn::{{closure}}
  86: <F as alloc::boxed::FnBox<A>>::call_box
  87: std::sys::imp::thread::Thread::new::thread_start
  88: _pthread_body
  89: _pthread_start

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions