-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
When building Dice and rsdd both from the master branch, the following simple example results in all zeros:
let burglary = flip 0.1 in
let alarm = if burglary then flip 9.5 else flip 0.1 in
let _ = observe alarm in burglary
The example above has the output of:
================[ Joint Distribution ]================
Value Probability
true 0
false 0
To build them from the master branch, the following Dockerfile was used:
FROM ocaml/opam:debian-11-ocaml-4.09
WORKDIR /dice
# Install Python 3.9 and other dependencies
RUN sudo apt-get update && sudo apt-get install python3.9 m4 pkg-config libffi-dev libgmp-dev -y
# Install Rust and Cargo
RUN sh -c "$(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs)" -- -y
# Install Dice dependencies
RUN sudo mkdir -p /dice && sudo chown $(id -un) /dice-python && sudo chown $(id -un) /dice
RUN git clone https://github.com/SHoltzen/dice.git /dice
RUN cd /dice && git submodule update --init --recursive && cd rsdd && git checkout master
RUN cd /dice && opam init && opam install . --deps-only
# Build Dice
RUN /bin/bash -c "cd /dice && eval '$(opam env)' && source $HOME/.cargo/env && dune build"
# Install Dice
RUN /bin/bash -c "cd /dice && eval '$(opam env)' && dune install"Metadata
Metadata
Assignees
Labels
No labels