Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:miw:miw08_hml_rules:hekate_case_thermostat [2008/03/31 23:46]
miw
pl:miw:miw08_hml_rules:hekate_case_thermostat [2019/06/27 15:50]
Linia 1: Linia 1:
-**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 in non-RDF form: 
-  
-    @prefix rdf: <​http://​www.w3.org/​1999/​02/​22-rdf-syntax-ns#>​ . 
-    @prefix rul: <​http://​id.ninebynine.org/​RDFRules/​1.0/>​ . 
-    @prefix ex:  <​http://​example.org/#>​ .    
-    ​ 
-    ex : monday (?day)-> 
-     ex : workday (?day). 
-    ex : tuesday(?​day)->​ 
-     ex : workday (?day). 
-    ex : wednesday (?day)-> 
-     ex : workday (?day). 
-    ex : thursday (?day)-> 
-     ex : workday (?day). 
-    ex : friday (?day)-> 
-     ex : workday (?day). 
- 
-Rule represented in RDF/N3 
- 
-    [rdf:type rul:Rule; 
-     ​rul:​from _:genid1; 
-     ​rul:​infer _:genid2]. 
- 
-    _:​genid1 ​    ​rdf:​type rul:Fact; 
-                ​rul:​pred ex:monday; 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid3; 
-                  ​rdf:​rest rdf:nil]. 
- 
-    _:​genid3 ​    ​rdf:​type rul:Var; 
-                 ​rdfs:​label “?day”. 
- 
-[analogicznie dla pozostałych dni pracujacych] 
- 
-**Rule: 2**    
- 
-    if    the day is Saturday ​ 
-    or    the day is Sunday ​ 
-    then  today is the weekend 
- 
-Rule in non-RDF form: 
- 
-    ex : saturday (?day)-> 
-     ex : weekend (?day). 
-    ex : sunday (?day)-> 
-     ex : weekend (?day). 
- 
-    [rdf:type rul:Rule; 
-     ​rul:​from _:genid1; 
-     ​rul:​infer _:genid2]. 
- 
-    _:​genid1 ​    ​rdf:​type rul:Fact; 
-                ​rul:​pred ex:​saturday;​ 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid3; 
-                  ​rdf:​rest rdf:nil]. 
- 
-    _:​genid3 ​    ​rdf:​type ​ rul:Var; 
-                 ​rdfs:​label ​ “?day”. 
- 
-[analogicznie dla „Sunday”] 
- 
-**Rule: 3**  
-  ​ 
-    if    today is workday ​ 
-    and   the time is '​between 9 am and 5 pm' ​ 
-    then  operation is '​during business hours' 
- 
-Rule in non-RDF form: 
- 
-      ex : workday (?day)& 
-      ex : time_between (?time1, ?time2) -> 
-            ex : during_buisness_hours (?day, ?time1, ?time2). 
- 
-Rule represented in RDF/N3 
- 
-    [rdf:type rul:Rule; 
-     ​rul:​from _:genid1; 
-     ​rul:​from _:genid2; 
-     ​rul:​infer _:genid3]. 
- 
-     ​_:​genid1 ​    ​rdf:​type rul:Fact; 
-                 rul:pred ex:workday; 
-                  rul:args [rdf:type rdf:List; 
-                            rdf:first _:genid4; 
-                   rdf:rest rdf:nil]. 
- 
-     ​_:​genid2 ​    ​rdf:​type rul:Fact; 
-                 rul:pred ex:​time_between;​ 
-                  rul:args [rdf:type rdf:List; 
-                            rdf:first _:genid5; 
-                   rdf:rest [rdf:type rdf:List; 
-                                      rdf:first _:genid6; 
-                             rdf:rest rdf:nil]. 
- 
-     ​_:​genid3 ​    ​rdf:​type rul:Fact; 
-                 rul:pred ex: during_buisness_hours;​ 
-                  rul:args [rdf:type rdf:List; 
-                            rdf:first _:genid4; 
-                   rdf:rest [rdf:type rdf:List; 
-                                      rdf:first _:genid5; 
-                             rdf rest [rdf:type rdf:List; 
-                                                rdf:first _:genid6; 
-                                       rdf:​rest ​ rdf:nil]. 
- 
-     ​_:​genid4 ​    ​rdf:​type rul:Var; 
-                  rdfs:​label ​   “?day”. 
- 
-     ​_:​genid5 ​    ​rdf:​type rul:Var; 
-                  rdfs:​label ​ “?​time1”. 
- 
-     ​_:​genid6 ​    ​rdf:​type rul:Var; 
-                  rdfs:​label ​ “?​time2”. 
- 
-**Rule: 4 **  
-  
-    if    today is workday ​ 
-    and   the time is '​before 9 am' ​ 
-    then  operation is 'not during business hours' 
- 
-Rule in non-RDF form: 
- 
-    ex : workday (?day)& 
-    ex : time_before (?time) -> 
-       ex : not_during_buisness_hours (?day, ?time). 
- 
-Rule represented in RDF/N3 
- 
-    [rdf:type rul:Rule; 
-     ​rul:​from _:genid1; 
-     ​rul:​from _:genid2; 
-     ​rul:​infer _:genid3]. 
- 
-    _:​genid1 ​    ​rdf:​type rul:Fact; 
-                ​rul:​pred ex:workday; 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid4; 
-                  ​rdf:​rest rdf:nil]. 
- 
-    _:​genid2 ​    ​rdf:​type rul:Fact; 
-                ​rul:​pred ex:​time_before;​ 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid5; 
-                  ​rdf:​rest rdf:nil]. 
- 
-    _:​genid3 ​    ​rdf:​type rul:Fact; 
-                ​rul:​pred ex: not_during_buisness_hours;​ 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid4; 
-                  ​rdf:​rest [rdf:type rdf:List; 
-                                           ​rdf:​first _:genid5; 
-                                  rdf rest [rdf:type rdf:List; 
-                                                     ​rdf:​first _:genid6; 
-                                            ​rdf:​rest ​ rdf:nil]. 
- 
-    _:​genid4 ​    ​rdf:​type rul:Var; 
-                 ​rdfs:​label ​   “?day”. 
- 
-    _:​genid5 ​    ​rdf:​type rul:Var; 
-                 ​rdfs:​label ​ “?​time”. 
-**Rule: 5**  
-  ​ 
-    if    today is workday ​ 
-    and   the time is 'after 5 pm' ​ 
-    then  operation is 'not during business hours' 
- 
-Rule in non-RDF form: 
- 
-    ex : workday (?day)& 
-    ex : time_after_5pm (?time) -> 
-     ex : not_during_buisness_hours (?day, ?time). 
- 
-Rule represented in RDF/N3 
- 
-    [rdf:type rul:Rule; 
-     ​rul:​from _:genid1; 
-     ​rul:​from _:genid2; 
-     ​rul:​infer _:genid3]. 
- 
-    _:​genid1 ​    ​rdf:​type rul:Fact; 
-                ​rul:​pred ex:workday; 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid3; 
-                  ​rdf:​rest rdf:nil]. 
- 
- 
-    _:​genid2 ​    ​rdf:​type rul:Fact; 
-                ​rul:​pred ex: time_after_5pm;​ 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid4; 
-                  ​rdf:​rest rdf:nil]. 
- 
-    _:​genid3 ​    ​rdf:​type ​ rul:Var; 
-                 ​rdfs:​label ​ “?day”. 
- 
-    _:​genid4 ​    ​rdf:​type ​ rul:Var; 
-                 ​rdfs:​label “?​time”. 
- 
-**Rule: 6 **  
-  
-    if    today is weekend ​ 
-    then  operation is 'not during business hours' 
- 
-Rule in non-RDF form: 
- 
-    ex : weekend (?day)-> 
-           ex : not_during_buisness_hours (?day). 
- 
-Rule represented in RDF/N3 
- 
-    [rdf:type rul:Rule; 
-     ​rul:​from _:genid1; 
-     ​rul:​infer _:genid2]. 
- 
-    _:​genid1 ​    ​rdf:​type rul:Fact; 
-         ​  ​      ​rul:​pred ex: weekend; 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid3; 
-                   rdf:rest rdf:nil]. 
- 
- 
-    _:​genid2 ​    ​rdf:​type rul:Fact; 
-                ​rul:​pred ex: not_during_buisness_hours;​ 
-                 ​rul:​args [rdf:type rdf:List; 
-                           ​rdf:​first _:genid3; 
-                  ​rdf:​rest rdf:nil]. 
- 
- 
-    _:​genid3 ​    ​rdf:​type rul:Var; 
-                 ​rdfs:​label ​   “?day”. 
pl/miw/miw08_hml_rules/hekate_case_thermostat.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
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