diff --git a/examples/crbd.tppl b/examples/crbd.tppl index 4b9b749..663a9b1 100644 --- a/examples/crbd.tppl +++ b/examples/crbd.tppl @@ -1,3 +1,7 @@ +import "treeppl::lib/trees.tppl" + +type alias Tree = ClockTree + function simulateExtinctSubtree(time: Real, lambda: Real, mu: Real) { assume waitingTime ~ Exponential(lambda + mu); if waitingTime > time { diff --git a/examples/treeppl_in_jupyter.ipynb b/examples/treeppl_in_jupyter.ipynb index ff7e90b..13d26bc 100644 --- a/examples/treeppl_in_jupyter.ipynb +++ b/examples/treeppl_in_jupyter.ipynb @@ -227,6 +227,9 @@ "outputs": [], "source": [ "%%treeppl crbd -m smc-bpf --particles 10000 --resample align --subsample --subsample-size 10\n", + "import \"treeppl::lib/trees.tppl\"\n", + "\n", + "type alias Tree = ClockTree\n", "\n", "function simulateExtinctSubtree(time: Real, lambda: Real, mu: Real) {\n", " assume waitingTime ~ Exponential(lambda + mu);\n", diff --git a/tests/test_all.py b/tests/test_all.py index 270442c..2aa240a 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -46,6 +46,10 @@ def test_tree_input(): ) with treeppl.Model( source="""\ +import "treeppl::lib/trees.tppl" + +type alias Tree = ClockTree + function count_leaves(tree: Tree) => Int { if tree is Node { return count_leaves(tree.left) + count_leaves(tree.right);