BayesianLogic / blog

The BLOG programming language
http://bayesianlogic.github.io/
BSD 4-Clause "Original" or "Old" License
98 stars 31 forks source link

Refactoring Examples #215

Closed chrisgioia64 closed 10 years ago

chrisgioia64 commented 10 years ago

@lileicc Not to be merged yet.

Changes to examples so that they compile:

lileicc commented 10 years ago

@chrisgioia64 Please use tuple set instead of implicitset for uniform choice!

chrisgioia64 commented 10 years ago

So UniformChoice({p for Person p})?

lileicc commented 10 years ago

Yes

lileicc commented 10 years ago

And for obs, you need

obs {b for Blip b} = {B1, B2, B3};
lileicc commented 10 years ago

Categorical actually works. see example:

random Integer x ~ Categorical(
  { 1 -> 0.2,
    2 -> 0.8});
query x;
lileicc commented 10 years ago

@chrisgioia64 Please pull. I updated.

lileicc commented 10 years ago

@cberzan @chrisgioia64 @tejasvsrinivasan @jxwuyi

I will make the following arrangement.

  1. merge this branch first.
  2. continue to merge new-distrib-interface into master.
  3. create a new branch dedicated for revising all examples. based on master, case-expression and list-set branch. we expect no java code change in that branch. But all changes on examples will be made in that branch. So that we can make sure there is one valid version of examples.
  4. Tejas helps revise the examples.
  5. Yi fixes bugs in case-expression branch.