Skip to content

zeros in probability in the master build #60

@dotkrnl

Description

@dotkrnl

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions