Hypertext Edition and Consistency Maintenance with Rules

Download Report

Transcript Hypertext Edition and Consistency Maintenance with Rules

Consistency Maintenance between
Web Pages and Rules using XRML
2001. 10.1
Ju Young Kang
IIS/EC
Kaist Graduate School of Management
1
Table of Contents

Introduction
– Research Backgroud
– Objectives and Scopes


Literature Review
Consistency Maintenance에 대한 개요
– Overall Inspection to Consistency Maintenance(or Introduction to
CM)

Rule Generation from Hypertext
 Consistency Maintenance between Hypertext and Rules
 Other Considerations
 Conclusion and Contribution
 Further Study
2
Research Background

Toward Intelligent Web
– Data Processing => Rule Processing
– Rules are implicitly embedded in the Web pages by text and table.
– Explicit representation of the implicit rules which can be
understood, processed and maintained by software agent and
human .
– Maintain Consistency between Rule base and Web page.
• Knowledge Acquisition
– Aid the semi-automatic extraction of rules from XML
• Knowledge Management
– Apply Changes in Web page to Rule base
3
Topology of XRML
Web Page
Web
Browsing
HTML
Data
Processing
XML
XRML
Rule
Processing
eXtensible Rule Markup Language
4
Human
Agent
• Agents
• Forms
How to Represent Knowledge?

HTML
– Information : data + knowledge
– 인간이 이해하는 것이 주 목표

XML
– Structured data format(representation)
– Data를 인간과 agent가 동시에 이해가능한 형태로 표현

XRML
– Knowledge를 인간과 agent가 동시에 이해가능한 형태로 표현
– agent가 이해하기 위해서는 XML과 마찬가지로 structured로 표현해야만
한다.
– 그런데 Human의 경우, structured data는 쉽게 이해할 수 있지만
knowledge 특히 rule은 structured format으로 쉽게 이해하기 힘들다.
– 이로 인해, 인간에게 knowledge를 제공하는 HTML과 추론에 사용되는
rule base는 분리되어 독립적으로 관리되고 있는 것이 현재의 상황
– 따라서 사람이 읽기 쉬운 형태와 기계가 읽기 쉬운 형태의 2중구조로 표현
하고 이 둘 간의 consistency를 보장하는 형태로 관리할 필요가 있다.
5
Knowledge Representation in XRML
Agent를 위해 XML형태의 RSML을 제공
 Human을 위해 XML형태의 RIML을 제공
 XML의 특성을 이용해 RIML과 RSML간의 Consistency를
제공

Knowledge
Transform
HTML
RIML
Web
Browsing
Human
Consistency
Maintenance
RSML
Rule Base
Represent
6
Rule
Processing
Agent
Knowledge Acquisition and XRML

Knowledge Acquisition 방법을 제공
– HTML  RIML  RSML  Rule Base

RIML과 RSML을 통해 KMS와 KBS의 연결고리 제공
– KA 차원에서 rule generate 방법론 및 도구 제공
– KM 차원에서 consistency maintenance 방법론 및 도구 제공
RB
Human
Knowledge
Acquisition
Knowledge
Management
KBS
KMS
Unstructured
Knowledge
Generate
RIML
Agent
Structured
Knowledge
RSML
Consistency
Maintenance
7
Need for Consistency Maintenance

Increasing needs of exchanging rules on the Web
– 과실상계 같은 경우, 법령은 정부에서 만들지만 법을 이용해 KBS를 구축 및 서비스
하는 곳은 다양한 보험회사들
– 따라서 법을 여러 보험회사들에 배포할 필요가 있음
– KBS에는 과실상계법 뿐만 아니라 보험료에 관련된 자체규칙도 포함되어야 한다.

Need to apply frequent modification of rules
– 과실상계법의 경우 판례에 의해 잦은 변화가 있을 수 있고 보험회사 자체규칙도 자
주 변경된다.

Need to guarantee consistency between HTML and rules
– KBS에서 추론결과를 보여준 후 근거로 rule base보다는 HTML로 구성된 원래의 법
혹은 규칙을 제시하는 것이 바람직
– 이 때 만일 consistency가 유지되어 있지 않으면 회사의 신뢰에 막대한 영향을 끼치
게 된다.

How to maintain consistency?
– Too much burden to Knowledge Engineer when frequent change of HTML and
rules occur
– Need for intermediary automated supports
8
Research Objectives

Support Knowledge Acquisition from HTML using RIML
and RSML
– Propose RIML and RSML
• Rule Identification Markup Language
• Rule Structure Markup Language
• Represent rules with various designed XRML tags

Support Knowledge Management using RIML and RSML
– Propose consistency maintenance methodology
• Represent consistency information using XRML tags
• Inconsistency detection using XRML tags
• Consistency maintenance by inconsistency detection and
resolution
9
Research Scopes

Define RIML and RSML
– Define DTD for RIML and RSML
– Make conversion steps from RIML to RSML

Develop XRML editor
–
–
–
–

Support making RIML
Support converting from RIML to RSML
Support consistency maintenance
Define functions and make prototype
Develop Consistency Maintenance Methodology
– Make inconsistency detection method
– Make inconsistency resolution method
– Support rule change propagation
10
Literature Review 1/2

XRML
– 현재까지의 연구내용을 간략히

XML
– RIML, RSML이 XML기반인 이유

Knowledge Acquisition and Knowledge Maintenance(*)
– 두가지를 동시에 고려하는 형태의 시스템이 없음을 확인
• KAS가 어떤 식으로 제공되는가?
– 적어도 우리의 접근방식과 같은 형태는 없음을 확인
• Scope 차이가 있음을 명시
– 우리는 inferential knowledge 만을 고려
» 따라서 Conceptual Model (Semantic network or Frame, Object)의
과정을 거치지 않고 바로 IF then 형태의 rule로 전환
» 그 중에서 HTML로 표현된 형태의 knowledge만을 대상으로 하고 있
다.
» 변환목표는 Rule base라는 것도 차이
• Consistency를 고려하는가?
• 고려한다면 우리의 접근방식과의 유사성
– KMS와 KBS간의 차이 확인
• KMS에 대한 정리가 필요함
11
Literature Review 2/2

