1:- module(test_tornado,
    2  [test_tornado/0]).    3:- use_module(library(plunit)).    4
    5test_tornado:-
    6    trill:set_algorithm(tornado),
    7    run_tests([tornado_biopax,
    8    tornado_dbpedia,
    9    tornado_brca,
   10    tornado_commander,
   11    tornado_johnEmployee,
   12    tornado_peoplePets,
   13    tornado_vicodi]).
   14
   15:- use_module(library(trill_test/trill_test)).   16
   17:- begin_tests(tornado_brca, []).   18
   19:- ensure_loaded(library('examples/BRCA.pl')).   20
   21test(p_wlbrcr_h):-
   22  run((prob_instanceOf('WomanUnderLifetimeBRCRisk','Helen',Prob),close_to(Prob,0.123))).
   23test(p_wa_wulbrcr):-
   24  run((prob_sub_class('WomanAged3040','WomanUnderLifetimeBRCRisk',Prob),close_to(Prob,0.123))).
   25
   26:- end_tests(tornado_brca).   27
   28
   29:- begin_tests(tornado_vicodi, []).   30
   31:-ensure_loaded(library(examples/vicodi)).   32
   33test(p_r_avdpf):-
   34  run((prob_instanceOf('vicodi:Role','vicodi:Anthony-van-Dyck-is-Painter-in-Flanders',Prob),close_to(Prob,0.27540000000000003))).
   35test(p_p_r):-
   36  run((prob_sub_class('vicodi:Painter','vicodi:Role',Prob),close_to(Prob,0.30600000000000005))).
   37
   38:- end_tests(tornado_vicodi).   39
   40
   41:- begin_tests(tornado_commander, []).   42
   43:-ensure_loaded(library(examples/commander)).   44
   45test(e_c_j):-
   46  run((prob_instanceOf(commander,john,Prob),close_to(Prob,1))).
   47
   48:- end_tests(tornado_commander).   49
   50
   51:- begin_tests(tornado_peoplePets, []).   52
   53:-ensure_loaded(library(examples/peoplePets)).   54
   55test(p_nl_k):-
   56  run((prob_instanceOf('natureLover','Kevin',Prob),close_to(Prob,0.348))).
   57
   58:- end_tests(tornado_peoplePets).   59
   60
   61:- begin_tests(tornado_biopax, []).   62
   63:-ensure_loaded(library(examples/biopaxLevel3)).   64
   65test(p_twbr_e):-
   66  run((prob_sub_class('biopax:TransportWithBiochemicalReaction','biopax:Entity',Prob),close_to(Prob,0.98))).
   67
   68:- end_tests(tornado_biopax).   69
   70
   71:- begin_tests(tornado_dbpedia, []).   72
   73:-ensure_loaded(library('examples/DBPedia.pl')).   74
   75test(p_p_pp):-
   76  run((prob_sub_class('dbpedia:Place','dbpedia:PopulatedPlace',Prob),close_to(Prob,0.8273765902816))).
   77
   78:- end_tests(tornado_dbpedia).   79
   80
   81:- begin_tests(tornado_johnEmployee, []).   82
   83:-ensure_loaded(library(examples/johnEmployee)).   84
   85test(e_p_j):-
   86  run((prob_instanceOf('johnEmployee:person','johnEmployee:john',Prob),close_to(Prob,1))).
   87  
   88:- end_tests(tornado_johnEmployee).