list of test for semlpad.pl and semlpadsld.pl
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2014 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
28dd8a87a4
commit
dd7a96e082
46
cplint/testsemlpad.txt
Normal file
46
cplint/testsemlpad.txt
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
LPAD and CP-Logic reasoning suite
|
||||||
|
Copyright (c) 2007, Fabrizio Riguzzi
|
||||||
|
|
||||||
|
list of tests for semlpad.pl
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
files([
|
||||||
|
exapprox,
|
||||||
|
exrange,
|
||||||
|
threesideddice,
|
||||||
|
mendels, %ok only with grounding=variables
|
||||||
|
coin2,
|
||||||
|
ex
|
||||||
|
]).
|
||||||
|
|
||||||
|
|
||||||
|
test((s([a],P),close_to(P,0.1719)),exapprox,ground_body(true)).
|
||||||
|
test((s([a],P),close_to(P,0.0.99)),exapprox,ground_body(false)).
|
||||||
|
|
||||||
|
test((s([a(1)],P),close_to(P,0.2775)),exrange,_).
|
||||||
|
test((s([a(2)],P),close_to(P,0.36)),exrange,_).
|
||||||
|
|
||||||
|
test((s([on(0,1)],P),close_to(P,0.333333333333333)),threesideddice,_).
|
||||||
|
test((s([on(1,1)],P),close_to(P,0.222222222222222)),threesideddice,_).
|
||||||
|
test((s([on(2,1)],P),close_to(P,0.148148147703704)),threesideddice,_).
|
||||||
|
|
||||||
|
test((sc([on(2,1)],[on(0,1)],P),close_to(P,0.222222222222222)),threesideddice,_).
|
||||||
|
test((sc([on(2,1)],[on(1,1)],P),close_to(P,0.333333333333333)),threesideddice,_).
|
||||||
|
|
||||||
|
|
||||||
|
test((s([cg(s,1,p)],P),close_to(P,0.5)),mendels,ground_body(false)).
|
||||||
|
test((s([cg(s,1,w)],P),close_to(P,0.5)),mendels,ground_body(false)).
|
||||||
|
test((s([cg(s,2,p)],P),close_to(P,1.0)),mendels,ground_body(false)).
|
||||||
|
test((s([cg(s,2,w)],P),close_to(P,0)),mendels,ground_body(false)).
|
||||||
|
|
||||||
|
|
||||||
|
test((s([heads(coin1)],P),close_to(P,0.51)),coin2,_).
|
||||||
|
test((s([heads(coin2)],P),close_to(P,0.51)),coin2,_).
|
||||||
|
|
||||||
|
test((s([tails(coin1)],P),close_to(P,0.49)),coin2,_).
|
||||||
|
test((s([tails(coin2)],P),close_to(P,0.49)),coin2,_).
|
||||||
|
|
||||||
|
test((s([a],P),close_to(P,0.226)),ex,_).
|
||||||
|
|
51
cplint/testsemlpadsld.txt
Normal file
51
cplint/testsemlpadsld.txt
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
LPAD and CP-Logic reasoning suite
|
||||||
|
Copyright (c) 2007, Fabrizio Riguzzi
|
||||||
|
|
||||||
|
list of tests for semlpadsld.pl
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
files([
|
||||||
|
exapprox,
|
||||||
|
exrange,
|
||||||
|
threesideddice,
|
||||||
|
mendels,
|
||||||
|
school_simple,
|
||||||
|
coin2,
|
||||||
|
ex]).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
test((s([a],P),close_to(P,0.1719)),exapprox,ground_body(true)).
|
||||||
|
test((s([a],P),close_to(P,0.0.99)),exapprox,ground_body(false)).
|
||||||
|
|
||||||
|
test((s([a(1)],P),close_to(P,0.2775)),exrange,_).
|
||||||
|
test((s([a(2)],P),close_to(P,0.36)),exrange,_).
|
||||||
|
|
||||||
|
test((s([on(0,1)],P),close_to(P,0.333333333333333)),threesideddice,_).
|
||||||
|
test((s([on(1,1)],P),close_to(P,0.222222222222222)),threesideddice,_).
|
||||||
|
test((s([on(2,1)],P),close_to(P,0.148148147703704)),threesideddice,_).
|
||||||
|
|
||||||
|
test((sc([on(2,1)],[on(0,1)],P),close_to(P,0.222222222222222)),threesideddice,_).
|
||||||
|
test((sc([on(2,1)],[on(1,1)],P),close_to(P,0.333333333333333)),threesideddice,_).
|
||||||
|
|
||||||
|
|
||||||
|
test((s([cg(s,1,p)],P),close_to(P,0.5)),mendels,ground_body(false)).
|
||||||
|
test((s([cg(s,1,w)],P),close_to(P,0.5)),mendels,ground_body(false)).
|
||||||
|
test((s([cg(s,2,p)],P),close_to(P,1.0)),mendels,ground_body(false)).
|
||||||
|
test((s([cg(s,2,w)],P),close_to(P,0)),mendels,ground_body(false)).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
test((s([student_ranking(s0,h)],P),close_to(P,0.6646250000000005)),school_simple,_).
|
||||||
|
test((s([student_ranking(s0,l)],P),close_to(P,0.33537499999999987)),school_simple,_).
|
||||||
|
|
||||||
|
test((s([heads(coin1)],P),close_to(P,0.51)),coin2,_).
|
||||||
|
test((s([heads(coin2)],P),close_to(P,0.51)),coin2,_).
|
||||||
|
|
||||||
|
test((s([tails(coin1)],P),close_to(P,0.49)),coin2,_).
|
||||||
|
test((s([tails(coin2)],P),close_to(P,0.49)),coin2,_).
|
||||||
|
|
||||||
|
test((s([a],P),close_to(P,0.226)),ex,_).
|
||||||
|
|
Reference in New Issue
Block a user