|
| 1 | +# yadlr |
| 2 | + |
| 3 | +yadlr is multi-valued reasoning system written in Prolog. |
| 4 | + |
| 5 | +At its current state of development, yadlr only provides ABox services |
| 6 | +over the SHOIQ Description Logic, although there is no DL-like front |
| 7 | +end and atleast, atmost constructs have to be translated using the |
| 8 | +dlalldifferent built-in concept, where the "atom" is a list of variables. |
| 9 | + |
| 10 | +Emphasis is given to coupling yadlr to a ILP systems in order to |
| 11 | +evaluate multi-valued DL hypotheses, so there is no plan for providing |
| 12 | +TBox services in the forseeable future. |
| 13 | + |
| 14 | + |
| 15 | +## Prolog APIs |
| 16 | + |
| 17 | +yadlr provides two Prolog front-ends, yadlr and prodlr. Although the |
| 18 | +intension is to eventually allow all front-end and inference engine |
| 19 | +combinations, currently the yadlr can be used with the resolution and |
| 20 | +Prolog engine, and prodlr with the Prolog engine. |
| 21 | + |
| 22 | +Before loading either of the front-end modules, use_inference_engine/1 |
| 23 | +and use_algebra/1 must be asserted in the user namespace. |
| 24 | + |
| 25 | +yadlr.pl provides the following predicates: |
| 26 | + |
| 27 | +```prolog |
| 28 | + yadlr_init( +KB ) |
| 29 | +
|
| 30 | + yadlr_concept( +KB, +ConceptName ) |
| 31 | + yadlr_relation( +KB, +RelationName ) |
| 32 | + yadlr_instance( +KB, +InstanceName ) |
| 33 | +
|
| 34 | + yadlr_assert( +KB, +Formula, +Degree ) |
| 35 | +
|
| 36 | + check_membership/5 ( +KB, +InstanceName, +ConceptName, +Degree, -Restrictions ) |
| 37 | + check_types/5 ( +KB, +InstanceName, +Degree, ?ConceptNames, -Restrictions ) |
| 38 | + check_members/5 ( +KB, +ConceptName, +Degree, ?InstanceNames, -Restrictions ) |
| 39 | +
|
| 40 | + set_proof_tree_log/1 ( +Filename|no ) |
| 41 | + unset_proof_tree_log/0 |
| 42 | +
|
| 43 | + set_depth_limit/1 ( +YESNO ) |
| 44 | +``` |
| 45 | + |
| 46 | +prodlr.pl provides the following predicates: |
| 47 | + |
| 48 | +```prolog |
| 49 | + declare_concept( +ConceptName, +SuperConceptName ) |
| 50 | + assert_instance( +ConceptName, +InstanceName, +Degree ) |
| 51 | + add_to_concept( +ConceptName, [ (+InstanceName, +Degree) ] ) |
| 52 | +
|
| 53 | + declare_relation( +RelationName, +DomainConceptName, +RangeConceptName ) |
| 54 | + add_to_relation( +RelationName, +InstanceName, [ (+FillerInstanceName, +Degree) ] ) |
| 55 | +
|
| 56 | + concept_select( +InList, ?ConceptName, -OutList ) |
| 57 | + forall_select( +InList, +RelationName, +ConceptName, -OutList ) |
| 58 | + atleast_select( +InList, ?RelationName, ?ConceptName, +Min, -OutList ) |
| 59 | + atmost_select( +InList, ?RelationName, ?ConceptName, +Max, -OutList ) |
| 60 | + self_select( +InList, ?RelationName, -OutList ) |
| 61 | +``` |
| 62 | + |
| 63 | +## Formula Syntax |
| 64 | + |
| 65 | +S is the start symbol. F is a formula non-terminal symbol. A is an |
| 66 | +atomic non-terminal symbol. <whatever> are terminal symbols. |
| 67 | + |
| 68 | + S :== all(X,F) |
| 69 | + F :== all(X,F) |
| 70 | + F :== exists(X,F) |
| 71 | + F :== dlnot(F) |
| 72 | + F :== dland(F, F) |
| 73 | + F :== dlor(F, F) |
| 74 | + F :== dlimplies(F, F) |
| 75 | + F :== dlequiv(F, F) |
| 76 | + F :== C(A) |
| 77 | + F :== R(A, A) |
| 78 | + F :== dlalldifferent( [X1..Xn] ) |
| 79 | + A :== <Instance> | X |
| 80 | + C :== <Concept Name> |
| 81 | + R :== <Relation Name> |
| 82 | + X :== <Variable> |
| 83 | + |
| 84 | + |
| 85 | +## Proof Tree Log |
| 86 | + |
| 87 | +By declaring |
| 88 | + :- use_proof_tree_log( yes ). |
| 89 | +each proof will print on standard output all the derivations made during |
| 90 | +the proof. The tree representation can be retrieved from this log by |
| 91 | +keeping track of the depth of the derivation. |
| 92 | + |
| 93 | +STEP-TYPE is either i (initial), mp (modus-ponens), or l (leaf). |
| 94 | + |
| 95 | +Line syntax: |
| 96 | + |
| 97 | + LINE :== DEPTH ( STEP-TYPE ) ( NUM-RESTRS ) CLAUSE-LIST |
| 98 | + DEPTH :== <Integer> |
| 99 | + STEP-TYPE :== i || mp || l |
| 100 | + NUM-RESTRS :== NUM-RESTR NUM-RESTRS |
| 101 | + NUM-RESTR :== <Algebraic Expression involving d,x> |
| 102 | + CLAUSE-LIST :== [ CLAUSE | CLAUSE-LIST ] |
| 103 | + CLAUSE :== yclause( <Positive Literal List>, <Negative Lit List>, <Fuzzy Degree> ) |
| 104 | + |
| 105 | +## Known Problems |
| 106 | + |
| 107 | +Complementization doesn't take into account complement relationships between |
| 108 | +"symmetric" number restrictions and quantifiers. This is going to be tricky |
| 109 | +to fix, I see trouble ahead. |
| 110 | + |
0 commit comments