1 / 12

Process Logic

Process Logic. Outline Decision tree Decision table Structured English Tight English (skip). Why not Narrative English?. Same thing can be represented in different sentences/statements. Ex Go to movies only on weekends, unless it’s holidays No movies unless it’s weekends or holidays

wells
Download Presentation

Process Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Process Logic • Outline • Decision tree • Decision table • Structured English • Tight English (skip)

  2. Why not Narrative English? • Same thing can be represented in different sentences/statements. Ex • Go to movies only on weekends, unless it’s holidays • No movies unless it’s weekends or holidays • Undefined adjectives Ex. Good customers?

  3. Boundary Specification Ex. Company discount policy: Children between 2 and 12 pay half price. Children under 2 years old get 90% discount. 4 possible interpretations

  4. And/Or Ambiguity Ex. Passengers over 67 or students under 26 and traveling at least 150 km one way receive a 50% discount. A: the passenger is over 67 B: the passenger is a student under 26 C: the passenger travels at least 150 km one way ABC (literally) A(BC) (AB)C

  5. An Example • NSB provides attractive prices for group travel. 2-9 people traveling together will receive 25% discount; 10 people or more will receive a 40% discount. It also takes into account students and military service. Students are eligible for 50% discount and military service-personal to pay only 25% of the standard rate.

  6. Decision Tree • Identify conditions and actions • Clear boundary, and/or ambiguities • Define unclear adjectives • Construct the tree 50% dis. student military 75% dis. NSB 1 people 0% dis. others 2-9 people 25% dis. 10 and more 40% dis.

  7. Standard Decision Tree 50% S M O 1 75% 0% error S M O ST 2-9 error error S M O error >=10 error error NSB error S M O 1 error error 50% S M O GT 2-9 75% 25% 50% S M O >=10 75% 40%

  8. Decision Table • Collect all conditions and actions • List all combinations from the conditions • Assign relevant action to each combination • Merge combinations with only one different condition but same action together

  9. Decision Table for the Example

  10. Structured English • Use if-then-else, do-while, repeat-until (no in-case) to specify conditions, and statements to actions. Ex. ifcategory is student then discount is 50% else ifcategory is military thendiscount is 75% else ifgroup size is 1 then no discount else ifgroup size is 2-9 then discount is 25% else(group size is 10 or more) discount is 40%

  11. Desirable Features • Completeness—Has every case been considered? • Consistency—Does each case lead to only one unique set of actions? • Compactness—Are the rules independent of each other? Implications: • quality software • Efficiency • Ease of modification and maintenance • Ease of comprehension

  12. Summary

More Related