Consistency Maintenance with Web (*)
– Between Web and Database
– Using XML to Build Consistency Rules for Distributed Specifications
– Maintaining Mutual Consistency for Cached Web Objects

Rule Markup Languages and Consistency
– Consistency 고려 여부
– 우리의 목적과 부합하는 점, 아닌 점

Rule Base Consistency Maintenance
12
Overview of Extensible Rule
Markup Language (XRML)

Components of XRML
 Architecture of XRML
 Ideal Properties of XRML
13
Components of XRML
A language that can represent the implicit rules
on web pages to achieve knowledge sharing
between software agent and human.

Three Components of XRML
–
–
–
Rule Identification Markup Language (RIML):
• A language that can identify the existence of implicit rules in the
hypertexts on the Web
Rule Structure Markup Language (RSML):
• A language for intermediate representation of hypertext
knowledge and structured rules
Rule Triggering Markup Language (RTML):
• A language that define the conditions when certain rules will be
triggered
14
Architecture of XRML
KMS
KBS
Expert System
RIML
Transform
RSML
RB
Inference
Engine
DB
XML
HTML
XSL
RTML
Applications
Browsed to Human
XRML
15
Ideal Properties of XRML

Expressional Completeness
– RSML should be completely transformable to a canonical syntax of structured
rules

Relevance Linkage
– Linkages of the relevance between hypertexts with RIML and RSML rules syntax
should be completely expressed

Polymorphous Consistency
– Consistency should be maintained for knowledge expressed in different types of
expressions, such as RSML rules and hypertext with RIML

Applicative Universality
– The rule expressions in RSML should be able to support multiple applications
within the domain universe

Knowledge Integration
– Structured rules collected from multiple sources Including the ones from RSML
should be integrated uniformly.

Interoperability
– Rules in RSML should be exchangeable and sharable among multiple commercial
solutions
16
Why Use XML?

Features of XML[W3C]
– Structured documents can be richly used over the web
– Beneficial to a wide variety of diverse applications : authoring,
browsing, content analysis, etc.
– Easy to write programs that process XML documents
– Be human-legible and reasonably clear

General Advantages of XML for Knowledge
Representation(KR)[Harold Boley]
– Definition of self-describing data in worldwide standardized, nonproprietary format
– Structured data and knowledge exchange for enterprises in
various industries
– Integration of information from different sources (into uniform
documents)
17
XML and KR

Specific Advantages of XML for KR[Harold Boley]
– XML provides the most suitable infrastructure for knowledge bases on the
Web
– Uniform storage of knowledge bases
– Interchange of knowledge bases between different AI languages
– Exchange between knowledge bases and databases, application systems,
etc.
– Even transformation/compilation of AI source programs using XML
markup and annotations is possible

Expressive Power of XML for KR
– Extensibility of tags
• Can express all of rules in rule base
• Can express meta-knowledge for consistency maintenance
• Can express mathematical model with newly defined tags
– No need to develop parser
• Exist standard parsers like DOM, SAX
18
KBS vs. KMS
Knowledge Based
System
Knowledge
Processor
Knowledge Management
System
System
Human
Forward/Backward Chaining,
Approximate Reasoning
HyperLink, Keyword Search
Knowledge
Representation
Rule, Predicate Calculus,
Object (Frames)
HTML, XML, Hypermedia, VRML
Scope of
Knowledge
Specific Knowledge Base
Global Knowledge Portal
Domain Specific
General Purpose
Limited
Everybody, Everyday
Inference
Tools
Popularity
19
Rule Markup Languages and
Consistency

Case Based Markup Language (CBML)
 Relational-Functional Markup Language (RFML)
 Agent-Object-Relationship Markup Language (AORML)
 Business Rules Markup Language (BRML)
 Artificial Intelligence Markup Language (AIML)

There is no Rule ML which both human and machine can
read.
20
Architecture for Distributed CBR
21
Examples of RFML
Likes(john, mary)
// RFML
<hn>
<pattop>
<con> likes </con>
<con> john </con>
<var> x </var>
</pattop>
<callop>
<con> female </con>
<var> x </var>
</callop>
<callop>
<con> likes </con>
<var> x </var>
<con> wine </con>
</callop>
</hn>
//Prolog-like syntax
(hn (likes john mary)) //Lisp-like syntax
<hn>
<pattop>
<con> likes </con>
<con> john </con>
<con> mary </con>
</pattop>
</hn>
//RFML
likes(john,X) :- female(X), likes(X,wine).
//Prolog-like syntax
(hn (likes john _x) (female _x) (likes _x wine))
//Lisp-like syntax
22
AORML and Business Rules

AORML is used for representing business rules in AOR
model
– Integrity constraints, derivation rules, reaction rules

Business rules
– Define and control business processes
– Business process
• Interaction process for the purpose of doing business
– Interaction process
• Sequence of events, actions and activities performed by
agents
– Set of rules that specifies the sequence of events, actions and
activities performed by agents
23
BRML As Interlingua
24
Consistency in Other Rule MLs 1/2

AIML
– No translating from others
– No need for consistency maintenance

CBML
– No frequent changes in cases
– No need for consistency maintenance
• Always parsing/translating in & out
– No consistency maintenance

RFML
– Only focusing on representing rules with XML
– Don’t consider any consistency

AORML
– No exchange of rules between entities
– Relatively low importance of consistency
– No consistency maintenance
25
Consistency in Other Rule MLs 2/2

