From bdef49bb20de93c41cee884bf8f8ee055f66a965 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Wed, 23 May 2012 15:57:00 +0100 Subject: [PATCH] remove city old example --- packages/CLPBN/examples/City/db_128.yap | 25 ----------- packages/CLPBN/examples/City/schema.yap | 60 ------------------------- packages/CLPBN/examples/City/tables.yap | 35 --------------- 3 files changed, 120 deletions(-) delete mode 100644 packages/CLPBN/examples/City/db_128.yap delete mode 100644 packages/CLPBN/examples/City/schema.yap delete mode 100644 packages/CLPBN/examples/City/tables.yap diff --git a/packages/CLPBN/examples/City/db_128.yap b/packages/CLPBN/examples/City/db_128.yap deleted file mode 100644 index 6eea3954a..000000000 --- a/packages/CLPBN/examples/City/db_128.yap +++ /dev/null @@ -1,25 +0,0 @@ - -%conservative_city(nyc, t). - -hair_color(joe, t). - -car_color(joe, t). - -shoe_size(joe, f). - -/* Steps: - -1. generate N facts lives(I, nyc), 0 <= I < N. - -2. generate evidence on descn for N people, *** except for 1 *** - -3. Run query ?- guilty(joe, Guilty), witness(joe, t), descn(2,t), descn(3, f), descn(4, f). - -query(Guilty) :- - guilty(joe, Guilty), - witness(joe, t), - descn(2,t), - descn(3,f), - descn(4,f), .... - -*/ \ No newline at end of file diff --git a/packages/CLPBN/examples/City/schema.yap b/packages/CLPBN/examples/City/schema.yap deleted file mode 100644 index ff1950b40..000000000 --- a/packages/CLPBN/examples/City/schema.yap +++ /dev/null @@ -1,60 +0,0 @@ - -/* base file for school database. Supposed to be called from school_*.yap */ - -conservative_city(City, Cons) :- - cons_table(City, ConsDist), - { Cons = cons(City) with p([y,n], ConsDist) }. - -gender(X, Gender) :- - gender_table(City, GenderDist), - { Gender = gender(City) with p([m,f], GenderDist) }. - -hair_color(X, Color) :- - lives(X, City), - conservative_city(City, Cons), - gender(X, Gender), - color_table(X,ColorTable), - { Color = color(X) with - p([t,f], ColorTable,[Gender,Cons]) }. - -car_color(X, Color) :- - hair_color(City, HColor), - ccolor_table(X,CColorTable), - { Color = ccolor(X) with - p([t,f], CColorTable,[HColor]) }. - -height(X, Height) :- - gender(X, Gender), - height_table(X,HeightTable), - { Height = height(X) with - p([t,f], HeightTable,[Gender]) }. - -shoe_size(X, Shoesize) :- - height(X, Height), - shoe_size_table(X,ShoesizeTable), - { Shoesize = shoe_size(X) with - p([t,f], ShoesizeTable,[Height]) }. - -guilty(X, Guilt) :- - guilt_table(X, GuiltDist), - { Guilt = guilt(X) with p([y,n], GuiltDist) }. - - -descn(X, Descn) :- - car_color(X, Car), - hair_color(X, Hair), - height(X, Height), - guilty(X, Guilt), - descn_table(X, DescTable), - { Descn = descn(X) with - p([t,f], DescTable,[Car,Hair,Height,Guilt]) }. - -witness(City, Witness) :- - descn(joe, DescnJ), - descn(1, Descn1), - wit_table(WitTable), - { Witness = wit(City) with - p([t,f], WitTable,[DescnJ, Descn1]) }. - - - \ No newline at end of file diff --git a/packages/CLPBN/examples/City/tables.yap b/packages/CLPBN/examples/City/tables.yap deleted file mode 100644 index 94ab3d016..000000000 --- a/packages/CLPBN/examples/City/tables.yap +++ /dev/null @@ -1,35 +0,0 @@ - -cons_table(amsterdam,[0.2, - 0.8]) :- !. -cons_table(_, [0.8, - 0.2]). - -color_table(_, - /* tm tf fm ff */ - [ 0.05, 0.1, 0.3, 0.5 , - 0.95, 0.9, 0.7, 0.5 ]). - -ccolor_table(_, - /* t f */ - [ 0.9, 0.2 , - 0.1, 0.8 ]). - -height_table(_, - /* m f */ - [ 0.6, 0.4 , - 0.4, 0.6 ]). - -shoe_size_table(_, - /* t f */ - [ 0.9, 0.1 , - 0.1, 0.9 ]). - - A: professor's ability; - B: student's grade (for course registration). -*/ -descn_table(_, - /* color, hair, height, guilt */ - /* ttttt tttf ttft ttff tfttt tftf tfft tfff ttttt fttf ftft ftff ffttt fftf ffft ffff */ -/*t*/ [0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, -/*f*/ 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 ]). -