Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hekate:hekate_case_thermostat [2008/05/28 12:30]
gjn prolog code
hekate:hekate_case_thermostat [2019/06/27 15:49]
Line 1: Line 1:
-====== HeKatE Case Thermostat ====== 
- 
-This case analysis is based on [[hekate process]]. 
- 
-FIXME 
- 
-====== Introduction ====== 
- 
-The ARD process can be easily explained using the following example. ​ 
-It is a reworked Thermostat case. 
-The main problem described here is to create a temperature control system 
-for an office. 
-The design process is shown below. 
- 
-===== Description ===== 
- 
- 
-===== Conceptualization ===== 
- 
-==== Vocabulary ==== 
- 
- 
-==== Original Rules ==== 
- 
-<​code>​ 
-Rule: 1    
-if     the day is Monday ​ 
-or     the day is Tuesday ​ or     the day is Wednesday ​ 
-or     the day is Thursday or     the day is Friday ​ 
-then   today is a workday 
- 
-Rule: 2    
-if    the day is Saturday ​ 
-or    the day is Sunday ​ 
-then  today is the weekend 
- 
-Rule: 3    
-if    today is workday ​ 
-and   the time is '​between 9 am and 5 pm' ​ 
-then  operation is '​during business hours' 
- 
-Rule: 4    
-if    today is workday ​ 
-and   the time is '​before 9 am' ​ 
-then  operation is 'not during business hours' 
- 
-Rule: 5    
-if    today is workday ​ 
-and   the time is 'after 5 pm' ​ 
-then  operation is 'not during business hours' 
- 
-Rule: 6    
-if    today is weekend ​ 
-then  operation is 'not during business hours' 
- 
-Rule: 7    
-if    the month is January ​ 
-or    the month is February or the month is December ​ 
-then  the season is summer ​ 
- 
-Rule: 8    
-if    the month is March  
-or    the month is April or the month is May  
-then  the season is autumn ​ 
- 
-Rule: 9  ​ 
-if    the month is June  
-or    the month is July or    the month is August ​ 
-then  the season is winter ​ 
- 
-Rule: 10    
-if    the month is September ​ 
-or    the month is October or the month is November ​ 
-then  the season is spring ​ 
- 
-Rule: 11    
-if    the season is spring ​ 
-and   ​operation is '​during business hours' ​ 
-then  thermostat_setting is '20 degrees'​ 
- 
-Rule: 12    
-if    the season is spring ​ 
-and   ​operation is 'not during business hours' ​ 
-then  thermostat_setting is '15 degrees'​ 
- 
-Rule: 13    
-if    the season is summer ​ 
-and   ​operation is '​during business hours' ​ 
-then  thermostat_setting is '24 degrees'​ 
- 
-Rule: 14    
-if    the season is summer ​ 
-and   ​operation is 'not during business hours' ​ 
-then  thermostat_setting is '27 degrees'​ 
- 
-Rule: 15    
-if    the season is autumn ​ 
-and   ​operation is '​during business hours' ​ 
-then  thermostat_setting is '20 degrees'​ 
- 
-Rule: 16    
-if    the season is autumn ​ 
-and   ​operation is 'not during business hours' ​ 
-then  thermostat_setting is '16 degrees'​ 
- 
-Rule: 17    
-if    the season is winter ​ 
-and   ​operation is '​during business hours' ​ 
-then  thermostat_setting is '18 degrees'​ 
- 
-Rule: 18 
-if    the season is winter ​ 
-and   ​operation is 'not during business hours' ​ 
-then  thermostat_setting is '14 degrees'​ 
-</​code>​ 
- 
-The seasons //ARE// correct, the Author lives in Australia. 
- 
-===== Analysis ===== 
- 
-===== Conceptual design ===== 
- 
-==== General Conceptual Design ==== 
- 
- 
-==== Directed Conceptual Design ==== 
- 
-We model the system aiming at matching the original rules. 
- 
-First, it is stated that there is a system to be designed which is described by 
-a single conceptual attribute ''​Thermostat''​. ​ 
-It is so called level 0 of the design. 
- 
-Refining knowledge about what is the purpose of the system makes a transition to the diagram at level 1; it is a finalization. ​ 
-It is stated that the thermostat controls temperature and this control has something to do with time.  
-That is why ''​Thermostat''​ is finalized into ''​Time''​ and ''​Temperature''​. 
- 
-Furthermore,​ at level 2, it is stated that ''​Temperature''​ 
-depends on ''​Time'':​ there are two properties identified in the 
-system and a functional dependency between them. 
- 
-The design process continues, through splits and/or finalizations,​ until all physical attributes (indicated with lower case letters) are identified and relationships among them are stated which is presented at level 8. 
- 
-The whole process is shown below: 
- 
-^ ARD diagram ​         ^ Corresponding THP  ^ VARDA model  ^ 
-| <​graphviz file="​hekate:​therm-a0.dot"></​graphviz> ​ | | ard_att_add('​Thermostat'​),​ ard_property_add(['​Thermostat'​]) ​ | 
-| <​graphviz file="​hekate:​therm-a1.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t1.dot"></​graphviz>​ | ard_att_add('​Time'​),​ ard_att_add('​Temperature'​),​ ard_finalize(['​Thermostat'​],​ ['​Time','​Temperature'​]) ​  | 
-| <​graphviz file="​hekate:​therm-a2.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t2.dot"></​graphviz>​ | ard_split(['​Time','​Temperature'​],​[ ['​Time'​],​['​Temperature'​]],​ [ [ ['​Time'​],​['​Temperature'​]]])| 
-| <​graphviz file="​hekate:​therm-a3.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t3.dot"></​graphviz>​ | ard_att_add('​Date'​), ​ ard_att_add('​Hour'​),​ ard_att_add(season),​ ard_att_add(operation),​ ard_finalize(['​Time'​],​['​Date','​Hour',​season,​operation])| 
-| <​graphviz file="​hekate:​therm-a4.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t4.dot"></​graphviz>​ | ard_split(['​Date','​Hour',​season,​operation],​[ ['​Date','​Hour'​],​[season,​operation]],​[ [ ['​Date','​Hour'​],​ [season,​operation]],​[ [season,​operation],​['​Temperature'​]]])| 
-| <​graphviz file="​hekate:​therm-a5f.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t5f.dot"></​graphviz>​ | ard_split([season,​operation],​[ [season],​[operation]],​[ [ ['​Date','​Hour'​],​[season]],​[ ['​Date','​Hour'​],​[operation]],​[ [season],​['​Temperature'​]],​[ [operation],​ ['​Temperature'​]]])| 
-| <​graphviz file="​hekate:​therm-a6f.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t6f.dot"></​graphviz>​ | ard_split(['​Date','​Hour'​],​[ ['​Date'​],​['​Hour'​]],​[ [ ['​Date'​],​[season]],​[ ['​Date'​],​[operation]],​[ ['​Hour'​],​[operation]]])| 
-| <​graphviz file="​hekate:​therm-a7f.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t7f.dot"></​graphviz>​ | ard_att_add(day),​ ard_att_add(month),​ ard_att_add(today),​ ard_finalize(['​Date'​],​[day,​month,​today])| 
-| <​graphviz file="​hekate:​therm-a8f.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t8f.dot"></​graphviz>​ | ard_split([day,​month,​today],​[ [month],​[day,​today]],​[ [ [month],​[season]],​[ [day,​today],​[operation]]])| 
-| <​graphviz file="​hekate:​therm-a9f.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t9f.dot"></​graphviz>​ | ard_split([day,​today],​[ [day],​[today]],​[ [ [day],​[today]],​[ [today],​[operation]]]| 
-| <​graphviz file="​hekate:​therm-a10f.dot"></​graphviz> ​ | <​graphviz file="​hekate:​therm-t10f.dot"></​graphviz>​ | ard_att_add(hour),​ ard_finalize(['​Hour'​],​[hour]),​ ard_att_add(thermostat_settings),​ ard_finalize(['​Temperature'​],​[thermostat_settings])| 
- 
- 
-=== Full Design === 
- 
-Subsequent ARD levels are given below: 
- 
-{{:​hekate:​thermostat-ard.png|:​hekate:​thermostat-ard.png}} 
- 
-The Transformation Process History diagram is given below: 
- 
-{{:​hekate:​thermostat-tph.png|:​hekate:​thermostat-tph.png}} 
- 
-=== Full ARD Model === 
- 
-See ''​therm-model.pl''​ in [[hekate:​varda]] 
- 
-==== Refined Conceptual Design ==== 
- 
-===== Physical Attribute Specification ===== 
- 
-===== Structuralization ===== 
- 
-XTT prototype generated by [[VARDA]]: 
- 
-{{:​hekate:​thermostat-varda-xtt.png|:​hekate:​thermostat-varda-xtt.png}} 
- 
-===== Logical design ===== 
- 
-{{:​hekate:​thermostat-xtt.png|:​hekate:​thermostat-xtt.png}} 
- 
  
hekate/hekate_case_thermostat.txt · Last modified: 2019/06/27 15:49 (external edit)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0