BRML
– Rule representation as interlingua
– Always parsing/translating in & out
– No need for consistency maintenance

Summary
– Most of studies are focusing on representing and exchanging
rules with XML in WWW environment, not considering consistency
• Focusing on representing various types of rules (like Logic,
Lisp, and Prolog) with XML
• Generate structured rules from structured knowledge
– No study in Knowledge Acquisition from Web
26
Rule Base Verification 1/2

Why need an Automated Assistant for Knowledge-base verification?[Suwa]
– checks for inconsistencies and gaps in the knowledge base
– helps the experts and knowledge engineers to communicate with each other
– provides a clear and understandable display of the knowledge as the system will
use it

Checking for Consistency [Nguyen]
–
–
–
–
–

Redundant Rules
Conflicting Rules
Subsumed Rules
Unnecessary IF Conditions
Circular Rules
Checking for Completeness [Nguyen]
–
–
–
–
Unreferenced Attribute Values
Illegal Attribute Values
Unreachable Conclusions
Dead-End IF Conditions and Dead-End Goals
27
Rule Base Verification 2/2

The method of verification
–
–
–
Rule Checking Program[Suwa]
• finds all parameters used in the conditions of these rules
• makes a table, displaying all possible combinations of condition
parameter values and the corresponding values which will be
concluded for the action parameter
• checks the tables for conflict, redundancy, subsumption, and
missing rules, then displays the table with a summary of any
potential errors that were found.
Rule Checker[Nguyen]
• Dependency Chart and Circular Rule-Chain Detection
• Checking Data-Driven Rules
Expert System checker based on Hierarchical Decision tables
• Check for ambiguity and redundancy
• Check for completeness
• Check for missing rules
28
본문 목차



Overall Inspection into Consistency Maintenance (or
Introduction to CM)
Rule Generation from Hypertext
Consistency Maintenance between Hypertext and Rules
29
Overall Inspection into Consistency
Maintenance
Inconsistency의 개략적 분류
 Inconsistency를 일으키는 상황 및 원인
 Assumptions on Consistency
 Basic Approach to Consistency Maintenance
 고려해야 할 사항

– Where to Place Consistency Information?
– Include CI into only RIML or RIML plus RSML?


Consistency Maintenance를 위한 XRML의 구성
RIML과 RSML의 관계
30
Inconsistency의 개략적 분류

Inconsistency within Rule Base
– Rule base 변경 시 다른 rule과의 consistency
– Rule propagation

Inconsistency between HTML and Rule Base
– RIML로부터 RSML을 generate하는 경우
– Generate 된 후에 RIML 혹은 RSML을 변경하는 경우
• HTML  Rule Base
• Rule Base  HTML
31
Inconsistency가 발생하는 상황 및 원인

Inconsistency가 발생하는 상황
– Rule is scattered in HTML.
– Rule is linked to many HTML.
– Rule is connected with other rules.
• If user updates a rule, then system updates related other rules automatically
• Support rule propagation by AND-OR Graph
• Notify related HTML part to Knowledge Engineer

Inconsistency를 일으키는 원인
–
–
–
–
–

Knowledge Engineer can make mistakes.
HTML is inconsistent from the beginning
Rule is inconsistent after change of rule
Rule is inconsistent after change of HTML
HTML is inconsistent after change of rule
Possible change
– Change of variable, value, operator, fact and rule
32
Assumptions on Consistency

Use same keywords between RIML and RSML
 HTML is implicitly complete
 Rule Base is consistent and complete
– Ambiguity is not allowed in RSML

Information to construct rules is incomplete
– Ambiguity resolution is required in generating RSML
– Examples of resolution by KE with incomplete information
• Determine missing terms
• Determine adequate words for terms using dictionary
– Knowledge Engineer is required

Information to maintain consistency is incomplete
– Ambiguity resolution is required
– KE have to select appropriate terms
– RIML에 HTML이 섞여 있으므로 RIML 변경 시에는 반드시 KE가 문맥을 고려하여
HTML부분을 수정하여야 한다.
– Knowledge Engineer is required

The person making RIML may be different from the person making RSML
– Generating RIML have to be easier than generating RSML.
33
Basic Approach to Consistency
Maintenance 1/2

Rule Base 내부
– 기존 연구를 활용
– Propagation을 중심으로 연구
– 전체연구의 focus가 아님

Between HTML and Rule Base
– Rule base를 generate하는 과정에서 서로 간의 consistency를 유지
• Consistency information을 생성
• 이를 지원하는 semi automated tool의 정의 및 개발
– 부분적인 KE의 역할이 필요
34
Basic Approach to Consistency
Maintenance 2/2

Between HTML and Rule Base
– HTML 혹은 rule base의 변경 시에 서로 간의 consistency를 유지
• 두 가지 접근 방법이 존재
– 변경하는 과정에서 자동으로 consistency가 유지되도록 지원
– 변경 후에 inconsistency를 detect하고 발견된 inconsistency를
resolve한다
• Rule Base 내부의 consistency 관리와 연결이 가능
– Rule Base 내부에서 propagation에 의한 변경 후 모든 변경 결과
를 HTML 에 반영
• 생성된 consistency information을 이용
• 이를 지원하는 semi automated tool의 정의 및 개발
– 부분적인 KE의 역할이 필요
35
고려해야 할 사항

KE와 Tool 간의 업무 영역
– generating RIML
• 주어진 step을 따라가면서 Tool의 guide를 따라 KE가 선택
– editing RIML or RSML
• 변경 시 즉시 적용
– 주어진 step을 따라가면서 Tool의 guide를 따라 KE가 선택
• 변경 후 detection and resolution
– automated detection
– semi-automated resolution : KE가 선택

RIML에 <operator>를 넣을 것인가? 넣는다면 어느 과정에서 넣을 것
인가?
– 기본적인 operator에 대해서는 RIML에서 KE가 집어 넣고 나머지는
dummy로 생성

