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