diff service/reasoning/rules.n3 @ 1089:cb7fa2f30df9

rules become simple-looking again; fix the ambiguity in memory after loading them. Ignore-this: e8788fe6e9c8738671bc1f8910a906c refactor all rule/inference code to one module; all escaping/unescaping to another. darcs-hash:dd0d4538341f23cf7a524cfdc51d03fe1db5ebab
author drewp <drewp@bigasterisk.com>
date Sun, 08 May 2016 02:58:25 -0700
parents 0f6128740000
children 79efb6fdcb95
line wrap: on
line diff
--- a/service/reasoning/rules.n3	Fri May 06 18:38:18 2016 -0700
+++ b/service/reasoning/rules.n3	Sun May 08 02:58:25 2016 -0700
@@ -141,14 +141,11 @@
 } .
 
 { bed:redButton :buttonState :press . :headboardWhite :brightness 0.0 . } => {
-  # Desired:
-  #   :output :subgraph { :headboardWhite :brightness 0.2 }
-  # but I haven't been able to extract the inner graph triples yet.
-  :output :statement [ :subj :headboardWhite; :pred :brightness; :obj 0.2 ] . 
+  :headboardWhite :brightness 0.2 . 
 } .
 
 { bed:redButton :buttonState :press . :headboardWhite :brightness 0.2 . } => {
-  :output :statement [ :subj :headboardWhite; :pred :brightness; :obj 1 ] .
+  :headboardWhite :brightness 1 .
 } .
 
 @prefix sensor:   <http://bigasterisk.com/homeauto/sensor/> .
@@ -169,7 +166,12 @@
   } .
 
 { :bookSwitch :buttonState :press . :livingRoomLamp1 :brightness 0.0 . } => {
-  :livingRoomLamp1 :brightness 1.0 . :livingRoomLamp2 :brightness 1.0 } .
+  :livingRoomLamp1 :brightness 1.0 .
+  :livingRoomLamp2 :brightness 1.0 .
+} .
 { :bookSwitch :buttonState :press . :livingRoomLamp1 :brightness 1.0 . } => {
-  :livingRoomLamp1 :brightness 0.0 . :livingRoomLamp2 :brightness 0.0 } .
+  :livingRoomLamp1 :brightness 0 .
+  :livingRoomLamp2 :brightness 0 .
+} .
 
+