Where to Place Consistency Information?
– Maintain as separate tables
– Include into XRML by extending XRML tags
• Include into Only RIML or 36
RIML plus RSML?
Where to Place
Consistency Information(CI)?

Maintain as separate tables
– Represent all information about variable, value, operator, rule as tables
– Pros
• Simple to maintain and use
– Cons
• Need additional space to store tables
• Need additional type(XML or database) to distribute consistency information

Include into XRML by extending XRML tags
– Include meta knowledge as attributes and elements of each tags to maintain
consistency
– Pros
• Easy to understand by looking only RIML source
• No additional space is needed
• Consistency information can be distributed with RIML
– Cons
• Difficult to represent all information as extended tags
37
Include CI into Only RIML
or RIML plus RSML?

Both RIML and RSML maintain consistency information including pair_id for
each set of variable, value and operator.
– Pros
• Can provide more automated consistency maintenance
– Some consistency maintenance can be fully automated
– Cons
• RSML은 RB에 대응되어야 하는데 Consistency info.는 RB와 별 관계 없음

Only RIML maintains consistency information
– Pros
• RSML is simple( only has rules, not consistency info.)
– Cons
• Incomplete consistency
– Knowledge Engineer is required when each change occurred
• Complex to maintain consistency
– 대응하는 symbol을 찾는 과정이 복잡
38
Consistency Maintenance를 위한
XRML의 구성

고려사항에 대한 결정사항
– Include consistency information into XRML by extending XRML tags
– Both RIML and RSML maintain consistency information including pair_id
for each set of variable, value and operator

Generation of RSML 이후 RIML의 변경이 필요
– RIML은 RSML을 generate하는 과정과 RSML 생성 후 consistency의 유지
과정 양쪽에 모두 사용된다.
– 그러나, generate하는 과정에서는 아직 consistency information이 완전하
지 않은 상태이므로 RSML 생성 후 RIML을 update해야 한다.
39
RIML과 RSML의 관계
HTML
Generate
Generate
Rule Base
RSML을 생성하기 위한 매개체 역할
Generate
RIML
RSML
Update
RSML과의 Consistency를 유지하는 역할
Update HTML
and RB
Consistency
Maintenance
40
Rule Generation from Hypertext

Rule Representation
– Basic definition



Relation between RIML and RSML
Overall Steps to Generate Rules
Rule Identification Markup Language
–
–
–
–

Description of RIML
Document Type Definition for RIML
Generate RIML from HTML
Example of RIML
Rule Structure Markup Language
–
–
–
–
–
–
Document Type Definition for RSML
DTD Tree of RSML
Generate RSML from RIML
Example of RSML
Update RIML
Example of Updated RIML
41
Rule Representation

Rule expressiveness
– Rule ML, RFML은 Horn Clause Calculus 지원
• Prolog를 기반으로 하고 있기 때문
– 우리는 Horn과 first order logic[Torsun][Lloyd]의 사이를 지원
• Horn보다 다양한 premise 형태를 지원
– Nested 구조의 and, or, not조합을 허용
– RIML이 HTML을 포함하고 있으므로 Horn보다는 다양한
형태를 지원할 수 있어야 한다
• binary 형태의 predicate만을 지원
– 모든 n-ary predicate은 binary predicate으로 표현 가능
[Torsun]
• Object와 attribute개념은 지원하지 않음
– UNIK-BWD에 기반을 두고 있기 때문
42
Basic Definition for Rule
Representation

Definition
– Symbols
• variables, values, operators, connectives
– Operator
• predicate
– Connective
• AND|OR|NOT
– Atomic sentence
• operator + variable + value
43
Definition of RIML and RSML

RIML
– HTML로부터 RSML을 생성하기 위한 중간매체 language
– A language that added meta-knowledge on how the hypertext is
related with the structured rule.

RSML
– Rule base에 대응되는 structured rule representation language
– A intermediate language that can be easily associated with the
RIML
44
Relation between RIML and RSML

The cardinality between RIML and RSML is M:N.
 The cardinality between atomic formulas in RIML and
atomic sentences in RSML is M:N
– One conclusion in RIML can be divided into two or more
conclusions in RSML.
– One atomic sentence in RIML can be used in two or more
premises in RSML.
– Two or more atomic sentences can be used in one premise in
RSML.
45
Overall Steps to Generate Rules

Step1: Generate RIML
– Knowledge engineer
• Specify value, variable, operator in HTML
• Make pair
– Tool
• Generate attributes of tags
• Make missing variables, values, and operators

Step2: Generate RSML
– Tool
• Make template for RSML from RIML
– Knowledge engineer
• Correct inappropriate symbols
• Adjust positions of atoms
• Add required tags like <Rule>, <IF>, <THEN>, <AND>, <OR>, <NOT>

Step3: Update RIML (Tool only)
– Make atom table based on RSML
– Update URL, RuleTitle, variable, value, and operator
46
Overall Steps to Generate Rules
Step
Knowledge
Engineer
Tool
A.
Generate
Base RIML
1. Specify value, variable,
operator in HTML
2. Make pair
3. Generate attributes of tags
4. Make missing variables,
values, and operators
B.
Generate
RSML
6. Add required tags
5. Make template for RSML from
base RIML
C.
Generate
Extended
RIML
7. Make atom table based on
RSML
8. Update URL, RuleTitle,
variable, value, and operator
47
Description of RIML

<RuleSet>...</RuleSet>, <RuleTitle>...</RuleTitle>, and <URL>…</URL>
–

Represent the rule set and its title
Tags <variable pair_id=#>, <value pair _id=#> and <operator type=%op_type
pair _id=#>
– Identification of the variables, values and operators used in the structured rule
– The same numbers in the tags imply the association among variable, value and
operator

