UML based expert system generation Using Enterprise Architect to model and generate a web-based...
-
Upload
shannon-logan -
Category
Documents
-
view
216 -
download
4
Transcript of UML based expert system generation Using Enterprise Architect to model and generate a web-based...
UML based expert system generation
Using Enterprise Architect to model and generate a web-
based expert system
Aims of research
Using Unified Modelling Language (UML) to model expert systems (ES)
Developing a system that can consume and analyze that model to generate an ES
Using the web as a deployment platform
Reasons for research
ES need maintaining and scaling ES model should remain accurate As the system grows, it’s model
should still be understandable ES benefit from portability
Technologies used
Enterprise Architect UML model development XML exporting of model
Visual Studio 2010 Shell development using ASP.NET and
C# Web based user interface
Similar research
Dunstan’s ES generator Uses XML to output web-based ES
related to university courses XML file contains course information Prolog interpreter processes the data
and outputs web pages WITS – web-based training ES for
SME’s Uses JavaScript to provide functionality Easy to use interface
What does this research add?
XML data generation methods consistency and validity of ES model accessible web-based ES not reliant
on client side scripting mechanism for both developers and
users to access the system
ES Modelling
Relevant UML elements Activity Diagrams
Activities, objects, decisions, initials and finals
Edges used to link elements with optional guards
Sample ES Housing Benefit
Income, dependants, housing need define level of housing benefit
act HousingNeed
HousingNeedActivityInitial
Do you havea fixedabode? (trueor false)
hn1 :HousingBenefit
HousingNeed = true
hn2 :HousingBenefit
HousingNeed = false
HousingNeedActivityFinal
Is the abodeadequate? (true orfalse)
hn3 :HousingBenefit
HousingNeed = true
[false][true]
[true]
[false]
KBS and ES Shell components
Knowledge base The uml model
Development environment EA
Inference engine .net shell
User interface Web page
Explanation facilities Web page
Mapping UML to ES
Critical factors are determined through activity diagrams
Decisions within the diagrams become rules – for example ‘fixed abode’
Forward chaining is used to test all decisions against current knowledge base – leading to a goal state.
Uses a blind search
Model development
A Class model defines the system (HousingBenefit) Class variables define
critical factors Nested composite
activity diagrams define how critical factors are determined
Activity Diagrams
Instances of the class are added to diagrams
Run state of a variable in that instance is set accordingly
Ensures consistency/ integrity of data Where variables must only hold
specific values, enumerations are used (demo)
ES Generator Classes
ExpertSystem class Dictionary containing all the critical factors Source XML data Processes the top level activities and outputs
the results
CriticalFactor class Processes the composite activities Determines the result of each critical factor
Nodes Process individual elements of an activity
diagram
Processing
Loops Top level loop successively finds all top
level activities starting from the first initial node
Sub loop processes discrete elements on each composite activity diagram
(es generator activities)
Determining critical factors
Object node finds the variable ‘extendedProperties’ subnode of the
current noderunstate="@VAR;Variable=HousingNeed;Value=true;Op==;@END
VAR;“
Split on ‘;’ Split on ‘=‘ Get the variable name and value Set the parent _criticalFactorResult to
the value
Handling decisions Determine the type of decision
Critical factor Direct input
If response already exists, get it, find the corresponding guard then find the target node and continue
If not, halt programme execution, output the question and wait for a response
Output
Once all critical factors have been determined, the goal state is determined
Then results are output This includes output of determining
factors Thereby providing simple explanation
Limitations
Only simple input can be handled Inputs are not validated Not like a traditional ES shell Developers must have knowledge of
UML Changes to the system must take
place at the correct location UML based XML data is hard-coded
Advantages
ES model can scale whilst still being logically organised/ understandable
The model is a perfect representation of the implementation
Being web-based it is portable The shell allows any ES to be
developed and deployed on the web Provided the developer knows UML and
has Enterprise Architect.