Skip to content
UoL CS Notes

Derived Assertions Algorithm

COMP111 Lectures

The following algorithm take as input the knowledge base K containing Ka and Kr and computes all assertions E(a) with E a class name and a an individual name such that KE(a). This set is stored in: DerivedAssertions In only remains to check whether A(b) is in DerivedAssertions.

The algorithm computes the set DerivedAssertions by starting with Ka and then applying the rules Kr exhaustively to already derived atomic assertions.

Input: a knowledge base K containing assertions K_a and rules K_r
	
DerivedAssertions := K_a
repeat
	if there exits E(a) not in DerivedAssertions
		and A_1(x)^...^A_n(x) --> E(x) in K_r
		and A_1(x),...,A_n(x) in DerivedAssertions
	then 
		add E(a) to DerivedAssertions
		NewAssertion := true
	else 
		NewAssertion := false
	endif
until NewAssertion = false
return Derived Assertions

Rule Application

In the algorithm above we say that:

E(a) is added to DerivedAssertions by applying the rule: A1(x)AnE(x) to the atomic assertions: A1(x),,AnDerivedAssertions

Example

Let:

  • Ka={A1(a)}
  • Ka={A1(x)A2(x),A2(x)A3(x)}

In:

  • First DerivedAssertions contains Ka only.

  • Then an application of A1(x)A2(x) to A1(a) adds A2(a) to DerivedAssertions.

  • Then an application of A2(x)A3(x) to A2(a) adds A3(a) to DerivedAssertions.

  • Now no rule is applicable. Thus: DerivedAssertions={A1(a),A2(a),A3(a)} is returned.