HTML에 RIML tag을 붙이는 기준
– 관련된 rule base를 표시하기 위한 기본적 정보가 대상
– RSML을 generate하고 RSML과의 consistency에 필요한 symbol이 대상
• variable, value, operator
– operator의 경우, predicate을 완전히 표현할 수 없으므로, 단지 predicate임만을 표
현, 그 외는 정형화 되어 있는 type에서 선택
– pair_id를 이용하여 Atomic sentence의 범위를 지정

변경과 consistency information의 저장은 모두 tag의 attribute를 이용하여 이
루어지므로 HTML 원문에는 변화가 없음
48
Document Type Definition for RIML
<?xml version=“1.0” encoding =“UTF-8”?>
<!Entity % op_type (is|isnot|le|lt|ge|gt|pr) #IMPLIED>
<!Element RIML (RuleSet)+>
<!ATTLIST RIML Version CDATA #Required>
<!Element RuleSet (URL+,RuleTitle,(variable|value|operator)*>
<!Element URL (#PCDATA)>
<!Element RuleTitle (#PCDATA)>
<!Element variable (#PCDATA?)>
<!ATTLIST variable
pair_id ID #Required)>
<!Element value (#PCDATA?)>
<!ATTLIST value
pair_id IDREF #Required >
<!Element operator (#PCDATA?)>
<!ATTLIST operator
type %op_type;
pair_id IDREF #Required >
49
Document Type Definition for RIML
<?xml version=“1.0” encoding =“UTF-8”?>
<!Entity % op_type (is|isnot|le|lt|ge|gt|pr) #IMPLIED>
<!Element RIML (RuleSet)+>
<!ATTLIST RIML Version CDATA #Required>
<!Element RuleSet (URL+,RuleTitle,(variable|value|operator)*>
<!Element URL (#PCDATA)>
<!Element RuleTitle (#PCDATA)>
<!Element variable (#PCDATA?)>
<!ATTLIST variable
name CDATA #Required
pair_id ID #Required>
<!Element value (#PCDATA?)>
<!ATTLIST value
name CDATA #Required
pair_id IDREF #Required>
<!Element operator (#PCDATA?)>
<!ATTLIST operator
type %op_type;
pair_id IDREF #Required>
50
Meaning of elements and attributes
in RIML
Element/Attribute
RIML
Version
Description
The root element within a HTML/RIML document. This element carries a required attribute Version.
It indicates the particular version of this specification with which the rule exchanges.
RuleSet
The element “RuleSet” envelops the body of rule. The presence of this element indicates that
this is contains at least one variable, value, and operator, etc. At least one must be present within
RIML
RuleTitle
It is the title of the RuleSet.
variable
The literal element “variable” represents variable names.
name
It indicates the name of variable in RSML.
pair_id
It indicates unique set of variable, value and operator.
value
The literal element “value” represents value names.
name
It indicates the name of value in RSML.
pair_id
It indicates unique set of variable, value and operator.
operator
The literal element “operator” represents operator type and names.
type
It indicates the operator type between variable and value. The operator type is defined as ENTITY
because it can be changed.
pair _id
It indicates unique set of variable, value and operator.
51
Description of Tags 1/2

pair_id attribute
– represent atomic sentence which is composed of <variable>,
<operator>, and <value> in RIML
– 필요성
• RIML 혹은 RSML에서 symbol에 변화가 생긴 경우, 이에 대응
하는 symbol을 반대쪽에서 찾고자 할 때 pair_id가 없으면 범위
를 지정할 수 없으므로 text search를 해야 한다. search 후에는
KE가 여러 개 중에서 선택해야만 한다.
• Multi page로 RIML이 존재하는 경우, 모든 page를 모두 검색해
야만 한다.
• RSML에서 변경으로 인해 propagation이 일어나는 경우, 한
symbol의 변경이 여러 symbol의 변경을 유발하게 되는데, 이런
경우 해결방법이 매우 복잡해진다.
52
Description of Tags 2/2

name attribute
– variable과 value가 1:1 대응이 안 되는 경우
• 예) The project is promoted and sponsored by KAIST
• 예) The project is sponsored by KAIST and KIST
• PCDATA를 갖지 않고 name attribute만을 갖는 dummy variable 혹은 dummy
value로 해결
• <value name=“KAIST”></value>
• <variable name = “sponsored”></variable>
– RIML의 variable 이름이 그대로 RSML에 쓰일 수 없는 경우
• 문제 예) 같은 의미의 다른 이름
• KE가 통일해서 정리하는 방안 가능
• tag을 이용해 해결, 즉 RIML의 <variable>이 attribute로 RSML에서 사용되는 이
름을 갖도록 한다
– RIML의 value 값이 그대로 RSML에 쓰일 수 없는 경우
• 문제 예) ten thousand dollars  $10,000
• tag을 이용해 해결, 즉 RIML의 <value>가 attribute로 RSML에서 사용되는 값을
갖도록 한다
• 해결 예) <value name=“$10,000”>ten thousand dollars</value>
53
Generate RIML from HTML 1/3

Procedure
1. Identify RuleSets and symbols
1) Identify ranges which composed of same type of rules
– Insert <RuleSet>, </RuleSet> before and after ranges
– Assign <RuleTitle> to each range
– Assign <URL> of RSML
– Identify pages and paragraphs to assign values and variables
2) Identify the words that will be used as variables
– Insert <variable> tag and assign name attribute
– Each variable must be unique
3) Identify the words that will be used as values
– Insert <value> tag and assign name attribute
4) Identify the words that will be used as operators
– Insert <operator> tag
– Assign operator type as attribute
54
Generate RIML from HTML 2/3
2. Connect variables, values and operators to make pairs
1) Drag symbol to related symbol
• 연결해야 할 symbol이 중복되지 않는 경우
– pair_id 생성
• symbol이 두 개 이상의 symbol과 연결되는 경우
– pair_id 생성
– 중복되는 dummy tag을 생성한다.
• 각 symbol의 attribute를 채워 넣는다.
2) 연결 안 된 value가 남은 경우 (variable이 생략된 경우)
• 연결 안된 value로 pair를 생성
– pair_id 생성
– dummy variable 생성
» variable name을 KE가 지정
– value와 dummy variable에 attribute를 채워넣는다
• 아직도 연결 안된 value가 있으면 1)로 가서 과정을 반복
55
Generate RIML from HTML 3/3
3. pair에 operator가 연결되지 않은 경우
1) dummy operator를 해당 value 앞에 생성
• dummy operator에 pair_id attribute를 채워넣는다.
56
Example of RIML
57
Description of RSML
<AND>, <OR>, <NOT> connective 지원
 Nested <AND>, <OR>, <NOT> 지원

