Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010....
Transcript of Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010....
![Page 1: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/1.jpg)
MSc Business Information Systems
Visual Rule Modelling
![Page 2: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/2.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Logic programming is a powerful, declarativeprogramming language
Prolog is both a programming language with control construct,
input/output operations, arithmetics etc. a knowledge representation language
But writing a knowledge base in Prolog or rule-basedsystems is not user-friendly
User-friendly interfaces can be built on top of Prolog orforward-chaining rule systems to represent and modifyrule-based knowledge bases
![Page 3: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/3.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
VisiRule – a graphical modelling tool
VisiRule™ is an extension to WIN-PROLOG from Logic Programming Associates Ltd.
VisiRule allows experts to build decision models using a graphical paradigm
VisiRule allow to graphically represent forward chaining rules with access to Prolog
VisiRule models can be interpreted and executed
VisiRule models can be exported to other programs and integrated into existing web and desktop standards
![Page 4: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/4.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Layers of VisiRule
VisiRule creates charts (layer 1)
VisiRule generates Flex code(LPA ‘s Expert System Product) (layer 2)
Flex code in turn generates Prolog (layer 3)
The underlying Prolog allows to do almost anything, including call C functions using a built-in predicate called winapi/4
VisiRule
Flex
WIN-PROLOG
Integration with VB, Delphi, ODBC
![Page 5: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/5.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Answer the question … and get result
![Page 6: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/6.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
A simple visible chart
Start node
Question
Expressions
End nodes
![Page 7: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/7.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Question Types
![Page 8: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/8.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Question Types
Single Choice This is the default option. The menu produced will only allow the user to select one of the items on themenu.
Multiple Choice This allows the user to select any or none of theitems on the menu.
Number Input Instead of a menu, this option provides an input box into which the user can enter any number
Integer Input This is like Number Input, but only allows the user to enter an integer.
Set Input An input box is also provided by this option. The usercan type in a list of items, separated by a spacecharacter. For example: red amber green.
Name Input Another input box is provided into which the user cantype a word or phrase.
![Page 9: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/9.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Generating and running executable code
![Page 10: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/10.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
![Page 11: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/11.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Representing a Decision in VisiRuleVisiRule diagrams are graphical representations of forward chaining rules:
![Page 12: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/12.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
The same rule set can also be represented as a decision table:
![Page 13: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/13.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Travel Advisory represented as Decision Table and Decision Tree
![Page 14: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/14.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Dividing a Decision Tree into Subtrees usingContinuation Boxes
![Page 15: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/15.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Dividing a Decision Tree into Subtrees usingContinuation Boxes (Cont.)
![Page 16: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/16.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Statement Box
The function of a statement box is to calculate a valuefrom information that is already known.
Statement boxes have three elements: an editable name (balance_plus_order in example below) an editable local variable (X in example below) editable Prolog code which is used to calculate the value
(X is balance+order_total.)
![Page 17: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/17.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Statement Box with an Arithmetic Expression
![Page 18: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/18.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Example: Calculating Leap Years
![Page 19: Visual Rule Modelling - Hinkelmannknut.hinkelmann.ch/lectures/KE2010/KE-5-VisualRules.pdf · 2010. 4. 17. · Prof. Dr. Knut Hinkelmann MSc BIS/ Layers of VisiRule VisiRule creates](https://reader036.fdocuments.in/reader036/viewer/2022071408/60fff160cd59b24dbe57adfd/html5/thumbnails/19.jpg)
Prof. Dr. Knut Hinkelmann MSc BIS/
Using a Statement Box to access a Prolog Knowledge Base