6
7example(1001) :-
8 makeEnvironment('ex1','von HJO'),
9 initEnvironment,
10 defconcept(fatherAcademic,and([male,some(child,academic)])),
11 defconcept(grandfatherAcademic,and([male,some(child,fatherAcademic)])),
12 assert_ind(tom,tim,child),
13 assert_ind(tim,mike,child),
14 assert_ind(mike,male),
15 assert_ind(mike,academic),
16 assert_ind(tim,male),
17 assert_ind(tom,male).
24example(1002) :-
25 makeEnvironment('ex2','krisExample'),
26 initEnvironment,
27 defprimconcept(male),
28 defprimconcept(female,not(male)),
29 defconcept(males,some(sex,male)),
30 defconcept(females,some(sex,female)),
31 defprimconcept(person,some(sex,or([male,female]))),
32 defconcept(parent,and([person,some(child,person)])),
33 defconcept(mother,and([parent,some(sex,female)])),
34 defconcept(father,and([parent,not(mother)])),
35 defconcept(grandparent,and([parent,some(child,parent)])),
36 defconcept(parent_with_sons_only,and([parent,all(child,some(sex,male))])),
37 defconcept(parent_with_two_children,and([parent,atleast(2,child)])),
38 assert_ind(tom,father),
39 assert_ind(tom,peter,child),
40 assert_ind(tom,harry,child),
41 assert_ind(mary,parent_with_sons_only),
42 assert_ind(mary,tom,child),
43 assert_ind(mary,chris,child).
47example(1003) :-
48 makeEnvironment('ex3','Inconsistence'),
49 initEnvironment,
50 defprimconcept(parent_with_one_child,atmost(1,child)),
51 assert_ind(mary,parent_with_one_child),
52 assert_ind(mary,tom,child),
53 assert_ind(mary,chris,child).
56example(1004) :-
57 makeEnvironment('ex4','Inconsistence'),
58 initEnvironment,
59 defconcept([b(believe,a1)],c1,b(want,a2,car)),
60 defconcept([b(believe,a1)],c2,b(want,a3,car)),
61 defprimconcept([b(believe,a1)],c1,c2),
62 assert_ind([b(believe,a1)],audi,c1).
68example(1005) :-
69 makeEnvironment('ex5','Subsumption'),
70 initEnvironment,
71 defconcept(c1,and([all(r,a),all(and([r,q]),b)])),
72 defconcept(c2,all(and([r,q]),and([a,b]))).
78example(1006) :-
79 makeEnvironment('ex6','Subsumption'),
80 initEnvironment,
81 defrole(r1,and([r,q])),
82 defconcept(d0,and([a,b])),
83 defconcept(d1,all(r,a)),
84 defconcept(d2,all(r1,b)),
85 defconcept(c1,and([d1,d2])),
86 defconcept(c2,all(r1,d0)).
88example(1007) :-
89 makeEnvironment('ex7','Subsumption'),
90 initEnvironment,
91 defconcept(c1,atleast(3,r)),
92 defconcept(c2,and([all(and([r,p]),a),all(and([r,q]),not(a)),atleast(2,and([r,p])),atleast(2,and([r,q]))])).
96example(1008) :-
97 makeEnvironment('ex8','Disjunction of complementary concepts'),
98 initEnvironment,
99 defprimconcept(male),
100 defconcept(female,not(male)),
101 defconcept(heterosexual,or([male,female])).
106example(1009) :-
107 makeEnvironment('ex9','Variation of the KRIS example'),
108 initEnvironment,
109 defprimconcept(male),
110 defprimconcept(female,not(male)),
111 defprimconcept(person,or([male,female])),
112 defconcept(parent,and([person,some(child,person)])),
113 defconcept(mother,and([parent,female])),
114 defconcept(father,and([parent,not(mother)])),
115 defconcept(grandparent,and([parent,some(child,parent)])),
116 defconcept(parent_with_sons_only,and([parent,all(child,male)])),
117 defconcept(parent_with_two_children,and([parent,atleast(2,child)])),
118 assert_ind(tom,father),
119 assert_ind(tom,peter,child),
120 assert_ind(tom,harry,child),
121 assert_ind(mary,parent_with_sons_only),
122 assert_ind(mary,tom,child),
123 assert_ind(mary,chris,child).
127example(10010) :-
128 makeEnvironment('ex10','Inverse Role'),
129 initEnvironment,
130 defrole(r2,inverse(r1)),
131 defconcept(c1,all(r1,c2)),
132 defconcept(c3,some(r2,c1)),
133 assert_ind(tom,c3).
137example(10011) :-
138 makeEnvironment('ex11','Inconsistence'),
139 initEnvironment,
140 defconcept(c1,and([atleast(2,child),atmost(1,child)])),
141 assert_ind(tom,c1).
147example(10012) :-
148 makeEnvironment('ex12','Subsumption'),
149 initEnvironment,
150 defconcept(c1,and([person,atleast(2,child)])),
151 defconcept(c2,and([person,atleast(3,restr(child,lawyer))])).
155example(10013) :-
156 makeEnvironment('ex13','Subsumption'),
157 initEnvironment,
158 defconcept(c1,and([person,atmost(4,restr(child,doctor))])),
159 defconcept(c2,and([person,female,atmost(3,child)])).
165example(10014) :-
166 makeEnvironment('ex14','Subsumption'),
167 initEnvironment,
168 defconcept(c1,atmost(0,restr(r,and([atleast(3,s1),atleast(4,s2)])))),
169 defconcept(c2,all(restr(r,atleast(2,s1)),atmost(2,s2))).
173example(10015) :-
174 makeEnvironment('ex15','Subsumption'),
175 initEnvironment,
176 defconcept(c1,and([person,all(friend,doctor),all(restr(friend,doctor),atleast(1,speciality))])),
177 defconcept(c2,and([person,all(friend,atleast(1,speciality))])).
181example(10016) :-
182 makeEnvironment('ex16','Subsumption'),
183 initEnvironment,
184 defconcept(c1,and([atleast(1,restr(child,lawyer)),atleast(1,restr(child,doctor))])),
185 defconcept(c2,or([atleast(2,child),atleast(1,restr(child,and([lawyer,doctor])))])).
189example(10017) :-
190 makeEnvironment('ex17','Subsumption'),
191 initEnvironment,
192 defconcept(c1,some(and([child,friend]),doctor)),
193 defconcept(c2,and([some(child,doctor),some(friend,doctor)])).
197example(10018) :-
198 makeEnvironment('ex18','Number restrictions'),
199 initEnvironment,
200 defprimconcept(female),
201 defconcept(male,not(female)),
202 defconcept(c3,and([atmost(4,child),atleast(2,restr(child,female))])),
203 defconcept(c4,atmost(2,restr(child,female))),
204 assert_ind(tom,male),
205 assert_ind(peter,male),
206 assert_ind(mary,peter,child),
207 assert_ind(mary,tom,child),
208 assert_ind(mary,c3).
212example(10019) :-
213 makeEnvironment('ex19','Number restrictions'),
214 initEnvironment,
215 defprimconcept(female),
216 defconcept(male,not(female)),
217 defconcept(c5,and([atmost(2,restr(child,male))])),
218 assert_ind(tom,male),
219 assert_ind(peter,male),
220 assert_ind(mary,tom,child),
221 assert_ind(mary,peter,child),
222 assert_ind(mary,amy,child),
223 assert_ind(mary,c5).
227example(10020) :-
228 makeEnvironment('ex20','Number restrictions'),
229 initEnvironment,
230 defprimconcept(female),
231 defconcept(male,not(female)),
232 defconcept(c5,and([atmost(2,restr(child,male)),atmost(1,restr(child,female))])),
233 assert_ind(tom,male),
234 assert_ind(peter,male),
235 assert_ind(mary,tom,child),
236 assert_ind(mary,peter,child),
237 assert_ind(mary,amy,child),
238 assert_ind(mary,jane,child),
239 assert_ind(mary,c5).
242example(10021) :-
243 makeEnvironment('ex21','Number restrictions'),
244 initEnvironment,
245 defprimconcept(female),
246 defconcept(male,not(female)),
247 defconcept(c1,and([atmost(1,restr(teacher,male)),atmost(1,restr(teacher,female))])),
248 defconcept(c2,and([atmost(2,restr(teacher,male)),atmost(1,restr(teacher,female))])),
249 assert_ind(tom,c1),
250 assert_ind(sue,c1),
251 assert_ind(david,c2),
252 assert_ind(tom,betty,teacher),
253 assert_ind(tom,peter,teacher),
254 assert_ind(sue,betty,teacher),
255 assert_ind(sue,chris,teacher),
256 assert_ind(david,betty,teacher),
257 assert_ind(david,chris,teacher),
258 assert_ind(david,peter,teacher).
263example(10022) :-
264 makeEnvironment('ex22','Number restrictions'),
265 initEnvironment,
266 defprimconcept(female),
267 defconcept(male,not(female)),
268 defrole(maleTeacher,restr(teacher,male)),
269 defrole(femaleTeacher,restr(teacher,female)),
270 defconcept(c1,and([atmost(1,maleTeacher),atmost(1,femaleTeacher)])),
271 defconcept(c2,atmost(1,maleTeacher)),
272 assert_ind(tom,c2),
273 assert_ind(sue,c1),
274 assert_ind(tom,betty,teacher),
275 assert_ind(tom,chris,teacher),
276 assert_ind(tom,robin,teacher),
277 assert_ind(sue,betty,teacher),
278 assert_ind(sue,chris,teacher).
285example(10023) :-
286 makeEnvironment('ex23','Number restrictions'),
287 initEnvironment,
288 defprimconcept(female),
289 defconcept(male,not(female)),
290 defprimrole(maleTeacher,teacher),
291 defprimrole(femaleTeacher,teacher),
292 defconcept(c1,and([atmost(1,maleTeacher),atmost(1,femaleTeacher)])),
293 defconcept(c2,atmost(1,maleTeacher)),
294 assert_ind(tom,c2),
295 assert_ind(sue,c1),
296 assert_ind(tom,betty,teacher),
297 assert_ind(tom,chris,teacher),
298 assert_ind(tom,robin,teacher),
299 assert_ind(sue,betty,teacher),
300 assert_ind(sue,chris,teacher).
304example(10024) :-
305 makeEnvironment('ex24','Modal operators'),
306 initEnvironment,
307 modalAxioms(kd45,believe,a1),
308 defconcept(c1,b(believe,a1,auto)),
309 defconcept(c3,b(believe,a1,c1)),
310 defconcept([b(believe,a1)],c1,b(believe,a1,auto)),
311 defconcept([b(believe,a1)],c3,b(believe,a1,c1)),
312 assert_ind(audi,c1).
316example(10025) :-
317 makeEnvironment('ex25','Modal operators'),
318 initEnvironment,
319 modalAxioms(kd45,believe,a1),
320 defconcept([b(believe,a1)],c1,b(believe,a1,auto)),
321 defconcept([b(believe,a1)],c3,b(believe,a1,c1)),
322 assert_ind(audi,c1).
328example(10026) :-
329 makeEnvironment('ex27','Subsumption'),
330 initEnvironment,
331 defconcept(c1,atmost(0,r)),
332 defconcept(c2,all(r,c5)).
338example(10027) :-
339 makeEnvironment('ex28','Subsumption'),
340 initEnvironment,
341 defconcept(c1,not(some(r,'top'))),
342 defconcept(c2,all(r,c5)).
346example(10028) :-
347 makeEnvironment('ex28','Modal operators'),
348 initEnvironment,
349 modalAxioms(kd45,believe,a1),
350 modalAxioms(kd45,believe,all),
351 defprimconcept(auto),
352 assert_ind([b(believe,all)],audi,auto).
358example(10029) :-
359 makeEnvironment('ex29','Number restrictions'),
360 initEnvironment,
361 defprimconcept(female),
362 defconcept(male,not(female)),
363 defprimrole(teacher),
364 defrole(maleTeacher,restr(teacher,male)),
365 defrole(femaleTeacher,restr(teacher,female)),
366 defconcept(c1,and([atmost(1,maleTeacher),atmost(2,femaleTeacher)])),
367 assert_ind(tom,c1),
368 assert_ind(sue,c1),
369 assert_ind(tom,betty,teacher),
370 assert_ind(tom,chris,teacher),
371 assert_ind(tom,robin,teacher),
372 assert_ind(sue,betty,teacher),
373 assert_ind(sue,chris,teacher).
374example(10030) :-
375 makeEnvironment('ex30','Number restrictions'),
376 initEnvironment,
377 defprimconcept(female),
378 defrole(maleTeacher,restr(teacher,not(female))),
379 defrole(femaleTeacher,restr(teacher,female)),
380 defconcept(c1,and([atmost(1,maleTeacher),atmost(1,femaleTeacher)])),
381 defconcept(c2,atmost(1,maleTeacher)),
382 assert_ind(tom,c2),
383 assert_ind(sue,c1),
384 assert_ind(tom,betty,teacher),
385 assert_ind(tom,chris,teacher),
386 assert_ind(tom,robin,teacher),
387 assert_ind(sue,betty,teacher),
388 assert_ind(sue,chris,teacher).
393example(10031) :-
394 makeEnvironment('ex31','defclosed'),
395 initEnvironment,
396 defconcept(onlyMaleChildren,all(child,male)),
397 assert_ind(tom,peter,child),
398 assert_ind(tom,chris,child),
399 assert_ind(tom,tim,child),
400 assert_ind(peter,male),
401 assert_ind(chris,male),
402 assert_ind(tim,male),
403 defclosed(tom,_Y,child).
408example(10032) :-
409 makeEnvironment('ex32','abduction'),
410 initEnvironment,
411 defconcept(male,not(female)).
417example(10033) :-
418 makeEnvironment('ex33','abduction'),
419 initEnvironment,
420 defconcept(c1,and([quaker,normalQuaker])),
421 defconcept(c2,and([republican,normalRepublican])),
422 defprimconcept(c1,dove),
423 defprimconcept(c2,hawk),
424 assert_ind(nixon,quaker),
425 assert_ind(nixon,republican).
431example(10034) :-
432 makeEnvironment('ex34',abduction),
433 initEnvironment,
434 defprimconcept(penguin,and([bird,not(fly)])),
435 defprimconcept(bird,fly),
436 assert_ind(tweety,penguin),
437 assert_ind(john,bird).
455example(10035) :-
456 makeEnvironment('ex35',abduction),
457 initEnvironment,
458 defprimconcept(penguin,and([bird,not(normalBird)])),
459 defprimconcept(and([bird,normalBird]),fly),
460 assert_ind(tweety,penguin),
461 assert_ind(john,bird).
489example(10036) :-
490 makeEnvironment('ex36','abduction'),
491 initEnvironment,
492 defprimconcept(and([quaker,normalQuaker]),dove),
493 defprimconcept(and([republican,normalRepublican]),hawk),
494 assert_ind(nixon,quaker),
495 assert_ind(nixon,republican).
497example(10037) :-
498 makeEnvironment('ex37','abduction'),
499 initEnvironment,
500 defprimconcept(rained_last_night,grass_is_wet),
501 defprimconcept(sprinkler_was_on,grass_is_wet),
502 defprimconcept(grass_is_wet,shoes_are_wet).
506example(10038) :-
507 makeEnvironment('ex38','disjunctive_information'),
508 initEnvironment,
509 assert_ind(ideaste,oedipus,hasChild),
510 assert_ind(oedipus,polyneikes,hasChild),
511 assert_ind(ideaste,polyneikes,hasChild),
512 assert_ind(polyneikes,thersandros,hasChild),
513 assert_ind(oedipus,fatherMurderer),
514 assert_ind(thersandros,not(fatherMurderer)),
515 defconcept(c1,and([fatherMurderer,some(hasChild,not(fatherMurderer))])),
516 defconcept(c2,some(hasChild,c1)).
520example(10039) :-
521 makeEnvironment('ex39','negation_as_failure'),
522 initEnvironment,
523 defrole(parentOf,inverse(childOf)),
524 defconcept(male,not(female)),
525 defprimconcept(and([some(parentOf,top),naf(not(female))]),female),
526 assert_ind(mary,lucky,childOf).
535example(10040) :-
536 makeEnvironment('ex40','negation_as_failure'),
537 initEnvironment,
538 defprimconcept(and([doctor,naf(not(richPerson))]),richPerson),
539 defconcept(poorPerson,not(richPerson)),
540 assert_ind(peter,doctor).
549example(10041) :-
550 makeEnvironment('ex41','negation_as_failure'),
551 initEnvironment,
552 defrole(doctorParentOf,restr(inverse(childOf),doctor)),
553 defrole(childOfDoctor,inverse(r1)),
554 defprimconcept(and([some(doctorParentOf,top),naf(not(richPerson))]),richPerson),
555 defconcept(poorPerson,not(richPerson)),
556 assert_ind(chris,doctor),
557 assert_ind(chris,tom,childOf).
566example(10042) :-
567 makeEnvironment('ex42','negation_as_failure'),
568 initEnvironment,
569 defconcept(fourWheels,and([atleast(4,wheels),atmost(4,wheels)])),
570 defconcept(fiveWheels,and([atleast(5,wheels),atmost(5,wheels)])),
571 defprimconcept(and([car,naf(not(fourWheels))]),fourWheels),
572 assert_ind(audi,car).
574example(10043) :-
575 makeEnvironment('ex43','concrete_domains'),
576 initEnvironment,
577 defconcept(colors,set([b,y,r])),
578 defconcept(blueOrYellow,set([b,y])),
579 defconcept(red,set([r])),
580 defconcept(blue,set([b])),
581 defconcept(yellow,set([y])),
582 defconcept(redOrYellow,set([r,y])),
583 defconcept(blueOrRed,set([b,r])),
584 defconcept(yellowOrBlue,set([y,b])).
588example(10044) :-
589 makeEnvironment('ex44','concrete_domains'),
590 initEnvironment,
591 defconcept(c1,set([a,b])),
592 defconcept(c2,set([a,b,c])).
594example(10045) :-
595 makeEnvironment('ex45','concrete_domains'),
596 initEnvironment,
597 defconcept(c1,set([a,b,c])),
598 defconcept(c2,set([a,b])),
599 defconcept(nc2,not(c2)).
605example(10046) :-
606 makeEnvironment('ex46','concrete_domains'),
607 initEnvironment,
608 defconcept(c1,some(hasCol,set([yellow,blue,red]))),
609 defconcept(c2,some(hasCol,not(set([yellow])))),
610 defconcept(c3,some(hasCol,set([blue,red]))),
611 assert_ind(bmw,c1),
612 assert_ind(bmw,c2).
618example(10047) :-
619 makeEnvironment('ex47','concrete_domains'),
620 initEnvironment,
621 defconcept(c1,and([some(hasCol,set([yellow,blue,red])),all(hasCol,set([yellow,blue,red]))])),
622 defconcept(c2,some(hasCol,not(set([yellow])))),
623 defconcept(c3,some(hasCol,set([blue,red]))),
624 assert_ind(bmw,c1),
625 assert_ind(bmw,c2).
626example(10048) :-
627 makeEnvironment('ex48','concrete_concepts'),
628 initEnvironment,
629 defconcept(oneSpouse,and([atleast(1,spouse),atmost(1,spouse)])),
630 assert_ind(m1,oneSpouse),
631 defprimconcept(some(inverse(spouse),set([m1])),set([g0,g1,g2])),
632 assert_ind(g0,oneSpouse),
633 defprimconcept(some(inverse(spouse),set([g0])),set([m1,g1,g2])),
634 assert_ind(g1,oneSpouse),
635 defprimconcept(some(inverse(spouse),set([g1])),set([m1,g0,g2])),
636 assert_ind(g2,oneSpouse),
637 defprimconcept(some(inverse(spouse),set([g2])),set([m1,g0,g1])),
638 defconcept(zeroSH,and([atleast(0,sh),atmost(0,sh)])),
639 defconcept(oneSH,and([atleast(1,sh),atmost(1,sh)])),
640 defconcept(twoSH,and([atleast(2,sh),atmost(2,sh)])),
641 assert_ind(g0,zeroSH),
642 assert_ind(g1,oneSH),
643 assert_ind(g2,twoSH),
644 defprimconcept(and([some(inverse(sh),set([m1])),set([m1])]),bot),
645 defprimconcept(and([some(inverse(sh),set([g0])),set([g0])]),bot),
646 defprimconcept(and([some(inverse(sh),set([g1])),set([g1])]),bot),
647 defprimconcept(and([some(inverse(sh),set([g2])),set([g2])]),bot),
648 defprimconcept(and([some(inverse(spouse),set([m1])),some(inverse(sh),set([m1]))]),bot),
649 defprimconcept(and([some(inverse(spouse),set([g0])),some(inverse(sh),set([g0]))]),bot),
650 defprimconcept(and([some(inverse(spouse),set([g1])),some(inverse(sh),set([g1]))]),bot),
651 defprimconcept(and([some(inverse(spouse),set([g2])),some(inverse(sh),set([g2]))]),bot),
656 defrole(sh,inverse(sh)),
657 defrole(spouse,inverse(spouse)).
661example(10049) :-
662 makeEnvironment('ex49','defaults'),
663 initEnvironment,
664 defconcept(c4,and([c5,c6])),
665 defprimconcept(and([c0,naf(not(c2))]),c5),
666 defprimconcept(and([c0,naf(not(c3))]),c6),
667 defconcept(c1,or([not(c2),not(c3)])),
668 assert_ind(p,c0),
669 assert_ind(p,c1).
670example(10050) :-
671 makeEnvironment('ex50','complete_or'),
672 initEnvironment,
673 defprimconcept(c1,c0),
674 defprimconcept(not(c1),c0).
675example(10051) :-
676 makeEnvironment('ex51','functional_dependencies'),
677 initEnvironment,
678 def(posInfl(f,d)),
679 def(posInfl(h,f)),
680 def(posInfl(a,b)),
681 def(posInfl(b,c)),
682 def(posInfl(c,d)),
683 def(negInfl(b,e)),
684 def(negInfl(e,d)),
685 def(posInfl(g,e)),
686 def(posInfl(a,g)),
687 def(increase(a)).
688example(10052) :-
689 makeEnvironment('ex52','functional_dependencies'),
690 initEnvironment,
691 def(increase(hasCubicCapacity)),
692 def(negInfl(withRebate,hasPrice)),
693 def(posInfl(hasPrice,hasOverallCost)),
694 def(posInfl(hasCubicCapacity,hasListPrice)),
695 def(posInfl(hasListPrice,hasPrice)),
696 def(posInfl(hasCubicCapacity,hasFuelConsumption)),
697 def(posInfl(hasFuelConsumption,hasOverallCost)),
698 def(posInfl(hasCubicCapacity,hasMaxSpeed)),
699 def(negInfl(hasCatConverter,hasMaxSpeed)),
700 def(posInfl(hasCatConverter,hasFuelConsumption)),
701 def(posInfl(hasCubicCapacity,hasWeight)),
702 def(negInfl(hasWeight,hasMaxSpeed)).
703example(10053) :-
704 makeEnvironment('ex53','functional_dependencies'),
705 initEnvironment,
706 def(increase(hasCubicCapacity)),
707 def(infl(withRebate,hasPrice,-1.0)),
708 def(infl(hasPrice,hasOverallCost,1.0)),
709 def(infl(hasCubicCapacity,hasListPrice,1.2)),
710 def(infl(hasListPrice,hasPrice,1.0)),
711 def(infl(hasCubicCapacity,hasFuelConsumption,0.8)),
712 def(infl(hasFuelConsumption,hasOverallCost,1.0)),
713 def(infl(hasCubicCapacity,hasHorsePower,1.0)),
714 def(infl(hasHorsePower,hasFuelConsumption,1.0)),
715 def(infl(hasHorsePower,hasMaxSpeed,1.0)),
716 def(infl(hasFuelType,hasMaxSpeed,0.8)),
717 def(infl(hasCatConverter,hasHorsePower,-0.5)),
718 def(infl(hasCubicCapacity,hasWeight,0.5)),
719 def(infl(hasWeight,hasHorsePower,-1.0)).
720example(10054) :-
721 makeEnvironment('ex54','functional_dependencies'),
722 initEnvironment,
723 def(negInfl(a,b)),
724 def(posInfl(b,e)),
725 def(posInfl(e,d)),
726 def(negInfl(g,e)),
727 def(negInfl(a,g)).
731example(10055) :-
732 makeEnvironment('ex55','functional_dependencies'),
733 initEnvironment,
734 def(infl(a,b,1.0)),
735 def(infl(b,e,1.0)),
736 def(infl(e,d,1.0)),
737 def(infl(g,e,1.0)),
738 def(infl(a,g,-1.0)).
739example(10056) :-
740 makeEnvironment('ex56','functional_dependencies'),
741 initEnvironment,
742 def(infl(a,b,1.0)),
743 def(infl(b,e,1.0)),
744 def(infl(e,d,1.0)),
745 def(infl(g,e,1.0)),
746 def(infl(a,g,-1.0)),
747 def(infl(f,g,0.5)),
748 def(infl(f,h,-0.5)),
749 def(infl(h,d,0.3)).
750example(10057) :-
751 makeEnvironment('ex57','functional_dependencies'),
752 initEnvironment,
753 def(posInfl(a,b)),
754 def(posInfl(b,c)),
755 def(posInfl(c,d)).
756example(10058) :-
757 makeEnvironment('ex58','functional_dependencies'),
758 initEnvironment,
759 def(posInfl(a,b)),
760 def(posInfl(b,c)),
761 def(posInfl(c,d)),
762 def(infl(e,b,-1.0)),
763 def(infl(e,c,0.5)).
764example(10059) :-
765 sb_defenv('mybox','sb.lit'),
766 sb_initenv,
767 sb_primconcept(person),
768 sb_primconcept(woman,[supers([person])]),
769 sb_primconcept(man,[supers([person])]),
770 sb_disjoint(man,woman),
771 sb_primelemrole(child,'domain-range'(parent,person,person)),
772 sb_defconcept(parent,[supers([person]),
773 nr(child,1,30,2)]),
774 sb_defconcept(mother,[supers([parent,woman])]),
775 sb_defconcept(father,[supers([parent,man])]),
776 sb_defconcept(granni,[supers([grandparent,mother])]),
777 sb_defelem(harry,[isa(parent)]),
778 sb_defelem(mary,[isa(mother),
779 irole(child,
780 iname('marys-child'),
781 [nr(1,30,2), vr(harry)])]).
782example(10060) :-
783 makeEnvironment('ex60','Modal operators'),
784 initEnvironment,
785 modalAxioms(kd45,believe,peter),
786 defprimconcept([b(believe,peter)],doctor,richPerson),
787 assert_ind([b(believe,peter)],tom,doctor).
794example(10061) :-
795 makeEnvironment('ex61','Defaults and the lottery paradox'),
796 initEnvironment,
797 defprimconcept(and([bird,naf(not(fly))]), fly),
798 defprimconcept(and([bird,naf(not(nest))]), nest),
799 defprimconcept(emu,not(fly)),
800 defprimconcept(cuckoo,not(nest)),
801 assert_ind(tweety,bird).
814example(10062) :-
815 makeEnvironment('ex62','Defaults and the lottery paradox'),
816 initEnvironment,
817 defprimconcept(and([bird,naf(not(fly))]), fly),
818 defprimconcept(and([bird,naf(not(nest))]), nest),
819 defprimconcept(emu,not(fly)),
820 defprimconcept(cuckoo,not(nest)),
821 defconcept(bird,or([emu,cuckoo])),
822 assert_ind(tweety,bird).
832example(10063) :-
833 makeEnvironment('ex63','Defaults and the lottery paradox'),
834 initEnvironment,
835 defprimconcept(and([bird,naf(not(fly))]), fly),
836 defprimconcept(and([bird,naf(not(nest))]), nest),
837 defprimconcept(emu,not(fly)),
838 defprimconcept(cuckoo,not(nest)),
839 defconcept(bird,or([sparrow,emu,cuckoo])),
840 assert_ind(tweety,bird).
849example(10064) :-
850 makeEnvironment('ex64','Defaults and the lottery paradox'),
851 initEnvironment,
852 defprimconcept(naf(leftHandBroken),leftHandUsable),
853 defprimconcept(naf(rightHandBroken),rightHandUsable),
854 defconcept(oneHandBroken,or([leftHandBroken,rightHandBroken])),
855 defconcept(oneHandUsable,or([leftHandUsable,rightHandUsable])),
856 defconcept(bothHandsUsable,and([leftHandUsable,rightHandUsable])),
857 assert_ind(peter,oneHandBroken).
891example(10065) :-
892 makeEnvironment('ex65','Defaults and the lottery paradox'),
893 initEnvironment,
894 defprimconcept(naf(leftHandBroken),leftHandUsable),
895 defprimconcept(naf(rightHandBroken),rightHandUsable),
896 defconcept(oneHandBroken,or([leftHandBroken,rightHandBroken])),
897 defconcept(oneHandUsable,or([leftHandUsable,rightHandUsable])),
898 defconcept(bothHandsUsable,and([leftHandUsable,rightHandUsable])),
899 defprimconcept(leftHandBroken,not(leftHandUsable)),
900 defprimconcept(rightHandBroken,not(rightHandUsable)),
901 assert_ind(peter,oneHandBroken).
911example(10066) :-
912 makeEnvironment('ex66','Defaults and the lottery paradox'),
913 initEnvironment,
914 defprimconcept(naf(leftHandBroken),leftHandUsable),
915 defprimconcept(naf(rightHandBroken),rightHandUsable),
916 defconcept(oneHandBroken,or([leftHandBroken,rightHandBroken])),
917 defconcept(oneHandUsable,or([naf(not(leftHandUsable)),naf(not(rightHandUsable))])),
918 defconcept(bothHandsUsable,and([leftHandUsable,rightHandUsable])),
919 defprimconcept(leftHandBroken,not(leftHandUsable)),
920 defprimconcept(rightHandBroken,not(rightHandUsable)),
921 assert_ind(peter,oneHandBroken).
923example(10067) :-
924 makeEnvironment('ex67','Defaults and the lottery paradox'),
925 initEnvironment,
926 defprimconcept(naf(leftHandBroken),leftHandUsable),
927 defprimconcept(naf(rightHandBroken),rightHandUsable),
928 defprimconcept(leftHandBroken,not(leftHandUsable)),
929 defprimconcept(rightHandBroken,not(rightHandUsable)),
930 defconcept(oneHandUsable,or([leftHandUsable,rightHandUsable])),
931 defconcept(oneHandBroken,or([leftHandBroken,rightHandBroken])),
932 defconcept(bothHandsBroken,and([leftHandBroken,rightHandBroken])),
933 assert_ind(peter,oneHandBroken),
934 assert_ind(peter,not(bothHandsBroken)).
935example(10068) :-
936 makeEnvironment('ex68','Defaults and the lottery paradox'),
937 initEnvironment,
938 defprimconcept(naf(bot),leftHandUsable),
939 defprimconcept(naf(bot),rightHandUsable),
940 defprimconcept(leftHandBroken,not(leftHandUsable)),
941 defprimconcept(rightHandBroken,not(rightHandUsable)),
942 defconcept(oneHandUsable,or([leftHandUsable,rightHandUsable])),
943 defconcept(oneHandBroken,or([leftHandBroken,rightHandBroken])),
944 defconcept(bothHandsBroken,and([leftHandBroken,rightHandBroken])),
945 assert_ind(peter,oneHandBroken),
946 assert_ind(peter,not(bothHandsBroken)).
956example(10069) :-
957 makeEnvironment('ex69','Defaults and the lottery paradox'),
958 initEnvironment,
959 defprimconcept(and([bird,naf(exception),naf(not(fly))]), fly),
960 defprimconcept(and([bird,naf(exception),naf(not(nest))]), nest),
961 defprimconcept(emu,exception),
962 defprimconcept(cuckoo,exception),
963 defconcept(bird,or([emu,cuckoo])),
964 assert_ind(tweety,bird).
972example(10070) :-
973 makeEnvironment('ex70','Defaults and existential quantification'),
974 initEnvironment,
975 defconcept(blocked,some(on,top)),
976 defprimconcept(and([block,naf(blocked)]),clearTop),
977 assert_ind(a,block),
978 assert_ind(b,block),
979 assert_ind(c,block),
980 assert_ind(a,b,on).
981example(10071) :-
982 makeEnvironment('ex71','PRACMA'),
983 initEnvironment,
984 defprimconcept(sporttyp),
985 defprimconcept(envtyp),
986 sb_primconcept([b(believe,pk)],carwish,[supers([car])]),
987 sb_primelemrole([bc(want,sporttyp)],has_tyre,'domain-range'(carwish,broad_tyre,broad_tyre)),
988 sb_primelemrole([bc(believe,sporttyp)],speed,'domain-range'('2cv',low,low)),
989 sb_primelemrole([bc(want,envtyp)],has_part,'domain-range'(carwish,cat_conv,cat_conv)),
990 sb_primelemrole([bc(believe,envtyp)],speed,'domain-range'('2cv',fast,fast)),
993 modalAxioms(kd45,believe,concept(sporttyp)),
994 modalAxioms(kd45,want,concept(sporttyp)),
995 modalAxioms(kd45,believe,concept(envtyp)),
996 modalAxioms(kd45,want,concept(envtyp)).
997example(10072) :-
998 makeEnvironment('ex72','DEMO'),
999 initEnvironment,
1000 defprimconcept(sporttyp),
1001 defprimconcept(umwelttyp),
1002 modalAxioms([b(believe,pv)],k,want,concept(sporttyp)),
1003 modalAxioms([b(believe,pv)],k,want,concept(umwelttyp)),
1004 modalAxioms(kd45,believe,all),
1005 sb_primconcept([b(believe,all)], vw, [supers([auto])]),
1006 sb_primconcept([b(believe,all)], opel, [supers([auto])]),
1007 assert_ind([b(believe,all)],polo,vw),
1008 assert_ind([b(believe,all)],manta,opel),
1009 sb_defconcept([b(believe,pv),bc(want,sporttyp)],wunsch_auto,[supers([auto,hatSpoiler])]),
1010 1011 1012 1013 1014 sb_primconcept([b(believe,pv),bc(believe,sporttyp)],vw,[supers([langsam])]),
1015 defprimconcept([b(believe,pv),bc(believe,sporttyp)],and([auto,hatKat,naf(not(langsam))]),langsam),
1016 sb_defconcept([b(believe,pv),bc(want,umwelttyp)],wunsch_auto,[supers([auto,hatKat])]),
1017 sb_primconcept([b(believe,pv),bc(believe,umwelttyp)],vw,[supers([not(langsam)])]),
1018 assert_ind([b(believe,pv)],pk,sporttyp),
1019 1020 1021 1022 1023 1024 assert_ind([b(believe,pv),b(want,pk)],polo,auto).
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092example(10073) :-
1093 assert_ind([b(believe,all)],polo,vw),
1094 defprimconcept([b(believe,pv),bc(believe,sporttyp)],vw,langsam),
1095 assert_ind([b(believe,pv)],pk,sporttyp),
1096 modalAxioms(kd45,believe,pv),
1097 modalAxioms([b(believe,pv)],kd45,believe,concept(sporttyp)).
1098example(10074) :-
1099 makeEnvironment('ex74','DEMO'),
1100 initEnvironment,
1101 defprimconcept(sporttyp),
1102 defprimconcept(umwelttyp),
1103 modalAxioms([b(believe,pv)],k,want,concept(sporttyp)),
1104 modalAxioms([b(believe,pv)],k,want,concept(umwelttyp)),
1105 modalAxioms(kd45,believe,all),
1106 sb_primconcept([b(believe,all)], vw, [supers([auto])]),
1107 sb_primconcept([b(believe,all)], opel, [supers([auto])]),
1108 assert_ind([b(believe,all)],polo,vw),
1109 assert_ind([b(believe,all)],manta,opel),
1110 defprimconcept([b(believe,pv),bc(want,sporttyp)],and([auto,or([hatSpoiler,hatSchiebedach])]),wunsch_auto),
1111 defprimconcept([b(believe,pv),bc(believe,sporttyp)],vw,langsam),
1112 defprimconcept([b(believe,pv),bc(believe,sporttyp)],and([auto,hatKat,naf(not(langsam))]),langsam),
1113 defconcept([b(believe,pv),bc(want,umwelttyp)],wunsch_auto,and([auto,hatKat])),
1114 defprimconcept([b(believe,pv),bc(believe,umwelttyp)],vw,not(langsam)),
1115 assert_ind([b(believe,pv)],pk,sporttyp),
1116 assert_ind([b(believe,pv),b(want,pk)],polo,auto).
1117example(10075) :-
1118 makeEnvironment('ex75','DEMO'),
1119 initEnvironment,
1120 defprimconcept(racer),
1121 defprimconcept(creeper),
1122 modalAxioms([b(believe,ps)],k,want,concept(racer)),
1123 modalAxioms([b(believe,ps)],k,want,concept(creeper)),
1124 modalAxioms(kd45,believe,all),
1125 defprimconcept([b(believe,all)], vw, car),
1126 defprimconcept([b(believe,all)], bmw, car),
1127 assert_ind([b(believe,all)],beetle,vw),
1128 assert_ind([b(believe,all)],'bmw735',bmw),
1129 defprimconcept([b(believe,ps),bc(want,racer)],and([car,or([has_spoiler,has_sliding_roof])]),dream_car),
1130 defprimconcept([b(believe,ps),bc(believe,racer)],vw,slow),
1131 defprimconcept([b(believe,ps),bc(believe,racer)],and([car,has_cat_conv,naf(not(slow))]),slow),
1132 defconcept([b(believe,ps),bc(want,creeper)],dream_car,and([car,has_cat_conv])),
1133 defprimconcept([b(believe,ps),bc(believe,creeper)],vw,not(slow)),
1134 assert_ind([b(believe,ps)],pc,racer),
1135 assert_ind([b(believe,ps),b(want,pc)],beetle,car).
1136example(10076) :-
1137 makeEnvironment('ex76','SETHEO'),
1138 initEnvironment,
1139 defprimconcept(racer),
1140 defprimconcept(creeper),
1141 modalAxioms([b(believe,ps)],k,want,concept(racer)),
1142 modalAxioms([b(believe,ps)],k,want,concept(creeper)),
1143 modalAxioms(kd45,believe,all),
1144 defprimconcept([b(believe,all)], vw, car),
1145 defprimconcept([b(believe,all)], bmw, car),
1146 assert_ind([b(believe,all)],beetle,vw),
1147 assert_ind([b(believe,all)],'bmw735',bmw),
1148 defprimconcept([b(believe,ps),bc(want,racer)],and([car,or([has_spoiler,has_sliding_roof])]),dream_car),
1149 defprimconcept([b(believe,ps),bc(believe,racer)],vw,slow),
1150 defconcept([b(believe,ps),bc(want,creeper)],dream_car,and([car,has_cat_conv])),
1151 defprimconcept([b(believe,ps),bc(believe,creeper)],vw,not(slow)),
1152 assert_ind([b(believe,ps)],pc,racer),
1153 assert_ind([b(believe,ps),b(want,pc)],beetle,car)