– <!Element IF (AND|OR|NOT|atom) >,<!Element AND ((AND|OR|NOT| atom)+) >
– <!Element OR ((AND|OR|NOT| atom)+) >,<!Element NOT ((AND|OR|NOT|
atom)) >

First order logic 기반
– Binary predicate만을 지원
• operator, variable, value를 하나의 atomic sentence로 묶음
– Object, attribute 지원 않음
• UNIK-BWD의 제약 (차후 확장은 가능하며 고려대상)

Consistency Maintenance를 위해 각 atom마다 pair_id를 attribute로 포함
– RIML에서의 pair와 RSML에서의 atom은 1:N 관계를 갖고 있으므로 atom에서의
pair_id는 unique하지 않다.

향후 발전가능성
– RIML 및 RSML의 확장을 통해 Full first order logic 지원
• N-ary predicate 지원, Object, attribute 지원, 다양한 추론엔진 및 방식 지원
• function의 지원(consistency 유지방법이 많이 바뀔 수 있다.)
58
Document Type Definition for RSML
<?xml version=“1.0” encoding =“UTF-8”?>
<!Entity % op_type (is|le|lt|ge|gt) #IMPLIED>
<!Element RSML (RuleTitle,URL+,Rule+)>
<!ATTLIST RSML Version CDATA #Required>
<!Element URL (#PCDATA)>
<!Element RuleTitle (#PCDATA)>
<!Element Rule (IF,THEN)>
<!ATTLIST Rule
id ID #Required>
<!Element IF (AND|OR|NOT|atom) >
<!Element THEN (atom) >
<!Element AND ((AND|OR|NOT| atom)+) >
<!Element OR ((AND|OR|NOT| atom)+) >
<!Element NOT ((AND|OR|NOT| atom)) >
<!Element atom (variable, operator, value)>
<!ATTLIST atom
pair_id CDATA #Required>
<!Element operator (#PCDATA) >
<!Element variable (#PCDATA)>
<!Element value (#PCDATA)>
59
DTD Tree of RSML 1/2
: AND
RSML
: OR
RuleTitle
URL
PCDATA
+
Rule
PCDATA
IF
AND
1
+ : Repeat one or more
+
OR
NOT
1
2
60
THEN
atom
atom
Variable
Operator
Value
PCDATA
PCDATA
PCDATA
DTD Tree of RSML 2/2
1
: OR
+ : Repeat one or more
AND
OR
NOT
atom
NOT
atom
2
AND
OR
61
+
Meaning of elements and attributes
in RSML
Element/Attribute
RSML
Version
Description
The root element within a RSML document. This element carries a required attribute Version.
It indicates the particular version of this specification with which the rule exchanges.
RuleTitle
It is the title of the RuleSet in RSML. It corresponds to one rule base.
Rule
It corresponds to one rule in the rule base. All of rules in RSML compose one rule base.
id
It identifies a rule.
IF
‘IF’ element represents premises and is composed of ‘AND’ and ‘operator’.
THEN
‘THEN’ element represents a conclusion.
AND
‘AND’ is composed of a set of ‘OR’ or ‘NOT’ or ‘operator’.
OR
‘OR’ is composed of a set of ‘NOT’ or ‘operator’.
NOT
‘NOT’ is composed of one ‘operator’.
atom
It means atomic sentence and is composed of one variable, one operator and one value.
pair _id
It indicates unique set of variable, value and operator.
variable
The literal element “variable” represents variable names.
value
The literal element “value” represents value names.
operator
The literal element “operator” represents predicate and function.
62
Generate RSML from RIML 1/2

Procedure
1. Make RSML template
1) Extract RuleTitle, URL from RIML
2) Extract sets of <variable>, <operator>, and <value> from RIML.
– Update each PCDATA from name attribute
– Remove name or type attribute tags
3) Insert <atom> to each atomic sentence
– Assign pair_id to each <atom>
– Remove pair_id from each symbol
2. 적절치 못한 variable name이나 value의 name을 수정
1) Update PCDATA of variable and value
3. Assign appropriate PCDATA to <operator>
63
Generate RSML from RIML 2/2
4. Define the scope of each rule.
1) Place <Rule> tag to adequate position.
5. Define premises and conclusions in each rule.
1) Place <IF>, <THEN> tags to adequate position.
2) Adjust position of each atom to make perfect premise.
3) Conclusion이 2개 이상의 atom으로 이루어진 경우 (Tool에 의해 자동
화 가능)
– Divide rule to two or more rules.
» Copy premise to additional conclusions.
» Place <Rule> tag to new rules.
» Place <IF>, <THEN> tags to new rules.
4) If some premises are left out of range of <IF> or <THEN>, insert
premises to appropriate position.
6. Place <AND>, <OR>, <NOT> tags to adequate position.
64
Example of RSML
65
Update RIML

Procedure (Fully automated by tool)
– Make atom tables based on RSML
• pair_id, variable, variable name, operator, type, value, value
name
– Update RIML
• If URL of RSML change, update URL in RIML
• If RuleTitle of RSML change, update RuleTitle in RIML
• Modify variable, value
– Update name attribute of variable and value from table
• Modify operator
– Update type attribute of operator from table
– 미리 정의된 operator type이 아닌 predicate의 경우에는
type을 pr로 지정한다.
66
Example of Updated RIML
67
Consistency Maintenance between
Hypertext and Rules

Consistency between RIML and RSML
 Assumptions on Consistency Maintenance
 Methodology of Consistency Maintenance
– Consistency Maintenance Method for Each Add
– Consistency Maintenance Method for Each Update
• Example of Variable Update from RIML to RSML
• Example of Variable Update from RSML to RIML
– Consistency Maintenance Method for Each Delete
68
Consistency between RIML and
RSML
<RIML Version=”0.6” >
<RSML Version=“0.6”>
<RuleSet>
<URL>URL of RSML file</URL>
<URL> URL of RIML file </URL>
<RuleTitle>title of rule</RuleTitle>
<RuleTitle> title of rule </RuleTitle>
<Rule id = r1>
<variable name=“data of vr1 “ pair_id = 1 >data of vr1
</variable>
<operator type = le pair_id = 1>less than</operator>
<value name= “data of vl1” pair_id = 1>data of
vl1</value>
<variable name=“data of vr2 “ pair_id = 2 >data of vr2
</variable>
<operator type = is pair_id = 2></operator>
<value name= “data of vl2” pair_id = 2>data of
vl2</value>
<IF>
<atom pair_id=1>
<variable>data of vr1</variable>
<operator>le</operator>
<value>data of vl1</value>
</atom>
</IF>
<THEN>
<atom pair_id=2>
<variable>data of vr2</variable>
<operator>is</operator>
<value>data of vl2</value>
</atom>
</THEN>
</Rule>
</RuleSet>
</RIML>
</RSML>
69
Assumptions on Consistency
Maintenance

허용하는 HTML 변경의 범위와 방법
– 허가된 KE가 XRML Tool을 통해서만 HTML을 변경

HTML 혹은 Rule Base 변경의 감지 및 기준
– 변경 시 즉시 적용
• XRML Tool 상에서의 변경만을 감지
– 변경 후 detection and resolution
• detection 시점까지의 모든 변경을 감지
– HTML의 history는 유지하지 않음
70
Methodology of Consistency
Maintenance

Classification of inconsistency resolution method
– Guide updating RIML or RSML by tool and maintain consistency while KE update
RIML or RSML
• Define add, update, delete procedure which keep consistency
– Detection and correction of inconsistency after update of RIML or RSML
• When Knowledge Engineer updates RIML or RSML manually
• How to detect inconsistency?
– Analyze inconsistency with cases caused by different changes
» Add, update, delete of variable, value, operator, atom, rule
• How to correct inconsistency?
– Use of inconsistency resolution rule
– Correction or warning report

Consistency of Rule Base
– RSML에서 symbol이나 atom 혹은 rule을 수정할 때는 반드시 rule base 자체의
verification을 고려하여야 한다.
– RIML Update 후 RIML Consistency Check는 RSML의 Consistency Check를 통해
서 이루어진다.
– RSML Update는 RSML 자체의 Consistency Check를 통해서 가능하다.
71
Add Procedure Preserving
Consistency

Start from knowledge acquisition again?

Or only update extended RIML and RSML partially?
– Any add of one variable, one value or one operator causes add of set of
variable, value, and operator
72
Update Procedure Preserving
Consistency 1/2

Use <URL> and <RuleTitle> to find corresponding RIML or RSML
 Update of variable
RIML  RSML (1:N)
• Update the variable only
– Update name attribute of variable
– Find pair_id of the variable
– Find corresponding variables in atoms of RSML using pair_id
– Update the variables
• Update all the same variables
– Update by pattern matching in RIML and RSML
– RSML  RIML (N:1)
• Update the variable only
– Find pair_id of the variable
– Find variables of atoms which have the same pair_id in RSML
– Update those found variables
– Find corresponding variable in RIML using pair_id
– Update name attribute of the variable
– Update the variable
• Update all the same variables
– Update by pattern matching in RIML and RSML
73
Example of Variable Update
from RIML to RSML
RIML
<variable name=“Job_Title” pair_id = 1>
</variable>
<operator type=is pair_id =1></operator>
<p>(A) <value name=“Professor” pair_id=1>
Professor</value>
<ul><li><variable name=“Payment_Level” pair_id=2>
<operator type=le pair_id=2>Less than</operator>
<value name= “standard payment *1.5”
pair_id=2>standard payment *1.5</value> with regard
to number of researches </ul>
Update to ‘Promoted’
<p>*

<variable name=“Sponsored” pair_id=3>
 Sponsored</variable> project by 
<operator type=is pair_id =3></operator>
<value name=“Ministry of ST” pair_id=3> Ministry of
IC</value>
is excluded. </p> Update to ‘Promoted’
74
RSML
<Rule>
<IF> <AND>
<atom pair_id =1>
<variable> Job_Title</variable>
<operator> is </operator>
<value>Professor</value>
</atom>
<NOT><OR> 
Update to ‘Promoted’
<atom pair_id=3> 
<variable>Sponsored</variable>
<operator> is </operator>
<value Ministry of IC</value>
</atom>
</OR> </NOT> </AND></IF>
<THEN>
<atom pair_id=2>
<variable>Payment_Level </variable>
<operator> le </operator>
<value>standard payment *1.5</value>
</atom> </THEN>
</Rule>
Example of Variable Update
from RSML to RIML
RIML
<variable name=“Job_Title” pair_id = 1>
</variable>
<operator type=is pair_id =1></operator>
<p>(A) <value name=“Professor” pair_id=1>
Professor</value>
<ul><li><variable name=“Payment_Level” pair_id=2>
<operator type=le pair_id=2>Less than</operator>
<value name= “standard payment *1.5”
pair_id=2>standard payment *1.5</value> with regard
to number of researches </ul>
Update to ‘Promoted’
<p>*

<variable name=“Sponsored” pair_id=3>
 Sponsored</variable> project by

<operator type=is pair_id =3></operator>
<value name=“Ministry of ST” pair_id=3> Ministry of
IC</value>
is excluded. </p> Update to ‘Promoted’
75
RSML
<Rule>
<IF> <AND>
<atom pair_id =1>
<variable> Job_Title</variable>
<operator> is </operator>
<value>Professor</value>
</atom>
<NOT><OR> 
Update to ‘Promoted’
<atom pair_id=3> 
<variable>Sponsored</variable>
<operator> is </operator>
<value Ministry of IC</value>
</atom>
</OR> </NOT> </AND></IF>
<THEN>
<atom pair_id=2>
<variable>Payment_Level </variable>
<operator> le </operator>
<value>standard payment *1.5</value>
</atom> </THEN>
</Rule>
Update Procedure Preserving
Consistency 2/2

Update of value
– The same as change of variable

Update of operator
– The same as change of variable

Update of atom
– Update each variable, value and operator
– Change of one atom can propagate to changes of multiple atoms in rule base.
• Consistency of each changed atoms can be maintained using the same
consistency maintenance of one atom.
• Change of one atom in RIML can propagate to not only RIML, but also RSML
• Change of one atom in RSML can propagate to not only RSML, but also RIML

Update of Rule
– Consistency maintenance of each components of rule such as operator, variable,
value, and atom makes rule consistent
– Need further study of more complex case
76
Delete Procedure Preserving
Consistency

Any delete of one variable, one value or one operator causes delete of atom.
 Delete of atom
–
–

When the atom is included in premise
• When the premise has only one atom
– Delete related rule
– Propagate to other rules
– Make related corresponding atoms consistent in opposite RIML or RSML
• When the premise has two or more atoms
– Delete the atom
– Propagate to other rules
– Make related corresponding atoms consistent in opposite RIML or RSML
When the atom is included in conclusion
• Delete related rule
• Propagate to other rules
• Make related corresponding facts consistent in opposite RIML or RSML
Delete of rule
–
–
–
Delete related rule
Propagate to other rules
Make related corresponding facts consistent in opposite RIML or RSML
77
Other Consideration

Inference engine
– Simple backward engine (UNIK)
– RSML based backward engine
– Compare two methods and choose

Rule integration with external rules
– Transform RSML to rule base
– Issue of rule integration between rule base

Rule exchange in distributed environment
– Exchange RSML and convert it to their own form of rule base

Fact representation
– How to represent fact, XML or other method?

Mark in the browser
– Show the existence of rules
– Use for Q&A
• Analyze inference need and support inference
78
Test Plan

Technical Assistance
 Regulations for travel and personnel
 Tax
 Government regulations
 Auditing rule
79
Conclusion and Contribution

Define RIML and RSML for consistency maintenance
 Develop methodology for consistency maintenance
 Develop XRML editor

Easy and systematic Knowledge Acquisition
– Extract rules from HTML


Knowledge Management
Bridge of Knowledge Acquisition and Knowledge
Management
80
Further Study


Find criteria to measure the performance of knowledge
acquisition and knowledge maintenance
Prove that knowledge acquisition and knowledge
maintenance are easier than other KAS or KMS
81
예제 선택 방향

Delivery 예제
– Delivery에 대한 다양한 규칙을 표현
– Amazon
• 여러 페이지에 나뉘어서 규칙이 표현됨 : 페이지가 나뉘어진 환경을 테스트하
기에 적합
– Barnes and Noble
• Text 표현이 보다 풍부

과실상계 (법에 관련된 예제, 자동차세도 고려)
– 지식형태로 잘 표현되어 있으나 너무 정형화되어 있다.
– 한글문제
– 시스템 구현이 쉽다

현재 예제
– 시간 절약, 이해가 쉬움

졸업이수요건
– 너무 단순할 수 있음
– 외국대학의 졸업이수요건을 고려
82
질문사항
DTD 검토
 Operator 포함여부(RIML)
 Consistency 정보 위치
 가정 검토
 And/Or graph를 이용한 consistency 방법론 확인

– 가능한 경우 고려
83
References












[Torsun] I.S. Torsun, “Foundations of Intelligent Knowledge-Based Systems”, Academic
Press, 1995
[W3C] http://www.w3c.org/xml
[Harold Boley] Harold Boley, “Markup Languages for Functional-Logic Programming”,
Proceedings of 9th WFLP 2000
[Lloyd] John Wylie Lloyd, “Foundations of Logic Programming”, Springer-Verlag, 1987
[RuleML] RuleML, http://www.dfki.uni-kl.de/ruleml/
[AIML] AIML, http://www.alicebot.org/
[CBML] CBML, http://boffin.ucd.ie/Ulysses/CBR/CBR_CBML.htm
[AORML] AORML, http://tmitwww.tm.tue.nl/staff/gwagner/AORML
[BRML] BRML, http://www.research.ibm.com/rules/
[Suwa] Motoi Suwa, A.Carlisle Scott, Edward H.Shortliffe, “An Approach to Verifying
Completeness and Consistency in a Rule-Based Expert System”, AI Magazine, Vol.3.
No.4, Fall 1982, pp.16-21.
[Nguyen] Tin A. Nguyen, Walton A. Perkins, et al, “Knowledge Base Verification”, AI
Magazine, Vol 8. No 2, Summer 1987, pp.69-75
[Cragun] Brian J.Cragun, Harold J.Steudel, “A decision-table-based processor for
checking completeness and consistency in rule-based expert systems”, Man-Machine
Studies, No.26, 1987, pp.633-648
84