1% Enter your password. 2% Connected to PrologMUD, running eggdrop v1.6.21 3% ____ __ 4% / __/___ _ ___ _ ___/ /____ ___ ___ 5% / _/ / _ `// _ `// _ // __// _ \ / _ \ 6% /___/ \_, / \_, / \_,_//_/ \___// .__/ 7% /___/ /___/ /_/ 8% Hey swipl! My name is PrologMUD and I am running eggdrop v1.6.21, on Linux 5.0.0-38-generic. 9% Local time is now 13:56 10% You are an owner of this bot. Only +n users can see this! For more info, 11% see .help set motd. Please edit the motd file in your bot's 'text' 12% Use .help for basic help. 13% Use .help <command> for help on a specific command. 14% Use .help all to get a full command list. 15% Use .help *somestring* to list any help texts containing "somestring". 16% Have fun. 17% Commands start with '.' (like '.quit' or '.help') 18% Everything else goes out to the party line. 19% get2react([chon,"swipl","10"]). 20% You have no messages. 21% *** swipl joined the party line. 22% Echo turned off. 23% Set your console to ##prolog: - (none). 24% That channel already exists! 25% That channel already exists! 26% That channel already exists! 27% That channel already exists! 28% Msg to nickserv: identify swipl 29% Set your console to #logicmoo: - (none). 30% /pack/lps_corner/examples/binaryChop2.pl:2 31% push_lps_dialect. 32% ops. 33% [ti=user, load= /.../(examples, 'binaryChop2.pl'), strip=lps, ctx=lps, sm= /.../(examples, 'binaryChop2.pl'), lps= /.../(examples, 'binaryChop2.pl'), using= /.../(examples, 'binaryChop2.pl')]. 34% continue_lps_dialect. 35% ops. 36 37% LPS: fluents((left(_18944),right(_18944),searching(_19000))). 38% Into: fluents([left(_18944),right(_18944),searching(_19000)]). 39 40% LPS: initially((left(0),right(9),searching(60))). 41% Into: initial_state([left(0),right(9),searching(60)]). 42 43% LPS: actions(sample(_20552)). 44% Into: actions([sample(_20552)]). 45 46% LPS: events(do_sample/0). 47% Into: events([do_sample]). 48 49% LPS: if(at(found(_38926),_38948),(at(left(_38926),_38948),at(right(_38926),_38948))). 50% Into: l_int(holds(found(_38926),_38948),[holds(left(_38926),_38948),holds(right(_38926),_38948)]). 51 52% LPS: if(do_sample,(left(_40974),right(_41014),_41156 is (_41014+_40974)div 2,sample(_41156))). 53% Into: l_events(happens(do_sample,_42410,_42416),[holds(left(_40974),_42410),holds(right(_41014),_42410),_41156 is (_41014+_40974)div 2,happens(sample(_41156),_42410,_42416)]). 54 55% LPS: then(if(not(found(_43290))),do_sample). 56% Into: reactive_rule([holds(not(found(_43290)),_44386)],[happens(do_sample,_44466,_44472)]). 57 58% LPS: if(initiates(sample(_44390),left(_44430)),(searching(_44502),a(_44390,_44558),_44558<_44502,_44430 is _44390+1)). 59% Into: initiated(happens(sample(_44390),_46052,_46058),left(_44430),[holds(searching(_44502),_46052),a(_44390,_44558),_44558<_44502,_44430 is _44390+1]). 60 61% LPS: if(terminates(sample(_45962),left(_46002)),(searching(_46074),a(_45962,_46130),_46130<_46074)). 62% Into: terminated(happens(sample(_45962),_47442,_47448),left(_46002),[holds(searching(_46074),_47442),a(_45962,_46130),_46130<_46074]). 63 64% LPS: if(initiates(sample(_47360),right(_47360)),(searching(_47472),a(_47360,_47528),_47528>=_47472)). 65% Into: initiated(happens(sample(_47360),_48840,_48846),right(_47360),[holds(searching(_47472),_48840),a(_47360,_47528),_47528>=_47472]). 66 67% LPS: if(terminates(sample(_48758),right(_48798)),(searching(_48870),a(_48758,_48926),_48926>=_48870)). 68% Into: terminated(happens(sample(_48758),_50238,_50244),right(_48798),[holds(searching(_48870),_50238),a(_48758,_48926),_48926>=_48870]). 69% /pack/lps_corner/examples/binaryChop2.pl:29 70% pop_lps_dialect('$BLOB'("<stream>(0x562ef33c0700)"), (/.../(examples, 'binaryChop2.pl')-> /.../(examples, 'binaryChop2.pl'))). 71% ops. 72% :-listing('/pack/lps_corner/examples/binaryChop2.pl':_58286). 73 74 75initiated(happens(sample(A), B, _), left(C), [holds(searching(D), B), a(A, E), E<D, C is A+1]). 76initiated(happens(sample(A), B, _), right(A), [holds(searching(C), B), a(A, D), D>=C]). 77 78fluents([left(A), right(A), searching(_)]). 79 80l_int(holds(found(A), B), [holds(left(A), B), holds(right(A), B)]). 81 82a(0, 10). 83a(1, 12). 84a(2, 20). 85a(3, 25). 86a(4, 30). 87a(5, 31). 88a(6, 35). 89a(7, 60). 90a(8, 65). 91a(9, 500). 92 93reactive_rule([holds(not(found(_)), _)], [happens(do_sample, _, _)]). 94 95initial_state([left(0), right(9), searching(60)]). 96 97l_events(happens(do_sample, A, B), [holds(left(C), A), holds(right(D), A), E is (D+C)div 2, happens(sample(E), A, B)]). 98 99terminated(happens(sample(A), B, _), left(_), [holds(searching(C), B), a(A, D), D<C]). 100terminated(happens(sample(A), B, _), right(_), [holds(searching(C), B), a(A, D), D>=C]). 101 102:- dynamic actions/1. 103:- multifile actions/1. 104 105actions([sample(_)]). 106 107events([do_sample]). 108% dB(/.../(examples, 'binaryChop2.pl'), lps_visualization(_62278{groups:[_60894{content:"left(A)", id:"left/1", order:3, subgroupStack:"false"}, _60972{content:"right(A)", id:"right/1", order:3, subgroupStack:"false"}, _61050{content:"searching(A)", id:"searching/1", order:3, subgroupStack:"false"}, _61116{content:"Actions", id:"action", order:4}], items:[_61238{content:"0", end:2, group:"left/1", id:0, start:1, subgroup:"0", title:"Fluent left(0) initiated at 1<br/>and terminated at transition to 2"}, _61364{content:"5", end:4, group:"left/1", id:1, start:2, subgroup:"5", title:"Fluent left(5) initiated at 2<br/>and terminated at transition to 4"}, _61490{content:"7", end:21, group:"left/1", id:2, start:4, subgroup:"7", title:"Fluent left(7) initiated at 4<br/>and terminated at transition to 21"}, _61616{content:"7", end:21, group:"right/1", id:3, start:3, subgroup:"7", title:"Fluent right(7) initiated at 3<br/>and terminated at transition to 21"}, _61742{content:"9", end:3, group:"right/1", id:4, start:1, subgroup:"9", title:"Fluent right(9) initiated at 1<br/>and terminated at transition to 3"}, _61868{content:"60", end:21, group:"searching/1", id:5, start:1, subgroup:"60", title:"Fluent searching(60) initiated at 1<br/>and terminated at transition to 21"}, _61994{content:"sample(4)", group:"action", id:6, start:2, style:"color:green", title:"happens(sample(4),1,2)", type:"point"}, _62120{content:"sample(7)", group:"action", id:7, start:3, style:"color:green", title:"happens(sample(7),2,3)", type:"point"}, _62246{content:"sample(6)", group:"action", id:8, start:4, style:"color:green", title:"happens(sample(6),3,4)", type:"point"}]}, [])). 109% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'salomon.pl')). 110% run_lps_corner_file1(/.../(lps_user_examples, 'salomon.pl')). 111% /pack/logicmoo_ec/test/lps_user_examples/salomon.pl:1 112% push_lps_dialect. 113% ops. 114% [ti=user, load= /.../(lps_user_examples, 'salomon.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'salomon.pl'), lps= /.../(lps_user_examples, 'salomon.pl'), using= /.../(lps_user_examples, 'salomon.pl')]. 115% continue_lps_dialect. 116% ops. 117 118% LPS: events((disputa_entre(_19928,_19930),poner_a_prueba(_19928,_19930),propone_salida_drastica(_20026),tomar_decision)). 119% Into: events([disputa_entre(_19928,_19930),poner_a_prueba(_19928,_19930),propone_salida_drastica(_20026),tomar_decision]). 120 121% LPS: actions((propone_dividir_nino(_21290),dice(_21290,_21346),declara(_21290,_21402),dicta(_21290,_21458))). 122% Into: actions([propone_dividir_nino(_21290),dice(_21290,_21346),declara(_21290,_21402),dicta(_21290,_21458)]). 123 124% LPS: observe(from(disputa_entre(a,b),to(1,2))). 125% Into: observe([disputa_entre(a,b)],2). 126 127% LPS: then(if(from(disputa_entre(_23912,_23914),to(_23950,_23952))),from(poner_a_prueba(_23912,_23914),to(_23952,_24128))). 128% Into: reactive_rule([happens(disputa_entre(_23912,_23914),_23950,_23952)],[happens(poner_a_prueba(_23912,_23914),_23952,_24128)]). 129 130% LPS: if(from(poner_a_prueba(_25390,_25392),to(_25428,_25430)),from(propone_salida_drastica(salomon),to(_25428,_25430))). 131% Into: l_events(happens(poner_a_prueba(_25390,_25392),_25428,_25430),[happens(propone_salida_drastica(salomon),_25428,_25430)]). 132 133% LPS: if(from(propone_salida_drastica(_26730),to(_26766,_26768)),from(propone_dividir_nino(_26730),to(_26766,_26768))). 134% Into: l_events(happens(propone_salida_drastica(_26730),_26766,_26768),[happens(propone_dividir_nino(_26730),_26766,_26768)]). 135 136% LPS: then(if((from(propone_dividir_nino(salomon),to(_28154,_28156)),mujer(_28254),soy_su_madre(_28254))),from(dice(_28254,'No lo mate! D�selo a Ella'),to(_28156,_28476))). 137% Into: reactive_rule([happens(propone_dividir_nino(salomon),_28154,_28156),mujer(_28254),soy_su_madre(_28254)],[happens(dice(_28254,'No lo mate! D�selo a Ella'),_28156,_28476)]). 138 139% LPS: then(if((from(propone_dividir_nino(salomon),to(_30698,_30700)),mujer(_30798),not(soy_su_madre(_30798)))),from(dice(_30798,'S�, m�telo'),to(_30700,_31044))). 140% Into: reactive_rule([happens(propone_dividir_nino(salomon),_30698,_30700),mujer(_30798),not(soy_su_madre(_30798))],[happens(dice(_30798,'S�, m�telo'),_30700,_31044)]). 141 142% LPS: then(if((from(propone_dividir_nino(_33742),to(_33778,_33780)),from(dice(_33892,'No lo mate! D�selo a Ella'),to(_33930,_33932)),from(dice(_34044,'S�, m�telo'),to(_34082,_34084)))),(from(declara(_33742,la_verdadera_madre_es(_33892)),to(_34346,_34348)),from(dicta(_33742,entreguen_nino_a(_33892)),to(_34348,_34524)))). 143% Into: reactive_rule([happens(propone_dividir_nino(_33742),_33778,_33780),happens(dice(_33892,'No lo mate! D�selo a Ella'),_33930,_33932),happens(dice(_34044,'S�, m�telo'),_34082,_34084)],[happens(declara(_33742,la_verdadera_madre_es(_33892)),_34346,_34348),happens(dicta(_33742,entreguen_nino_a(_33892)),_34348,_34524)]). 144% /pack/logicmoo_ec/test/lps_user_examples/salomon.pl:68 145% pop_lps_dialect('$BLOB'("<stream>(0x562ef33c3e00)"), (/.../(lps_user_examples, 'salomon.pl')-> /.../(lps_user_examples, 'salomon.pl'))). 146% ops. 147% :-listing('/pack/logicmoo_ec/test/lps_user_examples/salomon.pl':_47468). 148 149 150reactive_rule([happens(disputa_entre(A, B), _, C)], [happens(poner_a_prueba(A, B), C, _)]). 151reactive_rule([happens(propone_dividir_nino(salomon), _, A), mujer(B), soy_su_madre(B)], [happens(dice(B, 'No lo mate! D�selo a Ella'), A, _)]). 152reactive_rule([happens(propone_dividir_nino(salomon), _, A), mujer(B), not(soy_su_madre(B))], [happens(dice(B, 'S�, m�telo'), A, _)]). 153reactive_rule([happens(propone_dividir_nino(A), _, _), happens(dice(B, 'No lo mate! D�selo a Ella'), _, _), happens(dice(_, 'S�, m�telo'), _, _)], [happens(declara(A, la_verdadera_madre_es(B)), _, C), happens(dicta(A, entreguen_nino_a(B)), C, _)]). 154 155soy_su_madre(b). 156 157l_events(happens(poner_a_prueba(_, _), A, B), [happens(propone_salida_drastica(salomon), A, B)]). 158l_events(happens(propone_salida_drastica(A), B, C), [happens(propone_dividir_nino(A), B, C)]). 159 160maxtime(10). 161 162:- dynamic actions/1. 163:- multifile actions/1. 164 165actions([propone_dividir_nino(A), dice(A, _), declara(A, _), dicta(A, _)]). 166 167events([disputa_entre(A, B), poner_a_prueba(A, B), propone_salida_drastica(_), tomar_decision]). 168 169observe([disputa_entre(a, b)], 2). 170 171mujer(a). 172mujer(b). 173% dB(/.../(lps_user_examples, 'salomon.pl'), lps_visualization(_74304{groups:[_73458{content:"Events", id:"event", order:1}, _73520{content:"Actions", id:"action", order:4}], items:[_73642{content:"disputa_entre(a,b)", group:"event", id:0, start:2, style:"color:#E19735", title:"happens(disputa_entre(a,b),1,2)", type:"point"}, _73768{content:"propone_dividir_nino(salomon)", group:"action", id:1, start:3, style:"color:green", title:"happens(propone_dividir_nino(salomon),2,3)", type:"point"}, _73894{content:"dice(a,S�, m�telo)", group:"action", id:2, start:4, style:"color:green", title:"happens(dice(a,S�, m�telo),3,4)", type:"point"}, _74020{content:"dice(b,No lo mate! D�selo a Ella)", group:"action", id:3, start:4, style:"color:green", title:"happens(dice(b,No lo mate! D�selo a Ella),3,4)", type:"point"}, _74146{content:"declara(salomon,la_verdadera_madre_es(b))", group:"action", id:4, start:5, style:"color:green", title:"happens(declara(salomon,la_verdadera_madre_es(b)),4,5)", type:"point"}, _74272{content:"dicta(salomon,entreguen_nino_a(b))", group:"action", id:5, start:6, style:"color:green", title:"happens(dicta(salomon,entreguen_nino_a(b)),5,6)", type:"point"}]}, [])). 174% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'Samuel Contreras.pl')). 175% run_lps_corner_file1(/.../(lps_user_examples, 'Samuel Contreras.pl')). 176% /pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl:1 177% push_lps_dialect. 178% ops. 179% [ti=user, load= /.../(lps_user_examples, 'Samuel Contreras.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'Samuel Contreras.pl'), lps= /.../(lps_user_examples, 'Samuel Contreras.pl'), using= /.../(lps_user_examples, 'Samuel Contreras.pl')]. 180% continue_lps_dialect. 181% ops. 182 183% LPS: fluents(enga�a/2). 184% Into: fluents([enga�a(_55932,_55934)]). 185 186% LPS: actions((ayuda/2,encuentra/1)). 187% Into: actions([ayuda(_57134,_57136),encuentra(_57146)]). 188 189% LPS: events((necesita/2,escapa/1)). 190% Into: events([necesita(_58294,_58296),escapa(_58306)]). 191 192% LPS: initially(enga�a(bruja,ni�o)). 193% Into: initial_state([enga�a(bruja,ni�o)]). 194 195% LPS: observe(from(necesita(bruja,objeto),to(1,2))). 196% Into: observe([necesita(bruja,objeto)],2). 197 198% LPS: if(initiates(encuentra(_60436),enga�a(_60490,_60492)),enga�a(_60492,_60490)). 199% Into: initiated(happens(encuentra(_60436),_61754,_61760),enga�a(_60490,_60492),[holds(enga�a(_60492,_60490),_61754)]). 200 201% LPS: then(if(necesita(bruja,objeto)),ayuda(ni�o,bruja)). 202% Into: reactive_rule([happens(necesita(bruja,objeto),_63140,_63146)],[happens(ayuda(ni�o,bruja),_63172,_63178)]). 203 204% LPS: then(if(ayuda(ni�o,bruja)),encuentra(objeto)). 205% Into: reactive_rule([happens(ayuda(ni�o,bruja),_64514,_64520)],[happens(encuentra(objeto),_64678,_64684)]). 206 207% LPS: if(escapa(ni�o),enga�a(ni�o,bruja)). 208% Into: l_events(happens(escapa(ni�o),_65806,_65806),[holds(enga�a(ni�o,bruja),_65806)]). 209 210% LPS: observe(from(necesita(bruja,objeto),to(4,5))). 211% Into: observe([necesita(bruja,objeto)],5). 212 213% LPS: then(if(necesita(bruja,objeto)),ayuda(ni�o,bruja)). 214% Into: reactive_rule([happens(necesita(bruja,objeto),_68356,_68362)],[happens(ayuda(ni�o,bruja),_68388,_68394)]). 215 216% LPS: then(if(ayuda(ni�o,bruja)),encuentra(objeto)). 217% Into: reactive_rule([happens(ayuda(ni�o,bruja),_69482,_69488)],[happens(encuentra(objeto),_69514,_69520)]). 218 219% LPS: then(if((encuentra(objeto),enga�a(ni�o,bruja))),escapa(ni�o)). 220% Into: reactive_rule([happens(encuentra(objeto),_70690,_70696),holds(enga�a(ni�o,bruja),_70696)],[happens(escapa(ni�o),_70788,_70794)]). 221% /usr/lib/swipl/library/option.pl:0 222% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a9a00)"), _64924, /.../(lps_user_examples, 'Samuel Contreras.pl'), _64928)). 223:- thread_local % module_dialect_lps/4. 224:- dynamic % module_dialect_lps/4. 225:- volatile % module_dialect_lps/4. 226 227% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 228 229% /usr/lib/swipl/library/option.pl:37 230% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a9a00)"), _72670, /.../(lps_user_examples, 'Samuel Contreras.pl'), _72674)). 231:- thread_local % module_dialect_lps/4. 232:- dynamic % module_dialect_lps/4. 233:- volatile % module_dialect_lps/4. 234 235% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 236 237% /usr/lib/swipl/library/option.pl:0 238% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a9400)"), _22632, /.../(lps_user_examples, 'Samuel Contreras.pl'), _22636)). 239:- thread_local % module_dialect_lps/4. 240:- dynamic % module_dialect_lps/4. 241:- volatile % module_dialect_lps/4. 242 243% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 244 245% /usr/lib/swipl/library/option.pl:37 246% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a9400)"), _30036, /.../(lps_user_examples, 'Samuel Contreras.pl'), _30040)). 247:- thread_local % module_dialect_lps/4. 248:- dynamic % module_dialect_lps/4. 249:- volatile % module_dialect_lps/4. 250 251% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 252 253% /usr/lib/swipl/library/process.pl:0 254% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a8e00)"), _37396, /.../(lps_user_examples, 'Samuel Contreras.pl'), _37400)). 255:- thread_local % module_dialect_lps/4. 256:- dynamic % module_dialect_lps/4. 257:- volatile % module_dialect_lps/4. 258 259% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 260 261% /usr/lib/swipl/library/process.pl:37 262% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a8e00)"), _45334, /.../(lps_user_examples, 'Samuel Contreras.pl'), _45338)). 263:- thread_local % module_dialect_lps/4. 264:- dynamic % module_dialect_lps/4. 265:- volatile % module_dialect_lps/4. 266 267% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 268 269% /usr/lib/swipl/library/error.pl:0 270% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a8800)"), _52816, /.../(lps_user_examples, 'Samuel Contreras.pl'), _52820)). 271:- thread_local % module_dialect_lps/4. 272:- dynamic % module_dialect_lps/4. 273:- volatile % module_dialect_lps/4. 274 275% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 276 277% /usr/lib/swipl/library/error.pl:36 278% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a8800)"), _60872, /.../(lps_user_examples, 'Samuel Contreras.pl'), _60876)). 279:- thread_local % module_dialect_lps/4. 280:- dynamic % module_dialect_lps/4. 281:- volatile % module_dialect_lps/4. 282 283% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 284 285% /usr/lib/swipl/library/apply.pl:0 286% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a8300)"), _68076, /.../(lps_user_examples, 'Samuel Contreras.pl'), _68080)). 287:- thread_local % module_dialect_lps/4. 288:- dynamic % module_dialect_lps/4. 289:- volatile % module_dialect_lps/4. 290 291% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 292 293% /usr/lib/swipl/library/apply.pl:36 294% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a8300)"), _76690, /.../(lps_user_examples, 'Samuel Contreras.pl'), _76694)). 295:- thread_local % module_dialect_lps/4. 296:- dynamic % module_dialect_lps/4. 297:- volatile % module_dialect_lps/4. 298 299% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 300 301% /usr/lib/swipl/library/option.pl:0 302% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a7d00)"), _83960, /.../(lps_user_examples, 'Samuel Contreras.pl'), _83964)). 303:- thread_local % module_dialect_lps/4. 304:- dynamic % module_dialect_lps/4. 305:- volatile % module_dialect_lps/4. 306 307% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 308 309% /usr/lib/swipl/library/option.pl:37 310% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a7d00)"), _91364, /.../(lps_user_examples, 'Samuel Contreras.pl'), _91368)). 311:- thread_local % module_dialect_lps/4. 312:- dynamic % module_dialect_lps/4. 313:- volatile % module_dialect_lps/4. 314 315% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 316 317% /usr/lib/swipl/library/readutil.pl:0 318% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a7600)"), _21206, /.../(lps_user_examples, 'Samuel Contreras.pl'), _21210)). 319:- thread_local % module_dialect_lps/4. 320:- dynamic % module_dialect_lps/4. 321:- volatile % module_dialect_lps/4. 322 323% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 324 325% /usr/lib/swipl/library/readutil.pl:37 326% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a7600)"), _28732, /.../(lps_user_examples, 'Samuel Contreras.pl'), _28736)). 327:- thread_local % module_dialect_lps/4. 328:- dynamic % module_dialect_lps/4. 329:- volatile % module_dialect_lps/4. 330 331% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 332 333% /usr/lib/swipl/library/readutil.pl:0 334% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a7000)"), _36084, /.../(lps_user_examples, 'Samuel Contreras.pl'), _36088)). 335:- thread_local % module_dialect_lps/4. 336:- dynamic % module_dialect_lps/4. 337:- volatile % module_dialect_lps/4. 338 339% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 340 341% /usr/lib/swipl/library/readutil.pl:37 342% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a7000)"), _43610, /.../(lps_user_examples, 'Samuel Contreras.pl'), _43614)). 343:- thread_local % module_dialect_lps/4. 344:- dynamic % module_dialect_lps/4. 345:- volatile % module_dialect_lps/4. 346 347% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 348 349% /usr/lib/swipl/library/process.pl:0 350% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a6700)"), _50712, /.../(lps_user_examples, 'Samuel Contreras.pl'), _50716)). 351:- thread_local % module_dialect_lps/4. 352:- dynamic % module_dialect_lps/4. 353:- volatile % module_dialect_lps/4. 354 355% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 356 357% /usr/lib/swipl/library/process.pl:37 358% tryed(tmp:% module_dialect_lps('$BLOB'("<stream>(0x562ef33a6700)"), _58650, /.../(lps_user_examples, 'Samuel Contreras.pl'), _58654)). 359:- thread_local % module_dialect_lps/4. 360:- dynamic % module_dialect_lps/4. 361:- volatile % module_dialect_lps/4. 362 363% module_dialect_lps('$BLOB'("<stream>(0x562ef32ab000)"), '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl', [op(0, fy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':not), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':then), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':if), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':else), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiates), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':updates), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':observe), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':false), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initially), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':fluents), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':prolog_events), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':actions), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':unserializable), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':update), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':initiate), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':terminate), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':in), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':at), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':during), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':from), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':to), op(0, xfy, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': ::), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, fx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <-), op(0, xfx, '/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl': <=)]). 364 365LPS version 21ef6da75fc8874032a83b114d06961df3effedc 366Using dc: 367 368 Simulation time is up. Unsolved goals: 369 370** -1 cycles took 0.000410 seconds ** 371% /pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl:32 372% pop_lps_dialect('$BLOB'("<stream>(0x562ef32ab000)"), (/.../(lps_user_examples, 'Samuel Contreras.pl')-> /.../(lps_user_examples, 'Samuel Contreras.pl'))). 373% ops. 374% :-listing('/pack/logicmoo_ec/test/lps_user_examples/Samuel Contreras.pl':_73798). 375 376 377:- dynamic used/1. 378 379used(0). 380used(0). 381 382:- dynamic state/1. 383 384state(enga�a(bruja, ni�o)). 385state(enga�a(ni�o, bruja)). 386state(real_time(1601499407.5697262)). 387state(lps_user(unknown_user)). 388state(lps_user(unknown_user, unknown_email)). 389state(enga�a(bruja, ni�o)). 390state(real_time(1601499407.6215806)). 391state(lps_user(unknown_user)). 392state(lps_user(unknown_user, unknown_email)). 393 394:- dynamic tried/3. 395 396 397maxTime(8). 398 399:- dynamic happens/3. 400 401 402fluents([enga�a(_, _)]). 403 404:- dynamic lps_test_result/3. 405 406lps_test_result(fluents, 0, 1). 407lps_test_result(events, 1, 0). 408lps_test_result(fluents, 1, 1). 409lps_test_result(events, 2, 1). 410lps_test_result(fluents, 2, 1). 411lps_test_result(events, 3, 1). 412lps_test_result(fluents, 3, 1). 413lps_test_result(events, 4, 1). 414lps_test_result(fluents, 4, 2). 415lps_test_result(events, 5, 1). 416lps_test_result(fluents, 5, 2). 417lps_test_result(events, 6, 1). 418lps_test_result(fluents, 6, 2). 419lps_test_result(events, 7, 1). 420lps_test_result(fluents, 7, 2). 421lps_test_result(events, 8, 0). 422lps_test_result(fluents, 8, 2). 423 424l_events(happens(escapa(ni�o), A, A), [holds(enga�a(ni�o, bruja), A)]). 425 426:- dynamic actions/1. 427:- multifile actions/1. 428 429actions([ayuda(_, _), encuentra(_)]). 430 431initiated(happens(encuentra(_), A, _), enga�a(B, C), [holds(enga�a(C, B), A)]). 432 433:- dynamic current_goal/1. 434 435current_goal(0). 436current_goal(0). 437 438:- dynamic lps_test_result_item/3. 439 440lps_test_result_item(fluents, 0, enga�a(bruja, ni�o)). 441lps_test_result_item(fluents, 1, enga�a(bruja, ni�o)). 442lps_test_result_item(events, 2, necesita(bruja, objeto)). 443lps_test_result_item(fluents, 2, enga�a(bruja, ni�o)). 444lps_test_result_item(events, 3, ayuda(ni�o, bruja)). 445lps_test_result_item(fluents, 3, enga�a(bruja, ni�o)). 446lps_test_result_item(events, 4, encuentra(objeto)). 447lps_test_result_item(fluents, 4, enga�a(bruja, ni�o)). 448lps_test_result_item(fluents, 4, enga�a(ni�o, bruja)). 449lps_test_result_item(events, 5, necesita(bruja, objeto)). 450lps_test_result_item(fluents, 5, enga�a(bruja, ni�o)). 451lps_test_result_item(fluents, 5, enga�a(ni�o, bruja)). 452lps_test_result_item(events, 6, ayuda(ni�o, bruja)). 453lps_test_result_item(fluents, 6, enga�a(bruja, ni�o)). 454lps_test_result_item(fluents, 6, enga�a(ni�o, bruja)). 455lps_test_result_item(events, 7, encuentra(objeto)). 456lps_test_result_item(fluents, 7, enga�a(bruja, ni�o)). 457lps_test_result_item(fluents, 7, enga�a(ni�o, bruja)). 458lps_test_result_item(fluents, 8, enga�a(bruja, ni�o)). 459lps_test_result_item(fluents, 8, enga�a(ni�o, bruja)). 460 461:- dynamic next_state/1. 462 463 464initial_state([enga�a(bruja, ni�o)]). 465 466:- dynamic lps_updating_current_state/0. 467 468 469:- dynamic real_time_beginning/1. 470 471real_time_beginning(1601499407.4535487). 472real_time_beginning(1601499407.621502). 473 474:- dynamic option/1. 475 476option(swish). 477option(dc). 478 479reactive_rule([happens(necesita(bruja, objeto), _, _)], [happens(ayuda(ni�o, bruja), _, _)]). 480reactive_rule([happens(ayuda(ni�o, bruja), _, _)], [happens(encuentra(objeto), _, _)]). 481reactive_rule([happens(necesita(bruja, objeto), _, _)], [happens(ayuda(ni�o, bruja), _, _)]). 482reactive_rule([happens(ayuda(ni�o, bruja), _, _)], [happens(encuentra(objeto), _, _)]). 483reactive_rule([happens(encuentra(objeto), _, A), holds(enga�a(ni�o, bruja), A)], [happens(escapa(ni�o), _, _)]). 484 485:- dynamic depth/1. 486 487depth(0). 488depth(0). 489 490:- dynamic current_time/1. 491 492current_time(0). 493current_time(10). 494 495events([necesita(_, _), escapa(_)]). 496 497observe([necesita(bruja, objeto)], 2). 498observe([necesita(bruja, objeto)], 5). 499% dB(/.../(lps_user_examples, 'Samuel Contreras.pl'), lps_visualization(_53206{groups:[_52030{content:"Events", id:"event", order:1}, _52104{content:"enga�a(A,B)", id:"enga�a/2", order:3, subgroupStack:"false"}, _52170{content:"Actions", id:"action", order:4}], items:[_52292{content:"bruja,ni�o", end:9, group:"enga�a/2", id:0, start:1, subgroup:"bruja", title:"Fluent enga�a(bruja,ni�o) initiated at 1<br/>and terminated at transition to 9"}, _52418{content:"ni�o,bruja", end:9, group:"enga�a/2", id:1, start:4, subgroup:"ni�o", title:"Fluent enga�a(ni�o,bruja) initiated at 4<br/>and terminated at transition to 9"}, _52544{content:"necesita(bruja,objeto)", group:"event", id:2, start:2, style:"color:#E19735", title:"happens(necesita(bruja,objeto),1,2)", type:"point"}, _52670{content:"ayuda(ni�o,bruja)", group:"action", id:3, start:3, style:"color:green", title:"happens(ayuda(ni�o,bruja),2,3)", type:"point"}, _52796{content:"encuentra(objeto)", group:"action", id:4, start:4, style:"color:green", title:"happens(encuentra(objeto),3,4)", type:"point"}, _52922{content:"necesita(bruja,objeto)", group:"event", id:5, start:5, style:"color:#E19735", title:"happens(necesita(bruja,objeto),4,5)", type:"point"}, _53048{content:"ayuda(ni�o,bruja)", group:"action", id:6, start:6, style:"color:green", title:"happens(ayuda(ni�o,bruja),5,6)", type:"point"}, _53174{content:"encuentra(objeto)", group:"action", id:7, start:7, style:"color:green", title:"happens(encuentra(objeto),6,7)", type:"point"}]}, [])). 500% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'sdsd.pl')). 501% run_lps_corner_file1(/.../(lps_user_examples, 'sdsd.pl')). 502% /pack/logicmoo_ec/test/lps_user_examples/sdsd.pl:1 503% push_lps_dialect. 504% ops. 505% [ti=user, load= /.../(lps_user_examples, 'sdsd.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'sdsd.pl'), lps= /.../(lps_user_examples, 'sdsd.pl'), using= /.../(lps_user_examples, 'sdsd.pl')]. 506% continue_lps_dialect. 507% ops. 508 509% LPS: fluents(enga�a(_19262,_19264)). 510% Into: fluents([enga�a(_19262,_19264)]). 511 512% LPS: actions((ayuda/2,encuentra/1,obtiene/1)). 513% Into: actions([ayuda(_21672,_21674),encuentra(_21684),obtiene(_21694)]). 514 515% LPS: events((necesita/2,escapa/1)). 516% Into: events([necesita(_22790,_22792),escapa(_22802)]). 517 518% LPS: initially(enga�a(bruja,ni�o)). 519% Into: initial_state([enga�a(bruja,ni�o)]). 520 521% LPS: observe(from(necesita(bruja,objeto),to(1,2))). 522% Into: observe([necesita(bruja,objeto)],2). 523 524% LPS: if(initiates(ayuda(_24946,_24948),enga�a(_24946,_24948)),obtiene(objeto)). 525% Into: initiated(happens(ayuda(_24946,_24948),_26240,_26246),enga�a(_24946,_24948),[happens(obtiene(objeto),_26240,_26246)]). 526 527% LPS: if(escapa(ni�o),ayuda(ni�o,bruja)). 528% Into: l_events(happens(escapa(ni�o),_27556,_27562),[happens(ayuda(ni�o,bruja),_27556,_27562)]). 529 530% LPS: then(if(from(necesita(bruja,objeto),to(_27634,_27636))),from(escapa(ni�o),to(_27636,_27796))). 531% Into: reactive_rule([happens(necesita(bruja,objeto),_27634,_27636)],[happens(escapa(ni�o),_27636,_27796)]). 532LPS version 21ef6da75fc8874032a83b114d06961df3effedc 533Using dc: 534 535 Simulation time is up. Unsolved goals: 536 537** -1 cycles took 0.000451 seconds ** 538% /pack/logicmoo_ec/test/lps_user_examples/sdsd.pl:29 539% pop_lps_dialect('$BLOB'("<stream>(0x562ef32abb00)"), (/.../(lps_user_examples, 'sdsd.pl')-> /.../(lps_user_examples, 'sdsd.pl'))). 540% ops. 541% :-listing('/pack/logicmoo_ec/test/lps_user_examples/sdsd.pl':_73000). 542 543 544:- dynamic used/1. 545 546used(0). 547used(0). 548 549:- dynamic state/1. 550 551state(enga�a(bruja, ni�o)). 552state(real_time(1601499407.8738532)). 553state(lps_user(unknown_user)). 554state(lps_user(unknown_user, unknown_email)). 555state(enga�a(bruja, ni�o)). 556state(real_time(1601499407.8823154)). 557state(lps_user(unknown_user)). 558state(lps_user(unknown_user, unknown_email)). 559 560:- dynamic tried/3. 561 562 563maxTime(8). 564 565:- dynamic happens/3. 566 567 568fluents([enga�a(_, _)]). 569 570:- dynamic lps_test_result/3. 571 572lps_test_result(fluents, 0, 1). 573lps_test_result(events, 1, 0). 574lps_test_result(fluents, 1, 1). 575lps_test_result(events, 2, 1). 576lps_test_result(fluents, 2, 1). 577lps_test_result(events, 3, 1). 578lps_test_result(fluents, 3, 1). 579lps_test_result(events, 4, 0). 580lps_test_result(fluents, 4, 1). 581lps_test_result(events, 5, 0). 582lps_test_result(fluents, 5, 1). 583lps_test_result(events, 6, 0). 584lps_test_result(fluents, 6, 1). 585lps_test_result(events, 7, 0). 586lps_test_result(fluents, 7, 1). 587lps_test_result(events, 8, 0). 588lps_test_result(fluents, 8, 1). 589 590l_events(happens(escapa(ni�o), A, B), [happens(ayuda(ni�o, bruja), A, B)]). 591 592:- dynamic lps_test_action_ancestor/3. 593 594lps_test_action_ancestor(escapa(ni�o), 2, 3). 595 596:- dynamic actions/1. 597:- multifile actions/1. 598 599actions([ayuda(_, _), encuentra(_), obtiene(_)]). 600 601initiated(happens(ayuda(A, B), C, D), enga�a(A, B), [happens(obtiene(objeto), C, D)]). 602 603:- dynamic current_goal/1. 604 605current_goal(0). 606current_goal(0). 607 608:- dynamic lps_test_result_item/3. 609 610lps_test_result_item(fluents, 0, enga�a(bruja, ni�o)). 611lps_test_result_item(fluents, 1, enga�a(bruja, ni�o)). 612lps_test_result_item(events, 2, necesita(bruja, objeto)). 613lps_test_result_item(fluents, 2, enga�a(bruja, ni�o)). 614lps_test_result_item(events, 3, ayuda(ni�o, bruja)). 615lps_test_result_item(fluents, 3, enga�a(bruja, ni�o)). 616lps_test_result_item(fluents, 4, enga�a(bruja, ni�o)). 617lps_test_result_item(fluents, 5, enga�a(bruja, ni�o)). 618lps_test_result_item(fluents, 6, enga�a(bruja, ni�o)). 619lps_test_result_item(fluents, 7, enga�a(bruja, ni�o)). 620lps_test_result_item(fluents, 8, enga�a(bruja, ni�o)). 621 622:- dynamic next_state/1. 623 624 625initial_state([enga�a(bruja, ni�o)]). 626 627:- dynamic lps_updating_current_state/0. 628 629 630:- dynamic real_time_beginning/1. 631 632real_time_beginning(1601499407.6736755). 633real_time_beginning(1601499407.8822443). 634 635:- dynamic option/1. 636 637option(swish). 638option(dc). 639 640reactive_rule([happens(necesita(bruja, objeto), _, A)], [happens(escapa(ni�o), A, _)]). 641 642:- dynamic depth/1. 643 644depth(0). 645depth(0). 646 647:- dynamic current_time/1. 648 649current_time(0). 650current_time(10). 651 652events([necesita(_, _), escapa(_)]). 653 654observe([necesita(bruja, objeto)], 2). 655% dB(/.../(lps_user_examples, 'sdsd.pl'), lps_visualization(_39800{groups:[_39254{content:"Events", id:"event", order:1}, _39328{content:"enga�a(A,B)", id:"enga�a/2", order:3, subgroupStack:"false"}, _39394{content:"Actions", id:"action", order:4}], items:[_39516{content:"bruja,ni�o", end:9, group:"enga�a/2", id:0, start:1, subgroup:"bruja", title:"Fluent enga�a(bruja,ni�o) initiated at 1<br/>and terminated at transition to 9"}, _39642{content:"necesita(bruja,objeto)", group:"event", id:1, start:2, style:"color:#E19735", title:"happens(necesita(bruja,objeto),1,2)", type:"point"}, _39768{content:"ayuda(ni�o,bruja)", group:"action", id:2, start:3, style:"color:green", title:"happens(ayuda(ni�o,bruja),2,3)", type:"point"}]}, [])). 656% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'search.pl')). 657% run_lps_corner_file1(/.../(lps_user_examples, 'search.pl')). 658% /pack/logicmoo_ec/test/lps_user_examples/search.pl:1 659% push_lps_dialect. 660% ops. 661% [ti=user, load= /.../(lps_user_examples, 'search.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'search.pl'), lps= /.../(lps_user_examples, 'search.pl'), using= /.../(lps_user_examples, 'search.pl')]. 662% continue_lps_dialect. 663% ops. 664 665% LPS: events((g/2,gx/1,o)). 666% Into: events([g(_20526,_20528),gx(_20538),o]). 667 668% LPS: actions(s/1). 669% Into: actions([s(_21512)]). 670 671% LPS: observe(from(o,to(1,2))). 672% Into: observe([o],2). 673 674% LPS: if(g(_22620,_22622),(_22620\==_22622,c(_22620,_22742),g(_22620,_22742),g(_22742,_22622))). 675% Into: l_events(happens(g(_22620,_22622),_24040,_24046),[_22620\==_22622,c(_22620,_22742),happens(g(_22620,_22742),_24040,_24812),happens(g(_22742,_22622),_24812,_24046)]). 676 677% LPS: if(g(_24826,_24826),s(_24826)). 678% Into: l_events(happens(g(_24826,_24826),_25896,_25902),[happens(s(_24826),_25896,_25902)]). 679 680% LPS: if(from(gx(_25914),to(_25950,_25952)),(c(_26064,_25914),from(gx(_26064),to(_25950,_25952)),s(_25914))). 681% Into: l_events(happens(gx(_25914),_25950,_25952),[c(_26064,_25914),happens(gx(_26064),_25950,_25952),happens(s(_25914),_27822,_27508)]). 682 683% LPS: if(from(gx(_27752),to(_27788,_27790)),from(s(_27752),to(_27788,_27790))). 684% Into: l_events(happens(gx(_27752),_27788,_27790),[happens(s(_27752),_27788,_27790)]). 685 686% LPS: then(if(from(o,to(_34480,_34482))),from(gx(5),to(_34482,_34642))). 687% Into: reactive_rule([happens(o,_34480,_34482)],[happens(gx(5),_34482,_34642)]). 688% /pack/logicmoo_ec/test/lps_user_examples/search.pl:28 689% pop_lps_dialect('$BLOB'("<stream>(0x562ef33a8000)"), (/.../(lps_user_examples, 'search.pl')-> /.../(lps_user_examples, 'search.pl'))). 690% ops. 691% :-listing('/pack/logicmoo_ec/test/lps_user_examples/search.pl':_43462). 692 693 694reactive_rule([happens(o, _, A)], [happens(gx(5), A, _)]). 695 696l_events(happens(g(A, B), C, D), [A\==B, c(A, E), happens(g(A, E), C, F), happens(g(E, B), F, D)]). 697l_events(happens(g(A, A), B, C), [happens(s(A), B, C)]). 698l_events(happens(gx(A), B, C), [c(D, A), happens(gx(D), B, C), happens(s(A), _, _)]). 699l_events(happens(gx(A), B, C), [happens(s(A), B, C)]). 700 701:- dynamic actions/1. 702:- multifile actions/1. 703 704actions([s(_)]). 705 706events([g(_, _), gx(_), o]). 707 708observe([o], 2). 709 710maxTime(10). 711 712c(1, 2). 713c(2, 3). 714c(3, 4). 715c(4, 5). 716% dB(/.../(lps_user_examples, 'search.pl'), lps_visualization(_70572{groups:[_69726{content:"Events", id:"event", order:1}, _69788{content:"Actions", id:"action", order:4}], items:[_69910{content:"o", group:"event", id:0, start:2, style:"color:#E19735", title:"happens(o,1,2)", type:"point"}, _70036{content:"s(1)", group:"action", id:1, start:3, style:"color:green", title:"happens(s(1),2,3)", type:"point"}, _70162{content:"s(2)", group:"action", id:2, start:3, style:"color:green", title:"happens(s(2),2,3)", type:"point"}, _70288{content:"s(3)", group:"action", id:3, start:3, style:"color:green", title:"happens(s(3),2,3)", type:"point"}, _70414{content:"s(4)", group:"action", id:4, start:3, style:"color:green", title:"happens(s(4),2,3)", type:"point"}, _70540{content:"s(5)", group:"action", id:5, start:3, style:"color:green", title:"happens(s(5),2,3)", type:"point"}]}, [])). 717% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'sel-driving cars.pl')). 718% run_lps_corner_file1(/.../(lps_user_examples, 'sel-driving cars.pl')). 719% /pack/logicmoo_ec/test/lps_user_examples/sel-driving cars.pl:1 720% push_lps_dialect. 721% ops. 722% [ti=user, load= /.../(lps_user_examples, 'sel-driving cars.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'sel-driving cars.pl'), lps= /.../(lps_user_examples, 'sel-driving cars.pl'), using= /.../(lps_user_examples, 'sel-driving cars.pl')]. 723% continue_lps_dialect. 724% ops. 725 726% LPS: fluents(location(_19264,_19266,_19268)). 727% Into: fluents([location(_19264,_19266,_19268)]). 728 729% LPS: events(destination(_20348,_20350)). 730% Into: events([destination(_20348,_20350)]). 731 732% LPS: actions((step(_21402),turn(_21402,_21458))). 733% Into: actions([step(_21402),turn(_21402,_21458)]). 734 735% LPS: if(updates(step(_22544),in(to(_22580,_22582),location(_22544,_22580,_22680))),next(_22580,_22680,_22582)). 736% Into: updated(happens(step(_22544),_24064,_24070),location(_22544,_22580,_22680),_22580-_22582,[next(_22580,_22680,_22582)]). 737 738% LPS: updates(turn(_32264,_32266),in(to(_32302,_32266),location(_32264,_32400,_32302))). 739% Into: updated(happens(turn(_32264,_32266),_33654,_33660),location(_32264,_32400,_32302),_32302-_32266,[]). 740 741% LPS: initially((location(mycar,2-1,northward),location(yourcar,9-9,westward))). 742% Into: initial_state([location(mycar,2-1,northward),location(yourcar,9-9,westward)]). 743 744% LPS: observe(from(destination(mycar,9-9),to(2,3))). 745% Into: observe([destination(mycar,9-9)],3). 746 747% LPS: observe(from(destination(yourcar,2-1),to(3,4))). 748% Into: observe([destination(yourcar,2-1)],4). 749 750% LPS: then(if((to(destination(_50646,_50648),_50670),at(location(_50646,_50766,_50768),_50670),directions(_50766,_50886,_50648))),from(drive(_50646,_50886,_50648),to(_50670,_51086))). 751% Into: reactive_rule([happens(destination(_50646,_50648),_52318,_50670),holds(location(_50646,_50766,_50768),_50670),directions(_50766,_50886,_50648)],[happens(drive(_50646,_50886,_50648),_50670,_51086)]). 752 753% LPS: if(from(drive(_53782,_53784,_53786),to(_53822,_53822)),at(location(_53782,_53786,_53954),_53822)). 754% Into: l_events(happens(drive(_53782,_53784,_53786),_53822,_53822),[holds(location(_53782,_53786,_53954),_53822)]). 755 756% LPS: if(from(drive(_55514,[_55454-_55456|_55488],_55518),to(_55554,_55556)),(location(_55514,_55684,_55454),on(_55684,_55456),next(_55684,_55454,_55814),on(_55814,_55456),from(step(_55514),to(_55554,_55948)),from(drive(_55514,[_55454-_55456|_55488],_55518),to(_55948,_55556)))). 757% Into: l_events(happens(drive(_55514,[_55454-_55456|_55488],_55518),_55554,_55556),[holds(location(_55514,_55684,_55454),_57772),on(_55684,_55456),next(_55684,_55454,_55814),on(_55814,_55456),happens(step(_55514),_55554,_55948),happens(drive(_55514,[_55454-_55456|_55488],_55518),_55948,_55556)]). 758 759% LPS: if(from(drive(_58674,[_58546-_58548,_58614-_58616|_58648],_58678),to(_58714,_58716)),(location(_58674,_58844,_58546),on(_58844,_58548),on(_58844,_58616),from(turn(_58674,_58614),to(_58714,_59052)),from(drive(_58674,[_58614-_58616|_58648],_58678),to(_59052,_58716)))). 760% Into: l_events(happens(drive(_58674,[_58546-_58548,_58614-_58616|_58648],_58678),_58714,_58716),[holds(location(_58674,_58844,_58546),_60856),on(_58844,_58548),on(_58844,_58616),happens(turn(_58674,_58614),_58714,_59052),happens(drive(_58674,[_58614-_58616|_58648],_58678),_59052,_58716)]). 761% /pack/logicmoo_ec/test/lps_user_examples/sel-driving cars.pl:77 762% pop_lps_dialect('$BLOB'("<stream>(0x562ef33a6d00)"), (/.../(lps_user_examples, 'sel-driving cars.pl')-> /.../(lps_user_examples, 'sel-driving cars.pl'))). 763% ops. 764% :-listing('/pack/logicmoo_ec/test/lps_user_examples/sel-driving cars.pl':_30514). 765 766 767d(location(mycar, X-Y, Heading), [type:circle, center:[XX, YY], radius:5, fillColor:blue]) :- 768 XX is X*10, 769 YY is Y*10. 770d(location(yourcar, X-Y, Heading), [type:circle, center:[XX, YY], radius:5, fillColor:red]) :- 771 XX is X*10, 772 YY is Y*10. 773d(timeless, [type:rectangle, fillColor:yellow, from:[A, B], to:[_, _]]) :- 774 1=<C, 775 C=<10, 776 1=<D, 777 D=<10, 778 not(on(C-D, _)), 779 A is C*10, 780 B is D*10, 781 _ is A+10, 782 _ is B+10. 783 784d(timeless, [type:rectangle, fillColor:yellow, from:[20, 20], to:[30, 30]], sendToBack). 785 786fluents([location(_, _, _)]). 787 788next(X-Y1, northward, X-Y2) :- 789 Y2 is Y1+1. 790next(X-Y1, southward, X-Y2) :- 791 Y2 is Y1-1. 792next(X1-Y, eastward, X2-Y) :- 793 X2 is X1+1. 794next(X1-Y, westward, X2-Y) :- 795 X2 is X1-1. 796 797directions(2-1, [northward-westStreet, eastward-northStreet], 9-9). 798directions(9-9, [westward-northStreet, southward-westStreet], 2-1). 799 800reactive_rule([happens(destination(A, B), _, C), holds(location(A, D, _), C), directions(D, E, B)], [happens(drive(A, E, B), C, _)]). 801 802initial_state([location(mycar, 2-1, northward), location(yourcar, 9-9, westward)]). 803 804l_events(happens(drive(A, _, B), C, C), [holds(location(A, B, _), C)]). 805l_events(happens(drive(A, [B-C|D], E), F, G), [holds(location(A, H, B), _), on(H, C), next(H, B, I), on(I, C), happens(step(A), F, J), happens(drive(A, [B-C|D], E), J, G)]). 806l_events(happens(drive(A, [B-C, D-E|F], G), H, I), [holds(location(A, J, B), _), on(J, C), on(J, E), happens(turn(A, D), H, K), happens(drive(A, [D-E|F], G), K, I)]). 807 808:- dynamic actions/1. 809:- multifile actions/1. 810 811actions([step(A), turn(A, _)]). 812 813on(X-5, mainStreet) :- 814 3=<X, 815 X=<8. 816on(X-9, northStreet) :- 817 2=<X, 818 X=<9. 819on(6-Y, highStreet) :- 820 1=<Y, 821 Y=<9. 822on(2-Y, westStreet) :- 823 1=<Y, 824 Y=<9. 825on(7-Y, eastStreet) :- 826 1=<Y, 827 Y=<9. 828 829events([destination(_, _)]). 830 831updated(happens(step(A), _, _), location(A, B, C), B-D, [next(B, C, D)]). 832updated(happens(turn(A, B), _, _), location(A, _, C), C-B, []). 833 834maxTime(20). 835 836observe([destination(mycar, 9-9)], 3). 837observe([destination(yourcar, 2-1)], 4). 838% get2react([notc,"NickServ","NickServ@services.","*","You are already logged in as \002\PrologMUD\002\.","PrologMUD"]). 839% irc_receive("NickServ","NickServ@services.","*","PrologMUD",ctcp("NOTICE","You are already logged in as \002\PrologMUD\002\.")). 840% unused(ircEventNow("PrologMUD","nickserv",ctcp("NOTICE","You are already logged in as \002\PrologMUD\002\."))). 841% dB(/.../(lps_user_examples, 'sel-driving cars.pl'), lps_visualization(_189458{groups:[_180722{content:"Events", id:"event", order:1}, _180796{content:"location(A,B,C)", id:"location/3", order:3, subgroupStack:"false"}, _180862{content:"Actions", id:"action", order:4}], items:[_180984{content:"mycar,2-1,northward", end:4, group:"location/3", id:0, start:1, subgroup:"mycar", title:"Fluent location(mycar,2-1,northward) initiated at 1<br/>and terminated at transition to 4"}, _181110{content:"mycar,2-2,northward", end:5, group:"location/3", id:1, start:4, subgroup:"mycar", title:"Fluent location(mycar,2-2,northward) initiated at 4<br/>and terminated at transition to 5"}, _181236{content:"mycar,2-3,northward", end:6, group:"location/3", id:2, start:5, subgroup:"mycar", title:"Fluent location(mycar,2-3,northward) initiated at 5<br/>and terminated at transition to 6"}, _181362{content:"mycar,2-4,northward", end:7, group:"location/3", id:3, start:6, subgroup:"mycar", title:"Fluent location(mycar,2-4,northward) initiated at 6<br/>and terminated at transition to 7"}, _181488{content:"mycar,2-5,northward", end:8, group:"location/3", id:4, start:7, subgroup:"mycar", title:"Fluent location(mycar,2-5,northward) initiated at 7<br/>and terminated at transition to 8"}, _181614{content:"mycar,2-6,northward", end:9, group:"location/3", id:5, start:8, subgroup:"mycar", title:"Fluent location(mycar,2-6,northward) initiated at 8<br/>and terminated at transition to 9"}, _181740{content:"mycar,2-7,northward", end:10, group:"location/3", id:6, start:9, subgroup:"mycar", title:"Fluent location(mycar,2-7,northward) initiated at 9<br/>and terminated at transition to 10"}, _181866{content:"mycar,2-8,northward", end:11, group:"location/3", id:7, start:10, subgroup:"mycar", title:"Fluent location(mycar,2-8,northward) initiated at 10<br/>and terminated at transition to 11"}, _181992{content:"mycar,2-9,eastward", end:13, group:"location/3", id:8, start:12, subgroup:"mycar", title:"Fluent location(mycar,2-9,eastward) initiated at 12<br/>and terminated at transition to 13"}, _182118{content:"mycar,2-9,northward", end:12, group:"location/3", id:9, start:11, subgroup:"mycar", title:"Fluent location(mycar,2-9,northward) initiated at 11<br/>and terminated at transition to 12"}, _182244{content:"mycar,3-9,eastward", end:14, group:"location/3", id:10, start:13, subgroup:"mycar", title:"Fluent location(mycar,3-9,eastward) initiated at 13<br/>and terminated at transition to 14"}, _182370{content:"mycar,4-9,eastward", end:15, group:"location/3", id:11, start:14, subgroup:"mycar", title:"Fluent location(mycar,4-9,eastward) initiated at 14<br/>and terminated at transition to 15"}, _182496{content:"mycar,5-9,eastward", end:16, group:"location/3", id:12, start:15, subgroup:"mycar", title:"Fluent location(mycar,5-9,eastward) initiated at 15<br/>and terminated at transition to 16"}, _182622{content:"mycar,6-9,eastward", end:17, group:"location/3", id:13, start:16, subgroup:"mycar", title:"Fluent location(mycar,6-9,eastward) initiated at 16<br/>and terminated at transition to 17"}, _182748{content:"mycar,7-9,eastward", end:18, group:"location/3", id:14, start:17, subgroup:"mycar", title:"Fluent location(mycar,7-9,eastward) initiated at 17<br/>and terminated at transition to 18"}, _182874{content:"mycar,8-9,eastward", end:19, group:"location/3", id:15, start:18, subgroup:"mycar", title:"Fluent location(mycar,8-9,eastward) initiated at 18<br/>and terminated at transition to 19"}, _183000{content:"mycar,9-9,eastward", end:21, group:"location/3", id:16, start:19, subgroup:"mycar", title:"Fluent location(mycar,9-9,eastward) initiated at 19<br/>and terminated at transition to 21"}, _183126{content:"yourcar,2-1,southward", end:21, group:"location/3", id:17, start:20, subgroup:"yourcar", title:"Fluent location(yourcar,2-1,southward) initiated at 20<br/>and terminated at transition to 21"}, _183252{content:"yourcar,2-2,southward", end:20, group:"location/3", id:18, start:19, subgroup:"yourcar", title:"Fluent location(yourcar,2-2,southward) initiated at 19<br/>and terminated at transition to 20"}, _183378{content:"yourcar,2-3,southward", end:19, group:"location/3", id:19, start:18, subgroup:"yourcar", title:"Fluent location(yourcar,2-3,southward) initiated at 18<br/>and terminated at transition to 19"}, _183504{content:"yourcar,2-4,southward", end:18, group:"location/3", id:20, start:17, subgroup:"yourcar", title:"Fluent location(yourcar,2-4,southward) initiated at 17<br/>and terminated at transition to 18"}, _183630{content:"yourcar,2-5,southward", end:17, group:"location/3", id:21, start:16, subgroup:"yourcar", title:"Fluent location(yourcar,2-5,southward) initiated at 16<br/>and terminated at transition to 17"}, _183756{content:"yourcar,2-6,southward", end:16, group:"location/3", id:22, start:15, subgroup:"yourcar", title:"Fluent location(yourcar,2-6,southward) initiated at 15<br/>and terminated at transition to 16"}, _183882{content:"yourcar,2-7,southward", end:15, group:"location/3", id:23, start:14, subgroup:"yourcar", title:"Fluent location(yourcar,2-7,southward) initiated at 14<br/>and terminated at transition to 15"}, _184008{content:"yourcar,2-8,southward", end:14, group:"location/3", id:24, start:13, subgroup:"yourcar", title:"Fluent location(yourcar,2-8,southward) initiated at 13<br/>and terminated at transition to 14"}, _184134{content:"yourcar,2-9,southward", end:13, group:"location/3", id:25, start:12, subgroup:"yourcar", title:"Fluent location(yourcar,2-9,southward) initiated at 12<br/>and terminated at transition to 13"}, _184260{content:"yourcar,2-9,westward", end:12, group:"location/3", id:26, start:11, subgroup:"yourcar", title:"Fluent location(yourcar,2-9,westward) initiated at 11<br/>and terminated at transition to 12"}, _184386{content:"yourcar,3-9,westward", end:11, group:"location/3", id:27, start:10, subgroup:"yourcar", title:"Fluent location(yourcar,3-9,westward) initiated at 10<br/>and terminated at transition to 11"}, _184512{content:"yourcar,4-9,westward", end:10, group:"location/3", id:28, start:9, subgroup:"yourcar", title:"Fluent location(yourcar,4-9,westward) initiated at 9<br/>and terminated at transition to 10"}, _184638{content:"yourcar,5-9,westward", end:9, group:"location/3", id:29, start:8, subgroup:"yourcar", title:"Fluent location(yourcar,5-9,westward) initiated at 8<br/>and terminated at transition to 9"}, _184764{content:"yourcar,6-9,westward", end:8, group:"location/3", id:30, start:7, subgroup:"yourcar", title:"Fluent location(yourcar,6-9,westward) initiated at 7<br/>and terminated at transition to 8"}, _184890{content:"yourcar,7-9,westward", end:7, group:"location/3", id:31, start:6, subgroup:"yourcar", title:"Fluent location(yourcar,7-9,westward) initiated at 6<br/>and terminated at transition to 7"}, _185016{content:"yourcar,8-9,westward", end:6, group:"location/3", id:32, start:5, subgroup:"yourcar", title:"Fluent location(yourcar,8-9,westward) initiated at 5<br/>and terminated at transition to 6"}, _185142{content:"yourcar,9-9,westward", end:5, group:"location/3", id:33, start:1, subgroup:"yourcar", title:"Fluent location(yourcar,9-9,westward) initiated at 1<br/>and terminated at transition to 5"}, _185268{content:"destination(mycar,9-9)", group:"event", id:34, start:3, style:"color:#E19735", title:"happens(destination(mycar,9-9),2,3)", type:"point"}, _185394{content:"destination(yourcar,2-1)", group:"event", id:35, start:4, style:"color:#E19735", title:"happens(destination(yourcar,2-1),3,4)", type:"point"}, _185520{content:"step(mycar)", group:"action", id:36, start:4, style:"color:green", title:"happens(step(mycar),3,4)", type:"point"}, _185646{content:"step(mycar)", group:"action", id:37, start:5, style:"color:green", title:"happens(step(mycar),4,5)", type:"point"}, _185772{content:"step(yourcar)", group:"action", id:38, start:5, style:"color:green", title:"happens(step(yourcar),4,5)", type:"point"}, _185898{content:"step(yourcar)", group:"action", id:39, start:6, style:"color:green", title:"happens(step(yourcar),5,6)", type:"point"}, _186024{content:"step(mycar)", group:"action", id:40, start:6, style:"color:green", title:"happens(step(mycar),5,6)", type:"point"}, _186150{content:"step(mycar)", group:"action", id:41, start:7, style:"color:green", title:"happens(step(mycar),6,7)", type:"point"}, _186276{content:"step(yourcar)", group:"action", id:42, start:7, style:"color:green", title:"happens(step(yourcar),6,7)", type:"point"}, _186402{content:"step(yourcar)", group:"action", id:43, start:8, style:"color:green", title:"happens(step(yourcar),7,8)", type:"point"}, _186528{content:"step(mycar)", group:"action", id:44, start:8, style:"color:green", title:"happens(step(mycar),7,8)", type:"point"}, _186654{content:"step(mycar)", group:"action", id:45, start:9, style:"color:green", title:"happens(step(mycar),8,9)", type:"point"}, _186780{content:"step(yourcar)", group:"action", id:46, start:9, style:"color:green", title:"happens(step(yourcar),8,9)", type:"point"}, _186906{content:"step(yourcar)", group:"action", id:47, start:10, style:"color:green", title:"happens(step(yourcar),9,10)", type:"point"}, _187032{content:"step(mycar)", group:"action", id:48, start:10, style:"color:green", title:"happens(step(mycar),9,10)", type:"point"}, _187158{content:"step(mycar)", group:"action", id:49, start:11, style:"color:green", title:"happens(step(mycar),10,11)", type:"point"}, _187284{content:"step(yourcar)", group:"action", id:50, start:11, style:"color:green", title:"happens(step(yourcar),10,11)", type:"point"}, _187410{content:"turn(yourcar,southward)", group:"action", id:51, start:12, style:"color:green", title:"happens(turn(yourcar,southward),11,12)", type:"point"}, _187536{content:"turn(mycar,eastward)", group:"action", id:52, start:12, style:"color:green", title:"happens(turn(mycar,eastward),11,12)", type:"point"}, _187662{content:"step(mycar)", group:"action", id:53, start:13, style:"color:green", title:"happens(step(mycar),12,13)", type:"point"}, _187788{content:"step(yourcar)", group:"action", id:54, start:13, style:"color:green", title:"happens(step(yourcar),12,13)", type:"point"}, _187914{content:"step(yourcar)", group:"action", id:55, start:14, style:"color:green", title:"happens(step(yourcar),13,14)", type:"point"}, _188040{content:"step(mycar)", group:"action", id:56, start:14, style:"color:green", title:"happens(step(mycar),13,14)", type:"point"}, _188166{content:"step(mycar)", group:"action", id:57, start:15, style:"color:green", title:"happens(step(mycar),14,15)", type:"point"}, _188292{content:"step(yourcar)", group:"action", id:58, start:15, style:"color:green", title:"happens(step(yourcar),14,15)", type:"point"}, _188418{content:"step(yourcar)", group:"action", id:59, start:16, style:"color:green", title:"happens(step(yourcar),15,16)", type:"point"}, _188544{content:"step(mycar)", group:"action", id:60, start:16, style:"color:green", title:"happens(step(mycar),15,16)", type:"point"}, _188670{content:"step(mycar)", group:"action", id:61, start:17, style:"color:green", title:"happens(step(mycar),16,17)", type:"point"}, _188796{content:"step(yourcar)", group:"action", id:62, start:17, style:"color:green", title:"happens(step(yourcar),16,17)", type:"point"}, _188922{content:"step(yourcar)", group:"action", id:63, start:18, style:"color:green", title:"happens(step(yourcar),17,18)", type:"point"}, _189048{content:"step(mycar)", group:"action", id:64, start:18, style:"color:green", title:"happens(step(mycar),17,18)", type:"point"}, _189174{content:"step(mycar)", group:"action", id:65, start:19, style:"color:green", title:"happens(step(mycar),18,19)", type:"point"}, _189300{content:"step(yourcar)", group:"action", id:66, start:19, style:"color:green", title:"happens(step(yourcar),18,19)", type:"point"}, _189426{content:"step(yourcar)", group:"action", id:67, start:20, style:"color:green", title:"happens(step(yourcar),19,20)", type:"point"}]}, _247852{cycles:[[_242414{create:_242390{center:[20, 10], fillColor:"blue", id:"location(mycar,2-1,northward)", radius:5, type:"circle"}}, _242544{create:_242520{center:[90, 90], fillColor:"red", id:"location(yourcar,9-9,westward)", radius:5, type:"circle"}}], [], [], [_242692{create:_242668{center:[20, 20], fillColor:"blue", id:"location(mycar,2-2,northward)", radius:5, type:"circle"}}, _242722{kill:"location(mycar,2-1,northward)"}], [_242858{create:_242834{center:[20, 30], fillColor:"blue", id:"location(mycar,2-3,northward)", radius:5, type:"circle"}}, _242988{create:_242964{center:[80, 90], fillColor:"red", id:"location(yourcar,8-9,westward)", radius:5, type:"circle"}}, _243018{kill:"location(mycar,2-2,northward)"}, _243048{kill:"location(yourcar,9-9,westward)"}], [_243184{create:_243160{center:[20, 40], fillColor:"blue", id:"location(mycar,2-4,northward)", radius:5, type:"circle"}}, _243314{create:_243290{center:[70, 90], fillColor:"red", id:"location(yourcar,7-9,westward)", radius:5, type:"circle"}}, _243344{kill:"location(mycar,2-3,northward)"}, _243374{kill:"location(yourcar,8-9,westward)"}], [_243510{create:_243486{center:[20, 50], fillColor:"blue", id:"location(mycar,2-5,northward)", radius:5, type:"circle"}}, _243640{create:_243616{center:[60, 90], fillColor:"red", id:"location(yourcar,6-9,westward)", radius:5, type:"circle"}}, _243670{kill:"location(mycar,2-4,northward)"}, _243700{kill:"location(yourcar,7-9,westward)"}], [_243836{create:_243812{center:[20, 60], fillColor:"blue", id:"location(mycar,2-6,northward)", radius:5, type:"circle"}}, _243966{create:_243942{center:[50, 90], fillColor:"red", id:"location(yourcar,5-9,westward)", radius:5, type:"circle"}}, _243996{kill:"location(mycar,2-5,northward)"}, _244026{kill:"location(yourcar,6-9,westward)"}], [_244162{create:_244138{center:[20, 70], fillColor:"blue", id:"location(mycar,2-7,northward)", radius:5, type:"circle"}}, _244292{create:_244268{center:[40, 90], fillColor:"red", id:"location(yourcar,4-9,westward)", radius:5, type:"circle"}}, _244322{kill:"location(mycar,2-6,northward)"}, _244352{kill:"location(yourcar,5-9,westward)"}], [_244488{create:_244464{center:[20, 80], fillColor:"blue", id:"location(mycar,2-8,northward)", radius:5, type:"circle"}}, _244618{create:_244594{center:[30, 90], fillColor:"red", id:"location(yourcar,3-9,westward)", radius:5, type:"circle"}}, _244648{kill:"location(mycar,2-7,northward)"}, _244678{kill:"location(yourcar,4-9,westward)"}], [_244814{create:_244790{center:[20, 90], fillColor:"blue", id:"location(mycar,2-9,northward)", radius:5, type:"circle"}}, _244944{create:_244920{center:[20, 90], fillColor:"red", id:"location(yourcar,2-9,westward)", radius:5, type:"circle"}}, _244974{kill:"location(mycar,2-8,northward)"}, _245004{kill:"location(yourcar,3-9,westward)"}], [_245140{create:_245116{center:[20, 90], fillColor:"blue", id:"location(mycar,2-9,eastward)", radius:5, type:"circle"}}, _245270{create:_245246{center:[20, 90], fillColor:"red", id:"location(yourcar,2-9,southward)", radius:5, type:"circle"}}, _245300{kill:"location(mycar,2-9,northward)"}, _245330{kill:"location(yourcar,2-9,westward)"}], [_245466{create:_245442{center:[30, 90], fillColor:"blue", id:"location(mycar,3-9,eastward)", radius:5, type:"circle"}}, _245596{create:_245572{center:[20, 80], fillColor:"red", id:"location(yourcar,2-8,southward)", radius:5, type:"circle"}}, _245626{kill:"location(mycar,2-9,eastward)"}, _245656{kill:"location(yourcar,2-9,southward)"}], [_245792{create:_245768{center:[40, 90], fillColor:"blue", id:"location(mycar,4-9,eastward)", radius:5, type:"circle"}}, _245922{create:_245898{center:[20, 70], fillColor:"red", id:"location(yourcar,2-7,southward)", radius:5, type:"circle"}}, _245952{kill:"location(mycar,3-9,eastward)"}, _245982{kill:"location(yourcar,2-8,southward)"}], [_246118{create:_246094{center:[50, 90], fillColor:"blue", id:"location(mycar,5-9,eastward)", radius:5, type:"circle"}}, _246248{create:_246224{center:[20, 60], fillColor:"red", id:"location(yourcar,2-6,southward)", radius:5, type:"circle"}}, _246278{kill:"location(mycar,4-9,eastward)"}, _246308{kill:"location(yourcar,2-7,southward)"}], [_246444{create:_246420{center:[60, 90], fillColor:"blue", id:"location(mycar,6-9,eastward)", radius:5, type:"circle"}}, _246574{create:_246550{center:[20, 50], fillColor:"red", id:"location(yourcar,2-5,southward)", radius:5, type:"circle"}}, _246604{kill:"location(mycar,5-9,eastward)"}, _246634{kill:"location(yourcar,2-6,southward)"}], [_246770{create:_246746{center:[70, 90], fillColor:"blue", id:"location(mycar,7-9,eastward)", radius:5, type:"circle"}}, _246900{create:_246876{center:[20, 40], fillColor:"red", id:"location(yourcar,2-4,southward)", radius:5, type:"circle"}}, _246930{kill:"location(mycar,6-9,eastward)"}, _246960{kill:"location(yourcar,2-5,southward)"}], [_247096{create:_247072{center:[80, 90], fillColor:"blue", id:"location(mycar,8-9,eastward)", radius:5, type:"circle"}}, _247226{create:_247202{center:[20, 30], fillColor:"red", id:"location(yourcar,2-3,southward)", radius:5, type:"circle"}}, _247256{kill:"location(mycar,7-9,eastward)"}, _247286{kill:"location(yourcar,2-4,southward)"}], [_247422{create:_247398{center:[90, 90], fillColor:"blue", id:"location(mycar,9-9,eastward)", radius:5, type:"circle"}}, _247552{create:_247528{center:[20, 20], fillColor:"red", id:"location(yourcar,2-2,southward)", radius:5, type:"circle"}}, _247582{kill:"location(mycar,8-9,eastward)"}, _247612{kill:"location(yourcar,2-3,southward)"}], [_247748{create:_247724{center:[20, 10], fillColor:"red", id:"location(yourcar,2-1,southward)", radius:5, type:"circle"}}, _247778{kill:"location(yourcar,2-2,southward)"}], [_247814{kill:"location(mycar,9-9,eastward)"}, _247844{kill:"location(yourcar,2-1,southward)"}]]})). 842% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'self-drivers.pl')). 843% run_lps_corner_file1(/.../(lps_user_examples, 'self-drivers.pl')). 844% /pack/logicmoo_ec/test/lps_user_examples/self-drivers.pl:1 845% push_lps_dialect. 846% ops. 847% [ti=user, load= /.../(lps_user_examples, 'self-drivers.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'self-drivers.pl'), lps= /.../(lps_user_examples, 'self-drivers.pl'), using= /.../(lps_user_examples, 'self-drivers.pl')]. 848% continue_lps_dialect. 849% ops. 850 851% LPS: fluents((location(_81626,_81628,_81630),collisionWarning(_81698,_81700,_81628),rightOfWay(_81698,_81700,_81628),collisionPossible(_81698,_81700))). 852% Into: fluents([location(_81626,_81628,_81630),collisionWarning(_81698,_81700,_81628),rightOfWay(_81698,_81700,_81628),collisionPossible(_81698,_81700)]). 853 854% LPS: events((destination(_83070,_83072),remove(_83070))). 855% Into: events([destination(_83070,_83072),remove(_83070)]). 856 857% LPS: actions((step(_84234,_84236,_84238),turn(_84234,_84294))). 858% Into: actions([step(_84234,_84236,_84238),turn(_84234,_84294)]). 859 860% LPS: initially((location(mycar,2-1,northward),location(yourcar,6-1,northward),location(othercar,10-5,westward),location(troubleMaker,6-2,northward),location(brokencar,2-7,noward))). 861% Into: initial_state([location(mycar,2-1,northward),location(yourcar,6-1,northward),location(othercar,10-5,westward),location(troubleMaker,6-2,northward),location(brokencar,2-7,noward)]). 862 863% LPS: observe(from(destination(mycar,9-9),to(2,3))). 864% Into: observe([destination(mycar,9-9)],3). 865 866% LPS: observe(from(destination(troubleMaker,9-9),to(2,3))). 867% Into: observe([destination(troubleMaker,9-9)],3). 868 869% LPS: observe(from(destination(yourcar,9-9),to(2,3))). 870% Into: observe([destination(yourcar,9-9)],3). 871 872% LPS: observe(from(destination(othercar,6-1),to(1,2))). 873% Into: observe([destination(othercar,6-1)],2). 874 875% LPS: observe(from(remove(brokencar),to(15,16))). 876% Into: observe([remove(brokencar)],16). 877 878% LPS: terminates(remove(_93240),location(_93240,_93310,_93312)). 879% Into: terminated(happens(remove(_93240),_94428,_94434),location(_93240,_93310,_93312),[]). 880 881% LPS: then(if((to(destination(_94446,_94448),_94470),at(location(_94446,_94566,_94568),_94470))),(directions(_94566,_94742,_94448),from(drive(_94446,_94742,_94448),_94470))). 882% Into: reactive_rule([happens(destination(_94446,_94448),_96052,_94470),holds(location(_94446,_94566,_94568),_94470)],[directions(_94566,_94742,_94448),happens(drive(_94446,_94742,_94448),_94470,_96624)]). 883 884% LPS: if(from(drive(_19082,[_19034-_19036],_19086),to(_19102,_19104)),(at(location(_19082,_19212,_19034),_19102),_19212\=_19086,next(_19212,_19034,_19348),on(_19348,_19036),from(step(_19082,_19212,_19348),to(_19462,_19464)),from(drive(_19082,[_19034-_19036],_19086),to(_19464,_19104)))). 885% Into: l_events(happens(drive(_19082,[_19034-_19036],_19086),_19102,_19104),[holds(location(_19082,_19212,_19034),_19102),_19212\=_19086,next(_19212,_19034,_19348),on(_19348,_19036),happens(step(_19082,_19212,_19348),_19462,_19464),happens(drive(_19082,[_19034-_19036],_19086),_19464,_19104)]). 886 887% LPS: if(from(drive(_21974,[_21846-_21848,_21914-_21916|_21948],_21978),to(_22014,_22016)),(location(_21974,_22144,_21846),next(_22144,_21846,_22218),not(on(_22218,_21916)),from(step(_21974,_22144,_22218),to(_22414,_22416)),from(drive(_21974,[_21846-_21848,_21914-_21916|_21948],_21978),to(_22416,_22016)))). 888% Into: l_events(happens(drive(_21974,[_21846-_21848,_21914-_21916|_21948],_21978),_22014,_22016),[holds(location(_21974,_22144,_21846),_24332),next(_22144,_21846,_22218),not(on(_22218,_21916)),happens(step(_21974,_22144,_22218),_22414,_22416),happens(drive(_21974,[_21846-_21848,_21914-_21916|_21948],_21978),_22416,_22016)]). 889 890% LPS: if(from(drive(_25372,[_25244-_25246,_25312-_25314|_25346],_25376),to(_25412,_25414)),(location(_25372,_25542,_25244),next(_25542,_25244,_25616),on(_25616,_25314),from(step(_25372,_25542,_25616),to(_25780,_25782)),from(turn(_25372,_25312),to(_25780,_25782)),from(drive(_25372,[_25312-_25314|_25346],_25376),to(_25782,_25414)))). 891% Into: l_events(happens(drive(_25372,[_25244-_25246,_25312-_25314|_25346],_25376),_25412,_25414),[holds(location(_25372,_25542,_25244),_27822),next(_25542,_25244,_25616),on(_25616,_25314),happens(step(_25372,_25542,_25616),_25780,_25782),happens(turn(_25372,_25312),_25780,_25782),happens(drive(_25372,[_25312-_25314|_25346],_25376),_25782,_25414)]). 892 893% LPS: updates(step(_28408,_28410,_28412),in(to(_28410,_28412),location(_28408,_28410,_28548))). 894% Into: updated(happens(step(_28408,_28410,_28412),_29796,_29802),location(_28408,_28410,_28548),_28410-_28412,[]). 895 896% LPS: updates(turn(_29694,_29696),in(to(_29732,_29696),location(_29694,_29830,_29732))). 897% Into: updated(happens(turn(_29694,_29696),_31076,_31082),location(_29694,_29830,_29732),_29732-_29696,[]). 898 899% LPS: false((step(_37744,_37746,_37748),collisionPossible(_37744,_37804))). 900% Into: d_pre([happens(step(_37744,_37746,_37748),_38898,_38904),holds(collisionPossible(_37744,_37804),_38898)]). 901 902% LPS: if(at(collisionPossible(_38932,_38934),_38956),(at(location(_38932,_39052,_39054),_38956),next(_39052,_39054,_39174),at(location(_38934,_39174,_39246),_38956),not(opposite(_39054,_39246)))). 903% Into: l_int(holds(collisionPossible(_38932,_38934),_38956),[holds(location(_38932,_39052,_39054),_38956),next(_39052,_39054,_39174),holds(location(_38934,_39174,_39246),_38956),not(opposite(_39054,_39246))]). 904 905% LPS: false((step(_45810,_45812,_45814),collisionWarning(_45810,_45884,_45814),not(rightOfWay(_45810,_45884,_45814)))). 906% Into: d_pre([happens(step(_45810,_45812,_45814),_47136,_47142),holds(collisionWarning(_45810,_45884,_45814),_47136),holds(not(rightOfWay(_45810,_45884,_45814)),_47136)]). 907 908% LPS: if(at(collisionWarning(_47184,_47186,_47188),_47210),(at(location(_47184,_47306,_47308),_47210),at(location(_47186,_47426,_47428),_47210),next(_47306,_47308,_47188),next(_47426,_47428,_47188),clash(_47308,_47428))). 909% Into: l_int(holds(collisionWarning(_47184,_47186,_47188),_47210),[holds(location(_47184,_47306,_47308),_47210),holds(location(_47186,_47426,_47428),_47210),next(_47306,_47308,_47188),next(_47426,_47428,_47188),clash(_47308,_47428)]). 910 911% LPS: if(rightOfWay(_53868,_53870,_53872),(priorityTjunction(_53872,_53928),location(_53868,_53998,_54000),on(_53998,_53928))). 912% Into: l_int(holds(rightOfWay(_53868,_53870,_53872),_55226),[priorityTjunction(_53872,_53928),holds(location(_53868,_53998,_54000),_55226),on(_53998,_53928)]). 913 914% LPS: if(rightOfWay(_55272,_55274,_55276),(crossRoads(_55276),at(location(_55272,_55386,_55388),_55410),at(location(_55274,_55506,_55508),_55410),rightOf(_55388,_55508))). 915% Into: l_int(holds(rightOfWay(_55272,_55274,_55276),_56850),[crossRoads(_55276),holds(location(_55272,_55386,_55388),_55410),holds(location(_55274,_55506,_55508),_55410),rightOf(_55388,_55508)]). 916% /pack/logicmoo_ec/test/lps_user_examples/self-drivers.pl:237 917% pop_lps_dialect('$BLOB'("<stream>(0x562ef31d3700)"), (/.../(lps_user_examples, 'self-drivers.pl')-> /.../(lps_user_examples, 'self-drivers.pl'))). 918% ops. 919% :-listing('/pack/logicmoo_ec/test/lps_user_examples/self-drivers.pl':_41872). 920 921 922clash(Heading1, Heading2) :- 923 horizontal(Heading1), 924 vertical(Heading2). 925clash(Heading1, Heading2) :- 926 vertical(Heading1), 927 horizontal(Heading2). 928 929d_pre([happens(step(A, _, _), B, _), holds(collisionPossible(A, _), B)]). 930d_pre([happens(step(A, _, B), C, _), holds(collisionWarning(A, D, B), C), holds(not(rightOfWay(A, D, B)), C)]). 931 932directions(Start, [Heading-Street], Finish) :- 933 on(Start, Street), 934 on(Finish, Street), 935 orientation(Start, Finish, Heading). 936directions(Start, NewRoute, Finish) :- 937 on(Finish, Street2), 938 route(_, Route, _), 939 append(FirstPart, 940 [Heading2-Street2|_], 941 Route), 942 on(Start, Street1), 943 append(_, [Heading1-Street1|Link], FirstPart), 944 append([Heading1-Street1|Link], 945 [Heading2-Street2], 946 NewRoute). 947 948crossRoads(6-5). 949crossRoads(8-5). 950 951updated(happens(step(A, B, C), _, _), location(A, B, _), B-C, []). 952updated(happens(turn(A, B), _, _), location(A, _, C), C-B, []). 953 954maxTime(30). 955 956opposite(northward, southward). 957opposite(southward, northward). 958opposite(eastward, westward). 959opposite(westward, eastward). 960 961fluents([location(_, A, _), collisionWarning(B, C, A), rightOfWay(B, C, A), collisionPossible(B, C)]). 962 963next(X-Y1, northward, X-Y2) :- 964 Y2 is Y1+1. 965next(X-Y1, southward, X-Y2) :- 966 Y2 is Y1-1. 967next(X1-Y, eastward, X2-Y) :- 968 X2 is X1+1. 969next(X1-Y, westward, X2-Y) :- 970 X2 is X1-1. 971 972vertical(H) :- 973 ( H=northward 974 ; H=southward 975 ). 976 977l_events(happens(drive(A, [B-C], D), E, F), [holds(location(A, G, B), E), G\=D, next(G, B, H), on(H, C), happens(step(A, G, H), _, I), happens(drive(A, [B-C], D), I, F)]). 978l_events(happens(drive(A, [B-C, D-E|F], G), _, H), [holds(location(A, I, B), _), next(I, B, J), not(on(J, E)), happens(step(A, I, J), _, K), happens(drive(A, [B-C, D-E|F], G), K, H)]). 979l_events(happens(drive(A, [B-_, C-D|E], F), _, G), [holds(location(A, H, B), _), next(H, B, I), on(I, D), happens(step(A, H, I), J, K), happens(turn(A, C), J, K), happens(drive(A, [C-D|E], F), K, G)]). 980 981:- dynamic actions/1. 982:- multifile actions/1. 983 984actions([step(A, _, _), turn(A, _)]). 985 986rightOf(westward, northward). 987rightOf(southward, westward). 988rightOf(eastward, southward). 989rightOf(northward, eastward). 990 991horizontal(H) :- 992 ( H=eastward 993 ; H=westward 994 ). 995 996d(location(mycar, X-Y, Heading), [type:ellipse, point:[XX, YY], size:[Xcar, Ycar], fillColor:blue]) :- 997 position(X, 998 Y, 999 Heading, 1000 XX, 1001 YY, 1002 Xcar, 1003 Ycar). 1004d(location(yourcar, X-Y, Heading), [type:ellipse, point:[XX, YY], size:[Xcar, Ycar], fillColor:red]) :- 1005 position(X, 1006 Y, 1007 Heading, 1008 XX, 1009 YY, 1010 Xcar, 1011 Ycar). 1012d(location(othercar, X-Y, Heading), [type:ellipse, point:[XX, YY], size:[Xcar, Ycar], fillColor:green]) :- 1013 position(X, 1014 Y, 1015 Heading, 1016 XX, 1017 YY, 1018 Xcar, 1019 Ycar). 1020d(location(troubleMaker, X-Y, Heading), [type:ellipse, point:[XX, YY], size:[Xcar, Ycar], fillColor:maroon]) :- 1021 position(X, 1022 Y, 1023 Heading, 1024 XX, 1025 YY, 1026 Xcar, 1027 Ycar). 1028d(location(brokencar, X-Y, Heading), [type:circle, center:[XX, YY], radius:10, fillColor:red]) :- 1029 XX is X*20+10, 1030 YY is Y*20+10. 1031d(timeless, A) :- 1032 findall([ type:rectangle, 1033 from:[B, C], 1034 to:[D, E], 1035 fillColor:yellow 1036 ], 1037 ( place(F-G), 1038 not(on(F-G, _)), 1039 B is F*20, 1040 C is G*20, 1041 D is B+20, 1042 E is C+20 1043 ), 1044 A). 1045 1046initial_state([location(mycar, 2-1, northward), location(yourcar, 6-1, northward), location(othercar, 10-5, westward), location(troubleMaker, 6-2, northward), location(brokencar, 2-7, noward)]). 1047 1048route(2-9, [eastward-northStreet], 9-9). 1049route(2-1, [northward-westStreet, eastward-northStreet], 9-9). 1050route(2-1, [northward-westStreet, eastward-mainStreet], 9-6). 1051route(6-1, [northward-highStreet, eastward-northStreet], 9-9). 1052route(9-9, [westward-northStreet, southward-westStreet], 2-1). 1053route(10-5, [westward-mainStreet, southward-highStreet], 6-1). 1054 1055on(X-5, mainStreet) :- 1056 2=<X, 1057 X=<10. 1058on(X-9, northStreet) :- 1059 2=<X, 1060 X=<9. 1061on(6-Y, highStreet) :- 1062 1=<Y, 1063 Y=<9. 1064on(2-Y, westStreet) :- 1065 1=<Y, 1066 Y=<9. 1067on(8-Y, eastStreet) :- 1068 1=<Y, 1069 Y=<9. 1070 1071place(X-Y) :- 1072 member(X, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 1073 member(Y, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]). 1074 1075priorityTjunction(2-5, westStreet). 1076priorityTjunction(6-9, northStreet). 1077priorityTjunction(8-9, northStreet). 1078 1079orientation(X-Y1, X-Y2, northward) :- 1080 Y1<Y2. 1081orientation(X-Y1, X-Y2, southward) :- 1082 Y1>Y2. 1083orientation(X1-Y, X2-Y, eastward) :- 1084 X1<X2. 1085orientation(X1-Y, X2-Y, westward) :- 1086 X1>X2. 1087 1088terminated(happens(remove(A), _, _), location(A, _, _), []). 1089 1090l_int(holds(collisionPossible(A, B), C), [holds(location(A, D, E), C), next(D, E, F), holds(location(B, F, G), C), not(opposite(E, G))]). 1091l_int(holds(collisionWarning(A, B, C), D), [holds(location(A, E, F), D), holds(location(B, G, H), D), next(E, F, C), next(G, H, C), clash(F, H)]). 1092l_int(holds(rightOfWay(A, _, B), C), [priorityTjunction(B, D), holds(location(A, E, _), C), on(E, D)]). 1093l_int(holds(rightOfWay(A, B, C), _), [crossRoads(C), holds(location(A, _, D), E), holds(location(B, _, F), E), rightOf(D, F)]). 1094 1095reactive_rule([happens(destination(A, B), _, C), holds(location(A, D, _), C)], [directions(D, E, B), happens(drive(A, E, B), C, _)]). 1096 1097position(X, Y, northward, XX, YY, 3, 7) :- 1098 XX is X*20, 1099 YY is Y*20. 1100position(X, Y, southward, XX, YY, 3, 7) :- 1101 XX is X*20+15, 1102 YY is Y*20. 1103position(X, Y, westward, XX, YY, 7, 3) :- 1104 XX is X*20+15, 1105 YY is Y*20. 1106position(X, Y, eastward, XX, YY, 7, 3) :- 1107 XX is X*20, 1108 YY is Y*20+15. 1109 1110events([destination(A, _), remove(A)]). 1111 1112observe([destination(mycar, 9-9)], 3). 1113observe([destination(troubleMaker, 9-9)], 3). 1114observe([destination(yourcar, 9-9)], 3). 1115observe([destination(othercar, 6-1)], 2). 1116observe([remove(brokencar)], 16). 1117% dB(/.../(lps_user_examples, 'self-drivers.pl'), lps_visualization(_280106{groups:[_267842{content:"Events", id:"event", order:1}, _267916{content:"location(A,B,C)", id:"location/3", order:3, subgroupStack:"false"}, _267982{content:"Actions", id:"action", order:4}], items:[_268104{content:"brokencar,2-7,noward", end:16, group:"location/3", id:0, start:1, subgroup:"brokencar", title:"Fluent location(brokencar,2-7,noward) initiated at 1<br/>and terminated at transition to 16"}, _268230{content:"mycar,2-1,northward", end:4, group:"location/3", id:1, start:1, subgroup:"mycar", title:"Fluent location(mycar,2-1,northward) initiated at 1<br/>and terminated at transition to 4"}, _268356{content:"mycar,2-2,northward", end:5, group:"location/3", id:2, start:4, subgroup:"mycar", title:"Fluent location(mycar,2-2,northward) initiated at 4<br/>and terminated at transition to 5"}, _268482{content:"mycar,2-3,northward", end:6, group:"location/3", id:3, start:5, subgroup:"mycar", title:"Fluent location(mycar,2-3,northward) initiated at 5<br/>and terminated at transition to 6"}, _268608{content:"mycar,2-4,northward", end:7, group:"location/3", id:4, start:6, subgroup:"mycar", title:"Fluent location(mycar,2-4,northward) initiated at 6<br/>and terminated at transition to 7"}, _268734{content:"mycar,2-5,northward", end:8, group:"location/3", id:5, start:7, subgroup:"mycar", title:"Fluent location(mycar,2-5,northward) initiated at 7<br/>and terminated at transition to 8"}, _268860{content:"mycar,2-6,northward", end:17, group:"location/3", id:6, start:8, subgroup:"mycar", title:"Fluent location(mycar,2-6,northward) initiated at 8<br/>and terminated at transition to 17"}, _268986{content:"mycar,2-7,northward", end:18, group:"location/3", id:7, start:17, subgroup:"mycar", title:"Fluent location(mycar,2-7,northward) initiated at 17<br/>and terminated at transition to 18"}, _269112{content:"mycar,2-8,northward", end:19, group:"location/3", id:8, start:18, subgroup:"mycar", title:"Fluent location(mycar,2-8,northward) initiated at 18<br/>and terminated at transition to 19"}, _269238{content:"mycar,2-9,eastward", end:20, group:"location/3", id:9, start:19, subgroup:"mycar", title:"Fluent location(mycar,2-9,eastward) initiated at 19<br/>and terminated at transition to 20"}, _269364{content:"mycar,3-9,eastward", end:21, group:"location/3", id:10, start:20, subgroup:"mycar", title:"Fluent location(mycar,3-9,eastward) initiated at 20<br/>and terminated at transition to 21"}, _269490{content:"mycar,4-9,eastward", end:22, group:"location/3", id:11, start:21, subgroup:"mycar", title:"Fluent location(mycar,4-9,eastward) initiated at 21<br/>and terminated at transition to 22"}, _269616{content:"mycar,5-9,eastward", end:23, group:"location/3", id:12, start:22, subgroup:"mycar", title:"Fluent location(mycar,5-9,eastward) initiated at 22<br/>and terminated at transition to 23"}, _269742{content:"mycar,6-9,eastward", end:24, group:"location/3", id:13, start:23, subgroup:"mycar", title:"Fluent location(mycar,6-9,eastward) initiated at 23<br/>and terminated at transition to 24"}, _269868{content:"mycar,7-9,eastward", end:31, group:"location/3", id:14, start:24, subgroup:"mycar", title:"Fluent location(mycar,7-9,eastward) initiated at 24<br/>and terminated at transition to 31"}, _269994{content:"othercar,6-1,southward", end:31, group:"location/3", id:15, start:10, subgroup:"othercar", title:"Fluent location(othercar,6-1,southward) initiated at 10<br/>and terminated at transition to 31"}, _270120{content:"othercar,6-2,southward", end:10, group:"location/3", id:16, start:9, subgroup:"othercar", title:"Fluent location(othercar,6-2,southward) initiated at 9<br/>and terminated at transition to 10"}, _270246{content:"othercar,6-3,southward", end:9, group:"location/3", id:17, start:8, subgroup:"othercar", title:"Fluent location(othercar,6-3,southward) initiated at 8<br/>and terminated at transition to 9"}, _270372{content:"othercar,6-4,southward", end:8, group:"location/3", id:18, start:7, subgroup:"othercar", title:"Fluent location(othercar,6-4,southward) initiated at 7<br/>and terminated at transition to 8"}, _270498{content:"othercar,6-5,southward", end:7, group:"location/3", id:19, start:6, subgroup:"othercar", title:"Fluent location(othercar,6-5,southward) initiated at 6<br/>and terminated at transition to 7"}, _270624{content:"othercar,7-5,westward", end:6, group:"location/3", id:20, start:5, subgroup:"othercar", title:"Fluent location(othercar,7-5,westward) initiated at 5<br/>and terminated at transition to 6"}, _270750{content:"othercar,8-5,westward", end:5, group:"location/3", id:21, start:4, subgroup:"othercar", title:"Fluent location(othercar,8-5,westward) initiated at 4<br/>and terminated at transition to 5"}, _270876{content:"othercar,9-5,westward", end:4, group:"location/3", id:22, start:3, subgroup:"othercar", title:"Fluent location(othercar,9-5,westward) initiated at 3<br/>and terminated at transition to 4"}, _271002{content:"othercar,10-5,westward", end:3, group:"location/3", id:23, start:1, subgroup:"othercar", title:"Fluent location(othercar,10-5,westward) initiated at 1<br/>and terminated at transition to 3"}, _271128{content:"troubleMaker,6-2,northward", end:4, group:"location/3", id:24, start:1, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,6-2,northward) initiated at 1<br/>and terminated at transition to 4"}, _271254{content:"troubleMaker,6-3,northward", end:5, group:"location/3", id:25, start:4, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,6-3,northward) initiated at 4<br/>and terminated at transition to 5"}, _271380{content:"troubleMaker,6-4,northward", end:7, group:"location/3", id:26, start:5, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,6-4,northward) initiated at 5<br/>and terminated at transition to 7"}, _271506{content:"troubleMaker,6-5,northward", end:8, group:"location/3", id:27, start:7, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,6-5,northward) initiated at 7<br/>and terminated at transition to 8"}, _271632{content:"troubleMaker,6-6,northward", end:9, group:"location/3", id:28, start:8, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,6-6,northward) initiated at 8<br/>and terminated at transition to 9"}, _271758{content:"troubleMaker,6-7,northward", end:10, group:"location/3", id:29, start:9, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,6-7,northward) initiated at 9<br/>and terminated at transition to 10"}, _271884{content:"troubleMaker,6-8,northward", end:11, group:"location/3", id:30, start:10, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,6-8,northward) initiated at 10<br/>and terminated at transition to 11"}, _272010{content:"troubleMaker,6-9,eastward", end:12, group:"location/3", id:31, start:11, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,6-9,eastward) initiated at 11<br/>and terminated at transition to 12"}, _272136{content:"troubleMaker,7-9,eastward", end:13, group:"location/3", id:32, start:12, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,7-9,eastward) initiated at 12<br/>and terminated at transition to 13"}, _272262{content:"troubleMaker,8-9,eastward", end:14, group:"location/3", id:33, start:13, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,8-9,eastward) initiated at 13<br/>and terminated at transition to 14"}, _272388{content:"troubleMaker,9-9,eastward", end:31, group:"location/3", id:34, start:14, subgroup:"troubleMaker", title:"Fluent location(troubleMaker,9-9,eastward) initiated at 14<br/>and terminated at transition to 31"}, _272514{content:"yourcar,6-1,northward", end:5, group:"location/3", id:35, start:1, subgroup:"yourcar", title:"Fluent location(yourcar,6-1,northward) initiated at 1<br/>and terminated at transition to 5"}, _272640{content:"yourcar,6-2,northward", end:6, group:"location/3", id:36, start:5, subgroup:"yourcar", title:"Fluent location(yourcar,6-2,northward) initiated at 5<br/>and terminated at transition to 6"}, _272766{content:"yourcar,6-3,northward", end:8, group:"location/3", id:37, start:6, subgroup:"yourcar", title:"Fluent location(yourcar,6-3,northward) initiated at 6<br/>and terminated at transition to 8"}, _272892{content:"yourcar,6-4,northward", end:9, group:"location/3", id:38, start:8, subgroup:"yourcar", title:"Fluent location(yourcar,6-4,northward) initiated at 8<br/>and terminated at transition to 9"}, _273018{content:"yourcar,6-5,northward", end:10, group:"location/3", id:39, start:9, subgroup:"yourcar", title:"Fluent location(yourcar,6-5,northward) initiated at 9<br/>and terminated at transition to 10"}, _273144{content:"yourcar,6-6,northward", end:11, group:"location/3", id:40, start:10, subgroup:"yourcar", title:"Fluent location(yourcar,6-6,northward) initiated at 10<br/>and terminated at transition to 11"}, _273270{content:"yourcar,6-7,northward", end:12, group:"location/3", id:41, start:11, subgroup:"yourcar", title:"Fluent location(yourcar,6-7,northward) initiated at 11<br/>and terminated at transition to 12"}, _273396{content:"yourcar,6-8,northward", end:13, group:"location/3", id:42, start:12, subgroup:"yourcar", title:"Fluent location(yourcar,6-8,northward) initiated at 12<br/>and terminated at transition to 13"}, _273522{content:"yourcar,6-9,eastward", end:14, group:"location/3", id:43, start:13, subgroup:"yourcar", title:"Fluent location(yourcar,6-9,eastward) initiated at 13<br/>and terminated at transition to 14"}, _273648{content:"yourcar,7-9,eastward", end:15, group:"location/3", id:44, start:14, subgroup:"yourcar", title:"Fluent location(yourcar,7-9,eastward) initiated at 14<br/>and terminated at transition to 15"}, _273774{content:"yourcar,8-9,eastward", end:31, group:"location/3", id:45, start:15, subgroup:"yourcar", title:"Fluent location(yourcar,8-9,eastward) initiated at 15<br/>and terminated at transition to 31"}, _273900{content:"destination(othercar,6-1)", group:"event", id:46, start:2, style:"color:#E19735", title:"happens(destination(othercar,6-1),1,2)", type:"point"}, _274026{content:"destination(mycar,9-9)", group:"event", id:47, start:3, style:"color:#E19735", title:"happens(destination(mycar,9-9),2,3)", type:"point"}, _274152{content:"destination(troubleMaker,9-9)", group:"event", id:48, start:3, style:"color:#E19735", title:"happens(destination(troubleMaker,9-9),2,3)", type:"point"}, _274278{content:"destination(yourcar,9-9)", group:"event", id:49, start:3, style:"color:#E19735", title:"happens(destination(yourcar,9-9),2,3)", type:"point"}, _274404{content:"step(othercar,10-5,9-5)", group:"action", id:50, start:3, style:"color:green", title:"happens(step(othercar,10-5,9-5),2,3)", type:"point"}, _274530{content:"step(othercar,9-5,8-5)", group:"action", id:51, start:4, style:"color:green", title:"happens(step(othercar,9-5,8-5),3,4)", type:"point"}, _274656{content:"step(troubleMaker,6-2,6-3)", group:"action", id:52, start:4, style:"color:green", title:"happens(step(troubleMaker,6-2,6-3),3,4)", type:"point"}, _274782{content:"step(mycar,2-1,2-2)", group:"action", id:53, start:4, style:"color:green", title:"happens(step(mycar,2-1,2-2),3,4)", type:"point"}, _274908{content:"step(mycar,2-2,2-3)", group:"action", id:54, start:5, style:"color:green", title:"happens(step(mycar,2-2,2-3),4,5)", type:"point"}, _275034{content:"step(troubleMaker,6-3,6-4)", group:"action", id:55, start:5, style:"color:green", title:"happens(step(troubleMaker,6-3,6-4),4,5)", type:"point"}, _275160{content:"step(yourcar,6-1,6-2)", group:"action", id:56, start:5, style:"color:green", title:"happens(step(yourcar,6-1,6-2),4,5)", type:"point"}, _275286{content:"step(othercar,8-5,7-5)", group:"action", id:57, start:5, style:"color:green", title:"happens(step(othercar,8-5,7-5),4,5)", type:"point"}, _275412{content:"step(othercar,7-5,6-5)", group:"action", id:58, start:6, style:"color:green", title:"happens(step(othercar,7-5,6-5),5,6)", type:"point"}, _275538{content:"turn(othercar,southward)", group:"action", id:59, start:6, style:"color:green", title:"happens(turn(othercar,southward),5,6)", type:"point"}, _275664{content:"step(yourcar,6-2,6-3)", group:"action", id:60, start:6, style:"color:green", title:"happens(step(yourcar,6-2,6-3),5,6)", type:"point"}, _275790{content:"step(mycar,2-3,2-4)", group:"action", id:61, start:6, style:"color:green", title:"happens(step(mycar,2-3,2-4),5,6)", type:"point"}, _275916{content:"step(mycar,2-4,2-5)", group:"action", id:62, start:7, style:"color:green", title:"happens(step(mycar,2-4,2-5),6,7)", type:"point"}, _276042{content:"step(troubleMaker,6-4,6-5)", group:"action", id:63, start:7, style:"color:green", title:"happens(step(troubleMaker,6-4,6-5),6,7)", type:"point"}, _276168{content:"step(othercar,6-5,6-4)", group:"action", id:64, start:7, style:"color:green", title:"happens(step(othercar,6-5,6-4),6,7)", type:"point"}, _276294{content:"step(othercar,6-4,6-3)", group:"action", id:65, start:8, style:"color:green", title:"happens(step(othercar,6-4,6-3),7,8)", type:"point"}, _276420{content:"step(yourcar,6-3,6-4)", group:"action", id:66, start:8, style:"color:green", title:"happens(step(yourcar,6-3,6-4),7,8)", type:"point"}, _276546{content:"step(troubleMaker,6-5,6-6)", group:"action", id:67, start:8, style:"color:green", title:"happens(step(troubleMaker,6-5,6-6),7,8)", type:"point"}, _276672{content:"step(mycar,2-5,2-6)", group:"action", id:68, start:8, style:"color:green", title:"happens(step(mycar,2-5,2-6),7,8)", type:"point"}, _276798{content:"step(troubleMaker,6-6,6-7)", group:"action", id:69, start:9, style:"color:green", title:"happens(step(troubleMaker,6-6,6-7),8,9)", type:"point"}, _276924{content:"step(yourcar,6-4,6-5)", group:"action", id:70, start:9, style:"color:green", title:"happens(step(yourcar,6-4,6-5),8,9)", type:"point"}, _277050{content:"step(othercar,6-3,6-2)", group:"action", id:71, start:9, style:"color:green", title:"happens(step(othercar,6-3,6-2),8,9)", type:"point"}, _277176{content:"step(othercar,6-2,6-1)", group:"action", id:72, start:10, style:"color:green", title:"happens(step(othercar,6-2,6-1),9,10)", type:"point"}, _277302{content:"step(yourcar,6-5,6-6)", group:"action", id:73, start:10, style:"color:green", title:"happens(step(yourcar,6-5,6-6),9,10)", type:"point"}, _277428{content:"step(troubleMaker,6-7,6-8)", group:"action", id:74, start:10, style:"color:green", title:"happens(step(troubleMaker,6-7,6-8),9,10)", type:"point"}, _277554{content:"step(troubleMaker,6-8,6-9)", group:"action", id:75, start:11, style:"color:green", title:"happens(step(troubleMaker,6-8,6-9),10,11)", type:"point"}, _277680{content:"turn(troubleMaker,eastward)", group:"action", id:76, start:11, style:"color:green", title:"happens(turn(troubleMaker,eastward),10,11)", type:"point"}, _277806{content:"step(yourcar,6-6,6-7)", group:"action", id:77, start:11, style:"color:green", title:"happens(step(yourcar,6-6,6-7),10,11)", type:"point"}, _277932{content:"step(yourcar,6-7,6-8)", group:"action", id:78, start:12, style:"color:green", title:"happens(step(yourcar,6-7,6-8),11,12)", type:"point"}, _278058{content:"step(troubleMaker,6-9,7-9)", group:"action", id:79, start:12, style:"color:green", title:"happens(step(troubleMaker,6-9,7-9),11,12)", type:"point"}, _278184{content:"step(troubleMaker,7-9,8-9)", group:"action", id:80, start:13, style:"color:green", title:"happens(step(troubleMaker,7-9,8-9),12,13)", type:"point"}, _278310{content:"step(yourcar,6-8,6-9)", group:"action", id:81, start:13, style:"color:green", title:"happens(step(yourcar,6-8,6-9),12,13)", type:"point"}, _278436{content:"turn(yourcar,eastward)", group:"action", id:82, start:13, style:"color:green", title:"happens(turn(yourcar,eastward),12,13)", type:"point"}, _278562{content:"step(yourcar,6-9,7-9)", group:"action", id:83, start:14, style:"color:green", title:"happens(step(yourcar,6-9,7-9),13,14)", type:"point"}, _278688{content:"step(troubleMaker,8-9,9-9)", group:"action", id:84, start:14, style:"color:green", title:"happens(step(troubleMaker,8-9,9-9),13,14)", type:"point"}, _278814{content:"step(yourcar,7-9,8-9)", group:"action", id:85, start:15, style:"color:green", title:"happens(step(yourcar,7-9,8-9),14,15)", type:"point"}, _278940{content:"remove(brokencar)", group:"event", id:86, start:16, style:"color:#E19735", title:"happens(remove(brokencar),15,16)", type:"point"}, _279066{content:"step(mycar,2-6,2-7)", group:"action", id:87, start:17, style:"color:green", title:"happens(step(mycar,2-6,2-7),16,17)", type:"point"}, _279192{content:"step(mycar,2-7,2-8)", group:"action", id:88, start:18, style:"color:green", title:"happens(step(mycar,2-7,2-8),17,18)", type:"point"}, _279318{content:"step(mycar,2-8,2-9)", group:"action", id:89, start:19, style:"color:green", title:"happens(step(mycar,2-8,2-9),18,19)", type:"point"}, _279444{content:"turn(mycar,eastward)", group:"action", id:90, start:19, style:"color:green", title:"happens(turn(mycar,eastward),18,19)", type:"point"}, _279570{content:"step(mycar,2-9,3-9)", group:"action", id:91, start:20, style:"color:green", title:"happens(step(mycar,2-9,3-9),19,20)", type:"point"}, _279696{content:"step(mycar,3-9,4-9)", group:"action", id:92, start:21, style:"color:green", title:"happens(step(mycar,3-9,4-9),20,21)", type:"point"}, _279822{content:"step(mycar,4-9,5-9)", group:"action", id:93, start:22, style:"color:green", title:"happens(step(mycar,4-9,5-9),21,22)", type:"point"}, _279948{content:"step(mycar,5-9,6-9)", group:"action", id:94, start:23, style:"color:green", title:"happens(step(mycar,5-9,6-9),22,23)", type:"point"}, _280074{content:"step(mycar,6-9,7-9)", group:"action", id:95, start:24, style:"color:green", title:"happens(step(mycar,6-9,7-9),23,24)", type:"point"}]}, _422170{cycles:[[_414046{create:[_406824{fillColor:"yellow", from:[20, 20], id:"timeless", to:[40, 40], type:"rectangle"}, _406942{fillColor:"yellow", from:[20, 40], id:"timeless", to:[40, 60], type:"rectangle"}, _407060{fillColor:"yellow", from:[20, 60], id:"timeless", to:[40, 80], type:"rectangle"}, _407178{fillColor:"yellow", from:[20, 80], id:"timeless", to:[40, 100], type:"rectangle"}, _407296{fillColor:"yellow", from:[20, 100], id:"timeless", to:[40, 120], type:"rectangle"}, _407414{fillColor:"yellow", from:[20, 120], id:"timeless", to:[40, 140], type:"rectangle"}, _407532{fillColor:"yellow", from:[20, 140], id:"timeless", to:[40, 160], type:"rectangle"}, _407650{fillColor:"yellow", from:[20, 160], id:"timeless", to:[40, 180], type:"rectangle"}, _407768{fillColor:"yellow", from:[20, 180], id:"timeless", to:[40, 200], type:"rectangle"}, _407886{fillColor:"yellow", from:[20, 200], id:"timeless", to:[40, 220], type:"rectangle"}, _408004{fillColor:"yellow", from:[40, 200], id:"timeless", to:[60, 220], type:"rectangle"}, _408122{fillColor:"yellow", from:[60, 20], id:"timeless", to:[80, 40], type:"rectangle"}, _408240{fillColor:"yellow", from:[60, 40], id:"timeless", to:[80, 60], type:"rectangle"}, _408358{fillColor:"yellow", from:[60, 60], id:"timeless", to:[80, 80], type:"rectangle"}, _408476{fillColor:"yellow", from:[60, 80], id:"timeless", to:[80, 100], type:"rectangle"}, _408594{fillColor:"yellow", from:[60, 120], id:"timeless", to:[80, 140], type:"rectangle"}, _408712{fillColor:"yellow", from:[60, 140], id:"timeless", to:[80, 160], type:"rectangle"}, _408830{fillColor:"yellow", from:[60, 160], id:"timeless", to:[80, 180], type:"rectangle"}, _408948{fillColor:"yellow", from:[60, 200], id:"timeless", to:[80, 220], type:"rectangle"}, _409066{fillColor:"yellow", from:[80, 20], id:"timeless", to:[100, 40], type:"rectangle"}, _409184{fillColor:"yellow", from:[80, 40], id:"timeless", to:[100, 60], type:"rectangle"}, _409302{fillColor:"yellow", from:[80, 60], id:"timeless", to:[100, 80], type:"rectangle"}, _409420{fillColor:"yellow", from:[80, 80], id:"timeless", to:[100, 100], type:"rectangle"}, _409538{fillColor:"yellow", from:[80, 120], id:"timeless", to:[100, 140], type:"rectangle"}, _409656{fillColor:"yellow", from:[80, 140], id:"timeless", to:[100, 160], type:"rectangle"}, _409774{fillColor:"yellow", from:[80, 160], id:"timeless", to:[100, 180], type:"rectangle"}, _409892{fillColor:"yellow", from:[80, 200], id:"timeless", to:[100, 220], type:"rectangle"}, _410010{fillColor:"yellow", from:[100, 20], id:"timeless", to:[120, 40], type:"rectangle"}, _410128{fillColor:"yellow", from:[100, 40], id:"timeless", to:[120, 60], type:"rectangle"}, _410246{fillColor:"yellow", from:[100, 60], id:"timeless", to:[120, 80], type:"rectangle"}, _410364{fillColor:"yellow", from:[100, 80], id:"timeless", to:[120, 100], type:"rectangle"}, _410482{fillColor:"yellow", from:[100, 120], id:"timeless", to:[120, 140], type:"rectangle"}, _410600{fillColor:"yellow", from:[100, 140], id:"timeless", to:[120, 160], type:"rectangle"}, _410718{fillColor:"yellow", from:[100, 160], id:"timeless", to:[120, 180], type:"rectangle"}, _410836{fillColor:"yellow", from:[100, 200], id:"timeless", to:[120, 220], type:"rectangle"}, _410954{fillColor:"yellow", from:[120, 200], id:"timeless", to:[140, 220], type:"rectangle"}, _411072{fillColor:"yellow", from:[140, 20], id:"timeless", to:[160, 40], type:"rectangle"}, _411190{fillColor:"yellow", from:[140, 40], id:"timeless", to:[160, 60], type:"rectangle"}, _411308{fillColor:"yellow", from:[140, 60], id:"timeless", to:[160, 80], type:"rectangle"}, _411426{fillColor:"yellow", from:[140, 80], id:"timeless", to:[160, 100], type:"rectangle"}, _411544{fillColor:"yellow", from:[140, 120], id:"timeless", to:[160, 140], type:"rectangle"}, _411662{fillColor:"yellow", from:[140, 140], id:"timeless", to:[160, 160], type:"rectangle"}, _411780{fillColor:"yellow", from:[140, 160], id:"timeless", to:[160, 180], type:"rectangle"}, _411898{fillColor:"yellow", from:[140, 200], id:"timeless", to:[160, 220], type:"rectangle"}, _412016{fillColor:"yellow", from:[160, 200], id:"timeless", to:[180, 220], type:"rectangle"}, _412134{fillColor:"yellow", from:[180, 20], id:"timeless", to:[200, 40], type:"rectangle"}, _412252{fillColor:"yellow", from:[180, 40], id:"timeless", to:[200, 60], type:"rectangle"}, _412370{fillColor:"yellow", from:[180, 60], id:"timeless", to:[200, 80], type:"rectangle"}, _412488{fillColor:"yellow", from:[180, 80], id:"timeless", to:[200, 100], type:"rectangle"}, _412606{fillColor:"yellow", from:[180, 120], id:"timeless", to:[200, 140], type:"rectangle"}, _412724{fillColor:"yellow", from:[180, 140], id:"timeless", to:[200, 160], type:"rectangle"}, _412842{fillColor:"yellow", from:[180, 160], id:"timeless", to:[200, 180], type:"rectangle"}, _412960{fillColor:"yellow", from:[180, 200], id:"timeless", to:[200, 220], type:"rectangle"}, _413078{fillColor:"yellow", from:[200, 20], id:"timeless", to:[220, 40], type:"rectangle"}, _413196{fillColor:"yellow", from:[200, 40], id:"timeless", to:[220, 60], type:"rectangle"}, _413314{fillColor:"yellow", from:[200, 60], id:"timeless", to:[220, 80], type:"rectangle"}, _413432{fillColor:"yellow", from:[200, 80], id:"timeless", to:[220, 100], type:"rectangle"}, _413550{fillColor:"yellow", from:[200, 120], id:"timeless", to:[220, 140], type:"rectangle"}, _413668{fillColor:"yellow", from:[200, 140], id:"timeless", to:[220, 160], type:"rectangle"}, _413786{fillColor:"yellow", from:[200, 160], id:"timeless", to:[220, 180], type:"rectangle"}, _413904{fillColor:"yellow", from:[200, 180], id:"timeless", to:[220, 200], type:"rectangle"}, _414022{fillColor:"yellow", from:[200, 200], id:"timeless", to:[220, 220], type:"rectangle"}]}], [_414182{create:_414158{center:[50, 150], fillColor:"red", id:"location(brokencar,2-7,noward)", radius:10, type:"circle"}}, _414324{create:_414300{fillColor:"blue", id:"location(mycar,2-1,northward)", point:[40, 20], size:[3, 7], type:"ellipse"}}, _414466{create:_414442{fillColor:"green", id:"location(othercar,10-5,westward)", point:[215, 100], size:[7, 3], type:"ellipse"}}, _414608{create:_414584{fillColor:"maroon", id:"location(troubleMaker,6-2,northward)", point:[120, 40], size:[3, 7], type:"ellipse"}}, _414750{create:_414726{fillColor:"red", id:"location(yourcar,6-1,northward)", point:[120, 20], size:[3, 7], type:"ellipse"}}], [], [_414904{create:_414880{fillColor:"green", id:"location(othercar,9-5,westward)", point:[195, 100], size:[7, 3], type:"ellipse"}}, _414934{kill:"location(othercar,10-5,westward)"}], [_415082{create:_415058{fillColor:"blue", id:"location(mycar,2-2,northward)", point:[40, 40], size:[3, 7], type:"ellipse"}}, _415224{create:_415200{fillColor:"green", id:"location(othercar,8-5,westward)", point:[175, 100], size:[7, 3], type:"ellipse"}}, _415366{create:_415342{fillColor:"maroon", id:"location(troubleMaker,6-3,northward)", point:[120, 60], size:[3, 7], type:"ellipse"}}, _415396{kill:"location(mycar,2-1,northward)"}, _415426{kill:"location(othercar,9-5,westward)"}, _415456{kill:"location(troubleMaker,6-2,northward)"}], [_415604{create:_415580{fillColor:"blue", id:"location(mycar,2-3,northward)", point:[40, 60], size:[3, 7], type:"ellipse"}}, _415746{create:_415722{fillColor:"green", id:"location(othercar,7-5,westward)", point:[155, 100], size:[7, 3], type:"ellipse"}}, _415888{create:_415864{fillColor:"maroon", id:"location(troubleMaker,6-4,northward)", point:[120, 80], size:[3, 7], type:"ellipse"}}, _416030{create:_416006{fillColor:"red", id:"location(yourcar,6-2,northward)", point:[120, 40], size:[3, 7], type:"ellipse"}}, _416060{kill:"location(mycar,2-2,northward)"}, _416090{kill:"location(othercar,8-5,westward)"}, _416120{kill:"location(troubleMaker,6-3,northward)"}, _416150{kill:"location(yourcar,6-1,northward)"}], [_416298{create:_416274{fillColor:"blue", id:"location(mycar,2-4,northward)", point:[40, 80], size:[3, 7], type:"ellipse"}}, _416440{create:_416416{fillColor:"green", id:"location(othercar,6-5,southward)", point:[135, 100], size:[3, 7], type:"ellipse"}}, _416582{create:_416558{fillColor:"red", id:"location(yourcar,6-3,northward)", point:[120, 60], size:[3, 7], type:"ellipse"}}, _416612{kill:"location(mycar,2-3,northward)"}, _416642{kill:"location(othercar,7-5,westward)"}, _416672{kill:"location(yourcar,6-2,northward)"}], [_416820{create:_416796{fillColor:"blue", id:"location(mycar,2-5,northward)", point:[40, 100], size:[3, 7], type:"ellipse"}}, _416962{create:_416938{fillColor:"green", id:"location(othercar,6-4,southward)", point:[135, 80], size:[3, 7], type:"ellipse"}}, _417104{create:_417080{fillColor:"maroon", id:"location(troubleMaker,6-5,northward)", point:[120, 100], size:[3, 7], type:"ellipse"}}, _417134{kill:"location(mycar,2-4,northward)"}, _417164{kill:"location(othercar,6-5,southward)"}, _417194{kill:"location(troubleMaker,6-4,northward)"}], [_417342{create:_417318{fillColor:"blue", id:"location(mycar,2-6,northward)", point:[40, 120], size:[3, 7], type:"ellipse"}}, _417484{create:_417460{fillColor:"green", id:"location(othercar,6-3,southward)", point:[135, 60], size:[3, 7], type:"ellipse"}}, _417626{create:_417602{fillColor:"maroon", id:"location(troubleMaker,6-6,northward)", point:[120, 120], size:[3, 7], type:"ellipse"}}, _417768{create:_417744{fillColor:"red", id:"location(yourcar,6-4,northward)", point:[120, 80], size:[3, 7], type:"ellipse"}}, _417798{kill:"location(mycar,2-5,northward)"}, _417828{kill:"location(othercar,6-4,southward)"}, _417858{kill:"location(troubleMaker,6-5,northward)"}, _417888{kill:"location(yourcar,6-3,northward)"}], [_418036{create:_418012{fillColor:"green", id:"location(othercar,6-2,southward)", point:[135, 40], size:[3, 7], type:"ellipse"}}, _418178{create:_418154{fillColor:"maroon", id:"location(troubleMaker,6-7,northward)", point:[120, 140], size:[3, 7], type:"ellipse"}}, _418320{create:_418296{fillColor:"red", id:"location(yourcar,6-5,northward)", point:[120, 100], size:[3, 7], type:"ellipse"}}, _418350{kill:"location(othercar,6-3,southward)"}, _418380{kill:"location(troubleMaker,6-6,northward)"}, _418410{kill:"location(yourcar,6-4,northward)"}], [_418558{create:_418534{fillColor:"green", id:"location(othercar,6-1,southward)", point:[135, 20], size:[3, 7], type:"ellipse"}}, _418700{create:_418676{fillColor:"maroon", id:"location(troubleMaker,6-8,northward)", point:[120, 160], size:[3, 7], type:"ellipse"}}, _418842{create:_418818{fillColor:"red", id:"location(yourcar,6-6,northward)", point:[120, 120], size:[3, 7], type:"ellipse"}}, _418872{kill:"location(othercar,6-2,southward)"}, _418902{kill:"location(troubleMaker,6-7,northward)"}, _418932{kill:"location(yourcar,6-5,northward)"}], [_419080{create:_419056{fillColor:"maroon", id:"location(troubleMaker,6-9,eastward)", point:[120, 195], size:[7, 3], type:"ellipse"}}, _419222{create:_419198{fillColor:"red", id:"location(yourcar,6-7,northward)", point:[120, 140], size:[3, 7], type:"ellipse"}}, _419252{kill:"location(troubleMaker,6-8,northward)"}, _419282{kill:"location(yourcar,6-6,northward)"}], [_419430{create:_419406{fillColor:"maroon", id:"location(troubleMaker,7-9,eastward)", point:[140, 195], size:[7, 3], type:"ellipse"}}, _419572{create:_419548{fillColor:"red", id:"location(yourcar,6-8,northward)", point:[120, 160], size:[3, 7], type:"ellipse"}}, _419602{kill:"location(troubleMaker,6-9,eastward)"}, _419632{kill:"location(yourcar,6-7,northward)"}], [_419780{create:_419756{fillColor:"maroon", id:"location(troubleMaker,8-9,eastward)", point:[160, 195], size:[7, 3], type:"ellipse"}}, _419922{create:_419898{fillColor:"red", id:"location(yourcar,6-9,eastward)", point:[120, 195], size:[7, 3], type:"ellipse"}}, _419952{kill:"location(troubleMaker,7-9,eastward)"}, _419982{kill:"location(yourcar,6-8,northward)"}], [_420130{create:_420106{fillColor:"maroon", id:"location(troubleMaker,9-9,eastward)", point:[180, 195], size:[7, 3], type:"ellipse"}}, _420272{create:_420248{fillColor:"red", id:"location(yourcar,7-9,eastward)", point:[140, 195], size:[7, 3], type:"ellipse"}}, _420302{kill:"location(troubleMaker,8-9,eastward)"}, _420332{kill:"location(yourcar,6-9,eastward)"}], [_420480{create:_420456{fillColor:"red", id:"location(yourcar,8-9,eastward)", point:[160, 195], size:[7, 3], type:"ellipse"}}, _420510{kill:"location(yourcar,7-9,eastward)"}], [_420546{kill:"location(brokencar,2-7,noward)"}], [_420694{create:_420670{fillColor:"blue", id:"location(mycar,2-7,northward)", point:[40, 140], size:[3, 7], type:"ellipse"}}, _420724{kill:"location(mycar,2-6,northward)"}], [_420872{create:_420848{fillColor:"blue", id:"location(mycar,2-8,northward)", point:[40, 160], size:[3, 7], type:"ellipse"}}, _420902{kill:"location(mycar,2-7,northward)"}], [_421050{create:_421026{fillColor:"blue", id:"location(mycar,2-9,eastward)", point:[40, 195], size:[7, 3], type:"ellipse"}}, _421080{kill:"location(mycar,2-8,northward)"}], [_421228{create:_421204{fillColor:"blue", id:"location(mycar,3-9,eastward)", point:[60, 195], size:[7, 3], type:"ellipse"}}, _421258{kill:"location(mycar,2-9,eastward)"}], [_421406{create:_421382{fillColor:"blue", id:"location(mycar,4-9,eastward)", point:[80, 195], size:[7, 3], type:"ellipse"}}, _421436{kill:"location(mycar,3-9,eastward)"}], [_421584{create:_421560{fillColor:"blue", id:"location(mycar,5-9,eastward)", point:[100, 195], size:[7, 3], type:"ellipse"}}, _421614{kill:"location(mycar,4-9,eastward)"}], [_421762{create:_421738{fillColor:"blue", id:"location(mycar,6-9,eastward)", point:[120, 195], size:[7, 3], type:"ellipse"}}, _421792{kill:"location(mycar,5-9,eastward)"}], [_421940{create:_421916{fillColor:"blue", id:"location(mycar,7-9,eastward)", point:[140, 195], size:[7, 3], type:"ellipse"}}, _421970{kill:"location(mycar,6-9,eastward)"}], [], [], [], [], [], [], [_422042{kill:"location(mycar,7-9,eastward)"}, _422072{kill:"location(othercar,6-1,southward)"}, _422102{kill:"location(troubleMaker,9-9,eastward)"}, _422132{kill:"location(yourcar,8-9,eastward)"}, _422162{kill:"timeless"}]]})). 1118% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'self-driving cars.pl')). 1119% run_lps_corner_file1(/.../(lps_user_examples, 'self-driving cars.pl')). 1120% /pack/logicmoo_ec/test/lps_user_examples/self-driving cars.pl:1 1121% push_lps_dialect. 1122% ops. 1123% [ti=user, load= /.../(lps_user_examples, 'self-driving cars.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'self-driving cars.pl'), lps= /.../(lps_user_examples, 'self-driving cars.pl'), using= /.../(lps_user_examples, 'self-driving cars.pl')]. 1124% continue_lps_dialect. 1125% ops. 1126 1127% LPS: fluents(location(_107232,_107234,_107236)). 1128% Into: fluents([location(_107232,_107234,_107236)]). 1129 1130% LPS: events(destination(_108316,_108318)). 1131% Into: events([destination(_108316,_108318)]). 1132 1133% LPS: actions((step(_109370),turn(_109370,_109426))). 1134% Into: actions([step(_109370),turn(_109370,_109426)]). 1135 1136% LPS: if(updates(step(_110512),in(to(_110548,_110550),location(_110512,_110548,_110648))),next(_110548,_110648,_110550)). 1137% Into: updated(happens(step(_110512),_112024,_112030),location(_110512,_110548,_110648),_110548-_110550,[next(_110548,_110648,_110550)]). 1138 1139% LPS: updates(turn(_120224,_120226),in(to(_120262,_120226),location(_120224,_120360,_120262))). 1140% Into: updated(happens(turn(_120224,_120226),_121606,_121612),location(_120224,_120360,_120262),_120262-_120226,[]). 1141 1142% LPS: initially((location(mycar,2-1,northward),location(yourcar,9-9,westward))). 1143% Into: initial_state([location(mycar,2-1,northward),location(yourcar,9-9,westward)]). 1144 1145% LPS: observe(from(destination(mycar,9-9),to(2,3))). 1146% Into: observe([destination(mycar,9-9)],3). 1147 1148% LPS: observe(from(destination(yourcar,2-1),to(3,4))). 1149% Into: observe([destination(yourcar,2-1)],4). 1150 1151% LPS: then(if((to(destination(_138670,_138672),_138694),at(location(_138670,_138790,_138792),_138694),directions(_138790,_138910,_138672))),from(drive(_138670,_138910,_138672),to(_138694,_139110))). 1152% Into: reactive_rule([happens(destination(_138670,_138672),_140342,_138694),holds(location(_138670,_138790,_138792),_138694),directions(_138790,_138910,_138672)],[happens(drive(_138670,_138910,_138672),_138694,_139110)]). 1153 1154% LPS: if(from(drive(_141806,_141808,_141810),to(_141846,_141846)),at(location(_141806,_141810,_141978),_141846)). 1155% Into: l_events(happens(drive(_141806,_141808,_141810),_141846,_141846),[holds(location(_141806,_141810,_141978),_141846)]). 1156 1157% LPS: if(from(drive(_143538,[_143478-_143480|_143512],_143542),to(_143578,_143580)),(location(_143538,_143708,_143478),on(_143708,_143480),next(_143708,_143478,_143838),on(_143838,_143480),from(step(_143538),to(_143578,_143972)),from(drive(_143538,[_143478-_143480|_143512],_143542),to(_143972,_143580)))). 1158% Into: l_events(happens(drive(_143538,[_143478-_143480|_143512],_143542),_143578,_143580),[holds(location(_143538,_143708,_143478),_145796),on(_143708,_143480),next(_143708,_143478,_143838),on(_143838,_143480),happens(step(_143538),_143578,_143972),happens(drive(_143538,[_143478-_143480|_143512],_143542),_143972,_143580)]). 1159 1160% LPS: if(from(drive(_146694,[_146566-_146568,_146634-_146636|_146668],_146698),to(_146734,_146736)),(location(_146694,_146864,_146566),on(_146864,_146568),on(_146864,_146636),from(turn(_146694,_146634),to(_146734,_147072)),from(drive(_146694,[_146634-_146636|_146668],_146698),to(_147072,_146736)))). 1161% Into: l_events(happens(drive(_146694,[_146566-_146568,_146634-_146636|_146668],_146698),_146734,_146736),[holds(location(_146694,_146864,_146566),_148876),on(_146864,_146568),on(_146864,_146636),happens(turn(_146694,_146634),_146734,_147072),happens(drive(_146694,[_146634-_146636|_146668],_146698),_147072,_146736)]). 1162% /pack/logicmoo_ec/test/lps_user_examples/self-driving cars.pl:83 1163% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca3900)"), (/.../(lps_user_examples, 'self-driving cars.pl')-> /.../(lps_user_examples, 'self-driving cars.pl'))). 1164% ops. 1165% :-listing('/pack/logicmoo_ec/test/lps_user_examples/self-driving cars.pl':_166774). 1166 1167 1168d(location(mycar, X-Y, Heading), [type:circle, center:[XX, YY], radius:5, fillColor:blue]) :- 1169 XX is X*10+5, 1170 YY is Y*10+5. 1171d(location(yourcar, X-Y, Heading), [type:circle, center:[XX, YY], radius:5, fillColor:red]) :- 1172 XX is X*10+5, 1173 YY is Y*10+5. 1174d(timeless, A) :- 1175 findall([ type:rectangle, 1176 from:[B, C], 1177 to:[D, E], 1178 fillColor:yellow 1179 ], 1180 ( place(F-G), 1181 not(on(F-G, _)), 1182 B is F*10, 1183 C is G*10, 1184 D is B+10, 1185 E is C+10 1186 ), 1187 A). 1188 1189fluents([location(_, _, _)]). 1190 1191next(X-Y1, northward, X-Y2) :- 1192 Y2 is Y1+1. 1193next(X-Y1, southward, X-Y2) :- 1194 Y2 is Y1-1. 1195next(X1-Y, eastward, X2-Y) :- 1196 X2 is X1+1. 1197next(X1-Y, westward, X2-Y) :- 1198 X2 is X1-1. 1199 1200directions(2-1, [northward-westStreet, eastward-northStreet], 9-9). 1201directions(9-9, [westward-northStreet, southward-westStreet], 2-1). 1202 1203reactive_rule([happens(destination(A, B), _, C), holds(location(A, D, _), C), directions(D, E, B)], [happens(drive(A, E, B), C, _)]). 1204 1205initial_state([location(mycar, 2-1, northward), location(yourcar, 9-9, westward)]). 1206 1207l_events(happens(drive(A, _, B), C, C), [holds(location(A, B, _), C)]). 1208l_events(happens(drive(A, [B-C|D], E), F, G), [holds(location(A, H, B), _), on(H, C), next(H, B, I), on(I, C), happens(step(A), F, J), happens(drive(A, [B-C|D], E), J, G)]). 1209l_events(happens(drive(A, [B-C, D-E|F], G), H, I), [holds(location(A, J, B), _), on(J, C), on(J, E), happens(turn(A, D), H, K), happens(drive(A, [D-E|F], G), K, I)]). 1210 1211:- dynamic actions/1. 1212:- multifile actions/1. 1213 1214actions([step(A), turn(A, _)]). 1215 1216on(X-5, mainStreet) :- 1217 3=<X, 1218 X=<10. 1219on(X-9, northStreet) :- 1220 2=<X, 1221 X=<9. 1222on(6-Y, highStreet) :- 1223 1=<Y, 1224 Y=<9. 1225on(2-Y, westStreet) :- 1226 1=<Y, 1227 Y=<9. 1228on(8-Y, eastStreet) :- 1229 1=<Y, 1230 Y=<9. 1231 1232events([destination(_, _)]). 1233 1234updated(happens(step(A), _, _), location(A, B, C), B-D, [next(B, C, D)]). 1235updated(happens(turn(A, B), _, _), location(A, _, C), C-B, []). 1236 1237maxTime(20). 1238 1239observe([destination(mycar, 9-9)], 3). 1240observe([destination(yourcar, 2-1)], 4). 1241 1242place(X-Y) :- 1243 member(X, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 1244 member(Y, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]). 1245% dB(/.../(lps_user_examples, 'self-driving cars.pl'), lps_visualization(_209334{groups:[_200598{content:"Events", id:"event", order:1}, _200672{content:"location(A,B,C)", id:"location/3", order:3, subgroupStack:"false"}, _200738{content:"Actions", id:"action", order:4}], items:[_200860{content:"mycar,2-1,northward", end:4, group:"location/3", id:0, start:1, subgroup:"mycar", title:"Fluent location(mycar,2-1,northward) initiated at 1<br/>and terminated at transition to 4"}, _200986{content:"mycar,2-2,northward", end:5, group:"location/3", id:1, start:4, subgroup:"mycar", title:"Fluent location(mycar,2-2,northward) initiated at 4<br/>and terminated at transition to 5"}, _201112{content:"mycar,2-3,northward", end:6, group:"location/3", id:2, start:5, subgroup:"mycar", title:"Fluent location(mycar,2-3,northward) initiated at 5<br/>and terminated at transition to 6"}, _201238{content:"mycar,2-4,northward", end:7, group:"location/3", id:3, start:6, subgroup:"mycar", title:"Fluent location(mycar,2-4,northward) initiated at 6<br/>and terminated at transition to 7"}, _201364{content:"mycar,2-5,northward", end:8, group:"location/3", id:4, start:7, subgroup:"mycar", title:"Fluent location(mycar,2-5,northward) initiated at 7<br/>and terminated at transition to 8"}, _201490{content:"mycar,2-6,northward", end:9, group:"location/3", id:5, start:8, subgroup:"mycar", title:"Fluent location(mycar,2-6,northward) initiated at 8<br/>and terminated at transition to 9"}, _201616{content:"mycar,2-7,northward", end:10, group:"location/3", id:6, start:9, subgroup:"mycar", title:"Fluent location(mycar,2-7,northward) initiated at 9<br/>and terminated at transition to 10"}, _201742{content:"mycar,2-8,northward", end:11, group:"location/3", id:7, start:10, subgroup:"mycar", title:"Fluent location(mycar,2-8,northward) initiated at 10<br/>and terminated at transition to 11"}, _201868{content:"mycar,2-9,eastward", end:13, group:"location/3", id:8, start:12, subgroup:"mycar", title:"Fluent location(mycar,2-9,eastward) initiated at 12<br/>and terminated at transition to 13"}, _201994{content:"mycar,2-9,northward", end:12, group:"location/3", id:9, start:11, subgroup:"mycar", title:"Fluent location(mycar,2-9,northward) initiated at 11<br/>and terminated at transition to 12"}, _202120{content:"mycar,3-9,eastward", end:14, group:"location/3", id:10, start:13, subgroup:"mycar", title:"Fluent location(mycar,3-9,eastward) initiated at 13<br/>and terminated at transition to 14"}, _202246{content:"mycar,4-9,eastward", end:15, group:"location/3", id:11, start:14, subgroup:"mycar", title:"Fluent location(mycar,4-9,eastward) initiated at 14<br/>and terminated at transition to 15"}, _202372{content:"mycar,5-9,eastward", end:16, group:"location/3", id:12, start:15, subgroup:"mycar", title:"Fluent location(mycar,5-9,eastward) initiated at 15<br/>and terminated at transition to 16"}, _202498{content:"mycar,6-9,eastward", end:17, group:"location/3", id:13, start:16, subgroup:"mycar", title:"Fluent location(mycar,6-9,eastward) initiated at 16<br/>and terminated at transition to 17"}, _202624{content:"mycar,7-9,eastward", end:18, group:"location/3", id:14, start:17, subgroup:"mycar", title:"Fluent location(mycar,7-9,eastward) initiated at 17<br/>and terminated at transition to 18"}, _202750{content:"mycar,8-9,eastward", end:19, group:"location/3", id:15, start:18, subgroup:"mycar", title:"Fluent location(mycar,8-9,eastward) initiated at 18<br/>and terminated at transition to 19"}, _202876{content:"mycar,9-9,eastward", end:21, group:"location/3", id:16, start:19, subgroup:"mycar", title:"Fluent location(mycar,9-9,eastward) initiated at 19<br/>and terminated at transition to 21"}, _203002{content:"yourcar,2-1,southward", end:21, group:"location/3", id:17, start:20, subgroup:"yourcar", title:"Fluent location(yourcar,2-1,southward) initiated at 20<br/>and terminated at transition to 21"}, _203128{content:"yourcar,2-2,southward", end:20, group:"location/3", id:18, start:19, subgroup:"yourcar", title:"Fluent location(yourcar,2-2,southward) initiated at 19<br/>and terminated at transition to 20"}, _203254{content:"yourcar,2-3,southward", end:19, group:"location/3", id:19, start:18, subgroup:"yourcar", title:"Fluent location(yourcar,2-3,southward) initiated at 18<br/>and terminated at transition to 19"}, _203380{content:"yourcar,2-4,southward", end:18, group:"location/3", id:20, start:17, subgroup:"yourcar", title:"Fluent location(yourcar,2-4,southward) initiated at 17<br/>and terminated at transition to 18"}, _203506{content:"yourcar,2-5,southward", end:17, group:"location/3", id:21, start:16, subgroup:"yourcar", title:"Fluent location(yourcar,2-5,southward) initiated at 16<br/>and terminated at transition to 17"}, _203632{content:"yourcar,2-6,southward", end:16, group:"location/3", id:22, start:15, subgroup:"yourcar", title:"Fluent location(yourcar,2-6,southward) initiated at 15<br/>and terminated at transition to 16"}, _203758{content:"yourcar,2-7,southward", end:15, group:"location/3", id:23, start:14, subgroup:"yourcar", title:"Fluent location(yourcar,2-7,southward) initiated at 14<br/>and terminated at transition to 15"}, _203884{content:"yourcar,2-8,southward", end:14, group:"location/3", id:24, start:13, subgroup:"yourcar", title:"Fluent location(yourcar,2-8,southward) initiated at 13<br/>and terminated at transition to 14"}, _204010{content:"yourcar,2-9,southward", end:13, group:"location/3", id:25, start:12, subgroup:"yourcar", title:"Fluent location(yourcar,2-9,southward) initiated at 12<br/>and terminated at transition to 13"}, _204136{content:"yourcar,2-9,westward", end:12, group:"location/3", id:26, start:11, subgroup:"yourcar", title:"Fluent location(yourcar,2-9,westward) initiated at 11<br/>and terminated at transition to 12"}, _204262{content:"yourcar,3-9,westward", end:11, group:"location/3", id:27, start:10, subgroup:"yourcar", title:"Fluent location(yourcar,3-9,westward) initiated at 10<br/>and terminated at transition to 11"}, _204388{content:"yourcar,4-9,westward", end:10, group:"location/3", id:28, start:9, subgroup:"yourcar", title:"Fluent location(yourcar,4-9,westward) initiated at 9<br/>and terminated at transition to 10"}, _204514{content:"yourcar,5-9,westward", end:9, group:"location/3", id:29, start:8, subgroup:"yourcar", title:"Fluent location(yourcar,5-9,westward) initiated at 8<br/>and terminated at transition to 9"}, _204640{content:"yourcar,6-9,westward", end:8, group:"location/3", id:30, start:7, subgroup:"yourcar", title:"Fluent location(yourcar,6-9,westward) initiated at 7<br/>and terminated at transition to 8"}, _204766{content:"yourcar,7-9,westward", end:7, group:"location/3", id:31, start:6, subgroup:"yourcar", title:"Fluent location(yourcar,7-9,westward) initiated at 6<br/>and terminated at transition to 7"}, _204892{content:"yourcar,8-9,westward", end:6, group:"location/3", id:32, start:5, subgroup:"yourcar", title:"Fluent location(yourcar,8-9,westward) initiated at 5<br/>and terminated at transition to 6"}, _205018{content:"yourcar,9-9,westward", end:5, group:"location/3", id:33, start:1, subgroup:"yourcar", title:"Fluent location(yourcar,9-9,westward) initiated at 1<br/>and terminated at transition to 5"}, _205144{content:"destination(mycar,9-9)", group:"event", id:34, start:3, style:"color:#E19735", title:"happens(destination(mycar,9-9),2,3)", type:"point"}, _205270{content:"destination(yourcar,2-1)", group:"event", id:35, start:4, style:"color:#E19735", title:"happens(destination(yourcar,2-1),3,4)", type:"point"}, _205396{content:"step(mycar)", group:"action", id:36, start:4, style:"color:green", title:"happens(step(mycar),3,4)", type:"point"}, _205522{content:"step(mycar)", group:"action", id:37, start:5, style:"color:green", title:"happens(step(mycar),4,5)", type:"point"}, _205648{content:"step(yourcar)", group:"action", id:38, start:5, style:"color:green", title:"happens(step(yourcar),4,5)", type:"point"}, _205774{content:"step(yourcar)", group:"action", id:39, start:6, style:"color:green", title:"happens(step(yourcar),5,6)", type:"point"}, _205900{content:"step(mycar)", group:"action", id:40, start:6, style:"color:green", title:"happens(step(mycar),5,6)", type:"point"}, _206026{content:"step(mycar)", group:"action", id:41, start:7, style:"color:green", title:"happens(step(mycar),6,7)", type:"point"}, _206152{content:"step(yourcar)", group:"action", id:42, start:7, style:"color:green", title:"happens(step(yourcar),6,7)", type:"point"}, _206278{content:"step(yourcar)", group:"action", id:43, start:8, style:"color:green", title:"happens(step(yourcar),7,8)", type:"point"}, _206404{content:"step(mycar)", group:"action", id:44, start:8, style:"color:green", title:"happens(step(mycar),7,8)", type:"point"}, _206530{content:"step(mycar)", group:"action", id:45, start:9, style:"color:green", title:"happens(step(mycar),8,9)", type:"point"}, _206656{content:"step(yourcar)", group:"action", id:46, start:9, style:"color:green", title:"happens(step(yourcar),8,9)", type:"point"}, _206782{content:"step(yourcar)", group:"action", id:47, start:10, style:"color:green", title:"happens(step(yourcar),9,10)", type:"point"}, _206908{content:"step(mycar)", group:"action", id:48, start:10, style:"color:green", title:"happens(step(mycar),9,10)", type:"point"}, _207034{content:"step(mycar)", group:"action", id:49, start:11, style:"color:green", title:"happens(step(mycar),10,11)", type:"point"}, _207160{content:"step(yourcar)", group:"action", id:50, start:11, style:"color:green", title:"happens(step(yourcar),10,11)", type:"point"}, _207286{content:"turn(yourcar,southward)", group:"action", id:51, start:12, style:"color:green", title:"happens(turn(yourcar,southward),11,12)", type:"point"}, _207412{content:"turn(mycar,eastward)", group:"action", id:52, start:12, style:"color:green", title:"happens(turn(mycar,eastward),11,12)", type:"point"}, _207538{content:"step(mycar)", group:"action", id:53, start:13, style:"color:green", title:"happens(step(mycar),12,13)", type:"point"}, _207664{content:"step(yourcar)", group:"action", id:54, start:13, style:"color:green", title:"happens(step(yourcar),12,13)", type:"point"}, _207790{content:"step(yourcar)", group:"action", id:55, start:14, style:"color:green", title:"happens(step(yourcar),13,14)", type:"point"}, _207916{content:"step(mycar)", group:"action", id:56, start:14, style:"color:green", title:"happens(step(mycar),13,14)", type:"point"}, _208042{content:"step(mycar)", group:"action", id:57, start:15, style:"color:green", title:"happens(step(mycar),14,15)", type:"point"}, _208168{content:"step(yourcar)", group:"action", id:58, start:15, style:"color:green", title:"happens(step(yourcar),14,15)", type:"point"}, _208294{content:"step(yourcar)", group:"action", id:59, start:16, style:"color:green", title:"happens(step(yourcar),15,16)", type:"point"}, _208420{content:"step(mycar)", group:"action", id:60, start:16, style:"color:green", title:"happens(step(mycar),15,16)", type:"point"}, _208546{content:"step(mycar)", group:"action", id:61, start:17, style:"color:green", title:"happens(step(mycar),16,17)", type:"point"}, _208672{content:"step(yourcar)", group:"action", id:62, start:17, style:"color:green", title:"happens(step(yourcar),16,17)", type:"point"}, _208798{content:"step(yourcar)", group:"action", id:63, start:18, style:"color:green", title:"happens(step(yourcar),17,18)", type:"point"}, _208924{content:"step(mycar)", group:"action", id:64, start:18, style:"color:green", title:"happens(step(mycar),17,18)", type:"point"}, _209050{content:"step(mycar)", group:"action", id:65, start:19, style:"color:green", title:"happens(step(mycar),18,19)", type:"point"}, _209176{content:"step(yourcar)", group:"action", id:66, start:19, style:"color:green", title:"happens(step(yourcar),18,19)", type:"point"}, _209302{content:"step(yourcar)", group:"action", id:67, start:20, style:"color:green", title:"happens(step(yourcar),19,20)", type:"point"}]}, _326008{cycles:[[_320404{create:[_313182{fillColor:"yellow", from:[10, 10], id:"timeless", to:[20, 20], type:"rectangle"}, _313300{fillColor:"yellow", from:[10, 20], id:"timeless", to:[20, 30], type:"rectangle"}, _313418{fillColor:"yellow", from:[10, 30], id:"timeless", to:[20, 40], type:"rectangle"}, _313536{fillColor:"yellow", from:[10, 40], id:"timeless", to:[20, 50], type:"rectangle"}, _313654{fillColor:"yellow", from:[10, 50], id:"timeless", to:[20, 60], type:"rectangle"}, _313772{fillColor:"yellow", from:[10, 60], id:"timeless", to:[20, 70], type:"rectangle"}, _313890{fillColor:"yellow", from:[10, 70], id:"timeless", to:[20, 80], type:"rectangle"}, _314008{fillColor:"yellow", from:[10, 80], id:"timeless", to:[20, 90], type:"rectangle"}, _314126{fillColor:"yellow", from:[10, 90], id:"timeless", to:[20, 100], type:"rectangle"}, _314244{fillColor:"yellow", from:[10, 100], id:"timeless", to:[20, 110], type:"rectangle"}, _314362{fillColor:"yellow", from:[20, 100], id:"timeless", to:[30, 110], type:"rectangle"}, _314480{fillColor:"yellow", from:[30, 10], id:"timeless", to:[40, 20], type:"rectangle"}, _314598{fillColor:"yellow", from:[30, 20], id:"timeless", to:[40, 30], type:"rectangle"}, _314716{fillColor:"yellow", from:[30, 30], id:"timeless", to:[40, 40], type:"rectangle"}, _314834{fillColor:"yellow", from:[30, 40], id:"timeless", to:[40, 50], type:"rectangle"}, _314952{fillColor:"yellow", from:[30, 60], id:"timeless", to:[40, 70], type:"rectangle"}, _315070{fillColor:"yellow", from:[30, 70], id:"timeless", to:[40, 80], type:"rectangle"}, _315188{fillColor:"yellow", from:[30, 80], id:"timeless", to:[40, 90], type:"rectangle"}, _315306{fillColor:"yellow", from:[30, 100], id:"timeless", to:[40, 110], type:"rectangle"}, _315424{fillColor:"yellow", from:[40, 10], id:"timeless", to:[50, 20], type:"rectangle"}, _315542{fillColor:"yellow", from:[40, 20], id:"timeless", to:[50, 30], type:"rectangle"}, _315660{fillColor:"yellow", from:[40, 30], id:"timeless", to:[50, 40], type:"rectangle"}, _315778{fillColor:"yellow", from:[40, 40], id:"timeless", to:[50, 50], type:"rectangle"}, _315896{fillColor:"yellow", from:[40, 60], id:"timeless", to:[50, 70], type:"rectangle"}, _316014{fillColor:"yellow", from:[40, 70], id:"timeless", to:[50, 80], type:"rectangle"}, _316132{fillColor:"yellow", from:[40, 80], id:"timeless", to:[50, 90], type:"rectangle"}, _316250{fillColor:"yellow", from:[40, 100], id:"timeless", to:[50, 110], type:"rectangle"}, _316368{fillColor:"yellow", from:[50, 10], id:"timeless", to:[60, 20], type:"rectangle"}, _316486{fillColor:"yellow", from:[50, 20], id:"timeless", to:[60, 30], type:"rectangle"}, _316604{fillColor:"yellow", from:[50, 30], id:"timeless", to:[60, 40], type:"rectangle"}, _316722{fillColor:"yellow", from:[50, 40], id:"timeless", to:[60, 50], type:"rectangle"}, _316840{fillColor:"yellow", from:[50, 60], id:"timeless", to:[60, 70], type:"rectangle"}, _316958{fillColor:"yellow", from:[50, 70], id:"timeless", to:[60, 80], type:"rectangle"}, _317076{fillColor:"yellow", from:[50, 80], id:"timeless", to:[60, 90], type:"rectangle"}, _317194{fillColor:"yellow", from:[50, 100], id:"timeless", to:[60, 110], type:"rectangle"}, _317312{fillColor:"yellow", from:[60, 100], id:"timeless", to:[70, 110], type:"rectangle"}, _317430{fillColor:"yellow", from:[70, 10], id:"timeless", to:[80, 20], type:"rectangle"}, _317548{fillColor:"yellow", from:[70, 20], id:"timeless", to:[80, 30], type:"rectangle"}, _317666{fillColor:"yellow", from:[70, 30], id:"timeless", to:[80, 40], type:"rectangle"}, _317784{fillColor:"yellow", from:[70, 40], id:"timeless", to:[80, 50], type:"rectangle"}, _317902{fillColor:"yellow", from:[70, 60], id:"timeless", to:[80, 70], type:"rectangle"}, _318020{fillColor:"yellow", from:[70, 70], id:"timeless", to:[80, 80], type:"rectangle"}, _318138{fillColor:"yellow", from:[70, 80], id:"timeless", to:[80, 90], type:"rectangle"}, _318256{fillColor:"yellow", from:[70, 100], id:"timeless", to:[80, 110], type:"rectangle"}, _318374{fillColor:"yellow", from:[80, 100], id:"timeless", to:[90, 110], type:"rectangle"}, _318492{fillColor:"yellow", from:[90, 10], id:"timeless", to:[100, 20], type:"rectangle"}, _318610{fillColor:"yellow", from:[90, 20], id:"timeless", to:[100, 30], type:"rectangle"}, _318728{fillColor:"yellow", from:[90, 30], id:"timeless", to:[100, 40], type:"rectangle"}, _318846{fillColor:"yellow", from:[90, 40], id:"timeless", to:[100, 50], type:"rectangle"}, _318964{fillColor:"yellow", from:[90, 60], id:"timeless", to:[100, 70], type:"rectangle"}, _319082{fillColor:"yellow", from:[90, 70], id:"timeless", to:[100, 80], type:"rectangle"}, _319200{fillColor:"yellow", from:[90, 80], id:"timeless", to:[100, 90], type:"rectangle"}, _319318{fillColor:"yellow", from:[90, 100], id:"timeless", to:[100, 110], type:"rectangle"}, _319436{fillColor:"yellow", from:[100, 10], id:"timeless", to:[110, 20], type:"rectangle"}, _319554{fillColor:"yellow", from:[100, 20], id:"timeless", to:[110, 30], type:"rectangle"}, _319672{fillColor:"yellow", from:[100, 30], id:"timeless", to:[110, 40], type:"rectangle"}, _319790{fillColor:"yellow", from:[100, 40], id:"timeless", to:[110, 50], type:"rectangle"}, _319908{fillColor:"yellow", from:[100, 60], id:"timeless", to:[110, 70], type:"rectangle"}, _320026{fillColor:"yellow", from:[100, 70], id:"timeless", to:[110, 80], type:"rectangle"}, _320144{fillColor:"yellow", from:[100, 80], id:"timeless", to:[110, 90], type:"rectangle"}, _320262{fillColor:"yellow", from:[100, 90], id:"timeless", to:[110, 100], type:"rectangle"}, _320380{fillColor:"yellow", from:[100, 100], id:"timeless", to:[110, 110], type:"rectangle"}]}], [_320540{create:_320516{center:[25, 15], fillColor:"blue", id:"location(mycar,2-1,northward)", radius:5, type:"circle"}}, _320670{create:_320646{center:[95, 95], fillColor:"red", id:"location(yourcar,9-9,westward)", radius:5, type:"circle"}}], [], [], [_320818{create:_320794{center:[25, 25], fillColor:"blue", id:"location(mycar,2-2,northward)", radius:5, type:"circle"}}, _320848{kill:"location(mycar,2-1,northward)"}], [_320984{create:_320960{center:[25, 35], fillColor:"blue", id:"location(mycar,2-3,northward)", radius:5, type:"circle"}}, _321114{create:_321090{center:[85, 95], fillColor:"red", id:"location(yourcar,8-9,westward)", radius:5, type:"circle"}}, _321144{kill:"location(mycar,2-2,northward)"}, _321174{kill:"location(yourcar,9-9,westward)"}], [_321310{create:_321286{center:[25, 45], fillColor:"blue", id:"location(mycar,2-4,northward)", radius:5, type:"circle"}}, _321440{create:_321416{center:[75, 95], fillColor:"red", id:"location(yourcar,7-9,westward)", radius:5, type:"circle"}}, _321470{kill:"location(mycar,2-3,northward)"}, _321500{kill:"location(yourcar,8-9,westward)"}], [_321636{create:_321612{center:[25, 55], fillColor:"blue", id:"location(mycar,2-5,northward)", radius:5, type:"circle"}}, _321766{create:_321742{center:[65, 95], fillColor:"red", id:"location(yourcar,6-9,westward)", radius:5, type:"circle"}}, _321796{kill:"location(mycar,2-4,northward)"}, _321826{kill:"location(yourcar,7-9,westward)"}], [_321962{create:_321938{center:[25, 65], fillColor:"blue", id:"location(mycar,2-6,northward)", radius:5, type:"circle"}}, _322092{create:_322068{center:[55, 95], fillColor:"red", id:"location(yourcar,5-9,westward)", radius:5, type:"circle"}}, _322122{kill:"location(mycar,2-5,northward)"}, _322152{kill:"location(yourcar,6-9,westward)"}], [_322288{create:_322264{center:[25, 75], fillColor:"blue", id:"location(mycar,2-7,northward)", radius:5, type:"circle"}}, _322418{create:_322394{center:[45, 95], fillColor:"red", id:"location(yourcar,4-9,westward)", radius:5, type:"circle"}}, _322448{kill:"location(mycar,2-6,northward)"}, _322478{kill:"location(yourcar,5-9,westward)"}], [_322614{create:_322590{center:[25, 85], fillColor:"blue", id:"location(mycar,2-8,northward)", radius:5, type:"circle"}}, _322744{create:_322720{center:[35, 95], fillColor:"red", id:"location(yourcar,3-9,westward)", radius:5, type:"circle"}}, _322774{kill:"location(mycar,2-7,northward)"}, _322804{kill:"location(yourcar,4-9,westward)"}], [_322940{create:_322916{center:[25, 95], fillColor:"blue", id:"location(mycar,2-9,northward)", radius:5, type:"circle"}}, _323070{create:_323046{center:[25, 95], fillColor:"red", id:"location(yourcar,2-9,westward)", radius:5, type:"circle"}}, _323100{kill:"location(mycar,2-8,northward)"}, _323130{kill:"location(yourcar,3-9,westward)"}], [_323266{create:_323242{center:[25, 95], fillColor:"blue", id:"location(mycar,2-9,eastward)", radius:5, type:"circle"}}, _323396{create:_323372{center:[25, 95], fillColor:"red", id:"location(yourcar,2-9,southward)", radius:5, type:"circle"}}, _323426{kill:"location(mycar,2-9,northward)"}, _323456{kill:"location(yourcar,2-9,westward)"}], [_323592{create:_323568{center:[35, 95], fillColor:"blue", id:"location(mycar,3-9,eastward)", radius:5, type:"circle"}}, _323722{create:_323698{center:[25, 85], fillColor:"red", id:"location(yourcar,2-8,southward)", radius:5, type:"circle"}}, _323752{kill:"location(mycar,2-9,eastward)"}, _323782{kill:"location(yourcar,2-9,southward)"}], [_323918{create:_323894{center:[45, 95], fillColor:"blue", id:"location(mycar,4-9,eastward)", radius:5, type:"circle"}}, _324048{create:_324024{center:[25, 75], fillColor:"red", id:"location(yourcar,2-7,southward)", radius:5, type:"circle"}}, _324078{kill:"location(mycar,3-9,eastward)"}, _324108{kill:"location(yourcar,2-8,southward)"}], [_324244{create:_324220{center:[55, 95], fillColor:"blue", id:"location(mycar,5-9,eastward)", radius:5, type:"circle"}}, _324374{create:_324350{center:[25, 65], fillColor:"red", id:"location(yourcar,2-6,southward)", radius:5, type:"circle"}}, _324404{kill:"location(mycar,4-9,eastward)"}, _324434{kill:"location(yourcar,2-7,southward)"}], [_324570{create:_324546{center:[65, 95], fillColor:"blue", id:"location(mycar,6-9,eastward)", radius:5, type:"circle"}}, _324700{create:_324676{center:[25, 55], fillColor:"red", id:"location(yourcar,2-5,southward)", radius:5, type:"circle"}}, _324730{kill:"location(mycar,5-9,eastward)"}, _324760{kill:"location(yourcar,2-6,southward)"}], [_324896{create:_324872{center:[75, 95], fillColor:"blue", id:"location(mycar,7-9,eastward)", radius:5, type:"circle"}}, _325026{create:_325002{center:[25, 45], fillColor:"red", id:"location(yourcar,2-4,southward)", radius:5, type:"circle"}}, _325056{kill:"location(mycar,6-9,eastward)"}, _325086{kill:"location(yourcar,2-5,southward)"}], [_325222{create:_325198{center:[85, 95], fillColor:"blue", id:"location(mycar,8-9,eastward)", radius:5, type:"circle"}}, _325352{create:_325328{center:[25, 35], fillColor:"red", id:"location(yourcar,2-3,southward)", radius:5, type:"circle"}}, _325382{kill:"location(mycar,7-9,eastward)"}, _325412{kill:"location(yourcar,2-4,southward)"}], [_325548{create:_325524{center:[95, 95], fillColor:"blue", id:"location(mycar,9-9,eastward)", radius:5, type:"circle"}}, _325678{create:_325654{center:[25, 25], fillColor:"red", id:"location(yourcar,2-2,southward)", radius:5, type:"circle"}}, _325708{kill:"location(mycar,8-9,eastward)"}, _325738{kill:"location(yourcar,2-3,southward)"}], [_325874{create:_325850{center:[25, 15], fillColor:"red", id:"location(yourcar,2-1,southward)", radius:5, type:"circle"}}, _325904{kill:"location(yourcar,2-2,southward)"}], [_325940{kill:"location(mycar,9-9,eastward)"}, _325970{kill:"location(yourcar,2-1,southward)"}, _326000{kill:"timeless"}]]})). 1246% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'semantic_graphs.pl')). 1247% run_lps_corner_file1(/.../(lps_user_examples, 'semantic_graphs.pl')). 1248% /pack/logicmoo_ec/test/lps_user_examples/semantic_graphs.pl:1 1249% push_lps_dialect. 1250% ops. 1251% [ti=user, load= /.../(lps_user_examples, 'semantic_graphs.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'semantic_graphs.pl'), lps= /.../(lps_user_examples, 'semantic_graphs.pl'), using= /.../(lps_user_examples, 'semantic_graphs.pl')]. 1252% continue_lps_dialect. 1253% ops. 1254% /pack/logicmoo_ec/test/lps_user_examples/semantic_graphs.pl:17 1255% pop_lps_dialect('$BLOB'("<stream>(0x562ef33a9400)"), (/.../(lps_user_examples, 'semantic_graphs.pl')-> /.../(lps_user_examples, 'semantic_graphs.pl'))). 1256% ops. 1257% :-listing('/pack/logicmoo_ec/test/lps_user_examples/semantic_graphs.pl':_104690). 1258 1259 1260lf_graph(LogicalForm, dot(digraph(Edges))) :- 1261 findall(edge((From->To), [label=Relation]), 1262 ( member(P, LogicalForm), 1263 P=..[Relation, From_, To_], 1264 term_string(From_, From), 1265 term_string(To_, To) 1266 ), 1267 Edges). 1268 1269:- dynamic'swish renderer'/2. 1270 1271'swish renderer'(graphviz, []). 1272 1273:- dynamic actions/1. 1274:- multifile actions/1. 1275 1276% dB(/.../(lps_user_examples, 'semantic_graphs.pl'), lps_visualization(_44390{groups:[], items:[]}, [])). 1277% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl')). 1278% run_lps_corner_file1(/.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl')). 1279% /pack/logicmoo_ec/test/lps_user_examples/Simpified contaminated doesn't work.pl:1 1280% push_lps_dialect. 1281% ops. 1282% [ti=user, load= /.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl'), lps= /.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl'), using= /.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl')]. 1283% continue_lps_dialect. 1284% ops. 1285 1286% LPS: fluents((contaminated/3,infected/3,met/3,tested/3)). 1287% Into: fluents([contaminated(_21328,_21330,_21332),infected(_21342,_21344,_21346),met(_21356,_21358,_21360),tested(_21370,_21372,_21374)]). 1288 1289% LPS: events((test(_21226,_21228,_21230),meets(_21226,_21300,_21230))). 1290% Into: events([test(_21226,_21228,_21230),meets(_21226,_21300,_21230)]). 1291 1292% LPS: actions(notify/3). 1293% Into: actions([notify(_23482,_23484,_23486)]). 1294 1295% LPS: initiates(meets(_23498,_23500,_23502),met(_23498,_23500,_23502)). 1296% Into: initiated(happens(meets(_23498,_23500,_23502),_24722,_24728),met(_23498,_23500,_23502),[]). 1297 1298% LPS: initiates(meets(_24678,_24680,_24682),met(_24680,_24678,_24682)). 1299% Into: initiated(happens(meets(_24678,_24680,_24682),_25902,_25908),met(_24680,_24678,_24682),[]). 1300 1301% LPS: initiates(test(_25858,_25860,_25862),tested(_25858,_25860,_25862)). 1302% Into: initiated(happens(test(_25858,_25860,_25862),_27082,_27088),tested(_25858,_25860,_25862),[]). 1303 1304% LPS: if(contaminated(_27082,_27084,_27086),(tested(_27082,positive,_27158),two_week_after(_27158,_27086),five_days_before(_27084,_27158))). 1305% Into: l_int(holds(contaminated(_27082,_27084,_27086),_28428),[holds(tested(_27082,positive,_27158),_28428),two_week_after(_27158,_27086),five_days_before(_27084,_27158)]). 1306 1307% LPS: if(contaminated(_29640,_29642,_29644),(met(_29640,_29714,_29642),contaminated(_29714,_29786,_29788),within(_29786,_29642,_29788),five_days_after(_29642,_29916),two_week_after(_29642,_29644))). 1308% Into: l_int(holds(contaminated(_29640,_29642,_29644),_31258),[holds(met(_29640,_29714,_29642),_31258),holds(contaminated(_29714,_29786,_29788),_31258),within(_29786,_29642,_29788),five_days_after(_29642,_29916),two_week_after(_29642,_29644)]). 1309 1310% LPS: observe(from(meets(gertrude,alice,date(2020,3,15,0,0,0,0,'UTC',-)),to(2,3))). 1311% Into: observe([meets(gertrude,alice,date(2020,3,15,0,0,0,0,'UTC',-))],3). 1312 1313% LPS: observe(from(test(alice,positive,date(2020,3,14,0,0,0,0,'UTC',-)),to(4,5))). 1314% Into: observe([test(alice,positive,date(2020,3,14,0,0,0,0,'UTC',-))],5). 1315% /pack/logicmoo_ec/test/lps_user_examples/Simpified contaminated doesn't work.pl:109 1316% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca4f00)"), (/.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl')-> /.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl'))). 1317% ops. 1318% :-listing('/pack/logicmoo_ec/test/lps_user_examples/Simpified contaminated doesn\'t work.pl':_59124). 1319 1320 1321initiated(happens(meets(A, B, C), _, _), met(A, B, C), []). 1322initiated(happens(meets(A, B, C), _, _), met(B, A, C), []). 1323initiated(happens(test(A, B, C), _, _), tested(A, B, C), []). 1324 1325fluents([contaminated(_, _, _), infected(_, _, _), met(_, _, _), tested(_, _, _)]). 1326 1327l_int(holds(contaminated(A, B, C), D), [holds(tested(A, positive, E), D), two_week_after(E, C), five_days_before(B, E)]). 1328l_int(holds(contaminated(A, B, C), D), [holds(met(A, E, B), D), holds(contaminated(E, F, G), D), within(F, B, G), five_days_after(B, _), two_week_after(B, C)]). 1329 1330two_week_after(date(Y, M, D, H, Mn, S, Off, TZ, DST), Date2) :- 1331 nonvar(D), 1332 NewD is D+15, 1333 date_time_stamp(date(Y, 1334 M, 1335 NewD, 1336 H, 1337 Mn, 1338 S, 1339 Off, 1340 TZ, 1341 DST), 1342 Stamp), 1343 stamp_date_time(Stamp, Date2, 0). 1344two_week_after(Date2, date(Y, M, D, H, Mn, S, Off, TZ, DST)) :- 1345 nonvar(D), 1346 NewD is D+ -15, 1347 date_time_stamp(date(Y, 1348 M, 1349 NewD, 1350 H, 1351 Mn, 1352 S, 1353 Off, 1354 TZ, 1355 DST), 1356 Stamp), 1357 stamp_date_time(Stamp, Date2, 0). 1358 1359within(Date1, T, Date2) :- 1360 nonvar(Date1), 1361 nonvar(Date2), 1362 nonvar(T), 1363 date_time_stamp(Date1, Stamp1), 1364 date_time_stamp(Date2, Stamp2), 1365 date_time_stamp(T, Stamp3), 1366 Stamp1=<Stamp3, 1367 Stamp3=<Stamp2. 1368 1369maxtime(20). 1370 1371five_days_before(date(Y, M, D, H, Mn, S, Off, TZ, DST), Date2) :- 1372 nonvar(D), 1373 NewD is D+5, 1374 date_time_stamp(date(Y, 1375 M, 1376 NewD, 1377 H, 1378 Mn, 1379 S, 1380 Off, 1381 TZ, 1382 DST), 1383 Stamp), 1384 stamp_date_time(Stamp, Date2, 0). 1385five_days_before(Date2, date(Y, M, D, H, Mn, S, Off, TZ, DST)) :- 1386 nonvar(D), 1387 NewD is D+ -5, 1388 date_time_stamp(date(Y, 1389 M, 1390 NewD, 1391 H, 1392 Mn, 1393 S, 1394 Off, 1395 TZ, 1396 DST), 1397 Stamp), 1398 stamp_date_time(Stamp, Date2, 0). 1399 1400:- dynamic actions/1. 1401:- multifile actions/1. 1402 1403actions([notify(_, _, _)]). 1404 1405five_days_after(date(Y, M, D, H, Mn, S, Off, TZ, DST), Date2) :- 1406 nonvar(D), 1407 NewD is D+5, 1408 date_time_stamp(date(Y, 1409 M, 1410 NewD, 1411 H, 1412 Mn, 1413 S, 1414 Off, 1415 TZ, 1416 DST), 1417 Stamp), 1418 stamp_date_time(Stamp, Date2, 0). 1419five_days_after(Date2, date(Y, M, D, H, Mn, S, Off, TZ, DST)) :- 1420 nonvar(D), 1421 NewD is D+ -5, 1422 date_time_stamp(date(Y, 1423 M, 1424 NewD, 1425 H, 1426 Mn, 1427 S, 1428 Off, 1429 TZ, 1430 DST), 1431 Stamp), 1432 stamp_date_time(Stamp, Date2, 0). 1433 1434events([test(A, _, B), meets(A, _, B)]). 1435 1436observe([meets(gertrude, alice, date(2020, 3, 15, 0, 0, 0, 0, 'UTC', -))], 3). 1437observe([test(alice, positive, date(2020, 3, 14, 0, 0, 0, 0, 'UTC', -))], 5). 1438% dB(/.../(lps_user_examples, 'Simpified contaminated doesn\'t work.pl'), lps_visualization(_71492{groups:[_70678{content:"Events", id:"event", order:1}, _70752{content:"met(A,B,C)", id:"met/3", order:3, subgroupStack:"false"}, _70830{content:"tested(A,B,C)", id:"tested/3", order:3, subgroupStack:"false"}], items:[_70956{content:"alice,gertrude,date(2020,3,15,0,0,0,0,UTC,-)", end:21, group:"met/3", id:0, start:3, subgroup:"alice", title:"Fluent met(alice,gertrude,date(2020,3,15,0,0,0,0,UTC,-)) initiated at 3<br/>and terminated at transition to 21"}, _71082{content:"gertrude,alice,date(2020,3,15,0,0,0,0,UTC,-)", end:21, group:"met/3", id:1, start:3, subgroup:"gertrude", title:"Fluent met(gertrude,alice,date(2020,3,15,0,0,0,0,UTC,-)) initiated at 3<br/>and terminated at transition to 21"}, _71208{content:"alice,positive,date(2020,3,14,0,0,0,0,UTC,-)", end:21, group:"tested/3", id:2, start:5, subgroup:"alice", title:"Fluent tested(alice,positive,date(2020,3,14,0,0,0,0,UTC,-)) initiated at 5<br/>and terminated at transition to 21"}, _71334{content:"meets(gertrude,alice,date(2020,3,15,0,0,0,0,UTC,-))", group:"event", id:3, start:3, style:"color:#E19735", title:"happens(meets(gertrude,alice,date(2020,3,15,0,0,0,0,UTC,-)),2,3)", type:"point"}, _71460{content:"test(alice,positive,date(2020,3,14,0,0,0,0,UTC,-))", group:"event", id:4, start:5, style:"color:#E19735", title:"happens(test(alice,positive,date(2020,3,14,0,0,0,0,UTC,-)),4,5)", type:"point"}]}, [])). 1439% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'simple conveyor.pl')). 1440% run_lps_corner_file1(/.../(lps_user_examples, 'simple conveyor.pl')). 1441% /pack/logicmoo_ec/test/lps_user_examples/simple conveyor.pl:1 1442% push_lps_dialect. 1443% ops. 1444% [ti=user, load= /.../(lps_user_examples, 'simple conveyor.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'simple conveyor.pl'), lps= /.../(lps_user_examples, 'simple conveyor.pl'), using= /.../(lps_user_examples, 'simple conveyor.pl')]. 1445% continue_lps_dialect. 1446% ops. 1447 1448% LPS: fluents((pouring(_55194),contents(_55194,_55250),location(_55304,_55306),moving(_55346))). 1449% Into: fluents([pouring(_55194),contents(_55194,_55250),location(_55304,_55306),moving(_55346)]). 1450 1451% LPS: initially((contents(bottle,0),contents(container,0),contents(tank1,100),contents(tank2,100),contents(heaven,1000),location(bottle,160),location(tank1,160),location(tank2,240),location(container,400))). 1452% Into: initial_state([contents(bottle,0),contents(container,0),contents(tank1,100),contents(tank2,100),contents(heaven,1000),location(bottle,160),location(tank1,160),location(tank2,240),location(container,400)]). 1453 1454% LPS: actions((openValve(_58406),closeValve(_58406),pourChunk(_58500,_58502),startConveyor(_58542),stopConveyor,turnConveyor/1)). 1455% Into: actions([openValve(_58406),closeValve(_58406),pourChunk(_58500,_58502),startConveyor(_58542),stopConveyor,turnConveyor(_60084)]). 1456 1457% LPS: false((closeValve(_59980),not(pouring(_59980)))). 1458% Into: d_pre([happens(closeValve(_59980),_61108,_61114),holds(not(pouring(_59980)),_61108)]). 1459 1460% LPS: if(from(makeLocation(bottle,_61720),to(_61756,_61756)),(at(location(bottle,_61872),_61756),at(location(_61720,_61872),_61756))). 1461% Into: l_events(happens(makeLocation(bottle,_61720),_61756,_61756),[holds(location(bottle,_61872),_61756),holds(location(_61720,_61872),_61756)]). 1462 1463% LPS: if(from(makeLocation(bottle,_63776),to(_63812,_63814)),(at(location(bottle,_63928),_63812),at(location(_63776,_64032),_63812),_64164 is _64032-_63928,stopPlace(_64164,_64032,_64264),from(startConveyor(_64164),_63812),at(location(bottle,_64264),_64430),at(moving(_64164),_64430),from(stopConveyor,to(_64430,_63814)))). 1464% Into: l_events(happens(makeLocation(bottle,_63776),_63812,_63814),[holds(location(bottle,_63928),_63812),holds(location(_63776,_64032),_63812),_64164 is _64032-_63928,stopPlace(_64164,_64032,_64264),happens(startConveyor(_64164),_63812,_66910),holds(location(bottle,_64264),_64430),holds(moving(_64164),_64430),happens(stopConveyor,_64430,_63814)]). 1465 1466% LPS: initiates(startConveyor(_70524),moving(_70524)). 1467% Into: initiated(happens(startConveyor(_70524),_71672,_71678),moving(_70524),[]). 1468 1469% LPS: terminates(stopConveyor,moving(_71624)). 1470% Into: terminated(happens(stopConveyor,_72712,_72718),moving(_71624),[]). 1471 1472% LPS: then(if((at(moving(_72660),_72682),_72660>0)),from(turnConveyor(clockwise),_72682)). 1473% Into: reactive_rule([holds(moving(_72660),_72682),_72660>0],[happens(turnConveyor(clockwise),_72682,_74514)]). 1474 1475% LPS: then(if((at(moving(_74560),_74582),_74560<0)),from(turnConveyor(counterClockwise),_74582)). 1476% Into: reactive_rule([holds(moving(_74560),_74582),_74560<0],[happens(turnConveyor(counterClockwise),_74582,_76410)]). 1477 1478% LPS: if(updates(turnConveyor(counterClockwise),in(to(_18990,_18992),location(bottle,_18990))),(conveyorSpeed(_19146),_18992 is _18990-_19146)). 1479% Into: updated(happens(turnConveyor(counterClockwise),_19724,_19730),location(bottle,_18990),_18990-_18992,[conveyorSpeed(_19146),_18992 is _18990-_19146]). 1480 1481% LPS: if(updates(turnConveyor(clockwise),in(to(_20206,_20208),location(bottle,_20206))),(conveyorSpeed(_20394),_20208 is _20206+_20394)). 1482% Into: updated(happens(turnConveyor(clockwise),_21776,_21782),location(bottle,_20206),_20206-_20208,[conveyorSpeed(_20394),_20208 is _20206+_20394]). 1483 1484% LPS: then(if((at(contents(bottle,0),_23710),at(location(tank1,_23792),_23710),at(location(bottle,_23792),_23710),at(not(pouring(_23992)),_23710))),(from(pour(tank1,bottle,50),to(_23710,_24294)),from(makeLocation(bottle,tank2),to(_24294,_24446)),from(pour(tank2,bottle,50),to(_24446,_24614)),from(makeLocation(bottle,container),to(_24614,_24766)),from(pour(bottle,container,100),to(_24766,_24934)),from(makeLocation(bottle,tank1),_24934))). 1485% Into: reactive_rule([holds(contents(bottle,0),_23710),holds(location(tank1,_23792),_23710),holds(location(bottle,_23792),_23710),holds(not(pouring(_23992)),_23710)],[happens(pour(tank1,bottle,50),_23710,_24294),happens(makeLocation(bottle,tank2),_24294,_24446),happens(pour(tank2,bottle,50),_24446,_24614),happens(makeLocation(bottle,container),_24614,_24766),happens(pour(bottle,container,100),_24766,_24934),happens(makeLocation(bottle,tank1),_24934,_27030)]). 1486 1487% LPS: if(from(pour(_26636,_26638,_26640),to(_26676,_26678)),(at(contents(_26638,_26792),_26676),at(contents(_26636,_26896),_26676),_26896>=_26640,_27092 is _26640+_26792,valveRate(_27160),_27244 is _27092-_27160,from(openValve(_26636),to(_26676,_27350)),at(contents(_26638,_27244),_27486),from(closeValve(_26636),to(_27486,_26678)))). 1488% Into: l_events(happens(pour(_26636,_26638,_26640),_26676,_26678),[holds(contents(_26638,_26792),_26676),holds(contents(_26636,_26896),_26676),_26896>=_26640,_27092 is _26640+_26792,valveRate(_27160),_27244 is _27092-_27160,happens(openValve(_26636),_26676,_27350),holds(contents(_26638,_27244),_27486),happens(closeValve(_26636),_27486,_26678)]). 1489 1490% LPS: initiates(openValve(_30496),pouring(_30496)). 1491% Into: initiated(happens(openValve(_30496),_31644,_31650),pouring(_30496),[]). 1492 1493% LPS: terminates(closeValve(_31580),pouring(_31580)). 1494% Into: terminated(happens(closeValve(_31580),_32728,_32734),pouring(_31580),[]). 1495 1496% LPS: then(if((at(pouring(_32672),_32694),at(location(_32672,_32776),_32694),at(location(_32878,_32776),_32694),_32878\=_32672)),from(pourChunk(_32672,_32878),to(_32694,_33206))). 1497% Into: reactive_rule([holds(pouring(_32672),_32694),holds(location(_32672,_32776),_32694),holds(location(_32878,_32776),_32694),_32878\=_32672],[happens(pourChunk(_32672,_32878),_32694,_33206)]). 1498 1499% LPS: if(updates(pourChunk(_35230,_35232),in(to(_35268,_35270),contents(_35232,_35268))),(valveRate(_35456),_35270 is _35268+_35456)). 1500% Into: updated(happens(pourChunk(_35230,_35232),_36854,_36860),contents(_35232,_35268),_35268-_35270,[valveRate(_35456),_35270 is _35268+_35456]). 1501 1502% LPS: if(updates(pourChunk(_37310,_37312),in(to(_37348,_37350),contents(_37310,_37348))),(valveRate(_37536),_37350 is _37348-_37536)). 1503% Into: updated(happens(pourChunk(_37310,_37312),_38934,_38940),contents(_37310,_37348),_37348-_37350,[valveRate(_37536),_37350 is _37348-_37536]). 1504 1505% LPS: if(at(locatedContents(_40878,_40880,_40882),_40904),(at(location(_40878,_40880),_40904),at(contents(_40878,_40882),_40904))). 1506% Into: l_int(holds(locatedContents(_40878,_40880,_40882),_40904),[holds(location(_40878,_40880),_40904),holds(contents(_40878,_40882),_40904)]). 1507% /pack/logicmoo_ec/test/lps_user_examples/simple conveyor.pl:180 1508% pop_lps_dialect('$BLOB'("<stream>(0x562ef33a9200)"), (/.../(lps_user_examples, 'simple conveyor.pl')-> /.../(lps_user_examples, 'simple conveyor.pl'))). 1509% ops. 1510% :-listing('/pack/logicmoo_ec/test/lps_user_examples/simple conveyor.pl':_61668). 1511 1512 1513initiated(happens(startConveyor(A), _, _), moving(A), []). 1514initiated(happens(openValve(A), _, _), pouring(A), []). 1515 1516d_pre([happens(closeValve(A), B, _), holds(not(pouring(A)), B)]). 1517 1518d(locatedContents(bottle, Pos, Level), [type:rectangle, fillColor:yellow, from:[X1, 60], to:[X2, Height]]) :- 1519 Height is 60+Level/4, 1520 X1 is Pos-10, 1521 X2 is Pos+10. 1522d(locatedContents(tank1, Pos, Level), [type:rectangle, fillColor:yellow, from:[130, 120], to:[190, Height]]) :- 1523 Height is 120+Level/4. 1524d(locatedContents(tank2, Pos, Level), [type:rectangle, fillColor:yellow, from:[210, 120], to:[270, Height]]) :- 1525 Height is 120+Level/4. 1526d(location(bottle, Pos), [type:rectangle, from:[X1, 60], to:[X2, 100], strokeColor:blue]) :- 1527 X1 is Pos-10, 1528 X2 is Pos+10. 1529d(timeless, [[type:line, strokeWidth:2, strokeColor:black, from:[100, 60], to:[400, 60]], [type:circle, strokeWidth:2, strokeColor:black, center:[100, 40], radius:20], [type:circle, strokeWidth:2, strokeColor:black, center:[400, 40], radius:20], [type:rectangle, fillColor:white, from:[130, 120], to:[190, 150], strokeColor:blue], [type:rectangle, fillColor:white, from:[210, 120], to:[270, 150], strokeColor:blue], [type:line, strokeWidth:2, strokeColor:black, from:[100, 20], to:[400, 20]]]). 1530 1531fluents([pouring(A), contents(A, _), location(_, _), moving(_)]). 1532 1533l_int(holds(locatedContents(A, B, C), D), [holds(location(A, B), D), holds(contents(A, C), D)]). 1534 1535terminated(happens(stopConveyor, _, _), moving(_), []). 1536terminated(happens(closeValve(A), _, _), pouring(A), []). 1537 1538stopPlace(Vector, Place2, Stop) :- 1539 conveyorSpeed(S), 1540 Vector>0, 1541 Stop is Place2-S. 1542stopPlace(Vector, Place2, Stop) :- 1543 conveyorSpeed(S), 1544 Vector<0, 1545 Stop is Place2+S. 1546 1547reactive_rule([holds(moving(A), B), A>0], [happens(turnConveyor(clockwise), B, _)]). 1548reactive_rule([holds(moving(A), B), A<0], [happens(turnConveyor(counterClockwise), B, _)]). 1549reactive_rule([holds(contents(bottle, 0), A), holds(location(tank1, B), A), holds(location(bottle, B), A), holds(not(pouring(_)), A)], [happens(pour(tank1, bottle, 50), A, C), happens(makeLocation(bottle, tank2), C, D), happens(pour(tank2, bottle, 50), D, E), happens(makeLocation(bottle, container), E, F), happens(pour(bottle, container, 100), F, G), happens(makeLocation(bottle, tank1), G, _)]). 1550reactive_rule([holds(pouring(A), B), holds(location(A, C), B), holds(location(D, C), B), D\=A], [happens(pourChunk(A, D), B, _)]). 1551 1552initial_state([contents(bottle, 0), contents(container, 0), contents(tank1, 100), contents(tank2, 100), contents(heaven, 1000), location(bottle, 160), location(tank1, 160), location(tank2, 240), location(container, 400)]). 1553 1554l_events(happens(makeLocation(bottle, A), B, B), [holds(location(bottle, C), B), holds(location(A, C), B)]). 1555l_events(happens(makeLocation(bottle, A), B, C), [holds(location(bottle, D), B), holds(location(A, E), B), F is E-D, stopPlace(F, E, G), happens(startConveyor(F), B, _), holds(location(bottle, G), H), holds(moving(F), H), happens(stopConveyor, H, C)]). 1556l_events(happens(pour(A, B, C), D, E), [holds(contents(B, F), D), holds(contents(A, G), D), G>=C, H is C+F, valveRate(I), J is H-I, happens(openValve(A), D, _), holds(contents(B, J), K), happens(closeValve(A), K, E)]). 1557 1558valveRate(10). 1559 1560:- dynamic actions/1. 1561:- multifile actions/1. 1562 1563actions([openValve(A), closeValve(A), pourChunk(_, _), startConveyor(_), stopConveyor, turnConveyor(_)]). 1564 1565updated(happens(turnConveyor(counterClockwise), _, _), location(bottle, A), A-B, [conveyorSpeed(C), B is A-C]). 1566updated(happens(turnConveyor(clockwise), _, _), location(bottle, A), A-B, [conveyorSpeed(C), B is A+C]). 1567updated(happens(pourChunk(_, A), _, _), contents(A, B), B-C, [valveRate(D), C is B+D]). 1568updated(happens(pourChunk(A, _), _, _), contents(A, B), B-C, [valveRate(D), C is B-D]). 1569 1570maxTime(160). 1571 1572conveyorSpeed(10). 1573PROGRAM FAILED 1574% dB(/.../(lps_user_examples, 'simple conveyor.pl'), lps_visualization(_68598{groups:[_54912{content:"contents(A,B)", id:"contents/2", order:3, subgroupStack:"false"}, _54938{content:"location(A,B)", id:"location/2", order:3, subgroupStack:"false"}, _54964{content:"moving(A)", id:"moving/1", order:3, subgroupStack:"false"}, _54990{content:"pouring(A)", id:"pouring/1", order:3, subgroupStack:"false"}, _55016{content:"Actions", id:"action", order:4}], items:[_55038{content:"-240", end:75, group:"moving/1", id:0, start:51, subgroup:"-240", title:"Fluent moving(-240) initiated at 51<br/>and terminated at transition to 75"}, _55076{content:"-240", end:149, group:"moving/1", id:1, start:125, subgroup:"-240", title:"Fluent moving(-240) initiated at 125<br/>and terminated at transition to 149"}, _55114{content:"80", end:16, group:"moving/1", id:2, start:8, subgroup:"80", title:"Fluent moving(80) initiated at 8<br/>and terminated at transition to 16"}, ...(_135804)]}, _134822{cycles:[[_117200{create:[_116526{from:[100, 60], id:"timeless", strokeColor:"black", strokeWidth:2, to:[400, 60], type:"line"}, _116648{center:[100, 40], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _116770{center:[400, 40], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _116904{fillColor:"white", from:[130, 120], id:"timeless", strokeColor:"blue", to:[190, 150], type:"rectangle"}, _117038{fillColor:"white", from:[210, 120], id:"timeless", strokeColor:"blue", to:[270, 150], type:"rectangle"}, _117172{from:[100, 20], id:"timeless", strokeColor:"black", strokeWidth:2, to:[400, 20], type:"line"}]}], [_117348{create:_117324{from:[150, 60], id:"location(bottle,160)", strokeColor:"blue", to:[170, 100], type:"rectangle"}}], [], ...(_137852)]})). 1575% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'simplified checkout.pl')). 1576% run_lps_corner_file1(/.../(lps_user_examples, 'simplified checkout.pl')). 1577% /pack/logicmoo_ec/test/lps_user_examples/simplified checkout.pl:1 1578% push_lps_dialect. 1579% ops. 1580% [ti=user, load= /.../(lps_user_examples, 'simplified checkout.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'simplified checkout.pl'), lps= /.../(lps_user_examples, 'simplified checkout.pl'), using= /.../(lps_user_examples, 'simplified checkout.pl')]. 1581% continue_lps_dialect. 1582% ops. 1583 1584% LPS: fluents(approved/1). 1585% Into: fluents([approved(_177492)]). 1586 1587% LPS: actions((enter/1,approve/1)). 1588% Into: actions([enter(_179684),approve(_179694)]). 1589 1590% LPS: initiates(approve(_179630),approved(_179630)). 1591% Into: initiated(happens(approve(_179630),_180786,_180792),approved(_179630),[]). 1592 1593% LPS: fluents(card/1). 1594% Into: fluents([card(_181778)]). 1595 1596% LPS: initially((card(1),card(2))). 1597% Into: initial_state([card(1),card(2)]). 1598 1599% LPS: then(if(true),(at(card(_183070),_183092),from(enter(_183070),_183092),at(approved(_183070),_183092+2))). 1600% Into: reactive_rule([],[holds(card(_183070),_183092),happens(enter(_183070),_183092,_185032),holds(approved(_183070),_183092+2)]). 1601 1602% LPS: false((enter(_185610),enter(_185650),_185610\=_185650)). 1603% Into: d_pre([happens(enter(_185610),_186822,_186828),happens(enter(_185650),_186822,_186828),_185610\=_185650]). 1604 1605% LPS: then(if(to(enter(2),_187376)),from(approve(2),_187376)). 1606% Into: reactive_rule([happens(enter(2),_188570,_187376)],[happens(approve(2),_187376,_188660)]). 1607% /pack/logicmoo_ec/test/lps_user_examples/simplified checkout.pl:35 1608% pop_lps_dialect('$BLOB'("<stream>(0x562ef4162c00)"), (/.../(lps_user_examples, 'simplified checkout.pl')-> /.../(lps_user_examples, 'simplified checkout.pl'))). 1609% ops. 1610% :-listing('/pack/logicmoo_ec/test/lps_user_examples/simplified checkout.pl':_196230). 1611 1612 1613initiated(happens(approve(A), _, _), approved(A), []). 1614 1615d_pre([happens(enter(A), B, C), happens(enter(D), B, C), A\=D]). 1616 1617fluents([approved(_)]). 1618fluents([card(_)]). 1619 1620reactive_rule([], [holds(card(A), B), happens(enter(A), B, _), holds(approved(A), B+2)]). 1621reactive_rule([happens(enter(2), _, A)], [happens(approve(2), A, _)]). 1622 1623initial_state([card(1), card(2)]). 1624 1625:- dynamic actions/1. 1626:- multifile actions/1. 1627 1628actions([enter(_), approve(_)]). 1629 1630maxTime(5). 1631% dB(/.../(lps_user_examples, 'simplified checkout.pl'), lps_visualization(_277266{groups:[_276416{content:"card(A)", id:"card/1", order:3, subgroupStack:"false"}, _276482{content:"Actions", id:"action", order:4}], items:[_276604{content:"1", end:6, group:"card/1", id:0, start:1, subgroup:"1", title:"Fluent card(1) initiated at 1<br/>and terminated at transition to 6"}, _276730{content:"2", end:6, group:"card/1", id:1, start:1, subgroup:"2", title:"Fluent card(2) initiated at 1<br/>and terminated at transition to 6"}, _276856{content:"enter(1)", group:"action", id:2, start:2, style:"color:green", title:"happens(enter(1),1,2)", type:"point"}, _276982{content:"enter(1)", group:"action", id:3, start:3, style:"color:green", title:"happens(enter(1),2,3)", type:"point"}, _277108{content:"enter(1)", group:"action", id:4, start:4, style:"color:green", title:"happens(enter(1),3,4)", type:"point"}, _277234{content:"enter(1)", group:"action", id:5, start:5, style:"color:green", title:"happens(enter(1),4,5)", type:"point"}]}, [])). 1632% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'Solomon and the two women.pl')). 1633% run_lps_corner_file1(/.../(lps_user_examples, 'Solomon and the two women.pl')). 1634% /pack/logicmoo_ec/test/lps_user_examples/Solomon and the two women.pl:1 1635% push_lps_dialect. 1636% ops. 1637% [ti=user, load= /.../(lps_user_examples, 'Solomon and the two women.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'Solomon and the two women.pl'), lps= /.../(lps_user_examples, 'Solomon and the two women.pl'), using= /.../(lps_user_examples, 'Solomon and the two women.pl')]. 1638% continue_lps_dialect. 1639% ops. 1640 1641% LPS: events((dispute_between(a,b),put_to_test(a,b),propose_drastic_output(agent),make_decision)). 1642% Into: events([dispute_between(a,b),put_to_test(a,b),propose_drastic_output(agent),make_decision]). 1643 1644% LPS: actions((propose_cut_baby(agent),says(agent,message),declares(agent,verdict),decide(agent,judgment))). 1645% Into: actions([propose_cut_baby(agent),says(agent,message),declares(agent,verdict),decide(agent,judgment)]). 1646 1647% LPS: observe(from(dispute_between(a,b),to(1,2))). 1648% Into: observe([dispute_between(a,b)],2). 1649 1650% LPS: then(if(from(dispute_between(_59676,_59678),to(_59714,_59716))),from(put_a_test(_59676,_59678),to(_59716,_59892))). 1651% Into: reactive_rule([happens(dispute_between(_59676,_59678),_59714,_59716)],[happens(put_a_test(_59676,_59678),_59716,_59892)]). 1652 1653% LPS: if(from(put_a_test(_61156,_61158),to(_61194,_61196)),from(proposes_nasty_idea(salomon),to(_61194,_61196))). 1654% Into: l_events(happens(put_a_test(_61156,_61158),_61194,_61196),[happens(proposes_nasty_idea(salomon),_61194,_61196)]). 1655 1656% LPS: if(from(proposes_nasty_idea(_62496),to(_62532,_62534)),from(propose_cut_baby(_62496),to(_62532,_62534))). 1657% Into: l_events(happens(proposes_nasty_idea(_62496),_62532,_62534),[happens(propose_cut_baby(_62496),_62532,_62534)]). 1658 1659% LPS: then(if((from(propose_cut_baby(salomon),to(_63922,_63924)),woman(_64022),i_am_your_mother(_64022))),from(says(_64022,'Dont kill him! Give it to Her'),to(_63924,_64244))). 1660% Into: reactive_rule([happens(propose_cut_baby(salomon),_63922,_63924),woman(_64022),i_am_your_mother(_64022)],[happens(says(_64022,'Dont kill him! Give it to Her'),_63924,_64244)]). 1661 1662% LPS: then(if((from(propose_cut_baby(salomon),to(_66468,_66470)),woman(_66568),not(i_am_your_mother(_66568)))),from(says(_66568,'Yes, kill him'),to(_66470,_66814))). 1663% Into: reactive_rule([happens(propose_cut_baby(salomon),_66468,_66470),woman(_66568),not(i_am_your_mother(_66568))],[happens(says(_66568,'Yes, kill him'),_66470,_66814)]). 1664 1665% LPS: then(if((from(propose_cut_baby(_69510),to(_69546,_69548)),from(says(_69660,'Dont kill him! Give it to Her'),to(_69698,_69700)),from(says(_69812,'Yes, kill him'),to(_69850,_69852)))),(from(declare(_69510,the_true_mother_is(_69660)),to(_70114,_70116)),from(decide(_69510,give_baby_to(_69660)),to(_70116,_70292)))). 1666% Into: reactive_rule([happens(propose_cut_baby(_69510),_69546,_69548),happens(says(_69660,'Dont kill him! Give it to Her'),_69698,_69700),happens(says(_69812,'Yes, kill him'),_69850,_69852)],[happens(declare(_69510,the_true_mother_is(_69660)),_70114,_70116),happens(decide(_69510,give_baby_to(_69660)),_70116,_70292)]). 1667% /pack/logicmoo_ec/test/lps_user_examples/Solomon and the two women.pl:81 1668% pop_lps_dialect('$BLOB'("<stream>(0x562ef33a9000)"), (/.../(lps_user_examples, 'Solomon and the two women.pl')-> /.../(lps_user_examples, 'Solomon and the two women.pl'))). 1669% ops. 1670% :-listing('/pack/logicmoo_ec/test/lps_user_examples/Solomon and the two women.pl':_83296). 1671 1672 1673woman(a). 1674woman(b). 1675 1676reactive_rule([happens(dispute_between(A, B), _, C)], [happens(put_a_test(A, B), C, _)]). 1677reactive_rule([happens(propose_cut_baby(salomon), _, A), woman(B), i_am_your_mother(B)], [happens(says(B, 'Dont kill him! Give it to Her'), A, _)]). 1678reactive_rule([happens(propose_cut_baby(salomon), _, A), woman(B), not(i_am_your_mother(B))], [happens(says(B, 'Yes, kill him'), A, _)]). 1679reactive_rule([happens(propose_cut_baby(A), _, _), happens(says(B, 'Dont kill him! Give it to Her'), _, _), happens(says(_, 'Yes, kill him'), _, _)], [happens(declare(A, the_true_mother_is(B)), _, C), happens(decide(A, give_baby_to(B)), C, _)]). 1680 1681l_events(happens(put_a_test(_, _), A, B), [happens(proposes_nasty_idea(salomon), A, B)]). 1682l_events(happens(proposes_nasty_idea(A), B, C), [happens(propose_cut_baby(A), B, C)]). 1683 1684maxtime(10). 1685 1686i_am_your_mother(b). 1687 1688:- dynamic actions/1. 1689:- multifile actions/1. 1690 1691actions([propose_cut_baby(agent), says(agent, message), declares(agent, verdict), decide(agent, judgment)]). 1692 1693events([dispute_between(a, b), put_to_test(a, b), propose_drastic_output(agent), make_decision]). 1694 1695observe([dispute_between(a, b)], 2). 1696PROGRAM FAILED 1697% dB(/.../(lps_user_examples, 'Solomon and the two women.pl'), lps_visualization(_44068{groups:[_43914{content:"Events", id:"event", order:1}], items:[_44036{content:"dispute_between(a,b)", group:"event", id:0, start:2, style:"color:#E19735", title:"happens(dispute_between(a,b),1,2)", type:"point"}]}, [])). 1698% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'SOS.pl')). 1699% run_lps_corner_file1(/.../(lps_user_examples, 'SOS.pl')). 1700% /pack/logicmoo_ec/test/lps_user_examples/SOS.pl:1 1701% push_lps_dialect. 1702% ops. 1703% [ti=user, load= /.../(lps_user_examples, 'SOS.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'SOS.pl'), lps= /.../(lps_user_examples, 'SOS.pl'), using= /.../(lps_user_examples, 'SOS.pl')]. 1704% continue_lps_dialect. 1705% ops. 1706 1707% LPS: fluents((lightOn,lightOff)). 1708% Into: fluents([lightOn,lightOff]). 1709 1710% LPS: events(switch). 1711% Into: events([switch]). 1712 1713% LPS: actions(switch). 1714% Into: actions([switch]). 1715 1716% LPS: if(lightOff,not(lightOn)). 1717% Into: l_int(holds(lightOff,_23262),[holds(not(lightOn),_23262)]). 1718 1719% LPS: if(from(sos,to(_23726,_23728)),(at(lightOff,_23726),from(makeOn,to(_23726,_23904)),from(makeOn,to(_23904,_24016)),from(makeOn,to(_24016,_23728)))). 1720% Into: l_events(happens(sos,_23726,_23728),[holds(lightOff,_23726),happens(makeOn,_23726,_23904),happens(makeOn,_23904,_24016),happens(makeOn,_24016,_23728)]). 1721 1722% LPS: if(from(makeOn,to(_25856,_25858)),(from(switch,to(_25856,_25970)),from(switch,to(_25970+1,_25858)))). 1723% Into: l_events(happens(makeOn,_25856,_25858),[happens(switch,_25856,_25970),happens(switch,_25970+1,_25858)]). 1724 1725% LPS: then(if(true),sos). 1726% Into: reactive_rule([],[happens(sos,_28388,_28394)]). 1727 1728% LPS: if(initiates(switch,lightOn),lightOff). 1729% Into: initiated(happens(switch,_29554,_29560),lightOn,[holds(lightOff,_29554)]). 1730 1731% LPS: if(terminates(switch,lightOn),lightOn). 1732% Into: terminated(happens(switch,_30624,_30630),lightOn,[holds(lightOn,_30624)]). 1733% /pack/logicmoo_ec/test/lps_user_examples/SOS.pl:38 1734% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca5a00)"), (/.../(lps_user_examples, 'SOS.pl')-> /.../(lps_user_examples, 'SOS.pl'))). 1735% ops. 1736% :-listing('/pack/logicmoo_ec/test/lps_user_examples/SOS.pl':_38180). 1737 1738 1739initiated(happens(switch, A, _), lightOn, [holds(lightOff, A)]). 1740 1741fluents([lightOn, lightOff]). 1742 1743l_int(holds(lightOff, A), [holds(not(lightOn), A)]). 1744 1745reactive_rule([], [happens(sos, _, _)]). 1746 1747terminated(happens(switch, A, _), lightOn, [holds(lightOn, A)]). 1748 1749l_events(happens(sos, A, B), [holds(lightOff, A), happens(makeOn, A, C), happens(makeOn, C, D), happens(makeOn, D, B)]). 1750l_events(happens(makeOn, A, B), [happens(switch, A, C), happens(switch, C+1, B)]). 1751 1752:- dynamic actions/1. 1753:- multifile actions/1. 1754 1755actions([switch]). 1756 1757events([switch]). 1758 1759maxTime(25). 1760% dB(/.../(lps_user_examples, 'SOS.pl'), lps_visualization(_65570{groups:[_64390{content:"lightOn", id:"lightOn/0", order:3, subgroupStack:"false"}, _64456{content:"Actions", id:"action", order:4}], items:[_64566{content:"lightOn", end:4, group:"lightOn/0", id:0, start:2, title:"Fluent lightOn initiated at 2<br/>and terminated at transition to 4"}, _64676{content:"lightOn", end:7, group:"lightOn/0", id:1, start:5, title:"Fluent lightOn initiated at 5<br/>and terminated at transition to 7"}, _64786{content:"lightOn", end:10, group:"lightOn/0", id:2, start:8, title:"Fluent lightOn initiated at 8<br/>and terminated at transition to 10"}, _64908{content:"switch", group:"action", id:3, start:2, style:"color:green", title:"happens(switch,1,2)", type:"point"}, _65034{content:"switch", group:"action", id:4, start:4, style:"color:green", title:"happens(switch,3,4)", type:"point"}, _65160{content:"switch", group:"action", id:5, start:5, style:"color:green", title:"happens(switch,4,5)", type:"point"}, _65286{content:"switch", group:"action", id:6, start:7, style:"color:green", title:"happens(switch,6,7)", type:"point"}, _65412{content:"switch", group:"action", id:7, start:8, style:"color:green", title:"happens(switch,7,8)", type:"point"}, _65538{content:"switch", group:"action", id:8, start:10, style:"color:green", title:"happens(switch,9,10)", type:"point"}]}, [])). 1761% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, '123 contrato.pl')). 1762% run_lps_corner_file1(/.../(lps_user_examples, '123 contrato.pl')). 1763% /pack/logicmoo_ec/test/lps_user_examples/123 contrato.pl:1 1764% push_lps_dialect. 1765% ops. 1766% [ti=user, load= /.../(lps_user_examples, '123 contrato.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, '123 contrato.pl'), lps= /.../(lps_user_examples, '123 contrato.pl'), using= /.../(lps_user_examples, '123 contrato.pl')]. 1767% continue_lps_dialect. 1768% ops. 1769 1770% LPS: actions(pagar(comprador,cantidad,due�o)). 1771% Into: actions([pagar(comprador,cantidad,due�o)]). 1772 1773% LPS: events(causa(personal)). 1774% Into: events([causa(personal)]). 1775 1776% LPS: fluents((validar(comprador),por_pagar(cantidad))). 1777% Into: fluents([validar(comprador),por_pagar(cantidad)]). 1778 1779% LPS: at(opcompra(comprador,cantidad,due�o),_64238). 1780% Into: l_int(holds(opcompra(comprador,cantidad,due�o),_64238),[]). 1781 1782% LPS: then(if((causa(personal),to(validar(comprador),_65532))),cantidad is acordado). 1783% Into: reactive_rule([happens(causa(personal),_66740,_66782),happens(validar(comprador),_66804,_65532)],[cantidad is acordado]). 1784 1785% LPS: then(if((causa(personal),to(validar(comprador),_67190))),from(pagar(due�o,cantidad,comprador),to(_67190,_67382))). 1786% Into: reactive_rule([happens(causa(personal),_68528,_68570),happens(validar(comprador),_68592,_67190)],[happens(pagar(due�o,cantidad,comprador),_67190,_67382)]). 1787ERROR: /pack/logicmoo_ec/test/lps_user_examples/123 contrato.pl:25:15: Syntax error: Operator expected 1788% /pack/logicmoo_ec/test/lps_user_examples/123 contrato.pl:29 1789% pop_lps_dialect('$BLOB'("<stream>(0x562ef4161a00)"), (/.../(lps_user_examples, '123 contrato.pl')-> /.../(lps_user_examples, '123 contrato.pl'))). 1790% ops. 1791% :-listing('/pack/logicmoo_ec/test/lps_user_examples/123 contrato.pl':_77804). 1792 1793 1794total(_). 1795 1796fluents([validar(comprador), por_pagar(cantidad)]). 1797 1798l_int(holds(opcompra(comprador, cantidad, due�o), _), []). 1799 1800reactive_rule([happens(causa(personal), _, _), happens(validar(comprador), _, _)], [cantidad is acordado]). 1801reactive_rule([happens(causa(personal), _, _), happens(validar(comprador), _, A)], [happens(pagar(due�o, cantidad, comprador), A, _)]). 1802 1803cantidad(_). 1804 1805:- dynamic actions/1. 1806:- multifile actions/1. 1807 1808actions([pagar(comprador, cantidad, due�o)]). 1809 1810events([causa(personal)]). 1811 1812maxTime(10). 1813 1814acordado(_). 1815 1816if(nCuenta is total-cantidad). 1817% dB(/.../(lps_user_examples, '123 contrato.pl'), lps_visualization(_70132{groups:[], items:[]}, [])). 1818% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'Acompa�a.pl')). 1819% run_lps_corner_file1(/.../(lps_user_examples, 'Acompa�a.pl')). 1820% /pack/logicmoo_ec/test/lps_user_examples/Acompa�a.pl:1 1821% push_lps_dialect. 1822% ops. 1823% [ti=user, load= /.../(lps_user_examples, 'Acompa�a.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'Acompa�a.pl'), lps= /.../(lps_user_examples, 'Acompa�a.pl'), using= /.../(lps_user_examples, 'Acompa�a.pl')]. 1824% continue_lps_dialect. 1825% ops. 1826% /pack/logicmoo_ec/test/lps_user_examples/Acompa�a.pl:26 1827% pop_lps_dialect('$BLOB'("<stream>(0x562ef31d3300)"), (/.../(lps_user_examples, 'Acompa�a.pl')-> /.../(lps_user_examples, 'Acompa�a.pl'))). 1828% ops. 1829% :-listing('/pack/logicmoo_ec/test/lps_user_examples/Acompa�a.pl':_56128). 1830 1831 1832acompa�a(X) :- 1833 plato(X). 1834 1835:- dynamic actions/1. 1836:- multifile actions/1. 1837 1838 1839plato(Arroz). 1840 1841acompa�a(Hijo, Padre). 1842acompa�a(Padre, Hijo). 1843acompa�a(Madre, Hijo). 1844acompa�a(Hijo, Madre). 1845acompa�a(Hombre, Mujer). 1846acompa�a(Mujer, Hombre). 1847acompa�a(Respecto, Rezar). 1848acompa�a(Rezar, Respecto). 1849acompa�a(Arepa, Desayuno). 1850acompa�a(Desayuno, arepa). 1851acompa�a(Almuerzo, Arroz). 1852acompa�a(Arroz, Almuerzo). 1853acompa�a(Persona, mascota). 1854acompa�a(mascota, Persona). 1855acompa�a(amigo, feliz). 1856acompa�a(Feliz, amigo). 1857% dB(/.../(lps_user_examples, 'Acompa�a.pl'), lps_visualization(_37388{groups:[], items:[]}, [])). 1858% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'acompa.pl')). 1859% run_lps_corner_file1(/.../(lps_user_examples, 'acompa.pl')). 1860% /pack/logicmoo_ec/test/lps_user_examples/acompa.pl:1 1861% push_lps_dialect. 1862% ops. 1863% [ti=user, load= /.../(lps_user_examples, 'acompa.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'acompa.pl'), lps= /.../(lps_user_examples, 'acompa.pl'), using= /.../(lps_user_examples, 'acompa.pl')]. 1864% continue_lps_dialect. 1865% ops. 1866% /pack/logicmoo_ec/test/lps_user_examples/acompa.pl:32 1867% pop_lps_dialect('$BLOB'("<stream>(0x562ef4163d00)"), (/.../(lps_user_examples, 'acompa.pl')-> /.../(lps_user_examples, 'acompa.pl'))). 1868% ops. 1869% :-listing('/pack/logicmoo_ec/test/lps_user_examples/acompa.pl':_50570). 1870 1871 1872ama(romeo, julieta). 1873ama(julieta, romeo). 1874ama(bolivar, colombia). 1875ama(manuela, bolivar). 1876 1877rcombina(X, Y) :- 1878 combina(Y, X). 1879 1880viaja_junto(fulano, sutano). 1881 1882:- dynamic actions/1. 1883:- multifile actions/1. 1884 1885 1886viaja_junto(X, Y, _) :- 1887 viaja_junto(X, Y). 1888viaja_junto(X, Y, C) :- 1889 not(member((X, Y), C)), 1890 viaja_junto(Y, X, [(X, Y)|C]). 1891 1892combina(cafe, chocolate). 1893combina(salsa, pasta). 1894 1895acompa�a(X, Y) :- 1896 ama(X, Y). 1897acompa�a(X, Y) :- 1898 combina(X, Y). 1899acompa�a(X, Y) :- 1900 rcombina(X, Y). 1901acompa�a(X, Y) :- 1902 viaja_junto(X, Y, []). 1903% dB(/.../(lps_user_examples, 'acompa.pl'), lps_visualization(_33264{groups:[], items:[]}, [])). 1904% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'ama.pl')). 1905% run_lps_corner_file1(/.../(lps_user_examples, 'ama.pl')). 1906% /pack/logicmoo_ec/test/lps_user_examples/ama.pl:1 1907% push_lps_dialect. 1908% ops. 1909% [ti=user, load= /.../(lps_user_examples, 'ama.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'ama.pl'), lps= /.../(lps_user_examples, 'ama.pl'), using= /.../(lps_user_examples, 'ama.pl')]. 1910% continue_lps_dialect. 1911% ops. 1912% /pack/logicmoo_ec/test/lps_user_examples/ama.pl:27 1913% pop_lps_dialect('$BLOB'("<stream>(0x562ef33a9300)"), (/.../(lps_user_examples, 'ama.pl')-> /.../(lps_user_examples, 'ama.pl'))). 1914% ops. 1915% :-listing('/pack/logicmoo_ec/test/lps_user_examples/ama.pl':_46112). 1916 1917 1918persona(rosa). 1919 1920ama(romeo, julieta). 1921ama(julieta, romeo). 1922ama(bolivar, colombia). 1923ama(manuela, bolivar). 1924 1925humano(socrates). 1926 1927:- dynamic actions/1. 1928:- multifile actions/1. 1929 1930 1931acompa�ante(X) :- 1932 persona(X). 1933 1934mortal(X) :- 1935 humano(X). 1936 1937acompa�a(rosa, amanda). 1938acompa�a(amanda, gretta). 1939acompa�a(gretta, cesar). 1940acompa�a(cesar, rosa). 1941% dB(/.../(lps_user_examples, 'ama.pl'), lps_visualization(_28376{groups:[], items:[]}, [])). 1942% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'antecedents_and_observations.pl')). 1943% run_lps_corner_file1(/.../(lps_user_examples, 'antecedents_and_observations.pl')). 1944% /pack/logicmoo_ec/test/lps_user_examples/antecedents_and_observations.pl:1 1945% push_lps_dialect. 1946% ops. 1947% [ti=user, load= /.../(lps_user_examples, 'antecedents_and_observations.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'antecedents_and_observations.pl'), lps= /.../(lps_user_examples, 'antecedents_and_observations.pl'), using= /.../(lps_user_examples, 'antecedents_and_observations.pl')]. 1948% continue_lps_dialect. 1949% ops. 1950 1951% LPS: actions((a1,r1,a2,a3)). 1952% Into: actions([a1,r1,a2,a3]). 1953 1954% LPS: events(e2). 1955% Into: events([e2]). 1956 1957% LPS: fluents(f1). 1958% Into: fluents([f1]). 1959 1960% LPS: observe(from(a1,to(1,2))). 1961% Into: observe([a1],2). 1962 1963% LPS: observe(from(a2,to(2,3))). 1964% Into: observe([a2],3). 1965 1966% LPS: observe(from(e2,to(3,6))). 1967% Into: observe([e2],6). 1968 1969% LPS: observe(from(a3,to(8,9))). 1970% Into: observe([a3],9). 1971 1972% LPS: then(if((from(a1,to(_22180,_22182)),from(e1,to(_22182,_22294)))),from(r1,to(_22294,_22462))). 1973% Into: reactive_rule([happens(a1,_22180,_22182),happens(e1,_22182,_22294)],[happens(r1,_22294,_22462)]). 1974 1975% LPS: if(from(e1,to(_23650,_23652)),(from(a2,to(_23650,_23764)),from(e2,to(_23874,_23652)))). 1976% Into: l_events(happens(e1,_23650,_23652),[happens(a2,_23650,_23764),happens(e2,_23874,_23652)]). 1977 1978% LPS: if(from(e2,to(_25092,_25094)),from(a3,to(_25204,_25206))). 1979% Into: l_events(happens(e2,_25092,_25094),[happens(a3,_25204,_25206)]). 1980 1981% LPS: initiates(e1,f1). 1982% Into: initiated(happens(e1,_27426,_27432),f1,[]). 1983% /pack/logicmoo_ec/test/lps_user_examples/antecedents_and_observations.pl:20 1984% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca3c00)"), (/.../(lps_user_examples, 'antecedents_and_observations.pl')-> /.../(lps_user_examples, 'antecedents_and_observations.pl'))). 1985% ops. 1986% :-listing('/pack/logicmoo_ec/test/lps_user_examples/antecedents_and_observations.pl':_35002). 1987 1988 1989initiated(happens(e1, _, _), f1, []). 1990 1991fluents([f1]). 1992 1993reactive_rule([happens(a1, _, A), happens(e1, A, B)], [happens(r1, B, _)]). 1994 1995l_events(happens(e1, A, B), [happens(a2, A, _), happens(e2, _, B)]). 1996l_events(happens(e2, _, _), [happens(a3, _, _)]). 1997 1998:- dynamic actions/1. 1999:- multifile actions/1. 2000 2001actions([a1, r1, a2, a3]). 2002 2003events([e2]). 2004 2005observe([a1], 2). 2006observe([a2], 3). 2007observe([e2], 6). 2008observe([a3], 9). 2009 2010maxTime(10). 2011% dB(/.../(lps_user_examples, 'antecedents_and_observations.pl'), lps_visualization(_51546{groups:[_50638{content:"Events", id:"event", order:1}, _50712{content:"f1", id:"f1/0", order:3, subgroupStack:"false"}, _50778{content:"Actions", id:"action", order:4}], items:[_50888{content:"f1", end:11, group:"f1/0", id:0, start:9, title:"Fluent f1 initiated at 9<br/>and terminated at transition to 11"}, _51010{content:"a1", group:"event", id:1, start:2, style:"color:#E19735", title:"happens(a1,1,2)", type:"point"}, _51136{content:"a2", group:"event", id:2, start:3, style:"color:#E19735", title:"happens(a2,2,3)", type:"point"}, _51262{content:"e2", group:"event", id:3, start:6, style:"color:#E19735", title:"happens(e2,5,6)", type:"point"}, _51388{content:"a3", group:"event", id:4, start:9, style:"color:#E19735", title:"happens(a3,8,9)", type:"point"}, _51514{content:"r1", group:"action", id:5, start:10, style:"color:green", title:"happens(r1,9,10)", type:"point"}]}, [])). 2012% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'arrival_correct.pl')). 2013% run_lps_corner_file1(/.../(lps_user_examples, 'arrival_correct.pl')). 2014% /pack/logicmoo_ec/test/lps_user_examples/arrival_correct.pl:1 2015% push_lps_dialect. 2016% ops. 2017% [ti=user, load= /.../(lps_user_examples, 'arrival_correct.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'arrival_correct.pl'), lps= /.../(lps_user_examples, 'arrival_correct.pl'), using= /.../(lps_user_examples, 'arrival_correct.pl')]. 2018% continue_lps_dialect. 2019% ops. 2020 2021% LPS: actions((attack,rob,call_the(_19898),repeat_wife_message(_19938))). 2022% Into: actions([attack,rob,call_the(_19898),repeat_wife_message(_19938)]). 2023 2024% LPS: fluents((is_a_weapon,is_a_gift,has_phone)). 2025% Into: fluents([is_a_weapon,is_a_gift,has_phone]). 2026 2027% LPS: events((persuade,prepare,general_shows(_22244),call_general(_22244),general_remembers_wife(_22324))). 2028% Into: events([persuade,prepare,general_shows(_22244),call_general(_22244),general_remembers_wife(_22324)]). 2029 2030% LPS: initially(is_a_weapon). 2031% Into: initial_state([is_a_weapon]). 2032 2033% LPS: false((is_a_gift,attack)). 2034% Into: d_pre([holds(is_a_gift,_25556),happens(attack,_25556,_25562)]). 2035 2036% LPS: false((has_phone,rob)). 2037% Into: d_pre([holds(has_phone,_26994),happens(rob,_26994,_27000)]). 2038 2039% LPS: then(if(is_a_weapon),(prepare,attack)). 2040% Into: reactive_rule([holds(is_a_weapon,_28502)],[happens(prepare,_28660,_28702),happens(attack,_28702,_28666)]). 2041 2042% LPS: then(if(is_a_weapon),persuade). 2043% Into: reactive_rule([holds(is_a_weapon,_29984)],[happens(persuade,_30142,_30148)]). 2044 2045% LPS: then(if(is_a_weapon),rob). 2046% Into: reactive_rule([holds(is_a_weapon,_31246)],[happens(rob,_31404,_31410)]). 2047 2048% LPS: if(from(prepare,to(_31630,_31632)),(at(true,_31630),_31632 is _31630+6)). 2049% Into: l_events(happens(prepare,_31630,_31632),[holds(true,_31630),_31632 is _31630+6]). 2050 2051% LPS: if(persuade,(general_shows(_33670),general_remembers_wife(_33710),call_general(_33670),repeat_wife_message(_33710))). 2052% Into: l_events(happens(persuade,_34950,_34956),[happens(general_shows(_33670),_34950,_35024),happens(general_remembers_wife(_33710),_35024,_35090),happens(call_general(_33670),_35090,_35156),happens(repeat_wife_message(_33710),_35156,_34956)]). 2053 2054% LPS: if(call_general(_34968),call_the(_34968)). 2055% Into: l_events(happens(call_general(_34968),_36034,_36040),[happens(call_the(_34968),_36034,_36040)]). 2056 2057% LPS: terminates(persuade,is_a_weapon). 2058% Into: terminated(happens(persuade,_37118,_37124),is_a_weapon,[]). 2059 2060% LPS: initiates(persuade,is_a_gift). 2061% Into: initiated(happens(persuade,_38134,_38140),is_a_gift,[]). 2062 2063% LPS: initiates(rob,has_phone). 2064% Into: initiated(happens(rob,_39158,_39164),has_phone,[]). 2065 2066% LPS: observe(from(general_shows('+86-555000001'),to(2,3))). 2067% Into: observe([general_shows('+86-555000001')],3). 2068 2069% LPS: observe(from(general_remembers_wife(##########),to(3,4))). 2070% Into: observe([general_remembers_wife(##########)],4). 2071% /pack/logicmoo_ec/test/lps_user_examples/arrival_correct.pl:46 2072% pop_lps_dialect('$BLOB'("<stream>(0x562ef4161000)"), (/.../(lps_user_examples, 'arrival_correct.pl')-> /.../(lps_user_examples, 'arrival_correct.pl'))). 2073% ops. 2074% :-listing('/pack/logicmoo_ec/test/lps_user_examples/arrival_correct.pl':_49012). 2075 2076 2077initiated(happens(persuade, _, _), is_a_gift, []). 2078initiated(happens(rob, _, _), has_phone, []). 2079 2080d_pre([holds(is_a_gift, A), happens(attack, A, _)]). 2081d_pre([holds(has_phone, A), happens(rob, A, _)]). 2082 2083fluents([is_a_weapon, is_a_gift, has_phone]). 2084 2085reactive_rule([holds(is_a_weapon, _)], [happens(prepare, _, A), happens(attack, A, _)]). 2086reactive_rule([holds(is_a_weapon, _)], [happens(persuade, _, _)]). 2087reactive_rule([holds(is_a_weapon, _)], [happens(rob, _, _)]). 2088 2089terminated(happens(persuade, _, _), is_a_weapon, []). 2090 2091initial_state([is_a_weapon]). 2092 2093l_events(happens(prepare, A, B), [holds(true, A), B is A+6]). 2094l_events(happens(persuade, A, B), [happens(general_shows(C), A, D), happens(general_remembers_wife(E), D, F), happens(call_general(C), F, G), happens(repeat_wife_message(E), G, B)]). 2095l_events(happens(call_general(A), B, C), [happens(call_the(A), B, C)]). 2096 2097:- dynamic actions/1. 2098:- multifile actions/1. 2099 2100actions([attack, rob, call_the(_), repeat_wife_message(_)]). 2101 2102events([persuade, prepare, general_shows(A), call_general(A), general_remembers_wife(_)]). 2103 2104observe([general_shows('+86-555000001')], 3). 2105observe([general_remembers_wife(##########)], 4). 2106 2107maxTime(15). 2108% dB(/.../(lps_user_examples, 'arrival_correct.pl'), lps_visualization(_65518{groups:[_64234{content:"Events", id:"event", order:1}, _64308{content:"has_phone", id:"has_phone/0", order:3, subgroupStack:"false"}, _64386{content:"is_a_gift", id:"is_a_gift/0", order:3, subgroupStack:"false"}, _64464{content:"is_a_weapon", id:"is_a_weapon/0", order:3, subgroupStack:"false"}, _64530{content:"Actions", id:"action", order:4}], items:[_64640{content:"has_phone", end:16, group:"has_phone/0", id:0, start:2, title:"Fluent has_phone initiated at 2<br/>and terminated at transition to 16"}, _64750{content:"is_a_gift", end:16, group:"is_a_gift/0", id:1, start:6, title:"Fluent is_a_gift initiated at 6<br/>and terminated at transition to 16"}, _64860{content:"is_a_weapon", end:6, group:"is_a_weapon/0", id:2, start:1, title:"Fluent is_a_weapon initiated at 1<br/>and terminated at transition to 6"}, _64982{content:"rob", group:"action", id:3, start:2, style:"color:green", title:"happens(rob,1,2)", type:"point"}, _65108{content:"general_shows(+86-555000001)", group:"event", id:4, start:3, style:"color:#E19735", title:"happens(general_shows(+86-555000001),2,3)", type:"point"}, _65234{content:"general_remembers_wife(##########)", group:"event", id:5, start:4, style:"color:#E19735", title:"happens(general_remembers_wife(##########),3,4)", type:"point"}, _65360{content:"call_the(+86-555000001)", group:"action", id:6, start:5, style:"color:green", title:"happens(call_the(+86-555000001),4,5)", type:"point"}, _65486{content:"repeat_wife_message(##########)", group:"action", id:7, start:6, style:"color:green", title:"happens(repeat_wife_message(##########),5,6)", type:"point"}]}, [])). 2109% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'arrival_espa�ol(1).pl')). 2110% run_lps_corner_file1(/.../(lps_user_examples, 'arrival_espa�ol(1).pl')). 2111% /pack/logicmoo_ec/test/lps_user_examples/arrival_espa�ol(1).pl:1 2112% push_lps_dialect. 2113% ops. 2114% [ti=user, load= /.../(lps_user_examples, 'arrival_espa�ol(1).pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'arrival_espa�ol(1).pl'), lps= /.../(lps_user_examples, 'arrival_espa�ol(1).pl'), using= /.../(lps_user_examples, 'arrival_espa�ol(1).pl')]. 2115% continue_lps_dialect. 2116% ops. 2117 2118% LPS: actions((atacar,robar,llamar_al(_19956),repita_mensaje_esposa(_19996))). 2119% Into: actions([atacar,robar,llamar_al(_19956),repita_mensaje_esposa(_19996)]). 2120 2121% LPS: fluents((es_un_arma,es_un_regalo)). 2122% Into: fluents([es_un_arma,es_un_regalo]). 2123 2124% LPS: events((prepare,persuade,muestra_del_general(_22436),llamar_general(_22436),general_recuerda_esposa(_22516))). 2125% Into: events([prepare,persuade,muestra_del_general(_22436),llamar_general(_22436),general_recuerda_esposa(_22516)]). 2126 2127% LPS: initially(es_un_arma). 2128% Into: initial_state([es_un_arma]). 2129 2130% LPS: observe(from(muestra_del_general('+86-555000001'),to(2,3))). 2131% Into: observe([muestra_del_general('+86-555000001')],3). 2132 2133% LPS: observe(from(general_recuerda_esposa(##########),to(3,4))). 2134% Into: observe([general_recuerda_esposa(##########)],4). 2135 2136% LPS: false((es_un_regalo,atacar)). 2137% Into: d_pre([holds(es_un_regalo,_28204),happens(atacar,_28204,_28210)]). 2138 2139% LPS: then(if(es_un_arma),(prepare,atacar)). 2140% Into: reactive_rule([holds(es_un_arma,_29790)],[happens(prepare,_29948,_29990),happens(atacar,_29990,_29954)]). 2141 2142% LPS: then(if(es_un_arma),persuade). 2143% Into: reactive_rule([holds(es_un_arma,_31272)],[happens(persuade,_31430,_31436)]). 2144 2145% LPS: if(from(prepare,to(_31560,_31562)),(at(true,_31560),_31562 is _31560+6)). 2146% Into: l_events(happens(prepare,_31560,_31562),[holds(true,_31560),_31562 is _31560+6]). 2147 2148% LPS: if(persuade,(muestra_del_general(_33592),general_recuerda_esposa(_33632),llamar_general(_33592),repita_mensaje_esposa(_33632))). 2149% Into: l_events(happens(persuade,_34872,_34878),[happens(muestra_del_general(_33592),_34872,_34946),happens(general_recuerda_esposa(_33632),_34946,_35012),happens(llamar_general(_33592),_35012,_35078),happens(repita_mensaje_esposa(_33632),_35078,_34878)]). 2150 2151% LPS: if(llamar_general(_34890),(robar,llamar_al(_34890))). 2152% Into: l_events(happens(llamar_general(_34890),_36010,_36016),[happens(robar,_36010,_36090),happens(llamar_al(_34890),_36090,_36016)]). 2153 2154% LPS: terminates(persuade,es_un_arma). 2155% Into: terminated(happens(persuade,_37194,_37200),es_un_arma,[]). 2156 2157% LPS: initiates(persuade,es_un_regalo). 2158% Into: initiated(happens(persuade,_38210,_38216),es_un_regalo,[]). 2159% /pack/logicmoo_ec/test/lps_user_examples/arrival_espa�ol(1).pl:61 2160% pop_lps_dialect('$BLOB'("<stream>(0x562ef4161900)"), (/.../(lps_user_examples, 'arrival_espa�ol(1).pl')-> /.../(lps_user_examples, 'arrival_espa�ol(1).pl'))). 2161% ops. 2162% :-listing('/pack/logicmoo_ec/test/lps_user_examples/arrival_espa�ol(1).pl':_45810). 2163 2164 2165initiated(happens(persuade, _, _), es_un_regalo, []). 2166 2167d_pre([holds(es_un_regalo, A), happens(atacar, A, _)]). 2168 2169fluents([es_un_arma, es_un_regalo]). 2170 2171reactive_rule([holds(es_un_arma, _)], [happens(prepare, _, A), happens(atacar, A, _)]). 2172reactive_rule([holds(es_un_arma, _)], [happens(persuade, _, _)]). 2173 2174terminated(happens(persuade, _, _), es_un_arma, []). 2175 2176initial_state([es_un_arma]). 2177 2178l_events(happens(prepare, A, B), [holds(true, A), B is A+6]). 2179l_events(happens(persuade, A, B), [happens(muestra_del_general(C), A, D), happens(general_recuerda_esposa(E), D, F), happens(llamar_general(C), F, G), happens(repita_mensaje_esposa(E), G, B)]). 2180l_events(happens(llamar_general(A), B, C), [happens(robar, B, D), happens(llamar_al(A), D, C)]). 2181 2182:- dynamic actions/1. 2183:- multifile actions/1. 2184 2185actions([atacar, robar, llamar_al(_), repita_mensaje_esposa(_)]). 2186 2187events([prepare, persuade, muestra_del_general(A), llamar_general(A), general_recuerda_esposa(_)]). 2188 2189observe([muestra_del_general('+86-555000001')], 3). 2190observe([general_recuerda_esposa(##########)], 4). 2191 2192maxTime(10). 2193% dB(/.../(lps_user_examples, 'arrival_espa�ol(1).pl'), lps_visualization(_85454{groups:[_84358{content:"Events", id:"event", order:1}, _84432{content:"es_un_arma", id:"es_un_arma/0", order:3, subgroupStack:"false"}, _84510{content:"es_un_regalo", id:"es_un_regalo/0", order:3, subgroupStack:"false"}, _84576{content:"Actions", id:"action", order:4}], items:[_84686{content:"es_un_arma", end:7, group:"es_un_arma/0", id:0, start:1, title:"Fluent es_un_arma initiated at 1<br/>and terminated at transition to 7"}, _84796{content:"es_un_regalo", end:11, group:"es_un_regalo/0", id:1, start:7, title:"Fluent es_un_regalo initiated at 7<br/>and terminated at transition to 11"}, _84918{content:"muestra_del_general(+86-555000001)", group:"event", id:2, start:3, style:"color:#E19735", title:"happens(muestra_del_general(+86-555000001),2,3)", type:"point"}, _85044{content:"general_recuerda_esposa(##########)", group:"event", id:3, start:4, style:"color:#E19735", title:"happens(general_recuerda_esposa(##########),3,4)", type:"point"}, _85170{content:"robar", group:"action", id:4, start:5, style:"color:green", title:"happens(robar,4,5)", type:"point"}, _85296{content:"llamar_al(+86-555000001)", group:"action", id:5, start:6, style:"color:green", title:"happens(llamar_al(+86-555000001),5,6)", type:"point"}, _85422{content:"repita_mensaje_esposa(##########)", group:"action", id:6, start:7, style:"color:green", title:"happens(repita_mensaje_esposa(##########),6,7)", type:"point"}]}, [])). 2194% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'arrival_espa�ol.pl')). 2195% run_lps_corner_file1(/.../(lps_user_examples, 'arrival_espa�ol.pl')). 2196% /pack/logicmoo_ec/test/lps_user_examples/arrival_espa�ol.pl:1 2197% push_lps_dialect. 2198% ops. 2199% [ti=user, load= /.../(lps_user_examples, 'arrival_espa�ol.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'arrival_espa�ol.pl'), lps= /.../(lps_user_examples, 'arrival_espa�ol.pl'), using= /.../(lps_user_examples, 'arrival_espa�ol.pl')]. 2200% continue_lps_dialect. 2201% ops. 2202 2203% LPS: actions((atacar,robar,llamar_al(_56062),repita_mensaje_esposa(_56102))). 2204% Into: actions([atacar,robar,llamar_al(_56062),repita_mensaje_esposa(_56102)]). 2205 2206% LPS: fluents((es_un_arma,es_un_regalo)). 2207% Into: fluents([es_un_arma,es_un_regalo]). 2208 2209% LPS: events((prepare,persuade,muestra_del_general(_58542),llamar_general(_58542),general_recuerda_esposa(_58622))). 2210% Into: events([prepare,persuade,muestra_del_general(_58542),llamar_general(_58542),general_recuerda_esposa(_58622)]). 2211 2212% LPS: initially(es_un_arma). 2213% Into: initial_state([es_un_arma]). 2214 2215% LPS: observe(from(muestra_del_general('+86-555000001'),to(2,3))). 2216% Into: observe([muestra_del_general('+86-555000001')],3). 2217 2218% LPS: observe(from(general_recuerda_esposa(##########),to(3,4))). 2219% Into: observe([general_recuerda_esposa(##########)],4). 2220 2221% LPS: false((es_un_regalo,atacar)). 2222% Into: d_pre([holds(es_un_regalo,_64310),happens(atacar,_64310,_64316)]). 2223 2224% LPS: then(if(es_un_arma),(prepare,atacar)). 2225% Into: reactive_rule([holds(es_un_arma,_65896)],[happens(prepare,_66054,_66096),happens(atacar,_66096,_66060)]). 2226 2227% LPS: then(if(es_un_arma),persuade). 2228% Into: reactive_rule([holds(es_un_arma,_67378)],[happens(persuade,_67536,_67542)]). 2229 2230% LPS: if(from(prepare,to(_67666,_67668)),(at(true,_67666),_67668 is _67666+6)). 2231% Into: l_events(happens(prepare,_67666,_67668),[holds(true,_67666),_67668 is _67666+6]). 2232 2233% LPS: if(persuade,(muestra_del_general(_69698),general_recuerda_esposa(_69738),llamar_general(_69698),repita_mensaje_esposa(_69738))). 2234% Into: l_events(happens(persuade,_70978,_70984),[happens(muestra_del_general(_69698),_70978,_71052),happens(general_recuerda_esposa(_69738),_71052,_71118),happens(llamar_general(_69698),_71118,_71184),happens(repita_mensaje_esposa(_69738),_71184,_70984)]). 2235 2236% LPS: if(llamar_general(_70996),(robar,llamar_al(_70996))). 2237% Into: l_events(happens(llamar_general(_70996),_72116,_72122),[happens(robar,_72116,_72196),happens(llamar_al(_70996),_72196,_72122)]). 2238 2239% LPS: terminates(persuade,es_un_arma). 2240% Into: terminated(happens(persuade,_73300,_73306),es_un_arma,[]). 2241 2242% LPS: initiates(persuade,es_un_regalo). 2243% Into: initiated(happens(persuade,_74316,_74322),es_un_regalo,[]). 2244% /pack/logicmoo_ec/test/lps_user_examples/arrival_espa�ol.pl:61 2245% pop_lps_dialect('$BLOB'("<stream>(0x562ef33a8d00)"), (/.../(lps_user_examples, 'arrival_espa�ol.pl')-> /.../(lps_user_examples, 'arrival_espa�ol.pl'))). 2246% ops. 2247% :-listing('/pack/logicmoo_ec/test/lps_user_examples/arrival_espa�ol.pl':_81910). 2248 2249 2250initiated(happens(persuade, _, _), es_un_regalo, []). 2251 2252d_pre([holds(es_un_regalo, A), happens(atacar, A, _)]). 2253 2254fluents([es_un_arma, es_un_regalo]). 2255 2256reactive_rule([holds(es_un_arma, _)], [happens(prepare, _, A), happens(atacar, A, _)]). 2257reactive_rule([holds(es_un_arma, _)], [happens(persuade, _, _)]). 2258 2259terminated(happens(persuade, _, _), es_un_arma, []). 2260 2261initial_state([es_un_arma]). 2262 2263l_events(happens(prepare, A, B), [holds(true, A), B is A+6]). 2264l_events(happens(persuade, A, B), [happens(muestra_del_general(C), A, D), happens(general_recuerda_esposa(E), D, F), happens(llamar_general(C), F, G), happens(repita_mensaje_esposa(E), G, B)]). 2265l_events(happens(llamar_general(A), B, C), [happens(robar, B, D), happens(llamar_al(A), D, C)]). 2266 2267:- dynamic actions/1. 2268:- multifile actions/1. 2269 2270actions([atacar, robar, llamar_al(_), repita_mensaje_esposa(_)]). 2271 2272events([prepare, persuade, muestra_del_general(A), llamar_general(A), general_recuerda_esposa(_)]). 2273 2274observe([muestra_del_general('+86-555000001')], 3). 2275observe([general_recuerda_esposa(##########)], 4). 2276 2277maxTime(10). 2278% dB(/.../(lps_user_examples, 'arrival_espa�ol.pl'), lps_visualization(_55514{groups:[_54418{content:"Events", id:"event", order:1}, _54492{content:"es_un_arma", id:"es_un_arma/0", order:3, subgroupStack:"false"}, _54570{content:"es_un_regalo", id:"es_un_regalo/0", order:3, subgroupStack:"false"}, _54636{content:"Actions", id:"action", order:4}], items:[_54746{content:"es_un_arma", end:7, group:"es_un_arma/0", id:0, start:1, title:"Fluent es_un_arma initiated at 1<br/>and terminated at transition to 7"}, _54856{content:"es_un_regalo", end:11, group:"es_un_regalo/0", id:1, start:7, title:"Fluent es_un_regalo initiated at 7<br/>and terminated at transition to 11"}, _54978{content:"muestra_del_general(+86-555000001)", group:"event", id:2, start:3, style:"color:#E19735", title:"happens(muestra_del_general(+86-555000001),2,3)", type:"point"}, _55104{content:"general_recuerda_esposa(##########)", group:"event", id:3, start:4, style:"color:#E19735", title:"happens(general_recuerda_esposa(##########),3,4)", type:"point"}, _55230{content:"robar", group:"action", id:4, start:5, style:"color:green", title:"happens(robar,4,5)", type:"point"}, _55356{content:"llamar_al(+86-555000001)", group:"action", id:5, start:6, style:"color:green", title:"happens(llamar_al(+86-555000001),5,6)", type:"point"}, _55482{content:"repita_mensaje_esposa(##########)", group:"action", id:6, start:7, style:"color:green", title:"happens(repita_mensaje_esposa(##########),6,7)", type:"point"}]}, [])). 2279% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'arrival.pl')). 2280% run_lps_corner_file1(/.../(lps_user_examples, 'arrival.pl')). 2281% /pack/logicmoo_ec/test/lps_user_examples/arrival.pl:1 2282% push_lps_dialect. 2283% ops. 2284% [ti=user, load= /.../(lps_user_examples, 'arrival.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'arrival.pl'), lps= /.../(lps_user_examples, 'arrival.pl'), using= /.../(lps_user_examples, 'arrival.pl')]. 2285% continue_lps_dialect. 2286% ops. 2287 2288% LPS: actions((attack,rob,call_the(_19880),repeat_wife_message(_19920))). 2289% Into: actions([attack,rob,call_the(_19880),repeat_wife_message(_19920)]). 2290 2291% LPS: fluents((is_a_weapon,is_a_gift)). 2292% Into: fluents([is_a_weapon,is_a_gift]). 2293 2294% LPS: events((persuade,prepare,general_shows(_22172),call_general(_22172),general_remembers_wife(_22252))). 2295% Into: events([persuade,prepare,general_shows(_22172),call_general(_22172),general_remembers_wife(_22252)]). 2296 2297% LPS: initially(is_a_weapon). 2298% Into: initial_state([is_a_weapon]). 2299 2300% LPS: false((is_a_gift,attack)). 2301% Into: d_pre([holds(is_a_gift,_25484),happens(attack,_25484,_25490)]). 2302 2303% LPS: then(if(is_a_weapon),(prepare,attack)). 2304% Into: reactive_rule([holds(is_a_weapon,_26992)],[happens(prepare,_27150,_27192),happens(attack,_27192,_27156)]). 2305 2306% LPS: then(if(is_a_weapon),persuade). 2307% Into: reactive_rule([holds(is_a_weapon,_28474)],[happens(persuade,_28632,_28638)]). 2308 2309% LPS: if(from(prepare,to(_28700,_28702)),(at(true,_28700),_28702 is _28700+6)). 2310% Into: l_events(happens(prepare,_28700,_28702),[holds(true,_28700),_28702 is _28700+6]). 2311 2312% LPS: if(persuade,(general_shows(_30732),general_remembers_wife(_30772),call_general(_30732),repeat_wife_message(_30772))). 2313% Into: l_events(happens(persuade,_32012,_32018),[happens(general_shows(_30732),_32012,_32086),happens(general_remembers_wife(_30772),_32086,_32152),happens(call_general(_30732),_32152,_32218),happens(repeat_wife_message(_30772),_32218,_32018)]). 2314 2315% LPS: if(call_general(_32030),(rob,call_the(_32030))). 2316% Into: l_events(happens(call_general(_32030),_33150,_33156),[happens(rob,_33150,_33230),happens(call_the(_32030),_33230,_33156)]). 2317 2318% LPS: terminates(persuade,is_a_weapon). 2319% Into: terminated(happens(persuade,_34234,_34240),is_a_weapon,[]). 2320 2321% LPS: initiates(persuade,is_a_gift). 2322% Into: initiated(happens(persuade,_35250,_35256),is_a_gift,[]). 2323 2324% LPS: observe(from(general_shows('+86-555000001'),to(2,3))). 2325% Into: observe([general_shows('+86-555000001')],3). 2326 2327% LPS: observe(from(general_remembers_wife(##########),to(3,4))). 2328% Into: observe([general_remembers_wife(##########)],4). 2329% /pack/logicmoo_ec/test/lps_user_examples/arrival.pl:41 2330% pop_lps_dialect('$BLOB'("<stream>(0x562ef4163d00)"), (/.../(lps_user_examples, 'arrival.pl')-> /.../(lps_user_examples, 'arrival.pl'))). 2331% ops. 2332% :-listing('/pack/logicmoo_ec/test/lps_user_examples/arrival.pl':_45100). 2333 2334 2335initiated(happens(persuade, _, _), is_a_gift, []). 2336 2337d_pre([holds(is_a_gift, A), happens(attack, A, _)]). 2338 2339fluents([is_a_weapon, is_a_gift]). 2340 2341reactive_rule([holds(is_a_weapon, _)], [happens(prepare, _, A), happens(attack, A, _)]). 2342reactive_rule([holds(is_a_weapon, _)], [happens(persuade, _, _)]). 2343 2344terminated(happens(persuade, _, _), is_a_weapon, []). 2345 2346initial_state([is_a_weapon]). 2347 2348l_events(happens(prepare, A, B), [holds(true, A), B is A+6]). 2349l_events(happens(persuade, A, B), [happens(general_shows(C), A, D), happens(general_remembers_wife(E), D, F), happens(call_general(C), F, G), happens(repeat_wife_message(E), G, B)]). 2350l_events(happens(call_general(A), B, C), [happens(rob, B, D), happens(call_the(A), D, C)]). 2351 2352:- dynamic actions/1. 2353:- multifile actions/1. 2354 2355actions([attack, rob, call_the(_), repeat_wife_message(_)]). 2356 2357events([persuade, prepare, general_shows(A), call_general(A), general_remembers_wife(_)]). 2358 2359observe([general_shows('+86-555000001')], 3). 2360observe([general_remembers_wife(##########)], 4). 2361 2362maxTime(10). 2363% dB(/.../(lps_user_examples, 'arrival.pl'), lps_visualization(_90168{groups:[_89072{content:"Events", id:"event", order:1}, _89146{content:"is_a_gift", id:"is_a_gift/0", order:3, subgroupStack:"false"}, _89224{content:"is_a_weapon", id:"is_a_weapon/0", order:3, subgroupStack:"false"}, _89290{content:"Actions", id:"action", order:4}], items:[_89400{content:"is_a_gift", end:11, group:"is_a_gift/0", id:0, start:7, title:"Fluent is_a_gift initiated at 7<br/>and terminated at transition to 11"}, _89510{content:"is_a_weapon", end:7, group:"is_a_weapon/0", id:1, start:1, title:"Fluent is_a_weapon initiated at 1<br/>and terminated at transition to 7"}, _89632{content:"general_shows(+86-555000001)", group:"event", id:2, start:3, style:"color:#E19735", title:"happens(general_shows(+86-555000001),2,3)", type:"point"}, _89758{content:"general_remembers_wife(##########)", group:"event", id:3, start:4, style:"color:#E19735", title:"happens(general_remembers_wife(##########),3,4)", type:"point"}, _89884{content:"rob", group:"action", id:4, start:5, style:"color:green", title:"happens(rob,4,5)", type:"point"}, _90010{content:"call_the(+86-555000001)", group:"action", id:5, start:6, style:"color:green", title:"happens(call_the(+86-555000001),5,6)", type:"point"}, _90136{content:"repeat_wife_message(##########)", group:"action", id:6, start:7, style:"color:green", title:"happens(repeat_wife_message(##########),6,7)", type:"point"}]}, [])). 2364% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'badBlocks.pl')). 2365% run_lps_corner_file1(/.../(lps_user_examples, 'badBlocks.pl')). 2366% /pack/logicmoo_ec/test/lps_user_examples/badBlocks.pl:1 2367% push_lps_dialect. 2368% ops. 2369% [ti=user, load= /.../(lps_user_examples, 'badBlocks.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'badBlocks.pl'), lps= /.../(lps_user_examples, 'badBlocks.pl'), using= /.../(lps_user_examples, 'badBlocks.pl')]. 2370% continue_lps_dialect. 2371% ops. 2372 2373% LPS: fluents(location(_55870,_55872)). 2374% Into: fluents([location(_55870,_55872)]). 2375 2376% LPS: actions(move(_56914,_56916)). 2377% Into: actions([move(_56914,_56916)]). 2378 2379% LPS: initially((location(b,floor),location(c,b),location(a,floor))). 2380% Into: initial_state([location(b,floor),location(c,b),location(a,floor)]). 2381 2382% LPS: observe(from(move(d,a),to(3,4))). 2383% Into: observe([move(d,a)],4). 2384 2385% LPS: then(if(true),from(make_tower([b,a,floor]),to(_60518,_60520))). 2386% Into: reactive_rule([],[happens(make_tower([b,a,floor]),_60518,_60520)]). 2387 2388% LPS: if(at(clear(_61708),_61730),(_61708\=floor,at(not(location(_61882,_61708)),_61730))). 2389% Into: l_int(holds(clear(_61708),_61730),[_61708\=floor,holds(not(location(_61882,_61708)),_61730)]). 2390 2391% LPS: at(clear(floor),_63874). 2392% Into: l_int(holds(clear(floor),_63874),[]). 2393 2394% LPS: if(from(make_tower([_65102,floor]),to(_65164,_65166)),from(make_on(_65102,floor),to(_65164,_65166))). 2395% Into: l_events(happens(make_tower([_65102,floor]),_65164,_65166),[happens(make_on(_65102,floor),_65164,_65166)]). 2396 2397% LPS: if(from(make_tower([_66502,_66522|_66524]),to(_66572,_66574)),(_66522\=floor,from(make_tower([_66522|_66524]),to(_66572,_66808)),from(make_on(_66502,_66522),to(_66808,_66574)))). 2398% Into: l_events(happens(make_tower([_66502,_66522|_66524]),_66572,_66574),[_66522\=floor,happens(make_tower([_66522|_66524]),_66572,_66808),happens(make_on(_66502,_66522),_66808,_66574)]). 2399 2400% LPS: if(from(make_on(_68354,_68356),to(_68392,_68394)),(at(not(location(_68354,_68356)),_68392),from(make_clear(_68354),to(_68664,_68666)),from(make_clear(_68356),to(_68394,_68802)),from(move(_68354,_68356),to(_68952,_68954)))). 2401% Into: l_events(happens(make_on(_68354,_68356),_68392,_68394),[holds(not(location(_68354,_68356)),_68392),happens(make_clear(_68354),_68664,_68666),happens(make_clear(_68356),_68394,_68802),happens(move(_68354,_68356),_68952,_68954)]). 2402 2403% LPS: if(from(make_on(_70356,_70358),to(_70394,_70394)),at(location(_70356,_70358),_70394)). 2404% Into: l_events(happens(make_on(_70356,_70358),_70394,_70394),[holds(location(_70356,_70358),_70394)]). 2405 2406% LPS: if(from(make_clear(_71648),to(_71684,_71684)),at(clear(_71648),_71684)). 2407% Into: l_events(happens(make_clear(_71648),_71684,_71684),[holds(clear(_71648),_71684)]). 2408 2409% LPS: if(from(make_clear(_72906),to(_72942,_72944)),(at(location(_73056,_72906),_72942),from(make_on(_73056,floor),to(_72942,_72944)))). 2410% Into: l_events(happens(make_clear(_72906),_72942,_72944),[holds(location(_73056,_72906),_72942),happens(make_on(_73056,floor),_72942,_72944)]). 2411 2412% LPS: initiates(move(_74428,_74430),location(_74428,_74430)). 2413% Into: initiated(happens(move(_74428,_74430),_75614,_75620),location(_74428,_74430),[]). 2414 2415% LPS: terminates(move(_75560,_75562),location(_75560,_75618)). 2416% Into: terminated(happens(move(_75560,_75562),_76746,_76752),location(_75560,_75618),[]). 2417 2418% LPS: false((move(_76700,_76702),not(clear(_76700)))). 2419% Into: d_pre([happens(move(_76700,_76702),_77844,_77850),holds(not(clear(_76700)),_77844)]). 2420 2421% LPS: false((move(_77886,_77888),not(clear(_77888)))). 2422% Into: d_pre([happens(move(_77886,_77888),_79030,_79036),holds(not(clear(_77888)),_79030)]). 2423% /pack/logicmoo_ec/test/lps_user_examples/badBlocks.pl:61 2424% pop_lps_dialect('$BLOB'("<stream>(0x562ef32aa300)"), (/.../(lps_user_examples, 'badBlocks.pl')-> /.../(lps_user_examples, 'badBlocks.pl'))). 2425% ops. 2426% :-listing('/pack/logicmoo_ec/test/lps_user_examples/badBlocks.pl':_86646). 2427 2428 2429initiated(happens(move(A, B), _, _), location(A, B), []). 2430 2431d_pre([happens(move(A, _), B, _), holds(not(clear(A)), B)]). 2432d_pre([happens(move(_, A), B, _), holds(not(clear(A)), B)]). 2433 2434fluents([location(_, _)]). 2435 2436l_int(holds(clear(A), B), [A\=floor, holds(not(location(_, A)), B)]). 2437l_int(holds(clear(floor), _), []). 2438 2439reactive_rule([], [happens(make_tower([b, a, floor]), _, _)]). 2440 2441terminated(happens(move(A, _), _, _), location(A, _), []). 2442 2443initial_state([location(b, floor), location(c, b), location(a, floor)]). 2444 2445l_events(happens(make_tower([A, floor]), B, C), [happens(make_on(A, floor), B, C)]). 2446l_events(happens(make_tower([A, B|C]), D, E), [B\=floor, happens(make_tower([B|C]), D, F), happens(make_on(A, B), F, E)]). 2447l_events(happens(make_on(A, B), C, D), [holds(not(location(A, B)), C), happens(make_clear(A), _, _), happens(make_clear(B), D, _), happens(move(A, B), _, _)]). 2448l_events(happens(make_on(A, B), C, C), [holds(location(A, B), C)]). 2449l_events(happens(make_clear(A), B, B), [holds(clear(A), B)]). 2450l_events(happens(make_clear(A), B, C), [holds(location(D, A), B), happens(make_on(D, floor), B, C)]). 2451 2452:- dynamic actions/1. 2453:- multifile actions/1. 2454 2455actions([move(_, _)]). 2456 2457observe([move(d, a)], 4). 2458 2459maxTime(10). 2460Warning: Rejected observations [move(d,a)] attempting to satisfy false preconditions [happens(move(d,a),3,4),holds(not(clear(a)),3)] 2461% dB(/.../(lps_user_examples, 'badBlocks.pl'), lps_visualization(_98908{groups:[_97932{content:"location(A,B)", id:"location/2", order:3, subgroupStack:"false"}, _97998{content:"Actions", id:"action", order:4}], items:[_98120{content:"a,floor", end:11, group:"location/2", id:0, start:1, subgroup:"a", title:"Fluent location(a,floor) initiated at 1<br/>and terminated at transition to 11"}, _98246{content:"b,a", end:11, group:"location/2", id:1, start:3, subgroup:"b", title:"Fluent location(b,a) initiated at 3<br/>and terminated at transition to 11"}, _98372{content:"b,floor", end:3, group:"location/2", id:2, start:1, subgroup:"b", title:"Fluent location(b,floor) initiated at 1<br/>and terminated at transition to 3"}, _98498{content:"c,b", end:2, group:"location/2", id:3, start:1, subgroup:"c", title:"Fluent location(c,b) initiated at 1<br/>and terminated at transition to 2"}, _98624{content:"c,floor", end:11, group:"location/2", id:4, start:2, subgroup:"c", title:"Fluent location(c,floor) initiated at 2<br/>and terminated at transition to 11"}, _98750{content:"move(c,floor)", group:"action", id:5, start:2, style:"color:green", title:"happens(move(c,floor),1,2)", type:"point"}, _98876{content:"move(b,a)", group:"action", id:6, start:3, style:"color:green", title:"happens(move(b,a),2,3)", type:"point"}]}, [])). 2462% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'bad conveyor.pl')). 2463% run_lps_corner_file1(/.../(lps_user_examples, 'bad conveyor.pl')). 2464% /pack/logicmoo_ec/test/lps_user_examples/bad conveyor.pl:1 2465% push_lps_dialect. 2466% ops. 2467% [ti=user, load= /.../(lps_user_examples, 'bad conveyor.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'bad conveyor.pl'), lps= /.../(lps_user_examples, 'bad conveyor.pl'), using= /.../(lps_user_examples, 'bad conveyor.pl')]. 2468% continue_lps_dialect. 2469% ops. 2470 2471% LPS: fluents((pouring(_19836),contents(_19836,_19892),empty/1,location(_20010,_20012))). 2472% Into: fluents([pouring(_19836),contents(_19836,_19892),empty(_21324),location(_20010,_20012)]). 2473 2474% LPS: initially((contents(bottle,0),contents(container,0),contents(tank1,100),contents(tank2,100),location(bottle,160),location(tank1,160),location(tank2,240),location(container,360))). 2475% Into: initial_state([contents(bottle,0),contents(container,0),contents(tank1,100),contents(tank2,100),location(bottle,160),location(tank1,160),location(tank2,240),location(container,360)]). 2476 2477% LPS: actions((openValve(_22962),closeValve(_22962),pourChunk(_23056,_23058),turnConveyor/1)). 2478% Into: actions([openValve(_22962),closeValve(_22962),pourChunk(_23056,_23058),turnConveyor(_24426)]). 2479 2480% LPS: false((pourChunk(_24370,_24372),turnConveyor(_24412))). 2481% Into: d_pre([happens(pourChunk(_24370,_24372),_25454,_25460),happens(turnConveyor(_24412),_25454,_25460)]). 2482 2483% LPS: false((pourChunk(_25540,_25542),location(_25540,_25598),location(_25542,_25654),_25598\=_25654)). 2484% Into: d_pre([happens(pourChunk(_25540,_25542),_26898,_26904),holds(location(_25540,_25598),_26898),holds(location(_25542,_25654),_26898),_25598\=_25654]). 2485 2486% LPS: if(from(makeLocation(bottle,_27744),_27766),(at(location(bottle,_27848),_27766),at(location(_27744,_27952),_27766),_28084 is _27952-_27848,from(moveConveyor(_28084),_27766))). 2487% Into: l_events(happens(makeLocation(bottle,_27744),_27766,_29444),[holds(location(bottle,_27848),_27766),holds(location(_27744,_27952),_27766),_28084 is _27952-_27848,happens(moveConveyor(_28084),_27766,_29534)]). 2488 2489% LPS: from(moveConveyor(0),to(_30470,_30470)). 2490% Into: l_events(happens(moveConveyor(0),_30470,_30470),[]). 2491 2492% LPS: if(from(moveConveyor(_31544),to(_31580,_31582)),(_31544>0,from(turnConveyor(clockwise),to(_31580,_31782)),_31924 is _31544-10,from(moveConveyor(_31924),to(_31782,_31582)))). 2493% Into: l_events(happens(moveConveyor(_31544),_31580,_31582),[_31544>0,happens(turnConveyor(clockwise),_31580,_31782),_31924 is _31544-10,happens(moveConveyor(_31924),_31782,_31582)]). 2494 2495% LPS: if(moveConveyor(_33992),(_33992<0,turnConveyor(counterClockwise),_34180 is _33992+10,moveConveyor(_34180))). 2496% Into: l_events(happens(moveConveyor(_33992),_35422,_35428),[_33992<0,happens(turnConveyor(counterClockwise),_35422,_35704),_34180 is _33992+10,happens(moveConveyor(_34180),_35704,_35428)]). 2497 2498% LPS: if(updates(turnConveyor(counterClockwise),in(to(_36012,_36014),location(bottle,_36012))),_36014 is _36012-10). 2499% Into: updated(happens(turnConveyor(counterClockwise),_37488,_37494),location(bottle,_36012),_36012-_36014,[_36014 is _36012-10]). 2500 2501% LPS: if(updates(turnConveyor(clockwise),in(to(_37766,_37768),location(bottle,_37766))),_37768 is _37766+10). 2502% Into: updated(happens(turnConveyor(clockwise),_39242,_39248),location(bottle,_37766),_37766-_37768,[_37768 is _37766+10]). 2503 2504% LPS: if(empty(_39484),contents(_39484,0)). 2505% Into: l_int(holds(empty(_39484),_40568),[holds(contents(_39484,0),_40568)]). 2506 2507% LPS: then(if((at(empty(bottle),_40616),at(location(bottle,160),_40616))),(from(pour(tank1,bottle,50),to(_40616,_40912)),from(makeLocation(bottle,tank2),to(_40912,_41064)),from(pour(tank2,bottle,50),to(_41064,_41232)),from(makeLocation(bottle,container),to(_41232,_41384)),from(pour(bottle,container,100),to(_41384,_41552)),from(makeLocation(bottle,tank1),_41552))). 2508% Into: reactive_rule([holds(empty(bottle),_40616),holds(location(bottle,160),_40616)],[happens(pour(tank1,bottle,50),_40616,_40912),happens(makeLocation(bottle,tank2),_40912,_41064),happens(pour(tank2,bottle,50),_41064,_41232),happens(makeLocation(bottle,container),_41232,_41384),happens(pour(bottle,container,100),_41384,_41552),happens(makeLocation(bottle,tank1),_41552,_43344)]). 2509 2510% LPS: if(from(pour(_43168,_43170,_43172),to(_43208,_43210)),(at(contents(_43170,_43324),_43208),_43456 is _43172+_43324,valveRate(_43524),_43608 is _43456-_43524,from(openValve(_43168),to(_43208,_43714)),at(contents(_43170,_43608),_43850),from(closeValve(_43168),to(_43850,_43210)))). 2511% Into: l_events(happens(pour(_43168,_43170,_43172),_43208,_43210),[holds(contents(_43170,_43324),_43208),_43456 is _43172+_43324,valveRate(_43524),_43608 is _43456-_43524,happens(openValve(_43168),_43208,_43714),holds(contents(_43170,_43608),_43850),happens(closeValve(_43168),_43850,_43210)]). 2512 2513% LPS: initiates(openValve(_45500),pouring(_45500)). 2514% Into: initiated(happens(openValve(_45500),_46648,_46654),pouring(_45500),[]). 2515 2516% LPS: terminates(closeValve(_46584),pouring(_46584)). 2517% Into: terminated(happens(closeValve(_46584),_47732,_47738),pouring(_46584),[]). 2518 2519% LPS: then(if((at(pouring(_47676),_47698),at(location(_47676,_47780),_47698),at(location(_47882,_47780),_47698),_47882\=_47676)),from(pourChunk(_47676,_47882),to(_47698,_48210))). 2520% Into: reactive_rule([holds(pouring(_47676),_47698),holds(location(_47676,_47780),_47698),holds(location(_47882,_47780),_47698),_47882\=_47676],[happens(pourChunk(_47676,_47882),_47698,_48210)]). 2521 2522% LPS: if(updates(pourChunk(_49446,_49448),in(to(_49484,_49486),contents(_49448,_49484))),(valveRate(_49672),_49486 is _49484+_49672)). 2523% Into: updated(happens(pourChunk(_49446,_49448),_51070,_51076),contents(_49448,_49484),_49484-_49486,[valveRate(_49672),_49486 is _49484+_49672]). 2524 2525% LPS: if(updates(pourChunk(_50954,_50956),in(to(_50992,_50994),contents(_50954,_50992))),(valveRate(_51180),_50994 is _50992-_51180)). 2526% Into: updated(happens(pourChunk(_50954,_50956),_52578,_52584),contents(_50954,_50992),_50992-_50994,[valveRate(_51180),_50994 is _50992-_51180]). 2527 2528% LPS: if(at(locatedContents(_53568,_53570,_53572),_53594),(at(location(_53568,_53570),_53594),at(contents(_53568,_53572),_53594))). 2529% Into: l_int(holds(locatedContents(_53568,_53570,_53572),_53594),[holds(location(_53568,_53570),_53594),holds(contents(_53568,_53572),_53594)]). 2530% /pack/logicmoo_ec/test/lps_user_examples/bad conveyor.pl:129 2531% pop_lps_dialect('$BLOB'("<stream>(0x562ef4161900)"), (/.../(lps_user_examples, 'bad conveyor.pl')-> /.../(lps_user_examples, 'bad conveyor.pl'))). 2532% ops. 2533% :-listing('/pack/logicmoo_ec/test/lps_user_examples/bad conveyor.pl':_70820). 2534 2535 2536initiated(happens(openValve(A), _, _), pouring(A), []). 2537 2538d_pre([happens(pourChunk(_, _), A, B), happens(turnConveyor(_), A, B)]). 2539d_pre([happens(pourChunk(A, B), C, _), holds(location(A, D), C), holds(location(B, E), C), D\=E]). 2540 2541d(locatedContents(bottle, Pos, Level), [type:rectangle, fillColor:yellow, from:[X1, 60], to:[X2, Height]]) :- 2542 Height is 60+Level/4, 2543 X1 is Pos-10, 2544 X2 is Pos+10. 2545d(location(bottle, Pos), [type:rectangle, from:[X1, 60], to:[X2, 100], strokeColor:blue]) :- 2546 X1 is Pos-10, 2547 X2 is Pos+10. 2548d(timeless, [[type:line, strokeWidth:2, strokeColor:black, from:[100, 60], to:[400, 60]], [type:circle, strokeWidth:2, strokeColor:black, center:[100, 40], radius:20], [type:circle, strokeWidth:2, strokeColor:black, center:[400, 40], radius:20], [type:rectangle, fillColor:white, from:[130, 120], to:[190, 150], strokeColor:blue], [type:rectangle, fillColor:white, from:[210, 120], to:[270, 150], strokeColor:blue], [type:line, strokeWidth:2, strokeColor:black, from:[100, 20], to:[400, 20]]]). 2549 2550fluents([pouring(A), contents(A, _), empty(_), location(_, _)]). 2551 2552l_int(holds(empty(A), B), [holds(contents(A, 0), B)]). 2553l_int(holds(locatedContents(A, B, C), D), [holds(location(A, B), D), holds(contents(A, C), D)]). 2554 2555reactive_rule([holds(empty(bottle), A), holds(location(bottle, 160), A)], [happens(pour(tank1, bottle, 50), A, B), happens(makeLocation(bottle, tank2), B, C), happens(pour(tank2, bottle, 50), C, D), happens(makeLocation(bottle, container), D, E), happens(pour(bottle, container, 100), E, F), happens(makeLocation(bottle, tank1), F, _)]). 2556reactive_rule([holds(pouring(A), B), holds(location(A, C), B), holds(location(D, C), B), D\=A], [happens(pourChunk(A, D), B, _)]). 2557 2558terminated(happens(closeValve(A), _, _), pouring(A), []). 2559 2560valveRate(10). 2561 2562initial_state([contents(bottle, 0), contents(container, 0), contents(tank1, 100), contents(tank2, 100), location(bottle, 160), location(tank1, 160), location(tank2, 240), location(container, 360)]). 2563 2564l_events(happens(makeLocation(bottle, A), B, _), [holds(location(bottle, C), B), holds(location(A, D), B), E is D-C, happens(moveConveyor(E), B, _)]). 2565l_events(happens(moveConveyor(0), A, A), []). 2566l_events(happens(moveConveyor(A), B, C), [A>0, happens(turnConveyor(clockwise), B, D), E is A-10, happens(moveConveyor(E), D, C)]). 2567l_events(happens(moveConveyor(A), B, C), [A<0, happens(turnConveyor(counterClockwise), B, D), E is A+10, happens(moveConveyor(E), D, C)]). 2568l_events(happens(pour(A, B, C), D, E), [holds(contents(B, F), D), G is C+F, valveRate(H), I is G-H, happens(openValve(A), D, _), holds(contents(B, I), J), happens(closeValve(A), J, E)]). 2569 2570:- dynamic actions/1. 2571:- multifile actions/1. 2572 2573actions([openValve(A), closeValve(A), pourChunk(_, _), turnConveyor(_)]). 2574 2575updated(happens(turnConveyor(counterClockwise), _, _), location(bottle, A), A-B, [B is A-10]). 2576updated(happens(turnConveyor(clockwise), _, _), location(bottle, A), A-B, [B is A+10]). 2577updated(happens(pourChunk(_, A), _, _), contents(A, B), B-C, [valveRate(D), C is B+D]). 2578updated(happens(pourChunk(A, _), _, _), contents(A, B), B-C, [valveRate(D), C is B-D]). 2579 2580maxTime(90). 2581ERROR: LPS: execution timeout(resolveAndUpdate) 2582PROGRAM FAILED 2583% dB(/.../(lps_user_examples, 'bad conveyor.pl'), lps_visualization(_50470{groups:[_41598{content:"contents(A,B)", id:"contents/2", order:3, subgroupStack:"false"}, _41624{content:"location(A,B)", id:"location/2", order:3, subgroupStack:"false"}, _41650{content:"pouring(A)", id:"pouring/1", order:3, subgroupStack:"false"}, _41676{content:"Actions", id:"action", order:4}], items:[_41698{content:"bottle", end:44, group:"pouring/1", id:0, start:34, subgroup:"bottle", title:"Fluent pouring(bottle) initiated at 34<br/>and terminated at transition to 44"}, _41736{content:"bottle", end:46, group:"pouring/1", id:1, start:45, subgroup:"bottle", title:"Fluent pouring(bottle) initiated at 45<br/>and terminated at transition to 46"}, _41774{content:"bottle", end:48, group:"pouring/1", id:2, start:47, subgroup:"bottle", title:"Fluent pouring(bottle) initiated at 47<br/>and terminated at transition to 48"}, ...(_83892)]}, _82910{cycles:[[_76854{create:[_76180{from:[100, 60], id:"timeless", strokeColor:"black", strokeWidth:2, to:[400, 60], type:"line"}, _76302{center:[100, 40], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _76424{center:[400, 40], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _76558{fillColor:"white", from:[130, 120], id:"timeless", strokeColor:"blue", to:[190, 150], type:"rectangle"}, _76692{fillColor:"white", from:[210, 120], id:"timeless", strokeColor:"blue", to:[270, 150], type:"rectangle"}, _76826{from:[100, 20], id:"timeless", strokeColor:"black", strokeWidth:2, to:[400, 20], type:"line"}]}], [_77002{create:_76978{from:[150, 60], id:"location(bottle,160)", strokeColor:"blue", to:[170, 100], type:"rectangle"}}], [], [], [], [], [], [], [_77186{create:_77162{from:[160, 60], id:"location(bottle,170)", strokeColor:"blue", to:[180, 100], type:"rectangle"}}, _77216{kill:"location(bottle,160)"}], [_77364{create:_77340{from:[170, 60], id:"location(bottle,180)", strokeColor:"blue", to:[190, 100], type:"rectangle"}}, _77394{kill:"location(bottle,170)"}], [_77542{create:_77518{from:[180, 60], id:"location(bottle,190)", strokeColor:"blue", to:[200, 100], type:"rectangle"}}, _77572{kill:"location(bottle,180)"}], [_77720{create:_77696{from:[190, 60], id:"location(bottle,200)", strokeColor:"blue", to:[210, 100], type:"rectangle"}}, _77750{kill:"location(bottle,190)"}], [_77898{create:_77874{from:[200, 60], id:"location(bottle,210)", strokeColor:"blue", to:[220, 100], type:"rectangle"}}, _77928{kill:"location(bottle,200)"}], [_78076{create:_78052{from:[210, 60], id:"location(bottle,220)", strokeColor:"blue", to:[230, 100], type:"rectangle"}}, _78106{kill:"location(bottle,210)"}], [_78254{create:_78230{from:[220, 60], id:"location(bottle,230)", strokeColor:"blue", to:[240, 100], type:"rectangle"}}, _78284{kill:"location(bottle,220)"}], [_78432{create:_78408{from:[230, 60], id:"location(bottle,240)", strokeColor:"blue", to:[250, 100], type:"rectangle"}}, _78462{kill:"location(bottle,230)"}], [], [], [], [], [], [], [_78646{create:_78622{from:[240, 60], id:"location(bottle,250)", strokeColor:"blue", to:[260, 100], type:"rectangle"}}, _78676{kill:"location(bottle,240)"}], [_78824{create:_78800{from:[250, 60], id:"location(bottle,260)", strokeColor:"blue", to:[270, 100], type:"rectangle"}}, _78854{kill:"location(bottle,250)"}], [_79002{create:_78978{from:[260, 60], id:"location(bottle,270)", strokeColor:"blue", to:[280, 100], type:"rectangle"}}, _79032{kill:"location(bottle,260)"}], [_79180{create:_79156{from:[270, 60], id:"location(bottle,280)", strokeColor:"blue", to:[290, 100], type:"rectangle"}}, _79210{kill:"location(bottle,270)"}], [_79358{create:_79334{from:[280, 60], id:"location(bottle,290)", strokeColor:"blue", to:[300, 100], type:"rectangle"}}, _79388{kill:"location(bottle,280)"}], [_79536{create:_79512{from:[290, 60], id:"location(bottle,300)", strokeColor:"blue", to:[310, 100], type:"rectangle"}}, _79566{kill:"location(bottle,290)"}], [_79714{create:_79690{from:[300, 60], id:"location(bottle,310)", strokeColor:"blue", to:[320, 100], type:"rectangle"}}, _79744{kill:"location(bottle,300)"}], [_79892{create:_79868{from:[310, 60], id:"location(bottle,320)", strokeColor:"blue", to:[330, 100], type:"rectangle"}}, _79922{kill:"location(bottle,310)"}], [_80070{create:_80046{from:[320, 60], id:"location(bottle,330)", strokeColor:"blue", to:[340, 100], type:"rectangle"}}, _80100{kill:"location(bottle,320)"}], [_80248{create:_80224{from:[330, 60], id:"location(bottle,340)", strokeColor:"blue", to:[350, 100], type:"rectangle"}}, _80278{kill:"location(bottle,330)"}], [_80426{create:_80402{from:[340, 60], id:"location(bottle,350)", strokeColor:"blue", to:[360, 100], type:"rectangle"}}, _80456{kill:"location(bottle,340)"}], [_80604{create:_80580{from:[350, 60], id:"location(bottle,360)", strokeColor:"blue", to:[370, 100], type:"rectangle"}}, _80634{kill:"location(bottle,350)"}], [], [], [], [], [], [], [], [], [], [], [], [_80848{create:_80824{from:[340, 60], id:"location(bottle,350)", strokeColor:"blue", to:[360, 100], type:"rectangle"}}, _80878{kill:"location(bottle,360)"}], [_81026{create:_81002{from:[330, 60], id:"location(bottle,340)", strokeColor:"blue", to:[350, 100], type:"rectangle"}}, _81056{kill:"location(bottle,350)"}], [_81204{create:_81180{from:[320, 60], id:"location(bottle,330)", strokeColor:"blue", to:[340, 100], type:"rectangle"}}, _81234{kill:"location(bottle,340)"}], [_81382{create:_81358{from:[310, 60], id:"location(bottle,320)", strokeColor:"blue", to:[330, 100], type:"rectangle"}}, _81412{kill:"location(bottle,330)"}], [_81560{create:_81536{from:[300, 60], id:"location(bottle,310)", strokeColor:"blue", to:[320, 100], type:"rectangle"}}, _81590{kill:"location(bottle,320)"}], [_81738{create:_81714{from:[290, 60], id:"location(bottle,300)", strokeColor:"blue", to:[310, 100], type:"rectangle"}}, _81768{kill:"location(bottle,310)"}], [_81916{create:_81892{from:[280, 60], id:"location(bottle,290)", strokeColor:"blue", to:[300, 100], type:"rectangle"}}, _81946{kill:"location(bottle,300)"}], [_82094{create:_82070{from:[270, 60], id:"location(bottle,280)", strokeColor:"blue", to:[290, 100], type:"rectangle"}}, _82124{kill:"location(bottle,290)"}], [_82272{create:_82248{from:[260, 60], id:"location(bottle,270)", strokeColor:"blue", to:[280, 100], type:"rectangle"}}, _82302{kill:"location(bottle,280)"}], [_82450{create:_82426{from:[250, 60], id:"location(bottle,260)", strokeColor:"blue", to:[270, 100], type:"rectangle"}}, _82480{kill:"location(bottle,270)"}], [_82628{create:_82604{from:[240, 60], id:"location(bottle,250)", strokeColor:"blue", to:[260, 100], type:"rectangle"}}, _82658{kill:"location(bottle,260)"}], [_82806{create:_82782{from:[230, 60], id:"location(bottle,240)", strokeColor:"blue", to:[250, 100], type:"rectangle"}}, _82836{kill:"location(bottle,250)"}], [_82872{kill:"location(bottle,240)"}, _82902{kill:"timeless"}]]})). 2584% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'Ballot.pl')). 2585% run_lps_corner_file1(/.../(lps_user_examples, 'Ballot.pl')). 2586% /pack/logicmoo_ec/test/lps_user_examples/Ballot.pl:1 2587% push_lps_dialect. 2588% ops. 2589% [ti=user, load= /.../(lps_user_examples, 'Ballot.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'Ballot.pl'), lps= /.../(lps_user_examples, 'Ballot.pl'), using= /.../(lps_user_examples, 'Ballot.pl')]. 2590% continue_lps_dialect. 2591% ops. 2592 2593% LPS: events((ballot(_147606,_147608),giveRightToVote(_147606,_147664),delegate(_147718,_147720),vote(_147664,_147776))). 2594% Into: events([ballot(_147606,_147608),giveRightToVote(_147606,_147664),delegate(_147718,_147720),vote(_147664,_147776)]). 2595 2596% LPS: fluents((chairman(_149008),voter(_149062,_149064),voted(_149062,_149120),delegateOf(_149062,_149176),voteCount(_149120,_149232))). 2597% Into: fluents([chairman(_149008),voter(_149062,_149064),voted(_149062,_149120),delegateOf(_149062,_149176),voteCount(_149120,_149232)]). 2598 2599% LPS: observe(from(ballot(chair,[trump,clinton]),to(1,2))). 2600% Into: observe([ballot(chair,[trump,clinton])],2). 2601 2602% LPS: observe((giveRightToVote(chair,miguel),giveRightToVote(chair,fariba),giveRightToVote(chair,bob),from(giveRightToVote(chair,jacinto),to(3,4)))). 2603% Into: observe([giveRightToVote(chair,miguel),giveRightToVote(chair,fariba),giveRightToVote(chair,bob),giveRightToVote(chair,jacinto)],4). 2604 2605% LPS: observe(from(delegate(bob,miguel),to(4,5))). 2606% Into: observe([delegate(bob,miguel)],5). 2607 2608% LPS: observe(from(vote(miguel,clinton),to(5,6))). 2609% Into: observe([vote(miguel,clinton)],6). 2610 2611% LPS: observe(from(delegate(jacinto,bob),to(6,7))). 2612% Into: observe([delegate(jacinto,bob)],7). 2613 2614% LPS: observe(from(delegate(fariba,miguel),to(7,8))). 2615% Into: observe([delegate(fariba,miguel)],8). 2616 2617% LPS: if(initiates(ballot(_157782,_157784),voteCount(_157838,0)),member(_157838,_157784)). 2618% Into: initiated(happens(ballot(_157782,_157784),_159098,_159104),voteCount(_157838,0),[member(_157838,_157784)]). 2619 2620% LPS: initiates(ballot(_159494,_159496),voter(_159494,1)). 2621% Into: initiated(happens(ballot(_159494,_159496),_160680,_160686),voter(_159494,1),[]). 2622 2623% LPS: initiates(ballot(_160626,_160628),chairman(_160626)). 2624% Into: initiated(happens(ballot(_160626,_160628),_161792,_161798),chairman(_160626),[]). 2625 2626% LPS: false((ballot(_161780,_161782),voteCount(_161836,_161838))). 2627% Into: d_pre([happens(ballot(_161780,_161782),_162882,_162888),holds(voteCount(_161836,_161838),_162882)]). 2628 2629% LPS: if(initiates(giveRightToVote(_163182,_163184),voter(_163184,1)),(chairman(_163182),not(voter(_163184,_163376)))). 2630% Into: initiated(happens(giveRightToVote(_163182,_163184),_164604,_164610),voter(_163184,1),[holds(chairman(_163182),_164604),holds(not(voter(_163184,_163376)),_164604)]). 2631 2632% LPS: updates(delegate(_165064,_165066),in(to(_165102,0),voter(_165064,_165102))). 2633% Into: updated(happens(delegate(_165064,_165066),_166414,_166420),voter(_165064,_165102),_165102-0,[]). 2634 2635% LPS: if(updates(delegate(_166316,_166318),in(to(_166354,_166356),voter(_166436,_166354))),(delegateOf(_166318,_166436),voter(_166316,_166614),_166356 is _166614+_166354)). 2636% Into: updated(happens(delegate(_166316,_166318),_168082,_168088),voter(_166436,_166354),_166354-_166356,[holds(delegateOf(_166318,_166436),_168082),holds(voter(_166316,_166614),_168082),_166356 is _166614+_166354]). 2637 2638% LPS: if(updates(delegate(_168936,_168938),in(to(_168974,_168976),voteCount(_169056,_168974))),(delegateOf(_168938,_169178),voted(_169178,_169056),voter(_168936,_169290),_168976 is _168974+_169290)). 2639% Into: updated(happens(delegate(_168936,_168938),_170814,_170820),voteCount(_169056,_168974),_168974-_168976,[holds(delegateOf(_168938,_169178),_170814),holds(voted(_169178,_169056),_170814),holds(voter(_168936,_169290),_170814),_168976 is _168974+_169290]). 2640 2641% LPS: initiates(delegate(_171822,_171824),voted(_171822,delegated(_171824))). 2642% Into: initiated(happens(delegate(_171822,_171824),_173036,_173042),voted(_171822,delegated(_171824)),[]). 2643 2644% LPS: if(delegateOf(_173016,_173018),(voted(_173016,delegated(_173092)),delegateOf(_173092,_173018))). 2645% Into: l_int(holds(delegateOf(_173016,_173018),_174256),[holds(voted(_173016,delegated(_173092)),_174256),holds(delegateOf(_173092,_173018),_174256)]). 2646 2647% LPS: if(delegateOf(_174868,_174868),not(voted(_174868,delegated(_174952)))). 2648% Into: l_int(holds(delegateOf(_174868,_174868),_176020),[holds(not(voted(_174868,delegated(_174952))),_176020)]). 2649 2650% LPS: false((delegate(_176494,_176496),delegate(_176550,_176496),_176494\=_176550)). 2651% Into: d_pre([happens(delegate(_176494,_176496),_177740,_177746),happens(delegate(_176550,_176496),_177740,_177746),_176494\=_176550]). 2652 2653% LPS: false((delegate(_19610,_19612),voted(_19610,_19654))). 2654% Into: d_pre([happens(delegate(_19610,_19612),_19940,_19946),holds(voted(_19610,_19654),_19940)]). 2655 2656% LPS: false((delegate(_20248,_20250),_20248==_20250)). 2657% Into: d_pre([happens(delegate(_20248,_20250),_21382,_21388),_20248==_20250]). 2658 2659% LPS: false((delegate(_21690,_21692),delegate(_21690,_21748),_21692\=_21748)). 2660% Into: d_pre([happens(delegate(_21690,_21692),_22936,_22942),happens(delegate(_21690,_21748),_22936,_22942),_21692\=_21748]). 2661 2662% LPS: false((delegate(_23344,_23346),delegateOf(_23346,_23344))). 2663% Into: d_pre([happens(delegate(_23344,_23346),_24470,_24476),holds(delegateOf(_23346,_23344),_24470)]). 2664 2665% LPS: initiates(vote(_24770,_24772),voted(_24770,_24772)). 2666% Into: initiated(happens(vote(_24770,_24772),_25956,_25962),voted(_24770,_24772),[]). 2667 2668% LPS: if(updates(vote(_25970,_25972),in(to(_26008,_26010),voteCount(_25972,_26008))),(voter(_25970,_26212),_26010 is _26008+_26212)). 2669% Into: updated(happens(vote(_25970,_25972),_27624,_27630),voteCount(_25972,_26008),_26008-_26010,[holds(voter(_25970,_26212),_27624),_26010 is _26008+_26212]). 2670 2671% LPS: false((vote(_28096,_28098),vote(_28152,_28098),_28096\=_28152)). 2672% Into: d_pre([happens(vote(_28096,_28098),_29342,_29348),happens(vote(_28152,_28098),_29342,_29348),_28096\=_28152]). 2673 2674% LPS: false((vote(_29716,_29718),voted(_29716,_29774))). 2675% Into: d_pre([happens(vote(_29716,_29718),_30830,_30836),holds(voted(_29716,_29774),_30830)]). 2676 2677% LPS: false((vote(_31138,_31140),vote(_31138,_31196),_31140\=_31196)). 2678% Into: d_pre([happens(vote(_31138,_31140),_32384,_32390),happens(vote(_31138,_31196),_32384,_32390),_31140\=_31196]). 2679 2680% LPS: if(at(winningProposal(_32750,_32752),_32774),(at(findall(_32752-_32750,voteCount(_32750,_32752),_32960),_32774),sort(_32960,_33064),append(_33206,[_32752-_32750],_33064))). 2681% Into: l_int(holds(winningProposal(_32750,_32752),_32774),[holds(findall(_32752-_32750,[holds(voteCount(_32750,_32752),_32774)],_32960),_32774),sort(_32960,_33064),append(_33206,[_32752-_32750],_33064)]). 2682 2683% LPS: then(if(winningProposal(_35530,4)),from(lps_terminate,_35594)). 2684% Into: reactive_rule([holds(winningProposal(_35530,4),_36668)],[happens(lps_terminate,_35594,_37062)]). 2685% /pack/logicmoo_ec/test/lps_user_examples/Ballot.pl:77 2686% pop_lps_dialect('$BLOB'("<stream>(0x562ef4163d00)"), (/.../(lps_user_examples, 'Ballot.pl')-> /.../(lps_user_examples, 'Ballot.pl'))). 2687% ops. 2688% :-listing('/pack/logicmoo_ec/test/lps_user_examples/Ballot.pl':_44738). 2689 2690 2691initiated(happens(ballot(_, A), _, _), voteCount(B, 0), [member(B, A)]). 2692initiated(happens(ballot(A, _), _, _), voter(A, 1), []). 2693initiated(happens(ballot(A, _), _, _), chairman(A), []). 2694initiated(happens(giveRightToVote(A, B), C, _), voter(B, 1), [holds(chairman(A), C), holds(not(voter(B, _)), C)]). 2695initiated(happens(delegate(A, B), _, _), voted(A, delegated(B)), []). 2696initiated(happens(vote(A, B), _, _), voted(A, B), []). 2697 2698d_pre([happens(ballot(_, _), A, _), holds(voteCount(_, _), A)]). 2699d_pre([happens(delegate(A, B), C, D), happens(delegate(E, B), C, D), A\=E]). 2700d_pre([happens(delegate(A, _), B, _), holds(voted(A, _), B)]). 2701d_pre([happens(delegate(A, B), _, _), A==B]). 2702d_pre([happens(delegate(A, B), C, D), happens(delegate(A, E), C, D), B\=E]). 2703d_pre([happens(delegate(A, B), C, _), holds(delegateOf(B, A), C)]). 2704d_pre([happens(vote(A, B), C, D), happens(vote(E, B), C, D), A\=E]). 2705d_pre([happens(vote(A, _), B, _), holds(voted(A, _), B)]). 2706d_pre([happens(vote(A, B), C, D), happens(vote(A, E), C, D), B\=E]). 2707 2708fluents([chairman(_), voter(A, _), voted(A, B), delegateOf(A, _), voteCount(B, _)]). 2709 2710l_int(holds(delegateOf(A, B), C), [holds(voted(A, delegated(D)), C), holds(delegateOf(D, B), C)]). 2711l_int(holds(delegateOf(A, A), B), [holds(not(voted(A, delegated(_))), B)]). 2712l_int(holds(winningProposal(A, B), C), [holds(findall(B-A, [holds(voteCount(A, B), C)], D), C), sort(D, E), append(_, [B-A], E)]). 2713 2714reactive_rule([holds(winningProposal(_, 4), _)], [happens(lps_terminate, _, _)]). 2715 2716:- dynamic actions/1. 2717:- multifile actions/1. 2718 2719 2720events([ballot(A, _), giveRightToVote(A, B), delegate(_, _), vote(B, _)]). 2721 2722observe([ballot(chair, [trump, clinton])], 2). 2723observe([giveRightToVote(chair, miguel), giveRightToVote(chair, fariba), giveRightToVote(chair, bob), giveRightToVote(chair, jacinto)], 4). 2724observe([delegate(bob, miguel)], 5). 2725observe([vote(miguel, clinton)], 6). 2726observe([delegate(jacinto, bob)], 7). 2727observe([delegate(fariba, miguel)], 8). 2728 2729maxTime(15). 2730 2731updated(happens(delegate(A, _), _, _), voter(A, B), B-0, []). 2732updated(happens(delegate(A, B), C, _), voter(D, E), E-F, [holds(delegateOf(B, D), C), holds(voter(A, G), C), F is G+E]). 2733updated(happens(delegate(A, B), C, _), voteCount(D, E), E-F, [holds(delegateOf(B, G), C), holds(voted(G, D), C), holds(voter(A, H), C), F is E+H]). 2734updated(happens(vote(A, B), C, _), voteCount(B, D), D-E, [holds(voter(A, F), C), E is D+F]). 2735% dB(/.../(lps_user_examples, 'Ballot.pl'), lps_visualization(_91362{groups:[_87054{content:"Events", id:"event", order:1}, _87128{content:"chairman(A)", id:"chairman/1", order:3, subgroupStack:"false"}, _87206{content:"voteCount(A,B)", id:"voteCount/2", order:3, subgroupStack:"false"}, _87284{content:"voted(A,B)", id:"voted/2", order:3, subgroupStack:"false"}, _87362{content:"voter(A,B)", id:"voter/2", order:3, subgroupStack:"false"}, _87428{content:"Actions", id:"action", order:4}], items:[_87550{content:"chair", end:9, group:"chairman/1", id:0, start:2, subgroup:"chair", title:"Fluent chairman(chair) initiated at 2<br/>and terminated at transition to 9"}, _87676{content:"clinton,0", end:6, group:"voteCount/2", id:1, start:2, subgroup:"clinton", title:"Fluent voteCount(clinton,0) initiated at 2<br/>and terminated at transition to 6"}, _87802{content:"clinton,2", end:7, group:"voteCount/2", id:2, start:6, subgroup:"clinton", title:"Fluent voteCount(clinton,2) initiated at 6<br/>and terminated at transition to 7"}, _87928{content:"clinton,3", end:8, group:"voteCount/2", id:3, start:7, subgroup:"clinton", title:"Fluent voteCount(clinton,3) initiated at 7<br/>and terminated at transition to 8"}, _88054{content:"clinton,4", end:9, group:"voteCount/2", id:4, start:8, subgroup:"clinton", title:"Fluent voteCount(clinton,4) initiated at 8<br/>and terminated at transition to 9"}, _88180{content:"trump,0", end:9, group:"voteCount/2", id:5, start:2, subgroup:"trump", title:"Fluent voteCount(trump,0) initiated at 2<br/>and terminated at transition to 9"}, _88306{content:"bob,delegated(miguel)", end:9, group:"voted/2", id:6, start:5, subgroup:"bob", title:"Fluent voted(bob,delegated(miguel)) initiated at 5<br/>and terminated at transition to 9"}, _88432{content:"fariba,delegated(miguel)", end:9, group:"voted/2", id:7, start:8, subgroup:"fariba", title:"Fluent voted(fariba,delegated(miguel)) initiated at 8<br/>and terminated at transition to 9"}, _88558{content:"jacinto,delegated(bob)", end:9, group:"voted/2", id:8, start:7, subgroup:"jacinto", title:"Fluent voted(jacinto,delegated(bob)) initiated at 7<br/>and terminated at transition to 9"}, _88684{content:"miguel,clinton", end:9, group:"voted/2", id:9, start:6, subgroup:"miguel", title:"Fluent voted(miguel,clinton) initiated at 6<br/>and terminated at transition to 9"}, _88810{content:"bob,0", end:9, group:"voter/2", id:10, start:5, subgroup:"bob", title:"Fluent voter(bob,0) initiated at 5<br/>and terminated at transition to 9"}, _88936{content:"bob,1", end:5, group:"voter/2", id:11, start:4, subgroup:"bob", title:"Fluent voter(bob,1) initiated at 4<br/>and terminated at transition to 5"}, _89062{content:"chair,1", end:9, group:"voter/2", id:12, start:2, subgroup:"chair", title:"Fluent voter(chair,1) initiated at 2<br/>and terminated at transition to 9"}, _89188{content:"fariba,0", end:9, group:"voter/2", id:13, start:8, subgroup:"fariba", title:"Fluent voter(fariba,0) initiated at 8<br/>and terminated at transition to 9"}, _89314{content:"fariba,1", end:8, group:"voter/2", id:14, start:4, subgroup:"fariba", title:"Fluent voter(fariba,1) initiated at 4<br/>and terminated at transition to 8"}, _89440{content:"jacinto,0", end:9, group:"voter/2", id:15, start:7, subgroup:"jacinto", title:"Fluent voter(jacinto,0) initiated at 7<br/>and terminated at transition to 9"}, _89566{content:"jacinto,1", end:7, group:"voter/2", id:16, start:4, subgroup:"jacinto", title:"Fluent voter(jacinto,1) initiated at 4<br/>and terminated at transition to 7"}, _89692{content:"miguel,1", end:5, group:"voter/2", id:17, start:4, subgroup:"miguel", title:"Fluent voter(miguel,1) initiated at 4<br/>and terminated at transition to 5"}, _89818{content:"miguel,2", end:7, group:"voter/2", id:18, start:5, subgroup:"miguel", title:"Fluent voter(miguel,2) initiated at 5<br/>and terminated at transition to 7"}, _89944{content:"miguel,3", end:8, group:"voter/2", id:19, start:7, subgroup:"miguel", title:"Fluent voter(miguel,3) initiated at 7<br/>and terminated at transition to 8"}, _90070{content:"miguel,4", end:9, group:"voter/2", id:20, start:8, subgroup:"miguel", title:"Fluent voter(miguel,4) initiated at 8<br/>and terminated at transition to 9"}, _90196{content:"ballot(chair,[trump,clinton])", group:"event", id:21, start:2, style:"color:#E19735", title:"happens(ballot(chair,[trump,clinton]),1,2)", type:"point"}, _90322{content:"giveRightToVote(chair,miguel)", group:"event", id:22, start:4, style:"color:#E19735", title:"happens(giveRightToVote(chair,miguel),3,4)", type:"point"}, _90448{content:"giveRightToVote(chair,fariba)", group:"event", id:23, start:4, style:"color:#E19735", title:"happens(giveRightToVote(chair,fariba),3,4)", type:"point"}, _90574{content:"giveRightToVote(chair,bob)", group:"event", id:24, start:4, style:"color:#E19735", title:"happens(giveRightToVote(chair,bob),3,4)", type:"point"}, _90700{content:"giveRightToVote(chair,jacinto)", group:"event", id:25, start:4, style:"color:#E19735", title:"happens(giveRightToVote(chair,jacinto),3,4)", type:"point"}, _90826{content:"delegate(bob,miguel)", group:"event", id:26, start:5, style:"color:#E19735", title:"happens(delegate(bob,miguel),4,5)", type:"point"}, _90952{content:"vote(miguel,clinton)", group:"event", id:27, start:6, style:"color:#E19735", title:"happens(vote(miguel,clinton),5,6)", type:"point"}, _91078{content:"delegate(jacinto,bob)", group:"event", id:28, start:7, style:"color:#E19735", title:"happens(delegate(jacinto,bob),6,7)", type:"point"}, _91204{content:"delegate(fariba,miguel)", group:"event", id:29, start:8, style:"color:#E19735", title:"happens(delegate(fariba,miguel),7,8)", type:"point"}, _91330{content:"lps_terminate(unknown)", group:"action", id:30, start:9, style:"color:green", title:"happens(lps_terminate(unknown),8,9)", type:"point"}]}, [])). 2736% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'bank.pl')). 2737% run_lps_corner_file1(/.../(lps_user_examples, 'bank.pl')). 2738% /pack/logicmoo_ec/test/lps_user_examples/bank.pl:1 2739% push_lps_dialect. 2740% ops. 2741% [ti=user, load= /.../(lps_user_examples, 'bank.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'bank.pl'), lps= /.../(lps_user_examples, 'bank.pl'), using= /.../(lps_user_examples, 'bank.pl')]. 2742% continue_lps_dialect. 2743% ops. 2744 2745% LPS: actions(transfer(_62346,_62348,_62350)). 2746% Into: actions([transfer(_62346,_62348,_62350)]). 2747 2748% LPS: fluents(balance(_63430,_63432)). 2749% Into: fluents([balance(_63430,_63432)]). 2750 2751% LPS: initially((balance(bob,0),balance(fariba,100))). 2752% Into: initial_state([balance(bob,0),balance(fariba,100)]). 2753 2754% LPS: observe(from(transfer(fariba,bob,10),to(1,2))). 2755% Into: observe([transfer(fariba,bob,10)],2). 2756 2757% LPS: then(if((transfer(fariba,bob,_66830),balance(bob,_66886),_66886>=10)),transfer(bob,fariba,10)). 2758% Into: reactive_rule([happens(transfer(fariba,bob,_66830),_68198,_68204),holds(balance(bob,_66886),_68204),_66886>=10],[happens(transfer(bob,fariba,10),_68778,_68784)]). 2759 2760% LPS: then(if((transfer(bob,fariba,_68866),balance(fariba,_68922),_68922>=20)),transfer(fariba,bob,20)). 2761% Into: reactive_rule([happens(transfer(bob,fariba,_68866),_70234,_70240),holds(balance(fariba,_68922),_70240),_68922>=20],[happens(transfer(fariba,bob,20),_70814,_70820)]). 2762 2763% LPS: if(updates(transfer(_70890,_70892,_70894),in(to(_70930,_70932),balance(_70892,_70930))),_70932 is _70930+_70894). 2764% Into: updated(happens(transfer(_70890,_70892,_70894),_72450,_72456),balance(_70892,_70930),_70930-_70932,[_70932 is _70930+_70894]). 2765 2766% LPS: if(updates(transfer(_72860,_72862,_72864),in(to(_72900,_72902),balance(_72860,_72900))),_72902 is _72900-_72864). 2767% Into: updated(happens(transfer(_72860,_72862,_72864),_74420,_74426),balance(_72860,_72900),_72900-_72902,[_72902 is _72900-_72864]). 2768 2769% LPS: false((transfer(_74838,_74840,_74842),balance(_74838,_74898),_74898-_74842<0)). 2770% Into: d_pre([happens(transfer(_74838,_74840,_74842),_76154,_76160),holds(balance(_74838,_74898),_76154),_74898-_74842<0]). 2771% /pack/logicmoo_ec/test/lps_user_examples/bank.pl:50 2772% pop_lps_dialect('$BLOB'("<stream>(0x562ef4163600)"), (/.../(lps_user_examples, 'bank.pl')-> /.../(lps_user_examples, 'bank.pl'))). 2773% ops. 2774% :-listing('/pack/logicmoo_ec/test/lps_user_examples/bank.pl':_84656). 2775 2776 2777d_pre([happens(transfer(A, _, B), C, _), holds(balance(A, D), C), D-B<0]). 2778 2779fluents([balance(_, _)]). 2780 2781reactive_rule([happens(transfer(fariba, bob, _), _, A), holds(balance(bob, B), A), B>=10], [happens(transfer(bob, fariba, 10), _, _)]). 2782reactive_rule([happens(transfer(bob, fariba, _), _, A), holds(balance(fariba, B), A), B>=20], [happens(transfer(fariba, bob, 20), _, _)]). 2783 2784initial_state([balance(bob, 0), balance(fariba, 100)]). 2785 2786:- dynamic actions/1. 2787:- multifile actions/1. 2788 2789actions([transfer(_, _, _)]). 2790 2791observe([transfer(fariba, bob, 10)], 2). 2792 2793maxTime(10). 2794 2795updated(happens(transfer(_, A, B), _, _), balance(A, C), C-D, [D is C+B]). 2796updated(happens(transfer(A, _, B), _, _), balance(A, C), C-D, [D is C-B]). 2797% dB(/.../(lps_user_examples, 'bank.pl'), lps_visualization(_92516{groups:[_88694{content:"Events", id:"event", order:1}, _88768{content:"balance(A,B)", id:"balance/2", order:3, subgroupStack:"false"}, _88834{content:"Actions", id:"action", order:4}], items:[_88956{content:"bob,0", end:2, group:"balance/2", id:0, start:1, subgroup:"bob", title:"Fluent balance(bob,0) initiated at 1<br/>and terminated at transition to 2"}, _89082{content:"bob,0", end:4, group:"balance/2", id:1, start:3, subgroup:"bob", title:"Fluent balance(bob,0) initiated at 3<br/>and terminated at transition to 4"}, _89208{content:"bob,10", end:3, group:"balance/2", id:2, start:2, subgroup:"bob", title:"Fluent balance(bob,10) initiated at 2<br/>and terminated at transition to 3"}, _89334{content:"bob,10", end:6, group:"balance/2", id:3, start:5, subgroup:"bob", title:"Fluent balance(bob,10) initiated at 5<br/>and terminated at transition to 6"}, _89460{content:"bob,20", end:5, group:"balance/2", id:4, start:4, subgroup:"bob", title:"Fluent balance(bob,20) initiated at 4<br/>and terminated at transition to 5"}, _89586{content:"bob,20", end:8, group:"balance/2", id:5, start:7, subgroup:"bob", title:"Fluent balance(bob,20) initiated at 7<br/>and terminated at transition to 8"}, _89712{content:"bob,30", end:7, group:"balance/2", id:6, start:6, subgroup:"bob", title:"Fluent balance(bob,30) initiated at 6<br/>and terminated at transition to 7"}, _89838{content:"bob,30", end:10, group:"balance/2", id:7, start:9, subgroup:"bob", title:"Fluent balance(bob,30) initiated at 9<br/>and terminated at transition to 10"}, _89964{content:"bob,40", end:9, group:"balance/2", id:8, start:8, subgroup:"bob", title:"Fluent balance(bob,40) initiated at 8<br/>and terminated at transition to 9"}, _90090{content:"bob,50", end:11, group:"balance/2", id:9, start:10, subgroup:"bob", title:"Fluent balance(bob,50) initiated at 10<br/>and terminated at transition to 11"}, _90216{content:"fariba,50", end:11, group:"balance/2", id:10, start:10, subgroup:"fariba", title:"Fluent balance(fariba,50) initiated at 10<br/>and terminated at transition to 11"}, _90342{content:"fariba,60", end:9, group:"balance/2", id:11, start:8, subgroup:"fariba", title:"Fluent balance(fariba,60) initiated at 8<br/>and terminated at transition to 9"}, _90468{content:"fariba,70", end:7, group:"balance/2", id:12, start:6, subgroup:"fariba", title:"Fluent balance(fariba,70) initiated at 6<br/>and terminated at transition to 7"}, _90594{content:"fariba,70", end:10, group:"balance/2", id:13, start:9, subgroup:"fariba", title:"Fluent balance(fariba,70) initiated at 9<br/>and terminated at transition to 10"}, _90720{content:"fariba,80", end:5, group:"balance/2", id:14, start:4, subgroup:"fariba", title:"Fluent balance(fariba,80) initiated at 4<br/>and terminated at transition to 5"}, _90846{content:"fariba,80", end:8, group:"balance/2", id:15, start:7, subgroup:"fariba", title:"Fluent balance(fariba,80) initiated at 7<br/>and terminated at transition to 8"}, _90972{content:"fariba,90", end:3, group:"balance/2", id:16, start:2, subgroup:"fariba", title:"Fluent balance(fariba,90) initiated at 2<br/>and terminated at transition to 3"}, _91098{content:"fariba,90", end:6, group:"balance/2", id:17, start:5, subgroup:"fariba", title:"Fluent balance(fariba,90) initiated at 5<br/>and terminated at transition to 6"}, _91224{content:"fariba,100", end:2, group:"balance/2", id:18, start:1, subgroup:"fariba", title:"Fluent balance(fariba,100) initiated at 1<br/>and terminated at transition to 2"}, _91350{content:"fariba,100", end:4, group:"balance/2", id:19, start:3, subgroup:"fariba", title:"Fluent balance(fariba,100) initiated at 3<br/>and terminated at transition to 4"}, _91476{content:"transfer(fariba,bob,10)", group:"event", id:20, start:2, style:"color:#E19735", title:"happens(transfer(fariba,bob,10),1,2)", type:"point"}, _91602{content:"transfer(bob,fariba,10)", group:"action", id:21, start:3, style:"color:green", title:"happens(transfer(bob,fariba,10),2,3)", type:"point"}, _91728{content:"transfer(fariba,bob,20)", group:"action", id:22, start:4, style:"color:green", title:"happens(transfer(fariba,bob,20),3,4)", type:"point"}, _91854{content:"transfer(bob,fariba,10)", group:"action", id:23, start:5, style:"color:green", title:"happens(transfer(bob,fariba,10),4,5)", type:"point"}, _91980{content:"transfer(fariba,bob,20)", group:"action", id:24, start:6, style:"color:green", title:"happens(transfer(fariba,bob,20),5,6)", type:"point"}, _92106{content:"transfer(bob,fariba,10)", group:"action", id:25, start:7, style:"color:green", title:"happens(transfer(bob,fariba,10),6,7)", type:"point"}, _92232{content:"transfer(fariba,bob,20)", group:"action", id:26, start:8, style:"color:green", title:"happens(transfer(fariba,bob,20),7,8)", type:"point"}, _92358{content:"transfer(bob,fariba,10)", group:"action", id:27, start:9, style:"color:green", title:"happens(transfer(bob,fariba,10),8,9)", type:"point"}, _92484{content:"transfer(fariba,bob,20)", group:"action", id:28, start:10, style:"color:green", title:"happens(transfer(fariba,bob,20),9,10)", type:"point"}]}, [])). 2798% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'bankTransfer2D.pl')). 2799% run_lps_corner_file1(/.../(lps_user_examples, 'bankTransfer2D.pl')). 2800% /pack/logicmoo_ec/test/lps_user_examples/bankTransfer2D.pl:1 2801% push_lps_dialect. 2802% ops. 2803% [ti=user, load= /.../(lps_user_examples, 'bankTransfer2D.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'bankTransfer2D.pl'), lps= /.../(lps_user_examples, 'bankTransfer2D.pl'), using= /.../(lps_user_examples, 'bankTransfer2D.pl')]. 2804% continue_lps_dialect. 2805% ops. 2806 2807% LPS: actions(transfer(_61330,_61332,_61334)). 2808% Into: actions([transfer(_61330,_61332,_61334)]). 2809 2810% LPS: fluents(balance(_62414,_62416)). 2811% Into: fluents([balance(_62414,_62416)]). 2812 2813% LPS: initially((balance(bob,0),balance(fariba,100))). 2814% Into: initial_state([balance(bob,0),balance(fariba,100)]). 2815 2816% LPS: observe(from(transfer(fariba,bob,10),to(1,2))). 2817% Into: observe([transfer(fariba,bob,10)],2). 2818 2819% LPS: then(if((from(transfer(fariba,bob,_65814),to(_65850,_65852)),at(balance(bob,_65966),_65852),_65966>=10)),from(transfer(bob,fariba,10),to(_65852,_66276))). 2820% Into: reactive_rule([happens(transfer(fariba,bob,_65814),_65850,_65852),holds(balance(bob,_65966),_65852),_65966>=10],[happens(transfer(bob,fariba,10),_65852,_66276)]). 2821 2822% LPS: then(if((from(transfer(bob,fariba,_68924),to(_68960,_68962)),at(balance(fariba,_69076),_68962),_69076>=20)),from(transfer(fariba,bob,20),to(_68962,_69386))). 2823% Into: reactive_rule([happens(transfer(bob,fariba,_68924),_68960,_68962),holds(balance(fariba,_69076),_68962),_69076>=20],[happens(transfer(fariba,bob,20),_68962,_69386)]). 2824 2825% LPS: if(updates(transfer(_72022,_72024,_72026),in(to(_72062,_72064),balance(_72024,_72062))),_72064 is _72062+_72026). 2826% Into: updated(happens(transfer(_72022,_72024,_72026),_73582,_73588),balance(_72024,_72062),_72062-_72064,[_72064 is _72062+_72026]). 2827 2828% LPS: if(updates(transfer(_73992,_73994,_73996),in(to(_74032,_74034),balance(_73992,_74032))),_74034 is _74032-_73996). 2829% Into: updated(happens(transfer(_73992,_73994,_73996),_75552,_75558),balance(_73992,_74032),_74032-_74034,[_74034 is _74032-_73996]). 2830 2831% LPS: false((transfer(_75970,_75972,_75974),balance(_75970,_76030),_76030<_75974)). 2832% Into: d_pre([happens(transfer(_75970,_75972,_75974),_77232,_77238),holds(balance(_75970,_76030),_77232),_76030<_75974]). 2833 2834% LPS: false((transfer(_77894,_77896,_77898),transfer(_77894,_77968,_77970),_77896\=_77968)). 2835% Into: d_pre([happens(transfer(_77894,_77896,_77898),_79186,_79192),happens(transfer(_77894,_77968,_77970),_79186,_79192),_77896\=_77968]). 2836 2837% LPS: false((transfer(_79710,_79712,_79714),transfer(_79782,_79712,_79786),_79710\=_79782)). 2838% Into: d_pre([happens(transfer(_79710,_79712,_79714),_81002,_81008),happens(transfer(_79782,_79712,_79786),_81002,_81008),_79710\=_79782]). 2839% /pack/logicmoo_ec/test/lps_user_examples/bankTransfer2D.pl:45 2840% pop_lps_dialect('$BLOB'("<stream>(0x562ef4160e00)"), (/.../(lps_user_examples, 'bankTransfer2D.pl')-> /.../(lps_user_examples, 'bankTransfer2D.pl'))). 2841% ops. 2842% :-listing('/pack/logicmoo_ec/test/lps_user_examples/bankTransfer2D.pl':_30044). 2843 2844 2845d_pre([happens(transfer(A, _, B), C, _), holds(balance(A, D), C), D<B]). 2846d_pre([happens(transfer(A, B, _), C, D), happens(transfer(A, E, _), C, D), B\=E]). 2847d_pre([happens(transfer(A, B, _), C, D), happens(transfer(E, B, _), C, D), A\=E]). 2848 2849d(balance(Person, V), [from:[X, 0], to:[RightX, V], label:Person:V, type:rectangle, fontSize:13, fillColor:'#85bb65']) :- 2850 ( Person=bob, 2851 X=50 2852 ; Person=fariba, 2853 X=200 2854 ), 2855 RightX is X+70. 2856d(transfer(From, To, Amount), [type:arrow, label:Amount, from:[FX, 20], to:[TX, 20]]) :- 2857 ( From=bob, 2858 FX=120, 2859 TX=200 2860 ; From=fariba, 2861 FX=200, 2862 TX=120 2863 ). 2864d(timeless, [[type:star, center:[250, 150], points:9, radius1:20, radius2:25, fillColor:yellow, sendToBack], [type:rectangle, from:[0, 0], to:[320, 200], sendToBack, fillColor:[0, 0.746, 1]], [type:ellipse, shadowOffset:5, shadowColor:darkGray, point:[50, 150], size:[110, 40], fillColor:white], [type:ellipse, point:[20, 130], size:[90, 30], fillColor:white]]). 2865 2866fluents([balance(_, _)]). 2867 2868reactive_rule([happens(transfer(fariba, bob, _), _, A), holds(balance(bob, B), A), B>=10], [happens(transfer(bob, fariba, 10), A, _)]). 2869reactive_rule([happens(transfer(bob, fariba, _), _, A), holds(balance(fariba, B), A), B>=20], [happens(transfer(fariba, bob, 20), A, _)]). 2870 2871initial_state([balance(bob, 0), balance(fariba, 100)]). 2872 2873:- dynamic actions/1. 2874:- multifile actions/1. 2875 2876actions([transfer(_, _, _)]). 2877 2878observe([transfer(fariba, bob, 10)], 2). 2879 2880maxTime(10). 2881 2882updated(happens(transfer(_, A, B), _, _), balance(A, C), C-D, [D is C+B]). 2883updated(happens(transfer(A, _, B), _, _), balance(A, C), C-D, [D is C-B]). 2884% dB(/.../(lps_user_examples, 'bankTransfer2D.pl'), lps_visualization(_124530{groups:[_120708{content:"Events", id:"event", order:1}, _120782{content:"balance(A,B)", id:"balance/2", order:3, subgroupStack:"false"}, _120848{content:"Actions", id:"action", order:4}], items:[_120970{content:"bob,0", end:2, group:"balance/2", id:0, start:1, subgroup:"bob", title:"Fluent balance(bob,0) initiated at 1<br/>and terminated at transition to 2"}, _121096{content:"bob,0", end:4, group:"balance/2", id:1, start:3, subgroup:"bob", title:"Fluent balance(bob,0) initiated at 3<br/>and terminated at transition to 4"}, _121222{content:"bob,10", end:3, group:"balance/2", id:2, start:2, subgroup:"bob", title:"Fluent balance(bob,10) initiated at 2<br/>and terminated at transition to 3"}, _121348{content:"bob,10", end:6, group:"balance/2", id:3, start:5, subgroup:"bob", title:"Fluent balance(bob,10) initiated at 5<br/>and terminated at transition to 6"}, _121474{content:"bob,20", end:5, group:"balance/2", id:4, start:4, subgroup:"bob", title:"Fluent balance(bob,20) initiated at 4<br/>and terminated at transition to 5"}, _121600{content:"bob,20", end:8, group:"balance/2", id:5, start:7, subgroup:"bob", title:"Fluent balance(bob,20) initiated at 7<br/>and terminated at transition to 8"}, _121726{content:"bob,30", end:7, group:"balance/2", id:6, start:6, subgroup:"bob", title:"Fluent balance(bob,30) initiated at 6<br/>and terminated at transition to 7"}, _121852{content:"bob,30", end:10, group:"balance/2", id:7, start:9, subgroup:"bob", title:"Fluent balance(bob,30) initiated at 9<br/>and terminated at transition to 10"}, _121978{content:"bob,40", end:9, group:"balance/2", id:8, start:8, subgroup:"bob", title:"Fluent balance(bob,40) initiated at 8<br/>and terminated at transition to 9"}, _122104{content:"bob,50", end:11, group:"balance/2", id:9, start:10, subgroup:"bob", title:"Fluent balance(bob,50) initiated at 10<br/>and terminated at transition to 11"}, _122230{content:"fariba,50", end:11, group:"balance/2", id:10, start:10, subgroup:"fariba", title:"Fluent balance(fariba,50) initiated at 10<br/>and terminated at transition to 11"}, _122356{content:"fariba,60", end:9, group:"balance/2", id:11, start:8, subgroup:"fariba", title:"Fluent balance(fariba,60) initiated at 8<br/>and terminated at transition to 9"}, _122482{content:"fariba,70", end:7, group:"balance/2", id:12, start:6, subgroup:"fariba", title:"Fluent balance(fariba,70) initiated at 6<br/>and terminated at transition to 7"}, _122608{content:"fariba,70", end:10, group:"balance/2", id:13, start:9, subgroup:"fariba", title:"Fluent balance(fariba,70) initiated at 9<br/>and terminated at transition to 10"}, _122734{content:"fariba,80", end:5, group:"balance/2", id:14, start:4, subgroup:"fariba", title:"Fluent balance(fariba,80) initiated at 4<br/>and terminated at transition to 5"}, _122860{content:"fariba,80", end:8, group:"balance/2", id:15, start:7, subgroup:"fariba", title:"Fluent balance(fariba,80) initiated at 7<br/>and terminated at transition to 8"}, _122986{content:"fariba,90", end:3, group:"balance/2", id:16, start:2, subgroup:"fariba", title:"Fluent balance(fariba,90) initiated at 2<br/>and terminated at transition to 3"}, _123112{content:"fariba,90", end:6, group:"balance/2", id:17, start:5, subgroup:"fariba", title:"Fluent balance(fariba,90) initiated at 5<br/>and terminated at transition to 6"}, _123238{content:"fariba,100", end:2, group:"balance/2", id:18, start:1, subgroup:"fariba", title:"Fluent balance(fariba,100) initiated at 1<br/>and terminated at transition to 2"}, _123364{content:"fariba,100", end:4, group:"balance/2", id:19, start:3, subgroup:"fariba", title:"Fluent balance(fariba,100) initiated at 3<br/>and terminated at transition to 4"}, _123490{content:"transfer(fariba,bob,10)", group:"event", id:20, start:2, style:"color:#E19735", title:"happens(transfer(fariba,bob,10),1,2)", type:"point"}, _123616{content:"transfer(bob,fariba,10)", group:"action", id:21, start:3, style:"color:green", title:"happens(transfer(bob,fariba,10),2,3)", type:"point"}, _123742{content:"transfer(fariba,bob,20)", group:"action", id:22, start:4, style:"color:green", title:"happens(transfer(fariba,bob,20),3,4)", type:"point"}, _123868{content:"transfer(bob,fariba,10)", group:"action", id:23, start:5, style:"color:green", title:"happens(transfer(bob,fariba,10),4,5)", type:"point"}, _123994{content:"transfer(fariba,bob,20)", group:"action", id:24, start:6, style:"color:green", title:"happens(transfer(fariba,bob,20),5,6)", type:"point"}, _124120{content:"transfer(bob,fariba,10)", group:"action", id:25, start:7, style:"color:green", title:"happens(transfer(bob,fariba,10),6,7)", type:"point"}, _124246{content:"transfer(fariba,bob,20)", group:"action", id:26, start:8, style:"color:green", title:"happens(transfer(fariba,bob,20),7,8)", type:"point"}, _124372{content:"transfer(bob,fariba,10)", group:"action", id:27, start:9, style:"color:green", title:"happens(transfer(bob,fariba,10),8,9)", type:"point"}, _124498{content:"transfer(fariba,bob,20)", group:"action", id:28, start:10, style:"color:green", title:"happens(transfer(fariba,bob,20),9,10)", type:"point"}]}, _182436{cycles:[[_176560{create:[_176104{center:[250, 150], fillColor:"yellow", id:"timeless", points:9, radius1:20, radius2:25, sendToBack:"true", type:"star"}, _176264{fillColor:[0, 0.746, 1], from:[0, 0], id:"timeless", sendToBack:"true", to:[320, 200], type:"rectangle"}, _176410{fillColor:"white", id:"timeless", point:[50, 150], shadowColor:"darkGray", shadowOffset:5, size:[110, 40], type:"ellipse"}, _176536{fillColor:"white", id:"timeless", point:[20, 130], size:[90, 30], type:"ellipse"}]}], [_176740{create:_176708{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,0)", label:"bob:0", to:[120, 0], type:"rectangle"}}, _176914{create:_176882{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,100)", label:"fariba:100", to:[270, 100], type:"rectangle"}}, _177072{create:_177044{event:"true", from:[200, 20], id:"transfer(fariba,bob,10)", label:10, to:[120, 20], type:"arrow"}}], [_177252{create:_177220{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,10)", label:"bob:10", to:[120, 10], type:"rectangle"}}, _177426{create:_177394{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,90)", label:"fariba:90", to:[270, 90], type:"rectangle"}}, _177584{create:_177556{event:"true", from:[120, 20], id:"transfer(bob,fariba,10)", label:10, to:[200, 20], type:"arrow"}}, _177614{kill:"balance(bob,0)"}, _177644{kill:"balance(fariba,100)"}, _177674{kill:"transfer(fariba,bob,10)"}], [_177854{create:_177822{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,0)", label:"bob:0", to:[120, 0], type:"rectangle"}}, _178028{create:_177996{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,100)", label:"fariba:100", to:[270, 100], type:"rectangle"}}, _178186{create:_178158{event:"true", from:[200, 20], id:"transfer(fariba,bob,20)", label:20, to:[120, 20], type:"arrow"}}, _178216{kill:"balance(bob,10)"}, _178246{kill:"balance(fariba,90)"}, _178276{kill:"transfer(bob,fariba,10)"}], [_178456{create:_178424{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,20)", label:"bob:20", to:[120, 20], type:"rectangle"}}, _178630{create:_178598{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,80)", label:"fariba:80", to:[270, 80], type:"rectangle"}}, _178788{create:_178760{event:"true", from:[120, 20], id:"transfer(bob,fariba,10)", label:10, to:[200, 20], type:"arrow"}}, _178818{kill:"balance(bob,0)"}, _178848{kill:"balance(fariba,100)"}, _178878{kill:"transfer(fariba,bob,20)"}], [_179058{create:_179026{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,10)", label:"bob:10", to:[120, 10], type:"rectangle"}}, _179232{create:_179200{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,90)", label:"fariba:90", to:[270, 90], type:"rectangle"}}, _179390{create:_179362{event:"true", from:[200, 20], id:"transfer(fariba,bob,20)", label:20, to:[120, 20], type:"arrow"}}, _179420{kill:"balance(bob,20)"}, _179450{kill:"balance(fariba,80)"}, _179480{kill:"transfer(bob,fariba,10)"}], [_179660{create:_179628{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,30)", label:"bob:30", to:[120, 30], type:"rectangle"}}, _179834{create:_179802{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,70)", label:"fariba:70", to:[270, 70], type:"rectangle"}}, _179992{create:_179964{event:"true", from:[120, 20], id:"transfer(bob,fariba,10)", label:10, to:[200, 20], type:"arrow"}}, _180022{kill:"balance(bob,10)"}, _180052{kill:"balance(fariba,90)"}, _180082{kill:"transfer(fariba,bob,20)"}], [_180262{create:_180230{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,20)", label:"bob:20", to:[120, 20], type:"rectangle"}}, _180436{create:_180404{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,80)", label:"fariba:80", to:[270, 80], type:"rectangle"}}, _180594{create:_180566{event:"true", from:[200, 20], id:"transfer(fariba,bob,20)", label:20, to:[120, 20], type:"arrow"}}, _180624{kill:"balance(bob,30)"}, _180654{kill:"balance(fariba,70)"}, _180684{kill:"transfer(bob,fariba,10)"}], [_180864{create:_180832{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,40)", label:"bob:40", to:[120, 40], type:"rectangle"}}, _181038{create:_181006{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,60)", label:"fariba:60", to:[270, 60], type:"rectangle"}}, _181196{create:_181168{event:"true", from:[120, 20], id:"transfer(bob,fariba,10)", label:10, to:[200, 20], type:"arrow"}}, _181226{kill:"balance(bob,20)"}, _181256{kill:"balance(fariba,80)"}, _181286{kill:"transfer(fariba,bob,20)"}], [_181466{create:_181434{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,30)", label:"bob:30", to:[120, 30], type:"rectangle"}}, _181640{create:_181608{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,70)", label:"fariba:70", to:[270, 70], type:"rectangle"}}, _181798{create:_181770{event:"true", from:[200, 20], id:"transfer(fariba,bob,20)", label:20, to:[120, 20], type:"arrow"}}, _181828{kill:"balance(bob,40)"}, _181858{kill:"balance(fariba,60)"}, _181888{kill:"transfer(bob,fariba,10)"}], [_182068{create:_182036{fillColor:"#85bb65", fontSize:13, from:[50, 0], id:"balance(bob,50)", label:"bob:50", to:[120, 50], type:"rectangle"}}, _182242{create:_182210{fillColor:"#85bb65", fontSize:13, from:[200, 0], id:"balance(fariba,50)", label:"fariba:50", to:[270, 50], type:"rectangle"}}, _182272{kill:"balance(bob,30)"}, _182302{kill:"balance(fariba,70)"}, _182332{kill:"transfer(fariba,bob,20)"}], [_182368{kill:"balance(bob,50)"}, _182398{kill:"balance(fariba,50)"}, _182428{kill:"timeless"}]]})). 2885% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'Basic If Then Else.pl')). 2886% run_lps_corner_file1(/.../(lps_user_examples, 'Basic If Then Else.pl')). 2887% /pack/logicmoo_ec/test/lps_user_examples/Basic If Then Else.pl:1 2888% push_lps_dialect. 2889% ops. 2890% [ti=user, load= /.../(lps_user_examples, 'Basic If Then Else.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'Basic If Then Else.pl'), lps= /.../(lps_user_examples, 'Basic If Then Else.pl'), using= /.../(lps_user_examples, 'Basic If Then Else.pl')]. 2891% continue_lps_dialect. 2892% ops. 2893 2894% LPS: fluents((locked(_80174),trash(_80214),bin(_80254))). 2895% Into: fluents([locked(_80174),trash(_80214),bin(_80254)]). 2896 2897% LPS: actions((dispose(_81378,_81380),keep(_81420))). 2898% Into: actions([dispose(_81378,_81380),keep(_81420)]). 2899 2900% LPS: initially(bin(bucket)). 2901% Into: initial_state([bin(bucket)]). 2902 2903% LPS: then(if(true),then(if(at(bin(_83574),3)),else(dispose(garbage,_83574),keep(garbage)))). 2904% Into: reactive_rule([],[([holds(bin(_83574),3)]->[happens(dispose(garbage,_83574),_85192,_84896)];[happens(keep(garbage),_85358,_84896)])]). 2905 2906% LPS: then(if(true),(from(keep(uhuh),5),terminate(bin(bucket)),then(if(bin(_85804)),else(dispose(garbage,_85804),keep(garbage))))). 2907% Into: reactive_rule([],[happens(keep(uhuh),5,_87202),happens(terminate(bin(bucket)),_87284,_87330),([holds(bin(_85804),_87330)]->[happens(dispose(garbage,_85804),_87330,_87166)];[happens(keep(garbage),_87888,_87166)])]). 2908% /pack/logicmoo_ec/test/lps_user_examples/Basic If Then Else.pl:18 2909% pop_lps_dialect('$BLOB'("<stream>(0x562ef20f0500)"), (/.../(lps_user_examples, 'Basic If Then Else.pl')-> /.../(lps_user_examples, 'Basic If Then Else.pl'))). 2910% ops. 2911% :-listing('/pack/logicmoo_ec/test/lps_user_examples/Basic If Then Else.pl':_95558). 2912 2913 2914fluents([locked(_), trash(_), bin(_)]). 2915 2916reactive_rule([], [([holds(bin(A), 3)]->[happens(dispose(garbage, A), _, B)];[happens(keep(garbage), _, B)])]). 2917reactive_rule([], [happens(keep(uhuh), 5, _), happens(terminate(bin(bucket)), _, A), ([holds(bin(B), A)]->[happens(dispose(garbage, B), A, C)];[happens(keep(garbage), _, C)])]). 2918 2919initial_state([bin(bucket)]). 2920 2921:- dynamic actions/1. 2922:- multifile actions/1. 2923 2924actions([dispose(_, _), keep(_)]). 2925 2926maxTime(10). 2927% dB(/.../(lps_user_examples, 'Basic If Then Else.pl'), lps_visualization(_70072{groups:[_69348{content:"bin(A)", id:"bin/1", order:3, subgroupStack:"false"}, _69414{content:"Actions", id:"action", order:4}], items:[_69536{content:"bucket", end:6, group:"bin/1", id:0, start:1, subgroup:"bucket", title:"Fluent bin(bucket) initiated at 1<br/>and terminated at transition to 6"}, _69662{content:"dispose(garbage,bucket)", group:"action", id:1, start:4, style:"color:green", title:"happens(dispose(garbage,bucket),3,4)", type:"point"}, _69788{content:"keep(uhuh)", group:"action", id:2, start:6, style:"color:green", title:"happens(keep(uhuh),5,6)", type:"point"}, _69914{content:"terminate(bin(bucket))", group:"action", id:3, start:6, style:"color:green", title:"happens(terminate(bin(bucket)),5,6)", type:"point"}, _70040{content:"keep(garbage)", group:"action", id:4, start:7, style:"color:green", title:"happens(keep(garbage),6,7)", type:"point"}]}, [])). 2928% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'blocks_world_interference.pl')). 2929% run_lps_corner_file1(/.../(lps_user_examples, 'blocks_world_interference.pl')). 2930% /pack/logicmoo_ec/test/lps_user_examples/blocks_world_interference.pl:1 2931% push_lps_dialect. 2932% ops. 2933% [ti=user, load= /.../(lps_user_examples, 'blocks_world_interference.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'blocks_world_interference.pl'), lps= /.../(lps_user_examples, 'blocks_world_interference.pl'), using= /.../(lps_user_examples, 'blocks_world_interference.pl')]. 2934% continue_lps_dialect. 2935% ops. 2936 2937% LPS: fluents(location(_55410,_55412)). 2938% Into: fluents([location(_55410,_55412)]). 2939 2940% LPS: actions(move(_56454,_56456)). 2941% Into: actions([move(_56454,_56456)]). 2942 2943% LPS: initially((location(b,floor),location(c,b),location(a,floor))). 2944% Into: initial_state([location(b,floor),location(c,b),location(a,floor)]). 2945 2946% LPS: observe(from(move(c,a),to(2,3))). 2947% Into: observe([move(c,a)],3). 2948 2949% LPS: then(if(true),from(make_tower([b,a,floor]),to(_60022,_60024))). 2950% Into: reactive_rule([],[happens(make_tower([b,a,floor]),_60022,_60024)]). 2951 2952% LPS: if(at(clear(_61168),_61190),(_61168\=floor,at(not(location(_61342,_61168)),_61190))). 2953% Into: l_int(holds(clear(_61168),_61190),[_61168\=floor,holds(not(location(_61342,_61168)),_61190)]). 2954 2955% LPS: at(clear(floor),_63326). 2956% Into: l_int(holds(clear(floor),_63326),[]). 2957 2958% LPS: if(from(make_tower([_64554,floor]),to(_64616,_64618)),from(make_on(_64554,floor),to(_64616,_64618))). 2959% Into: l_events(happens(make_tower([_64554,floor]),_64616,_64618),[happens(make_on(_64554,floor),_64616,_64618)]). 2960 2961% LPS: if(from(make_tower([_65954,_65974|_65976]),to(_66024,_66026)),(_65974\=floor,from(make_tower([_65974|_65976]),to(_66024,_66260)),from(make_on(_65954,_65974),to(_66260,_66026)))). 2962% Into: l_events(happens(make_tower([_65954,_65974|_65976]),_66024,_66026),[_65974\=floor,happens(make_tower([_65974|_65976]),_66024,_66260),happens(make_on(_65954,_65974),_66260,_66026)]). 2963 2964% LPS: if(from(make_on(_67730,_67732),to(_67768,_67770)),(at(not(location(_67730,_67732)),_67768),from(make_clear(_67732),to(_67768,_68042)),from(make_clear(_67730),to(_68042,_68178)),from(move(_67730,_67732),to(_68178,_67770)))). 2965% Into: l_events(happens(make_on(_67730,_67732),_67768,_67770),[holds(not(location(_67730,_67732)),_67768),happens(make_clear(_67732),_67768,_68042),happens(make_clear(_67730),_68042,_68178),happens(move(_67730,_67732),_68178,_67770)]). 2966 2967% LPS: if(from(make_on(_69696,_69698),to(_69734,_69734)),at(location(_69696,_69698),_69734)). 2968% Into: l_events(happens(make_on(_69696,_69698),_69734,_69734),[holds(location(_69696,_69698),_69734)]). 2969 2970% LPS: if(from(make_clear(_70988),to(_71024,_71024)),at(clear(_70988),_71024)). 2971% Into: l_events(happens(make_clear(_70988),_71024,_71024),[holds(clear(_70988),_71024)]). 2972 2973% LPS: if(from(make_clear(_72246),to(_72282,_72284)),(at(location(_72396,_72246),_72282),from(make_on(_72396,floor),to(_72282,_72284)))). 2974% Into: l_events(happens(make_clear(_72246),_72282,_72284),[holds(location(_72396,_72246),_72282),happens(make_on(_72396,floor),_72282,_72284)]). 2975 2976% LPS: initiates(move(_73768,_73770),location(_73768,_73770)). 2977% Into: initiated(happens(move(_73768,_73770),_74954,_74960),location(_73768,_73770),[]). 2978 2979% LPS: terminates(move(_74900,_74902),location(_74900,_74958)). 2980% Into: terminated(happens(move(_74900,_74902),_76086,_76092),location(_74900,_74958),[]). 2981% /pack/logicmoo_ec/test/lps_user_examples/blocks_world_interference.pl:45 2982% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca2900)"), (/.../(lps_user_examples, 'blocks_world_interference.pl')-> /.../(lps_user_examples, 'blocks_world_interference.pl'))). 2983% ops. 2984% :-listing('/pack/logicmoo_ec/test/lps_user_examples/blocks_world_interference.pl':_83638). 2985 2986 2987initiated(happens(move(A, B), _, _), location(A, B), []). 2988 2989fluents([location(_, _)]). 2990 2991l_int(holds(clear(A), B), [A\=floor, holds(not(location(_, A)), B)]). 2992l_int(holds(clear(floor), _), []). 2993 2994reactive_rule([], [happens(make_tower([b, a, floor]), _, _)]). 2995 2996terminated(happens(move(A, _), _, _), location(A, _), []). 2997 2998initial_state([location(b, floor), location(c, b), location(a, floor)]). 2999 3000l_events(happens(make_tower([A, floor]), B, C), [happens(make_on(A, floor), B, C)]). 3001l_events(happens(make_tower([A, B|C]), D, E), [B\=floor, happens(make_tower([B|C]), D, F), happens(make_on(A, B), F, E)]). 3002l_events(happens(make_on(A, B), C, D), [holds(not(location(A, B)), C), happens(make_clear(B), C, E), happens(make_clear(A), E, F), happens(move(A, B), F, D)]). 3003l_events(happens(make_on(A, B), C, C), [holds(location(A, B), C)]). 3004l_events(happens(make_clear(A), B, B), [holds(clear(A), B)]). 3005l_events(happens(make_clear(A), B, C), [holds(location(D, A), B), happens(make_on(D, floor), B, C)]). 3006 3007:- dynamic actions/1. 3008:- multifile actions/1. 3009 3010actions([move(_, _)]). 3011 3012observe([move(c, a)], 3). 3013 3014maxTime(10). 3015% dB(/.../(lps_user_examples, 'blocks_world_interference.pl'), lps_visualization(_78056{groups:[_76754{content:"Events", id:"event", order:1}, _76828{content:"location(A,B)", id:"location/2", order:3, subgroupStack:"false"}, _76894{content:"Actions", id:"action", order:4}], items:[_77016{content:"a,floor", end:11, group:"location/2", id:0, start:1, subgroup:"a", title:"Fluent location(a,floor) initiated at 1<br/>and terminated at transition to 11"}, _77142{content:"b,a", end:11, group:"location/2", id:1, start:3, subgroup:"b", title:"Fluent location(b,a) initiated at 3<br/>and terminated at transition to 11"}, _77268{content:"b,floor", end:3, group:"location/2", id:2, start:1, subgroup:"b", title:"Fluent location(b,floor) initiated at 1<br/>and terminated at transition to 3"}, _77394{content:"c,a", end:11, group:"location/2", id:3, start:3, subgroup:"c", title:"Fluent location(c,a) initiated at 3<br/>and terminated at transition to 11"}, _77520{content:"c,b", end:2, group:"location/2", id:4, start:1, subgroup:"c", title:"Fluent location(c,b) initiated at 1<br/>and terminated at transition to 2"}, _77646{content:"c,floor", end:3, group:"location/2", id:5, start:2, subgroup:"c", title:"Fluent location(c,floor) initiated at 2<br/>and terminated at transition to 3"}, _77772{content:"move(c,floor)", group:"action", id:6, start:2, style:"color:green", title:"happens(move(c,floor),1,2)", type:"point"}, _77898{content:"move(c,a)", group:"event", id:7, start:3, style:"color:#E19735", title:"happens(move(c,a),2,3)", type:"point"}, _78024{content:"move(b,a)", group:"action", id:8, start:3, style:"color:green", title:"happens(move(b,a),2,3)", type:"point"}]}, [])). 3016% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'brujanino.pl')). 3017% run_lps_corner_file1(/.../(lps_user_examples, 'brujanino.pl')). 3018% /pack/logicmoo_ec/test/lps_user_examples/brujanino.pl:1 3019% push_lps_dialect. 3020% ops. 3021% [ti=user, load= /.../(lps_user_examples, 'brujanino.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'brujanino.pl'), lps= /.../(lps_user_examples, 'brujanino.pl'), using= /.../(lps_user_examples, 'brujanino.pl')]. 3022% continue_lps_dialect. 3023% ops. 3024 3025% LPS: fluents(enga�a/2). 3026% Into: fluents([enga�a(_57220,_57222)]). 3027 3028% LPS: actions((ayuda/2,encuentra/1)). 3029% Into: actions([ayuda(_58422,_58424),encuentra(_58434)]). 3030 3031% LPS: events((necesita/2,escapa/1)). 3032% Into: events([necesita(_59582,_59584),escapa(_59594)]). 3033 3034% LPS: initially(enga�a(bruja,ni�o)). 3035% Into: initial_state([enga�a(bruja,ni�o)]). 3036 3037% LPS: observe(from(necesita(bruja,objeto),to(1,2))). 3038% Into: observe([necesita(bruja,objeto)],2). 3039 3040% LPS: if(initiates(encuentra(_61724),enga�a(_61778,_61780)),enga�a(_61780,_61778)). 3041% Into: initiated(happens(encuentra(_61724),_63034,_63040),enga�a(_61778,_61780),[holds(enga�a(_61780,_61778),_63034)]). 3042 3043% LPS: then(if(necesita(bruja,objeto)),ayuda(ni�o,bruja)). 3044% Into: reactive_rule([happens(necesita(bruja,objeto),_64420,_64426)],[happens(ayuda(ni�o,bruja),_64452,_64458)]). 3045 3046% LPS: then(if(ayuda(ni�o,bruja)),encuentra(objeto)). 3047% Into: reactive_rule([happens(ayuda(ni�o,bruja),_65546,_65552)],[happens(encuentra(objeto),_65578,_65584)]). 3048 3049% LPS: if(escapa(ni�o),enga�a(ni�o,bruja)). 3050% Into: l_events(happens(escapa(ni�o),_66622,_66622),[holds(enga�a(ni�o,bruja),_66622)]). 3051 3052% LPS: observe(from(necesita(bruja,objeto),to(4,5))). 3053% Into: observe([necesita(bruja,objeto)],5). 3054 3055% LPS: then(if(necesita(bruja,objeto)),ayuda(ni�o,bruja)). 3056% Into: reactive_rule([happens(necesita(bruja,objeto),_69172,_69178)],[happens(ayuda(ni�o,bruja),_69204,_69210)]). 3057 3058% LPS: then(if(ayuda(ni�o,bruja)),encuentra(objeto)). 3059% Into: reactive_rule([happens(ayuda(ni�o,bruja),_70298,_70304)],[happens(encuentra(objeto),_70330,_70336)]). 3060 3061% LPS: then(if((encuentra(objeto),enga�a(ni�o,bruja))),escapa(ni�o)). 3062% Into: reactive_rule([happens(encuentra(objeto),_71506,_71512),holds(enga�a(ni�o,bruja),_71512)],[happens(escapa(ni�o),_71604,_71610)]). 3063% /pack/logicmoo_ec/test/lps_user_examples/brujanino.pl:29 3064% pop_lps_dialect('$BLOB'("<stream>(0x562ef4162800)"), (/.../(lps_user_examples, 'brujanino.pl')-> /.../(lps_user_examples, 'brujanino.pl'))). 3065% ops. 3066% :-listing('/pack/logicmoo_ec/test/lps_user_examples/brujanino.pl':_79106). 3067 3068 3069initiated(happens(encuentra(_), A, _), enga�a(B, C), [holds(enga�a(C, B), A)]). 3070 3071fluents([enga�a(_, _)]). 3072 3073reactive_rule([happens(necesita(bruja, objeto), _, _)], [happens(ayuda(ni�o, bruja), _, _)]). 3074reactive_rule([happens(ayuda(ni�o, bruja), _, _)], [happens(encuentra(objeto), _, _)]). 3075reactive_rule([happens(necesita(bruja, objeto), _, _)], [happens(ayuda(ni�o, bruja), _, _)]). 3076reactive_rule([happens(ayuda(ni�o, bruja), _, _)], [happens(encuentra(objeto), _, _)]). 3077reactive_rule([happens(encuentra(objeto), _, A), holds(enga�a(ni�o, bruja), A)], [happens(escapa(ni�o), _, _)]). 3078 3079initial_state([enga�a(bruja, ni�o)]). 3080 3081l_events(happens(escapa(ni�o), A, A), [holds(enga�a(ni�o, bruja), A)]). 3082 3083:- dynamic actions/1. 3084:- multifile actions/1. 3085 3086actions([ayuda(_, _), encuentra(_)]). 3087 3088events([necesita(_, _), escapa(_)]). 3089 3090observe([necesita(bruja, objeto)], 2). 3091observe([necesita(bruja, objeto)], 5). 3092 3093maxTime(8). 3094% dB(/.../(lps_user_examples, 'brujanino.pl'), lps_visualization(_66724{groups:[_65548{content:"Events", id:"event", order:1}, _65622{content:"enga�a(A,B)", id:"enga�a/2", order:3, subgroupStack:"false"}, _65688{content:"Actions", id:"action", order:4}], items:[_65810{content:"bruja,ni�o", end:9, group:"enga�a/2", id:0, start:1, subgroup:"bruja", title:"Fluent enga�a(bruja,ni�o) initiated at 1<br/>and terminated at transition to 9"}, _65936{content:"ni�o,bruja", end:9, group:"enga�a/2", id:1, start:4, subgroup:"ni�o", title:"Fluent enga�a(ni�o,bruja) initiated at 4<br/>and terminated at transition to 9"}, _66062{content:"necesita(bruja,objeto)", group:"event", id:2, start:2, style:"color:#E19735", title:"happens(necesita(bruja,objeto),1,2)", type:"point"}, _66188{content:"ayuda(ni�o,bruja)", group:"action", id:3, start:3, style:"color:green", title:"happens(ayuda(ni�o,bruja),2,3)", type:"point"}, _66314{content:"encuentra(objeto)", group:"action", id:4, start:4, style:"color:green", title:"happens(encuentra(objeto),3,4)", type:"point"}, _66440{content:"necesita(bruja,objeto)", group:"event", id:5, start:5, style:"color:#E19735", title:"happens(necesita(bruja,objeto),4,5)", type:"point"}, _66566{content:"ayuda(ni�o,bruja)", group:"action", id:6, start:6, style:"color:green", title:"happens(ayuda(ni�o,bruja),5,6)", type:"point"}, _66692{content:"encuentra(objeto)", group:"action", id:7, start:7, style:"color:green", title:"happens(encuentra(objeto),6,7)", type:"point"}]}, [])). 3095% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'buggymartianrobot.pl')). 3096% run_lps_corner_file1(/.../(lps_user_examples, 'buggymartianrobot.pl')). 3097% /pack/logicmoo_ec/test/lps_user_examples/buggymartianrobot.pl:1 3098% push_lps_dialect. 3099% ops. 3100% [ti=user, load= /.../(lps_user_examples, 'buggymartianrobot.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'buggymartianrobot.pl'), lps= /.../(lps_user_examples, 'buggymartianrobot.pl'), using= /.../(lps_user_examples, 'buggymartianrobot.pl')]. 3101% continue_lps_dialect. 3102% ops. 3103 3104% LPS: fluents((at_pos/2,free/2,visited/2,obstacle/2,life/2,lookingtowards/2)). 3105% Into: fluents([at_pos(_21600,_21602),free(_21612,_21614),visited(_21624,_21626),obstacle(_21636,_21638),life(_21648,_21650),lookingtowards(_21660,_21662)]). 3106 3107% LPS: actions((step(_21400,_21402),turn_right,report)). 3108% Into: actions([step(_21400,_21402),turn_right,report]). 3109 3110% LPS: initially((at_pos(0,0),life(2,1),free(1,0),free(2,0),obstacle(3,0),obstacle(2,-1),obstacle(2,1),lookingtowards(1,0))). 3111% Into: initial_state([at_pos(0,0),life(2,1),free(1,0),free(2,0),obstacle(3,0),obstacle(2,-1),obstacle(2,1),lookingtowards(1,0)]). 3112 3113% LPS: terminates(step(_24312,_24314),lookingtowards(_24312,_24314)). 3114% Into: terminated(happens(step(_24312,_24314),_25506,_25512),lookingtowards(_24312,_24314),[]). 3115 3116% LPS: if(initiates(step(_25444,_25446),lookingtowards(_25444,_25502)),(at_pos(_25444,_25590),lookingtowards(_25444,_25446),_25730 is _25446-_25590,abs(_25730)>0,_25502 is _25446+_25730)). 3117% Into: initiated(happens(step(_25444,_25446),_27344,_27350),lookingtowards(_25444,_25502),[holds(at_pos(_25444,_25590),_27344),holds(lookingtowards(_25444,_25446),_27344),_25730 is _25446-_25590,abs(_25730)>0,_25502 is _25446+_25730]). 3118 3119% LPS: if(initiates(step(_28832,_28834),lookingtowards(_28888,_28834)),(at_pos(_28976,_28834),lookingtowards(_28832,_28834),_29118 is _28832-_28976,abs(_29118)>0,_28888 is _28832+_29118)). 3120% Into: initiated(happens(step(_28832,_28834),_30732,_30738),lookingtowards(_28888,_28834),[holds(at_pos(_28976,_28834),_30732),holds(lookingtowards(_28832,_28834),_30732),_29118 is _28832-_28976,abs(_29118)>0,_28888 is _28832+_29118]). 3121 3122% LPS: initiates(step(_32220,_32222),at_pos(_32220,_32222)). 3123% Into: initiated(happens(step(_32220,_32222),_33406,_33412),at_pos(_32220,_32222),[]). 3124 3125% LPS: if(terminates(step(_33352,_33354),at_pos(_33408,_33410)),at_pos(_33408,_33410)). 3126% Into: terminated(happens(step(_33352,_33354),_34680,_34686),at_pos(_33408,_33410),[holds(at_pos(_33408,_33410),_34680)]). 3127 3128% LPS: terminates(step(_34972,_34974),free(_34972,_34974)). 3129% Into: terminated(happens(step(_34972,_34974),_36158,_36164),free(_34972,_34974),[]). 3130 3131% LPS: if(initiates(step(_36104,_36106),visited(_36160,_36162)),at_pos(_36160,_36162)). 3132% Into: initiated(happens(step(_36104,_36106),_37432,_37438),visited(_36160,_36162),[holds(at_pos(_36160,_36162),_37432)]). 3133 3134% LPS: then(if((at(lookingtowards(_37700,_37702),_37724),at(free(_37700,_37702),_37724),at(not(visited(_37700,_37702)),_37724))),from(step(_37700,_37702),to(_37724,_38164))). 3135% Into: reactive_rule([holds(lookingtowards(_37700,_37702),_37724),holds(free(_37700,_37702),_37724),holds(not(visited(_37700,_37702)),_37724)],[happens(step(_37700,_37702),_37724,_38164)]). 3136% /pack/logicmoo_ec/test/lps_user_examples/buggymartianrobot.pl:41 3137% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca3100)"), (/.../(lps_user_examples, 'buggymartianrobot.pl')-> /.../(lps_user_examples, 'buggymartianrobot.pl'))). 3138% ops. 3139% :-listing('/pack/logicmoo_ec/test/lps_user_examples/buggymartianrobot.pl':_48448). 3140 3141 3142initiated(happens(step(A, B), C, _), lookingtowards(A, D), [holds(at_pos(A, E), C), holds(lookingtowards(A, B), C), F is B-E, abs(F)>0, D is B+F]). 3143initiated(happens(step(A, B), C, _), lookingtowards(D, B), [holds(at_pos(E, B), C), holds(lookingtowards(A, B), C), F is A-E, abs(F)>0, D is A+F]). 3144initiated(happens(step(A, B), _, _), at_pos(A, B), []). 3145initiated(happens(step(_, _), A, _), visited(B, C), [holds(at_pos(B, C), A)]). 3146 3147fluents([at_pos(_, _), free(_, _), visited(_, _), obstacle(_, _), life(_, _), lookingtowards(_, _)]). 3148 3149terminated(happens(step(A, B), _, _), lookingtowards(A, B), []). 3150terminated(happens(step(_, _), A, _), at_pos(B, C), [holds(at_pos(B, C), A)]). 3151terminated(happens(step(A, B), _, _), free(A, B), []). 3152 3153reactive_rule([holds(lookingtowards(A, B), C), holds(free(A, B), C), holds(not(visited(A, B)), C)], [happens(step(A, B), C, _)]). 3154 3155initial_state([at_pos(0, 0), life(2, 1), free(1, 0), free(2, 0), obstacle(3, 0), obstacle(2, -1), obstacle(2, 1), lookingtowards(1, 0)]). 3156 3157:- dynamic actions/1. 3158:- multifile actions/1. 3159 3160actions([step(_, _), turn_right, report]). 3161 3162maxTime(5). 3163% dB(/.../(lps_user_examples, 'buggymartianrobot.pl'), lps_visualization(_93554{groups:[_91054{content:"at_pos(A,B)", id:"at_pos/2", order:3, subgroupStack:"false"}, _91132{content:"free(A,B)", id:"free/2", order:3, subgroupStack:"false"}, _91210{content:"life(A,B)", id:"life/2", order:3, subgroupStack:"false"}, _91288{content:"lookingtowards(A,B)", id:"lookingtowards/2", order:3, subgroupStack:"false"}, _91366{content:"obstacle(A,B)", id:"obstacle/2", order:3, subgroupStack:"false"}, _91444{content:"visited(A,B)", id:"visited/2", order:3, subgroupStack:"false"}, _91510{content:"Actions", id:"action", order:4}], items:[_91632{content:"0,0", end:2, group:"at_pos/2", id:0, start:1, subgroup:"0", title:"Fluent at_pos(0,0) initiated at 1<br/>and terminated at transition to 2"}, _91758{content:"1,0", end:3, group:"at_pos/2", id:1, start:2, subgroup:"1", title:"Fluent at_pos(1,0) initiated at 2<br/>and terminated at transition to 3"}, _91884{content:"2,0", end:6, group:"at_pos/2", id:2, start:3, subgroup:"2", title:"Fluent at_pos(2,0) initiated at 3<br/>and terminated at transition to 6"}, _92010{content:"1,0", end:2, group:"free/2", id:3, start:1, subgroup:"1", title:"Fluent free(1,0) initiated at 1<br/>and terminated at transition to 2"}, _92136{content:"2,0", end:3, group:"free/2", id:4, start:1, subgroup:"2", title:"Fluent free(2,0) initiated at 1<br/>and terminated at transition to 3"}, _92262{content:"2,1", end:6, group:"life/2", id:5, start:1, subgroup:"2", title:"Fluent life(2,1) initiated at 1<br/>and terminated at transition to 6"}, _92388{content:"1,0", end:2, group:"lookingtowards/2", id:6, start:1, subgroup:"1", title:"Fluent lookingtowards(1,0) initiated at 1<br/>and terminated at transition to 2"}, _92514{content:"2,0", end:3, group:"lookingtowards/2", id:7, start:2, subgroup:"2", title:"Fluent lookingtowards(2,0) initiated at 2<br/>and terminated at transition to 3"}, _92640{content:"3,0", end:6, group:"lookingtowards/2", id:8, start:3, subgroup:"3", title:"Fluent lookingtowards(3,0) initiated at 3<br/>and terminated at transition to 6"}, _92766{content:"2,-1", end:6, group:"obstacle/2", id:9, start:1, subgroup:"2", title:"Fluent obstacle(2,-1) initiated at 1<br/>and terminated at transition to 6"}, _92892{content:"2,1", end:6, group:"obstacle/2", id:10, start:1, subgroup:"2", title:"Fluent obstacle(2,1) initiated at 1<br/>and terminated at transition to 6"}, _93018{content:"3,0", end:6, group:"obstacle/2", id:11, start:1, subgroup:"3", title:"Fluent obstacle(3,0) initiated at 1<br/>and terminated at transition to 6"}, _93144{content:"0,0", end:6, group:"visited/2", id:12, start:2, subgroup:"0", title:"Fluent visited(0,0) initiated at 2<br/>and terminated at transition to 6"}, _93270{content:"1,0", end:6, group:"visited/2", id:13, start:3, subgroup:"1", title:"Fluent visited(1,0) initiated at 3<br/>and terminated at transition to 6"}, _93396{content:"step(1,0)", group:"action", id:14, start:2, style:"color:green", title:"happens(step(1,0),1,2)", type:"point"}, _93522{content:"step(2,0)", group:"action", id:15, start:3, style:"color:green", title:"happens(step(2,0),2,3)", type:"point"}]}, [])). 3164% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'buggymartianrobot,pl.pl')). 3165% run_lps_corner_file1(/.../(lps_user_examples, 'buggymartianrobot,pl.pl')). 3166% /pack/logicmoo_ec/test/lps_user_examples/buggymartianrobot,pl.pl:1 3167% push_lps_dialect. 3168% ops. 3169% [ti=user, load= /.../(lps_user_examples, 'buggymartianrobot,pl.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'buggymartianrobot,pl.pl'), lps= /.../(lps_user_examples, 'buggymartianrobot,pl.pl'), using= /.../(lps_user_examples, 'buggymartianrobot,pl.pl')]. 3170% continue_lps_dialect. 3171% ops. 3172 3173% LPS: fluents((at_pos/2,free/2,visited/2,obstacle/2,life/2,lookingtowards/2)). 3174% Into: fluents([at_pos(_60298,_60300),free(_60310,_60312),visited(_60322,_60324),obstacle(_60334,_60336),life(_60346,_60348),lookingtowards(_60358,_60360)]). 3175 3176% LPS: actions((step(_60098,_60100),turn_right,report)). 3177% Into: actions([step(_60098,_60100),turn_right,report]). 3178 3179% LPS: initially((at_pos(0,0),life(2,1),free(1,0),free(2,0),obstacle(3,0),obstacle(2,-1),obstacle(2,1),lookingtowards(1,0))). 3180% Into: initial_state([at_pos(0,0),life(2,1),free(1,0),free(2,0),obstacle(3,0),obstacle(2,-1),obstacle(2,1),lookingtowards(1,0)]). 3181 3182% LPS: terminates(step(_63010,_63012),lookingtowards(_63010,_63012)). 3183% Into: terminated(happens(step(_63010,_63012),_64196,_64202),lookingtowards(_63010,_63012),[]). 3184 3185% LPS: if(initiates(step(_64142,_64144),lookingtowards(_64142,_64200)),(at_pos(_64142,_64288),lookingtowards(_64142,_64144),_64428 is _64144-_64288,abs(_64428)>0,_64200 is _64144+_64428)). 3186% Into: initiated(happens(step(_64142,_64144),_66042,_66048),lookingtowards(_64142,_64200),[holds(at_pos(_64142,_64288),_66042),holds(lookingtowards(_64142,_64144),_66042),_64428 is _64144-_64288,abs(_64428)>0,_64200 is _64144+_64428]). 3187 3188% LPS: if(initiates(step(_67530,_67532),lookingtowards(_67586,_67532)),(at_pos(_67674,_67532),lookingtowards(_67530,_67532),_67816 is _67530-_67674,abs(_67816)>0,_67586 is _67530+_67816)). 3189% Into: initiated(happens(step(_67530,_67532),_69430,_69436),lookingtowards(_67586,_67532),[holds(at_pos(_67674,_67532),_69430),holds(lookingtowards(_67530,_67532),_69430),_67816 is _67530-_67674,abs(_67816)>0,_67586 is _67530+_67816]). 3190 3191% LPS: initiates(step(_70918,_70920),at_pos(_70918,_70920)). 3192% Into: initiated(happens(step(_70918,_70920),_72104,_72110),at_pos(_70918,_70920),[]). 3193 3194% LPS: if(terminates(step(_72050,_72052),at_pos(_72106,_72108)),at_pos(_72106,_72108)). 3195% Into: terminated(happens(step(_72050,_72052),_73378,_73384),at_pos(_72106,_72108),[holds(at_pos(_72106,_72108),_73378)]). 3196 3197% LPS: terminates(step(_73670,_73672),free(_73670,_73672)). 3198% Into: terminated(happens(step(_73670,_73672),_74856,_74862),free(_73670,_73672),[]). 3199 3200% LPS: if(initiates(step(_74802,_74804),visited(_74858,_74860)),at_pos(_74858,_74860)). 3201% Into: initiated(happens(step(_74802,_74804),_76130,_76136),visited(_74858,_74860),[holds(at_pos(_74858,_74860),_76130)]). 3202 3203% LPS: then(if((lookingtowards(_76398,_76400),free(_76398,_76400),not(visited(_76398,_76400)))),step(_76398,_76400)). 3204% Into: reactive_rule([holds(lookingtowards(_76398,_76400),_77768),holds(free(_76398,_76400),_77768),holds(not(visited(_76398,_76400)),_77768)],[happens(step(_76398,_76400),_78616,_78622)]). 3205% /pack/logicmoo_ec/test/lps_user_examples/buggymartianrobot,pl.pl:36 3206% pop_lps_dialect('$BLOB'("<stream>(0x562ef4160300)"), (/.../(lps_user_examples, 'buggymartianrobot,pl.pl')-> /.../(lps_user_examples, 'buggymartianrobot,pl.pl'))). 3207% ops. 3208% :-listing('/pack/logicmoo_ec/test/lps_user_examples/buggymartianrobot,pl.pl':_86266). 3209 3210 3211initiated(happens(step(A, B), C, _), lookingtowards(A, D), [holds(at_pos(A, E), C), holds(lookingtowards(A, B), C), F is B-E, abs(F)>0, D is B+F]). 3212initiated(happens(step(A, B), C, _), lookingtowards(D, B), [holds(at_pos(E, B), C), holds(lookingtowards(A, B), C), F is A-E, abs(F)>0, D is A+F]). 3213initiated(happens(step(A, B), _, _), at_pos(A, B), []). 3214initiated(happens(step(_, _), A, _), visited(B, C), [holds(at_pos(B, C), A)]). 3215 3216fluents([at_pos(_, _), free(_, _), visited(_, _), obstacle(_, _), life(_, _), lookingtowards(_, _)]). 3217 3218terminated(happens(step(A, B), _, _), lookingtowards(A, B), []). 3219terminated(happens(step(_, _), A, _), at_pos(B, C), [holds(at_pos(B, C), A)]). 3220terminated(happens(step(A, B), _, _), free(A, B), []). 3221 3222reactive_rule([holds(lookingtowards(A, B), C), holds(free(A, B), C), holds(not(visited(A, B)), C)], [happens(step(A, B), _, _)]). 3223 3224initial_state([at_pos(0, 0), life(2, 1), free(1, 0), free(2, 0), obstacle(3, 0), obstacle(2, -1), obstacle(2, 1), lookingtowards(1, 0)]). 3225 3226:- dynamic actions/1. 3227:- multifile actions/1. 3228 3229actions([step(_, _), turn_right, report]). 3230 3231maxTime(5). 3232% dB(/.../(lps_user_examples, 'buggymartianrobot,pl.pl'), lps_visualization(_62876{groups:[_60376{content:"at_pos(A,B)", id:"at_pos/2", order:3, subgroupStack:"false"}, _60454{content:"free(A,B)", id:"free/2", order:3, subgroupStack:"false"}, _60532{content:"life(A,B)", id:"life/2", order:3, subgroupStack:"false"}, _60610{content:"lookingtowards(A,B)", id:"lookingtowards/2", order:3, subgroupStack:"false"}, _60688{content:"obstacle(A,B)", id:"obstacle/2", order:3, subgroupStack:"false"}, _60766{content:"visited(A,B)", id:"visited/2", order:3, subgroupStack:"false"}, _60832{content:"Actions", id:"action", order:4}], items:[_60954{content:"0,0", end:2, group:"at_pos/2", id:0, start:1, subgroup:"0", title:"Fluent at_pos(0,0) initiated at 1<br/>and terminated at transition to 2"}, _61080{content:"1,0", end:3, group:"at_pos/2", id:1, start:2, subgroup:"1", title:"Fluent at_pos(1,0) initiated at 2<br/>and terminated at transition to 3"}, _61206{content:"2,0", end:6, group:"at_pos/2", id:2, start:3, subgroup:"2", title:"Fluent at_pos(2,0) initiated at 3<br/>and terminated at transition to 6"}, _61332{content:"1,0", end:2, group:"free/2", id:3, start:1, subgroup:"1", title:"Fluent free(1,0) initiated at 1<br/>and terminated at transition to 2"}, _61458{content:"2,0", end:3, group:"free/2", id:4, start:1, subgroup:"2", title:"Fluent free(2,0) initiated at 1<br/>and terminated at transition to 3"}, _61584{content:"2,1", end:6, group:"life/2", id:5, start:1, subgroup:"2", title:"Fluent life(2,1) initiated at 1<br/>and terminated at transition to 6"}, _61710{content:"1,0", end:2, group:"lookingtowards/2", id:6, start:1, subgroup:"1", title:"Fluent lookingtowards(1,0) initiated at 1<br/>and terminated at transition to 2"}, _61836{content:"2,0", end:3, group:"lookingtowards/2", id:7, start:2, subgroup:"2", title:"Fluent lookingtowards(2,0) initiated at 2<br/>and terminated at transition to 3"}, _61962{content:"3,0", end:6, group:"lookingtowards/2", id:8, start:3, subgroup:"3", title:"Fluent lookingtowards(3,0) initiated at 3<br/>and terminated at transition to 6"}, _62088{content:"2,-1", end:6, group:"obstacle/2", id:9, start:1, subgroup:"2", title:"Fluent obstacle(2,-1) initiated at 1<br/>and terminated at transition to 6"}, _62214{content:"2,1", end:6, group:"obstacle/2", id:10, start:1, subgroup:"2", title:"Fluent obstacle(2,1) initiated at 1<br/>and terminated at transition to 6"}, _62340{content:"3,0", end:6, group:"obstacle/2", id:11, start:1, subgroup:"3", title:"Fluent obstacle(3,0) initiated at 1<br/>and terminated at transition to 6"}, _62466{content:"0,0", end:6, group:"visited/2", id:12, start:2, subgroup:"0", title:"Fluent visited(0,0) initiated at 2<br/>and terminated at transition to 6"}, _62592{content:"1,0", end:6, group:"visited/2", id:13, start:3, subgroup:"1", title:"Fluent visited(1,0) initiated at 3<br/>and terminated at transition to 6"}, _62718{content:"step(1,0)", group:"action", id:14, start:2, style:"color:green", title:"happens(step(1,0),1,2)", type:"point"}, _62844{content:"step(2,0)", group:"action", id:15, start:3, style:"color:green", title:"happens(step(2,0),2,3)", type:"point"}]}, [])). 3233% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'busqueda.pl')). 3234% run_lps_corner_file1(/.../(lps_user_examples, 'busqueda.pl')). 3235% /pack/logicmoo_ec/test/lps_user_examples/busqueda.pl:1 3236% push_lps_dialect. 3237% ops. 3238% [ti=user, load= /.../(lps_user_examples, 'busqueda.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'busqueda.pl'), lps= /.../(lps_user_examples, 'busqueda.pl'), using= /.../(lps_user_examples, 'busqueda.pl')]. 3239% continue_lps_dialect. 3240% ops. 3241 3242% LPS: events((a,a1,a3)). 3243% Into: events([a,a1,a3]). 3244 3245% LPS: actions((a11,a31)). 3246% Into: actions([a11,a31]). 3247 3248% LPS: then(if(true),a). 3249% Into: reactive_rule([],[happens(a,_21970,_21976)]). 3250 3251% LPS: if(a,a2). 3252% Into: l_events(happens(a,_22990,_22996),[happens(a2,_22990,_22996)]). 3253 3254% LPS: if(a,a3). 3255% Into: l_events(happens(a,_24006,_24012),[happens(a3,_24006,_24012)]). 3256 3257% LPS: if(a1,a11). 3258% Into: l_events(happens(a1,_25022,_25028),[happens(a11,_25022,_25028)]). 3259 3260% LPS: if(a3,a31). 3261% Into: l_events(happens(a3,_26038,_26044),[happens(a31,_26038,_26044)]). 3262% /pack/logicmoo_ec/test/lps_user_examples/busqueda.pl:17 3263% pop_lps_dialect('$BLOB'("<stream>(0x562ef4161200)"), (/.../(lps_user_examples, 'busqueda.pl')-> /.../(lps_user_examples, 'busqueda.pl'))). 3264% ops. 3265% :-listing('/pack/logicmoo_ec/test/lps_user_examples/busqueda.pl':_36354). 3266 3267 3268a22. 3269 3270reactive_rule([], [happens(a, _, _)]). 3271 3272l_events(happens(a, A, B), [happens(a2, A, B)]). 3273l_events(happens(a, A, B), [happens(a3, A, B)]). 3274l_events(happens(a1, A, B), [happens(a11, A, B)]). 3275l_events(happens(a3, A, B), [happens(a31, A, B)]). 3276 3277a2 :- 3278 a22, 3279 writeln(hello). 3280 3281:- dynamic actions/1. 3282:- multifile actions/1. 3283 3284actions([a11, a31]). 3285 3286events([a, a1, a3]). 3287hello 3288 3289% dB(/.../(lps_user_examples, 'busqueda.pl'), lps_visualization(_58436{groups:[_58282{content:"Actions", id:"action", order:4}], items:[_58404{content:"a2", group:"action", id:0, start:2, style:"color:green", title:"happens(a2,1,2)", type:"point"}]}, [])). 3290% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'carta.pl')). 3291% run_lps_corner_file1(/.../(lps_user_examples, 'carta.pl')). 3292% /pack/logicmoo_ec/test/lps_user_examples/carta.pl:1 3293% push_lps_dialect. 3294% ops. 3295% [ti=user, load= /.../(lps_user_examples, 'carta.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'carta.pl'), lps= /.../(lps_user_examples, 'carta.pl'), using= /.../(lps_user_examples, 'carta.pl')]. 3296% continue_lps_dialect. 3297% ops. 3298 3299% LPS: fluents((alerta1,alerta2,alerta3)). 3300% Into: fluents([alerta1,alerta2,alerta3]). 3301 3302% LPS: actions(carta). 3303% Into: actions([carta]). 3304 3305% LPS: events((giroMensaje1,giroMensaje2,giroMensaje3,giroMensaje4)). 3306% Into: events([giroMensaje1,giroMensaje2,giroMensaje3,giroMensaje4]). 3307 3308% LPS: observe(from(alerta1,to(1,2))). 3309% Into: observe([alerta1],2). 3310 3311% LPS: then(if(at(alerta1,_24144)),from(giroMensaje1,to(_24144,_24248))). 3312% Into: reactive_rule([holds(alerta1,_24144)],[happens(giroMensaje1,_24144,_24248)]). 3313 3314% LPS: observe(from(alerta2,to(3,4))). 3315% Into: observe([alerta2],4). 3316 3317% LPS: then(if(at(alerta2,_26922)),from(giroMensaje2,to(_26922,_27026))). 3318% Into: reactive_rule([holds(alerta2,_26922)],[happens(giroMensaje2,_26922,_27026)]). 3319 3320% LPS: observe(from(alerta2,to(5,6))). 3321% Into: observe([alerta2],6). 3322 3323% LPS: then(if(at(alerta3,_29700)),from(giroMensaje3,to(_29700,_29804))). 3324% Into: reactive_rule([holds(alerta3,_29700)],[happens(giroMensaje3,_29700,_29804)]). 3325 3326% LPS: observe(from(carta,to(3,5))). 3327% Into: observe([carta],5). 3328 3329% LPS: if(from(giroMensaje4,to(_32484,_32486)),from(carta,to(_32484,_32486))). 3330% Into: l_events(happens(giroMensaje4,_32484,_32486),[happens(carta,_32484,_32486)]). 3331% /pack/logicmoo_ec/test/lps_user_examples/carta.pl:29 3332% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca4f00)"), (/.../(lps_user_examples, 'carta.pl')-> /.../(lps_user_examples, 'carta.pl'))). 3333% ops. 3334% :-listing('/pack/logicmoo_ec/test/lps_user_examples/carta.pl':_41318). 3335 3336 3337fluents([alerta1, alerta2, alerta3]). 3338 3339reactive_rule([holds(alerta1, A)], [happens(giroMensaje1, A, _)]). 3340reactive_rule([holds(alerta2, A)], [happens(giroMensaje2, A, _)]). 3341reactive_rule([holds(alerta3, A)], [happens(giroMensaje3, A, _)]). 3342 3343l_events(happens(giroMensaje4, A, B), [happens(carta, A, B)]). 3344 3345:- dynamic actions/1. 3346:- multifile actions/1. 3347 3348actions([carta]). 3349 3350events([giroMensaje1, giroMensaje2, giroMensaje3, giroMensaje4]). 3351 3352observe([alerta1], 2). 3353observe([alerta2], 4). 3354observe([alerta2], 6). 3355observe([carta], 5). 3356 3357maxTime(20). 3358% dB(/.../(lps_user_examples, 'carta.pl'), lps_visualization(_72730{groups:[_72198{content:"Events", id:"event", order:1}], items:[_72320{content:"alerta1", group:"event", id:0, start:2, style:"color:#E19735", title:"happens(alerta1,1,2)", type:"point"}, _72446{content:"alerta2", group:"event", id:1, start:4, style:"color:#E19735", title:"happens(alerta2,3,4)", type:"point"}, _72572{content:"carta", group:"event", id:2, start:5, style:"color:#E19735", title:"happens(carta,4,5)", type:"point"}, _72698{content:"alerta2", group:"event", id:3, start:6, style:"color:#E19735", title:"happens(alerta2,5,6)", type:"point"}]}, [])). 3359% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'CCAcompanaB2018.pl')). 3360% run_lps_corner_file1(/.../(lps_user_examples, 'CCAcompanaB2018.pl')). 3361% /pack/logicmoo_ec/test/lps_user_examples/CCAcompanaB2018.pl:1 3362% push_lps_dialect. 3363% ops. 3364% [ti=user, load= /.../(lps_user_examples, 'CCAcompanaB2018.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'CCAcompanaB2018.pl'), lps= /.../(lps_user_examples, 'CCAcompanaB2018.pl'), using= /.../(lps_user_examples, 'CCAcompanaB2018.pl')]. 3365% continue_lps_dialect. 3366% ops. 3367% /pack/logicmoo_ec/test/lps_user_examples/CCAcompanaB2018.pl:19 3368% pop_lps_dialect('$BLOB'("<stream>(0x562ef4161300)"), (/.../(lps_user_examples, 'CCAcompanaB2018.pl')-> /.../(lps_user_examples, 'CCAcompanaB2018.pl'))). 3369% ops. 3370% :-listing('/pack/logicmoo_ec/test/lps_user_examples/CCAcompanaB2018.pl':_77868). 3371 3372 3373persona(claudio). 3374persona(vanessa). 3375persona(jorge). 3376persona(jacinto). 3377persona(aquiles). 3378 3379:- dynamic actions/1. 3380:- multifile actions/1. 3381 3382 3383acompa�a(jorge, claudio). 3384acompa�a(claudio, jorge). 3385acompa�a(vanessa, jorge). 3386acompa�a(jorge, vanessa). 3387acompa�a(X, Y) :- 3388 acompa�a(Z, X), 3389 acompa�a(Z, Y), 3390 not(X=Y), 3391 !. 3392% dB(/.../(lps_user_examples, 'CCAcompanaB2018.pl'), lps_visualization(_30614{groups:[], items:[]}, [])). 3393% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'checkout.pl')). 3394% run_lps_corner_file1(/.../(lps_user_examples, 'checkout.pl')). 3395% /pack/logicmoo_ec/test/lps_user_examples/checkout.pl:1 3396% push_lps_dialect. 3397% ops. 3398% [ti=user, load= /.../(lps_user_examples, 'checkout.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'checkout.pl'), lps= /.../(lps_user_examples, 'checkout.pl'), using= /.../(lps_user_examples, 'checkout.pl')]. 3399% continue_lps_dialect. 3400% ops. 3401 3402% LPS: fluents((entered_at(_66334,_66336),authorised(_66334,_66392))). 3403% Into: fluents([entered_at(_66334,_66336),authorised(_66334,_66392)]). 3404 3405% LPS: actions((enter_card(_67500),authorise(_67500,_67556))). 3406% Into: actions([enter_card(_67500),authorise(_67500,_67556)]). 3407 3408% LPS: initiates(authorise(_19544,_19546),authorised(_19544,_19546)). 3409% Into: initiated(happens(authorise(_19544,_19546),_19956,_19962),authorised(_19544,_19546),[]). 3410 3411% LPS: initiates(from(enter_card(_19880),to(_19916,_19918)),entered_at(_19880,_19918)). 3412% Into: initiated(happens(enter_card(_19880),_19916,_19918),entered_at(_19880,_19918),[]). 3413 3414% LPS: if(from(checkout(_24382),to(_24418,_24420)),(have_card(_24518),from(enter_card(_24518),to(_24418,_24596)),at(authorised(_24518,_24382),_24420),_24420=<_24596+3)). 3415% Into: l_events(happens(checkout(_24382),_24418,_24420),[have_card(_24518),happens(enter_card(_24518),_24418,_24596),holds(authorised(_24518,_24382),_24420),_24420=<_24596+3]). 3416 3417% LPS: then(if(true),checkout(my_new_laptop)). 3418% Into: reactive_rule([],[happens(checkout(my_new_laptop),_28370,_28376)]). 3419 3420% LPS: false((enter_card(_28370),enter_card(_28410),_28370\=_28410)). 3421% Into: d_pre([happens(enter_card(_28370),_29582,_29588),happens(enter_card(_28410),_29582,_29588),_28370\=_28410]). 3422 3423% LPS: false((to(enter_card(_29938),_29960),entered_at(_30040,_30042),_30042<_29960,_29960=<_30042+3)). 3424% Into: d_pre([happens(enter_card(_29938),_31408,_29960),holds(entered_at(_30040,_30042),_31524),_30042<_29960,_29960=<_30042+3]). 3425% /pack/logicmoo_ec/test/lps_user_examples/checkout.pl:33 3426% pop_lps_dialect('$BLOB'("<stream>(0x562ef4161500)"), (/.../(lps_user_examples, 'checkout.pl')-> /.../(lps_user_examples, 'checkout.pl'))). 3427% ops. 3428% :-listing('/pack/logicmoo_ec/test/lps_user_examples/checkout.pl':_39640). 3429 3430 3431initiated(happens(authorise(A, B), _, _), authorised(A, B), []). 3432initiated(happens(enter_card(A), _, B), entered_at(A, B), []). 3433 3434d_pre([happens(enter_card(A), B, C), happens(enter_card(D), B, C), A\=D]). 3435d_pre([happens(enter_card(_), _, A), holds(entered_at(_, B), _), B<A, A=<B+3]). 3436 3437fluents([entered_at(A, _), authorised(A, _)]). 3438 3439have_card(1). 3440have_card(2). 3441 3442reactive_rule([], [happens(checkout(my_new_laptop), _, _)]). 3443 3444l_events(happens(checkout(A), B, C), [have_card(D), happens(enter_card(D), B, E), holds(authorised(D, A), C), C=<E+3]). 3445 3446:- dynamic actions/1. 3447:- multifile actions/1. 3448 3449actions([enter_card(A), authorise(A, _)]). 3450 3451maxTime(12). 3452% dB(/.../(lps_user_examples, 'checkout.pl'), lps_visualization(_63892{groups:[_63294{content:"entered_at(A,B)", id:"entered_at/2", order:3, subgroupStack:"false"}, _63360{content:"Actions", id:"action", order:4}], items:[_63482{content:"1,2", end:13, group:"entered_at/2", id:0, start:2, subgroup:"1", title:"Fluent entered_at(1,2) initiated at 2<br/>and terminated at transition to 13"}, _63608{content:"2,6", end:13, group:"entered_at/2", id:1, start:6, subgroup:"2", title:"Fluent entered_at(2,6) initiated at 6<br/>and terminated at transition to 13"}, _63734{content:"enter_card(1)", group:"action", id:2, start:2, style:"color:green", title:"happens(enter_card(1),1,2)", type:"point"}, _63860{content:"enter_card(2)", group:"action", id:3, start:6, style:"color:green", title:"happens(enter_card(2),5,6)", type:"point"}]}, [])). 3453% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'checkout with more_actions.pl')). 3454% run_lps_corner_file1(/.../(lps_user_examples, 'checkout with more_actions.pl')). 3455% /pack/logicmoo_ec/test/lps_user_examples/checkout with more_actions.pl:1 3456% push_lps_dialect. 3457% ops. 3458% [ti=user, load= /.../(lps_user_examples, 'checkout with more_actions.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'checkout with more_actions.pl'), lps= /.../(lps_user_examples, 'checkout with more_actions.pl'), using= /.../(lps_user_examples, 'checkout with more_actions.pl')]. 3459% continue_lps_dialect. 3460% ops. 3461 3462% LPS: fluents((entered_at(_32210,_32212),authorised(_32210,_32268))). 3463% Into: fluents([entered_at(_32210,_32212),authorised(_32210,_32268)]). 3464 3465% LPS: actions((enter_card(_33376),authorise(_33376,_33432))). 3466% Into: actions([enter_card(_33376),authorise(_33376,_33432)]). 3467 3468% LPS: initiates(authorise(_34532,_34534),authorised(_34532,_34534)). 3469% Into: initiated(happens(authorise(_34532,_34534),_35718,_35724),authorised(_34532,_34534),[]). 3470 3471% LPS: initiates(from(enter_card(_35650),to(_35686,_35688)),entered_at(_35650,_35688)). 3472% Into: initiated(happens(enter_card(_35650),_35686,_35688),entered_at(_35650,_35688),[]). 3473 3474% LPS: then(if(to(enter_card(2),_40150)),from(authorise(2,_40256),_40150+1)). 3475% Into: reactive_rule([happens(enter_card(2),_41428,_40150)],[happens(authorise(2,_40256),_40150+1,_41518)]). 3476 3477% LPS: if(from(checkout(_41476),to(_41512,_41514)),(have_card(_41612),from(enter_card(_41612),to(_41512,_41690)),at(authorised(_41612,_41476),_41514),_41514=<_41690+3)). 3478% Into: l_events(happens(checkout(_41476),_41512,_41514),[have_card(_41612),happens(enter_card(_41612),_41512,_41690),holds(authorised(_41612,_41476),_41514),_41514=<_41690+3]). 3479 3480% LPS: then(if(true),checkout(my_new_laptop)). 3481% Into: reactive_rule([],[happens(checkout(my_new_laptop),_45452,_45458)]). 3482 3483% LPS: false((enter_card(_45452),enter_card(_45492),_45452\=_45492)). 3484% Into: d_pre([happens(enter_card(_45452),_46664,_46670),happens(enter_card(_45492),_46664,_46670),_45452\=_45492]). 3485 3486% LPS: false((to(enter_card(_47020),_47042),entered_at(_47122,_47124),_47124<_47042,_47042=<_47124+3)). 3487% Into: d_pre([happens(enter_card(_47020),_48490,_47042),holds(entered_at(_47122,_47124),_48606),_47124<_47042,_47042=<_47124+3]). 3488 3489% LPS: false((enter_card(_49098),entered_at(_49098,_49154))). 3490% Into: d_pre([happens(enter_card(_49098),_50208,_50214),holds(entered_at(_49098,_49154),_50208)]). 3491% /pack/logicmoo_ec/test/lps_user_examples/checkout with more_actions.pl:36 3492% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca4800)"), (/.../(lps_user_examples, 'checkout with more_actions.pl')-> /.../(lps_user_examples, 'checkout with more_actions.pl'))). 3493% ops. 3494% :-listing('/pack/logicmoo_ec/test/lps_user_examples/checkout with more_actions.pl':_57896). 3495 3496 3497initiated(happens(authorise(A, B), _, _), authorised(A, B), []). 3498initiated(happens(enter_card(A), _, B), entered_at(A, B), []). 3499 3500d_pre([happens(enter_card(A), B, C), happens(enter_card(D), B, C), A\=D]). 3501d_pre([happens(enter_card(_), _, A), holds(entered_at(_, B), _), B<A, A=<B+3]). 3502d_pre([happens(enter_card(A), B, _), holds(entered_at(A, _), B)]). 3503 3504fluents([entered_at(A, _), authorised(A, _)]). 3505 3506have_card(1). 3507have_card(2). 3508 3509reactive_rule([happens(enter_card(2), _, A)], [happens(authorise(2, _), A+1, _)]). 3510reactive_rule([], [happens(checkout(my_new_laptop), _, _)]). 3511 3512l_events(happens(checkout(A), B, C), [have_card(D), happens(enter_card(D), B, E), holds(authorised(D, A), C), C=<E+3]). 3513 3514:- dynamic actions/1. 3515:- multifile actions/1. 3516 3517actions([enter_card(A), authorise(A, _)]). 3518 3519maxTime(12). 3520% dB(/.../(lps_user_examples, 'checkout with more_actions.pl'), lps_visualization(_87278{groups:[_86350{content:"authorised(A,B)", id:"authorised/2", order:3, subgroupStack:"false"}, _86428{content:"entered_at(A,B)", id:"entered_at/2", order:3, subgroupStack:"false"}, _86494{content:"Actions", id:"action", order:4}], items:[_86616{content:"2,A", end:13, group:"authorised/2", id:0, start:8, subgroup:"2", title:"Fluent authorised(2,A) initiated at 8<br/>and terminated at transition to 13"}, _86742{content:"1,2", end:13, group:"entered_at/2", id:1, start:2, subgroup:"1", title:"Fluent entered_at(1,2) initiated at 2<br/>and terminated at transition to 13"}, _86868{content:"2,6", end:13, group:"entered_at/2", id:2, start:6, subgroup:"2", title:"Fluent entered_at(2,6) initiated at 6<br/>and terminated at transition to 13"}, _86994{content:"enter_card(1)", group:"action", id:3, start:2, style:"color:green", title:"happens(enter_card(1),1,2)", type:"point"}, _87120{content:"enter_card(2)", group:"action", id:4, start:6, style:"color:green", title:"happens(enter_card(2),5,6)", type:"point"}, _87246{content:"authorise(2,A)", group:"action", id:5, start:8, style:"color:green", title:"happens(authorise(2,A),7,8)", type:"point"}]}, [])). 3521% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'completeness.pl')). 3522% run_lps_corner_file1(/.../(lps_user_examples, 'completeness.pl')). 3523% /pack/logicmoo_ec/test/lps_user_examples/completeness.pl:1 3524% push_lps_dialect. 3525% ops. 3526% [ti=user, load= /.../(lps_user_examples, 'completeness.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'completeness.pl'), lps= /.../(lps_user_examples, 'completeness.pl'), using= /.../(lps_user_examples, 'completeness.pl')]. 3527% continue_lps_dialect. 3528% ops. 3529 3530% LPS: events((e1,e2,e3,a1)). 3531% Into: events([e1,e2,e3,a1]). 3532 3533% LPS: actions(a1). 3534% Into: actions([a1]). 3535 3536% LPS: fluents(p). 3537% Into: fluents([p]). 3538 3539% LPS: then(if(from(e1,_57732)),(from(a1,_57820),_57820>_57732)). 3540% Into: reactive_rule([happens(e1,_57732,_59020)],[happens(a1,_57820,_59130),_57820>_57732]). 3541 3542% LPS: then(if(from(e2,_60000)),at(p,_60000+3)). 3543% Into: reactive_rule([happens(e2,_60000,_61222)],[holds(p,_60000+3)]). 3544 3545% LPS: initiates(a1,p). 3546% Into: initiated(happens(a1,_62794,_62800),p,[]). 3547 3548% LPS: terminates(e3,p). 3549% Into: terminated(happens(e3,_63810,_63816),p,[]). 3550 3551% LPS: observe(from(e1,1)). 3552% Into: observe([e1],2). 3553 3554% LPS: observe(from(e3,3)). 3555% Into: observe([e3],4). 3556 3557% LPS: observe(from(e2,4)). 3558% Into: observe([e2],5). 3559% /pack/logicmoo_ec/test/lps_user_examples/completeness.pl:15 3560% pop_lps_dialect('$BLOB'("<stream>(0x562ef4160900)"), (/.../(lps_user_examples, 'completeness.pl')-> /.../(lps_user_examples, 'completeness.pl'))). 3561% ops. 3562% :-listing('/pack/logicmoo_ec/test/lps_user_examples/completeness.pl':_74518). 3563 3564 3565initiated(happens(a1, _, _), p, []). 3566 3567fluents([p]). 3568 3569reactive_rule([happens(e1, A, _)], [happens(a1, B, _), B>A]). 3570reactive_rule([happens(e2, A, _)], [holds(p, A+3)]). 3571 3572terminated(happens(e3, _, _), p, []). 3573 3574:- dynamic actions/1. 3575:- multifile actions/1. 3576 3577actions([a1]). 3578 3579events([e1, e2, e3, a1]). 3580 3581observe([e1], 2). 3582observe([e3], 4). 3583observe([e2], 5). 3584PROGRAM FAILED 3585% dB(/.../(lps_user_examples, 'completeness.pl'), lps_visualization(_36108{groups:[_35326{content:"Events", id:"event", order:1}, _35400{content:"p", id:"p/0", order:3, subgroupStack:"false"}, _35466{content:"Actions", id:"action", order:4}], items:[_35576{content:"p", end:4, group:"p/0", id:0, start:3, title:"Fluent p initiated at 3<br/>and terminated at transition to 4"}, _35698{content:"e1", group:"event", id:1, start:2, style:"color:#E19735", title:"happens(e1,1,2)", type:"point"}, _35824{content:"a1", group:"action", id:2, start:3, style:"color:green", title:"happens(a1,2,3)", type:"point"}, _35950{content:"e3", group:"event", id:3, start:4, style:"color:#E19735", title:"happens(e3,3,4)", type:"point"}, _36076{content:"e2", group:"event", id:4, start:5, style:"color:#E19735", title:"happens(e2,4,5)", type:"point"}]}, [])). 3586% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'complex loan.pl')). 3587% run_lps_corner_file1(/.../(lps_user_examples, 'complex loan.pl')). 3588% :-listing('/pack/logicmoo_ec/test/lps_user_examples/complex loan.pl':_52822). 3589 3590% dB(/.../(lps_user_examples, 'complex loan.pl'), lps_visualization(_67528{groups:[], items:[]}, [])). 3591% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'consolidated loan.pl')). 3592% run_lps_corner_file1(/.../(lps_user_examples, 'consolidated loan.pl')). 3593% /pack/logicmoo_ec/test/lps_user_examples/consolidated loan.pl:1 3594% push_lps_dialect. 3595% ops. 3596% [ti=user, load= /.../(lps_user_examples, 'consolidated loan.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'consolidated loan.pl'), lps= /.../(lps_user_examples, 'consolidated loan.pl'), using= /.../(lps_user_examples, 'consolidated loan.pl')]. 3597% continue_lps_dialect. 3598% ops. 3599% /pack/logicmoo_ec/test/lps_user_examples/consolidated loan.pl:3 3600% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca2500)"), (/.../(lps_user_examples, 'consolidated loan.pl')-> /.../(lps_user_examples, 'consolidated loan.pl'))). 3601% ops. 3602% :-listing('/pack/logicmoo_ec/test/lps_user_examples/consolidated loan.pl':_109892). 3603 3604 3605:- dynamic actions/1. 3606:- multifile actions/1. 3607 3608% dB(/.../(lps_user_examples, 'consolidated loan.pl'), lps_visualization(_31014{groups:[], items:[]}, [])). 3609% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'contagion2.pl')). 3610% run_lps_corner_file1(/.../(lps_user_examples, 'contagion2.pl')). 3611% /pack/logicmoo_ec/test/lps_user_examples/contagion2.pl:1 3612% push_lps_dialect. 3613% ops. 3614% [ti=user, load= /.../(lps_user_examples, 'contagion2.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'contagion2.pl'), lps= /.../(lps_user_examples, 'contagion2.pl'), using= /.../(lps_user_examples, 'contagion2.pl')]. 3615% continue_lps_dialect. 3616% ops. 3617% /pack/logicmoo_ec/test/lps_user_examples/contagion2.pl:3 3618% pop_lps_dialect('$BLOB'("<stream>(0x562ef4162500)"), (/.../(lps_user_examples, 'contagion2.pl')-> /.../(lps_user_examples, 'contagion2.pl'))). 3619% ops. 3620% :-listing('/pack/logicmoo_ec/test/lps_user_examples/contagion2.pl':_73344). 3621 3622 3623:- dynamic actions/1. 3624:- multifile actions/1. 3625 3626% dB(/.../(lps_user_examples, 'contagion2.pl'), lps_visualization(_31008{groups:[], items:[]}, [])). 3627% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'contagionlps.pl')). 3628% run_lps_corner_file1(/.../(lps_user_examples, 'contagionlps.pl')). 3629% /pack/logicmoo_ec/test/lps_user_examples/contagionlps.pl:1 3630% push_lps_dialect. 3631% ops. 3632% [ti=user, load= /.../(lps_user_examples, 'contagionlps.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'contagionlps.pl'), lps= /.../(lps_user_examples, 'contagionlps.pl'), using= /.../(lps_user_examples, 'contagionlps.pl')]. 3633% continue_lps_dialect. 3634% ops. 3635 3636% LPS: fluents((contaminated/3,infected/3,met/3)). 3637% Into: fluents([contaminated(_20026,_20028,_20030),infected(_20040,_20042,_20044),met(_20054,_20056,_20058)]). 3638 3639% LPS: events((tested(_19966,_19968,_19970),meets(_19966,_20040,_19970))). 3640% Into: events([tested(_19966,_19968,_19970),meets(_19966,_20040,_19970)]). 3641 3642% LPS: if(initiates(tested(_21186,positive,_21190),contaminated(_21186,_21260,_21262)),(two_week_after(_21190,_21262),five_days_before(_21260,_21190))). 3643% Into: initiated(happens(tested(_21186,positive,_21190),_22640,_22646),contaminated(_21186,_21260,_21262),[two_week_after(_21190,_21262),five_days_before(_21260,_21190)]). 3644 3645% LPS: if(initiates(meets(_23392,_23394,_23396),contaminated(_23394,_23466,_23468)),(at(contamination(_23392,[],_23644,(_23608,_23610)),_23668),within(_23608,_23396,_23610),five_days_after(_23608,_23466),two_week_after(_23608,_23468))). 3646% Into: initiated(happens(meets(_23392,_23394,_23396),_25254,_25260),contaminated(_23394,_23466,_23468),[holds(contamination(_23392,[],_23644,(_23608,_23610)),_23668),within(_23608,_23396,_23610),five_days_after(_23608,_23466),two_week_after(_23608,_23468)]). 3647 3648% LPS: initiates(meets(_26622,_26624,_26626),met(_26622,_26624,_26626)). 3649% Into: initiated(happens(meets(_26622,_26624,_26626),_27846,_27852),met(_26622,_26624,_26626),[]). 3650 3651% LPS: initiates(meets(_27802,_27804,_27806),met(_27804,_27802,_27806)). 3652% Into: initiated(happens(meets(_27802,_27804,_27806),_29026,_29032),met(_27804,_27802,_27806),[]). 3653 3654% LPS: if(contamination(_29054,_29056,_29056,(_29022,_29024)),contaminated(_29054,_29022,_29024)). 3655% Into: l_int(holds(contamination(_29054,_29056,_29056,(_29022,_29024)),_30210),[holds(contaminated(_29054,_29022,_29024),_30210)]). 3656 3657% LPS: if(contamination(_30778,_30780,_30782,(_30746,_30748)),(met(_30778,_30854,_30856),not(member(_30854,_30780)),contamination(_30854,[_30854|_30780],_30782,(_31078,_31080)),within(_31078,_30856,_31080),five_days_after(_30856,_30746),two_week_after(_30856,_30748))). 3658% Into: l_int(holds(contamination(_30778,_30780,_30782,(_30746,_30748)),_32680),[holds(met(_30778,_30854,_30856),_32680),not(member(_30854,_30780)),holds(contamination(_30854,[_30854|_30780],_30782,(_31078,_31080)),_32680),within(_31078,_30856,_31080),five_days_after(_30856,_30746),two_week_after(_30856,_30748)]). 3659 3660% LPS: observe(from(meets(gertrude,alice,date(2020,3,15,0,0,0,0,'UTC',-)),to(2,3))). 3661% Into: observe([meets(gertrude,alice,date(2020,3,15,0,0,0,0,'UTC',-))],3). 3662 3663% LPS: observe(from(tested(alice,positive,date(2020,3,14,0,0,0,0,'UTC',-)),to(4,5))). 3664% Into: observe([tested(alice,positive,date(2020,3,14,0,0,0,0,'UTC',-))],5). 3665% /pack/logicmoo_ec/test/lps_user_examples/contagionlps.pl:107 3666% pop_lps_dialect('$BLOB'("<stream>(0x562ef4161000)"), (/.../(lps_user_examples, 'contagionlps.pl')-> /.../(lps_user_examples, 'contagionlps.pl'))). 3667% ops. 3668% :-listing('/pack/logicmoo_ec/test/lps_user_examples/contagionlps.pl':_60844). 3669 3670 3671initiated(happens(tested(A, positive, B), _, _), contaminated(A, C, D), [two_week_after(B, D), five_days_before(C, B)]). 3672initiated(happens(meets(A, B, C), _, _), contaminated(B, D, E), [holds(contamination(A, [], _, (F, G)), _), within(F, C, G), five_days_after(F, D), two_week_after(F, E)]). 3673initiated(happens(meets(A, B, C), _, _), met(A, B, C), []). 3674initiated(happens(meets(A, B, C), _, _), met(B, A, C), []). 3675 3676fluents([contaminated(_, _, _), infected(_, _, _), met(_, _, _)]). 3677 3678l_int(holds(contamination(A, B, B, (C, D)), E), [holds(contaminated(A, C, D), E)]). 3679l_int(holds(contamination(A, B, C, (D, E)), F), [holds(met(A, G, H), F), not(member(G, B)), holds(contamination(G, [G|B], C, (I, J)), F), within(I, H, J), five_days_after(H, D), two_week_after(H, E)]). 3680 3681two_week_after(date(Y, M, D, H, Mn, S, Off, TZ, DST), Date2) :- 3682 nonvar(D), 3683 NewD is D+15, 3684 date_time_stamp(date(Y, 3685 M, 3686 NewD, 3687 H, 3688 Mn, 3689 S, 3690 Off, 3691 TZ, 3692 DST), 3693 Stamp), 3694 stamp_date_time(Stamp, Date2, 0). 3695two_week_after(Date2, date(Y, M, D, H, Mn, S, Off, TZ, DST)) :- 3696 nonvar(D), 3697 NewD is D+ -15, 3698 date_time_stamp(date(Y, 3699 M, 3700 NewD, 3701 H, 3702 Mn, 3703 S, 3704 Off, 3705 TZ, 3706 DST), 3707 Stamp), 3708 stamp_date_time(Stamp, Date2, 0). 3709 3710within(Date1, T, Date2) :- 3711 nonvar(Date1), 3712 nonvar(Date2), 3713 nonvar(T), 3714 date_time_stamp(Date1, Stamp1), 3715 date_time_stamp(Date2, Stamp2), 3716 date_time_stamp(T, Stamp3), 3717 Stamp1=<Stamp3, 3718 Stamp3=<Stamp2. 3719 3720maxtime(20). 3721 3722five_days_before(date(Y, M, D, H, Mn, S, Off, TZ, DST), Date2) :- 3723 nonvar(D), 3724 NewD is D+5, 3725 date_time_stamp(date(Y, 3726 M, 3727 NewD, 3728 H, 3729 Mn, 3730 S, 3731 Off, 3732 TZ, 3733 DST), 3734 Stamp), 3735 stamp_date_time(Stamp, Date2, 0). 3736five_days_before(Date2, date(Y, M, D, H, Mn, S, Off, TZ, DST)) :- 3737 nonvar(D), 3738 NewD is D+ -5, 3739 date_time_stamp(date(Y, 3740 M, 3741 NewD, 3742 H, 3743 Mn, 3744 S, 3745 Off, 3746 TZ, 3747 DST), 3748 Stamp), 3749 stamp_date_time(Stamp, Date2, 0). 3750 3751:- dynamic actions/1. 3752:- multifile actions/1. 3753 3754 3755five_days_after(date(Y, M, D, H, Mn, S, Off, TZ, DST), Date2) :- 3756 nonvar(D), 3757 NewD is D+5, 3758 date_time_stamp(date(Y, 3759 M, 3760 NewD, 3761 H, 3762 Mn, 3763 S, 3764 Off, 3765 TZ, 3766 DST), 3767 Stamp), 3768 stamp_date_time(Stamp, Date2, 0). 3769five_days_after(Date2, date(Y, M, D, H, Mn, S, Off, TZ, DST)) :- 3770 nonvar(D), 3771 NewD is D+ -5, 3772 date_time_stamp(date(Y, 3773 M, 3774 NewD, 3775 H, 3776 Mn, 3777 S, 3778 Off, 3779 TZ, 3780 DST), 3781 Stamp), 3782 stamp_date_time(Stamp, Date2, 0). 3783 3784events([tested(A, _, B), meets(A, _, B)]). 3785 3786observe([meets(gertrude, alice, date(2020, 3, 15, 0, 0, 0, 0, 'UTC', -))], 3). 3787observe([tested(alice, positive, date(2020, 3, 14, 0, 0, 0, 0, 'UTC', -))], 5). 3788% dB(/.../(lps_user_examples, 'contagionlps.pl'), lps_visualization(_70552{groups:[_69738{content:"Events", id:"event", order:1}, _69812{content:"contaminated(A,B,C)", id:"contaminated/3", order:3, subgroupStack:"false"}, _69890{content:"met(A,B,C)", id:"met/3", order:3, subgroupStack:"false"}], items:[_70016{content:"alice,date(2020,3,9,0,0,0.0,0,-,-),date(2020,3,29,0,0,0.0,0,-,-)", end:21, group:"contaminated/3", id:0, start:5, subgroup:"alice", title:"Fluent contaminated(alice,date(2020,3,9,0,0,0.0,0,-,-),date(2020,3,29,0,0,0.0,0,-,-)) initiated at 5<br/>and terminated at transition to 21"}, _70142{content:"alice,gertrude,date(2020,3,15,0,0,0,0,UTC,-)", end:21, group:"met/3", id:1, start:3, subgroup:"alice", title:"Fluent met(alice,gertrude,date(2020,3,15,0,0,0,0,UTC,-)) initiated at 3<br/>and terminated at transition to 21"}, _70268{content:"gertrude,alice,date(2020,3,15,0,0,0,0,UTC,-)", end:21, group:"met/3", id:2, start:3, subgroup:"gertrude", title:"Fluent met(gertrude,alice,date(2020,3,15,0,0,0,0,UTC,-)) initiated at 3<br/>and terminated at transition to 21"}, _70394{content:"meets(gertrude,alice,date(2020,3,15,0,0,0,0,UTC,-))", group:"event", id:3, start:3, style:"color:#E19735", title:"happens(meets(gertrude,alice,date(2020,3,15,0,0,0,0,UTC,-)),2,3)", type:"point"}, _70520{content:"tested(alice,positive,date(2020,3,14,0,0,0,0,UTC,-))", group:"event", id:4, start:5, style:"color:#E19735", title:"happens(tested(alice,positive,date(2020,3,14,0,0,0,0,UTC,-)),4,5)", type:"point"}]}, [])). 3789% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'contagionnet.pl')). 3790% run_lps_corner_file1(/.../(lps_user_examples, 'contagionnet.pl')). 3791% /pack/logicmoo_ec/test/lps_user_examples/contagionnet.pl:1 3792% push_lps_dialect. 3793% ops. 3794% [ti=user, load= /.../(lps_user_examples, 'contagionnet.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'contagionnet.pl'), lps= /.../(lps_user_examples, 'contagionnet.pl'), using= /.../(lps_user_examples, 'contagionnet.pl')]. 3795% continue_lps_dialect. 3796% ops. 3797% /pack/logicmoo_ec/test/lps_user_examples/contagionnet.pl:85 3798% pop_lps_dialect('$BLOB'("<stream>(0x562ef5a59a00)"), (/.../(lps_user_examples, 'contagionnet.pl')-> /.../(lps_user_examples, 'contagionnet.pl'))). 3799% ops. 3800% :-listing('/pack/logicmoo_ec/test/lps_user_examples/contagionnet.pl':_42318). 3801 3802 3803two_week_after(date(Y, M, D, H, Mn, S, Off, TZ, DST), Date2) :- 3804 nonvar(D), 3805 NewD is D+15, 3806 date_time_stamp(date(Y, 3807 M, 3808 NewD, 3809 H, 3810 Mn, 3811 S, 3812 Off, 3813 TZ, 3814 DST), 3815 Stamp), 3816 stamp_date_time(Stamp, Date2, 0). 3817two_week_after(Date2, date(Y, M, D, H, Mn, S, Off, TZ, DST)) :- 3818 nonvar(D), 3819 NewD is D+ -15, 3820 date_time_stamp(date(Y, 3821 M, 3822 NewD, 3823 H, 3824 Mn, 3825 S, 3826 Off, 3827 TZ, 3828 DST), 3829 Stamp), 3830 stamp_date_time(Stamp, Date2, 0). 3831 3832within(Date1, T, Date2) :- 3833 nonvar(Date1), 3834 nonvar(Date2), 3835 nonvar(T), 3836 date_time_stamp(Date1, Stamp1), 3837 date_time_stamp(Date2, Stamp2), 3838 date_time_stamp(T, Stamp3), 3839 Stamp1=<Stamp3, 3840 Stamp3=<Stamp2. 3841 3842five_days_before(date(Y, M, D, H, Mn, S, Off, TZ, DST), Date2) :- 3843 nonvar(D), 3844 NewD is D+5, 3845 date_time_stamp(date(Y, 3846 M, 3847 NewD, 3848 H, 3849 Mn, 3850 S, 3851 Off, 3852 TZ, 3853 DST), 3854 Stamp), 3855 stamp_date_time(Stamp, Date2, 0). 3856five_days_before(Date2, date(Y, M, D, H, Mn, S, Off, TZ, DST)) :- 3857 nonvar(D), 3858 NewD is D+ -5, 3859 date_time_stamp(date(Y, 3860 M, 3861 NewD, 3862 H, 3863 Mn, 3864 S, 3865 Off, 3866 TZ, 3867 DST), 3868 Stamp), 3869 stamp_date_time(Stamp, Date2, 0). 3870 3871:- dynamic actions/1. 3872:- multifile actions/1. 3873 3874 3875met(A, B, T) :- 3876 ( observe(meets(A, B), T) 3877 ; observe(meets(B, A), T) 3878 ). 3879 3880observe(meets(alice, bob), date(2020, 3, 1, 0, 0, 0, 0, 'UTC', -)). 3881observe(meets(bob, charlie), date(2020, 3, 6, 0, 0, 0, 0, 'UTC', -)). 3882observe(meets(bob, delilah), date(2020, 3, 6, 0, 0, 0, 0, 'UTC', -)). 3883observe(meets(delilah, edgar), date(2020, 3, 12, 0, 0, 0, 0, 'UTC', -)). 3884observe(meets(delilah, fiona), date(2020, 3, 12, 0, 0, 0, 0, 'UTC', -)). 3885observe(meets(delilah, gertrude), date(2020, 3, 12, 0, 0, 0, 0, 'UTC', -)). 3886observe(meets(iona, edgar), date(2020, 3, 12, 0, 0, 0, 0, 'UTC', -)). 3887observe(meets(iona, fiona), date(2020, 3, 12, 0, 0, 0, 0, 'UTC', -)). 3888observe(meets(iona, gertrude), date(2020, 3, 12, 0, 0, 0, 0, 'UTC', -)). 3889observe(meets(edgar, hannah), date(2020, 3, 14, 0, 0, 0, 0, 'UTC', -)). 3890observe(meets(fiona, hannah), date(2020, 3, 14, 0, 0, 0, 0, 'UTC', -)). 3891observe(meets(gertrude, hannah), date(2020, 3, 14, 0, 0, 0, 0, 'UTC', -)). 3892observe(meets(edgar, iona), date(2020, 3, 14, 0, 0, 0, 0, 'UTC', -)). 3893observe(meets(fiona, iona), date(2020, 3, 14, 0, 0, 0, 0, 'UTC', -)). 3894observe(meets(gertrude, iona), date(2020, 3, 14, 0, 0, 0, 0, 'UTC', -)). 3895observe(tested(alice, positive), date(2020, 3, 15, 0, 0, 0, 0, 'UTC', -)). 3896 3897contaminated(A, Path, Path, (T1, T2)) :- 3898 observe(tested(A, positive), Date), 3899 five_days_before(T1, Date), 3900 two_week_after(Date, T2). 3901contaminated(A, Path, FPath, (Tm, T2)) :- 3902 met(A, B, Tm), 3903 not(member(B, Path)), 3904 contaminated(B, 3905 [B|Path], 3906 FPath, 3907 (TB1, TB2)), 3908 within(TB1, Tm, TB2), 3909 two_week_after(Tm, T2). 3910% dB(/.../(lps_user_examples, 'contagionnet.pl'), lps_visualization(_53084{groups:[], items:[]}, [])). 3911% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'contagion.pl')). 3912% run_lps_corner_file1(/.../(lps_user_examples, 'contagion.pl')). 3913% /pack/logicmoo_ec/test/lps_user_examples/contagion.pl:1 3914% push_lps_dialect. 3915% ops. 3916% [ti=user, load= /.../(lps_user_examples, 'contagion.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'contagion.pl'), lps= /.../(lps_user_examples, 'contagion.pl'), using= /.../(lps_user_examples, 'contagion.pl')]. 3917% continue_lps_dialect. 3918% ops. 3919% /pack/logicmoo_ec/test/lps_user_examples/contagion.pl:3 3920% pop_lps_dialect('$BLOB'("<stream>(0x562ef5a57300)"), (/.../(lps_user_examples, 'contagion.pl')-> /.../(lps_user_examples, 'contagion.pl'))). 3921% ops. 3922% :-listing('/pack/logicmoo_ec/test/lps_user_examples/contagion.pl':_95400). 3923 3924 3925:- dynamic actions/1. 3926:- multifile actions/1. 3927 3928% dB(/.../(lps_user_examples, 'contagion.pl'), lps_visualization(_31114{groups:[], items:[]}, [])). 3929% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'contrato116.pl')). 3930% run_lps_corner_file1(/.../(lps_user_examples, 'contrato116.pl')). 3931% /pack/logicmoo_ec/test/lps_user_examples/contrato116.pl:1 3932% push_lps_dialect. 3933% ops. 3934% [ti=user, load= /.../(lps_user_examples, 'contrato116.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'contrato116.pl'), lps= /.../(lps_user_examples, 'contrato116.pl'), using= /.../(lps_user_examples, 'contrato116.pl')]. 3935% continue_lps_dialect. 3936% ops. 3937 3938% LPS: actions((dragar(_19502,_19504,_19506),botar(_19502,_19504,_19562),pagar(_19504),paralizar(_19618),modificar(_19646))). 3939% Into: actions([dragar(_19502,_19504,_19506),botar(_19502,_19504,_19562),pagar(_19504),paralizar(_19618),modificar(_19646)]). 3940 3941% LPS: events(validar(_20210,_20212,_20214)). 3942% Into: events([validar(_20210,_20212,_20214)]). 3943 3944% LPS: fluents((obra_paralizada,especificacion(_21406),cuenta_camion(_21446),por_pagar(_21486),validado(_21446,_21556,_21558))). 3945% Into: fluents([obra_paralizada,especificacion(_21406),cuenta_camion(_21446),por_pagar(_21486),validado(_21446,_21556,_21558)]). 3946 3947% LPS: if(from(excavar(_22832,_22834,_22836),to(_22872,_22874)),(at(especificacion(_22972),_22872),at(cuenta_camion(_22832),_22872),conforme_a(_22972,_22834,_22836),capacidad(_22832,_22834),from(dragar(_22832,_22834,_22836),to(_22872,_22874)))). 3948% Into: l_events(happens(excavar(_22832,_22834,_22836),_22872,_22874),[holds(especificacion(_22972),_22872),holds(cuenta_camion(_22832),_22872),conforme_a(_22972,_22834,_22836),capacidad(_22832,_22834),happens(dragar(_22832,_22834,_22836),_22872,_22874)]). 3949 3950% LPS: then(if((at(not(obra_paralizada),_30204),at(not(fecha_tope(_30204)),_30204))),from(excavar(_30466,_30468,_30470),to(_30204,_30508))). 3951% Into: reactive_rule([holds(not(obra_paralizada),_30204),holds(not(fecha_tope(_30204)),_30204)],[happens(excavar(_30466,_30468,_30470),_30204,_30508)]). 3952 3953% LPS: then(if(from(dragar(_31740,_31742,aqui),to(_31780,_31782))),from(botar(_31740,_31742,alli),to(_31782,_31974))). 3954% Into: reactive_rule([happens(dragar(_31740,_31742,aqui),_31780,_31782)],[happens(botar(_31740,_31742,alli),_31782,_31974)]). 3955 3956% LPS: if(updates(dragar(_33188,_33190,_33192),in(to(_33188,_33230),cuenta_camion(_33188))),_33230 is _33188+1). 3957% Into: updated(happens(dragar(_33188,_33190,_33192),_34716,_34722),cuenta_camion(_33188),_33188-_33230,[_33230 is _33188+1]). 3958 3959% LPS: if(updates(botar(_34986,_34988,_34990),in(to(_35026,_35028),por_pagar(_35026))),(validado(_34986,_34988,_34990),_35028 is _35026+_34988)). 3960% Into: updated(happens(botar(_34986,_34988,_34990),_36644,_36650),por_pagar(_35026),_35026-_35028,[holds(validado(_34986,_34988,_34990),_36644),_35028 is _35026+_34988]). 3961 3962% LPS: if(initiates(validar(_36978,_36980,_36982),validado(_36978,_36980,_36982)),cuenta_camion(_36978)). 3963% Into: initiated(happens(validar(_36978,_36980,_36982),_38302,_38308),validado(_36978,_36980,_36982),[holds(cuenta_camion(_36978),_38302)]). 3964 3965% LPS: initially((especificacion(vacia),cuenta_camion(1),por_pagar(0))). 3966% Into: initial_state([especificacion(vacia),cuenta_camion(1),por_pagar(0)]). 3967 3968% LPS: observe(from(validar(_39438,10,alli),to(1,2))). 3969% Into: observe([validar(_39438,10,alli)],2). 3970 3971% LPS: observe(from(validar(_40608,10,alli),to(2,3))). 3972% Into: observe([validar(_40608,10,alli)],3). 3973 3974% LPS: observe(from(validar(_41778,10,alli),to(3,4))). 3975% Into: observe([validar(_41778,10,alli)],4). 3976 3977% LPS: observe(from(validar(_42948,10,alli),to(4,5))). 3978% Into: observe([validar(_42948,10,alli)],5). 3979 3980% LPS: observe(from(validar(_44118,10,alli),to(6,7))). 3981% Into: observe([validar(_44118,10,alli)],7). 3982 3983% LPS: observe(from(validar(_45288,10,alli),to(7,8))). 3984% Into: observe([validar(_45288,10,alli)],8). 3985% /pack/logicmoo_ec/test/lps_user_examples/contrato116.pl:59 3986% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca4f00)"), (/.../(lps_user_examples, 'contrato116.pl')-> /.../(lps_user_examples, 'contrato116.pl'))). 3987% ops. 3988% :-listing('/pack/logicmoo_ec/test/lps_user_examples/contrato116.pl':_54024). 3989 3990 3991initiated(happens(validar(A, B, C), D, _), validado(A, B, C), [holds(cuenta_camion(A), D)]). 3992 3993fluents([obra_paralizada, especificacion(_), cuenta_camion(A), por_pagar(_), validado(A, _, _)]). 3994 3995capacidad(_, 10). 3996 3997reactive_rule([holds(not(obra_paralizada), A), holds(not(fecha_tope(A)), A)], [happens(excavar(_, _, _), A, _)]). 3998reactive_rule([happens(dragar(A, B, aqui), _, C)], [happens(botar(A, B, alli), C, _)]). 3999 4000initial_state([especificacion(vacia), cuenta_camion(1), por_pagar(0)]). 4001 4002l_events(happens(excavar(A, B, C), D, E), [holds(especificacion(F), D), holds(cuenta_camion(A), D), conforme_a(F, B, C), capacidad(A, B), happens(dragar(A, B, C), D, E)]). 4003 4004:- dynamic actions/1. 4005:- multifile actions/1. 4006 4007actions([dragar(A, B, _), botar(A, B, _), pagar(B), paralizar(_), modificar(_)]). 4008 4009conforme_a(_, _, _). 4010 4011events([validar(_, _, _)]). 4012 4013fecha_tope(8). 4014 4015updated(happens(dragar(A, _, _), _, _), cuenta_camion(A), A-B, [B is A+1]). 4016updated(happens(botar(A, B, C), D, _), por_pagar(E), E-F, [holds(validado(A, B, C), D), F is E+B]). 4017 4018maxTime(10). 4019 4020observe([validar(_, 10, alli)], 2). 4021observe([validar(_, 10, alli)], 3). 4022observe([validar(_, 10, alli)], 4). 4023observe([validar(_, 10, alli)], 5). 4024observe([validar(_, 10, alli)], 7). 4025observe([validar(_, 10, alli)], 8). 4026% dB(/.../(lps_user_examples, 'contrato116.pl'), lps_visualization(_157238{groups:[_151292{content:"Events", id:"event", order:1}, _151366{content:"cuenta_camion(A)", id:"cuenta_camion/1", order:3, subgroupStack:"false"}, _151444{content:"especificacion(A)", id:"especificacion/1", order:3, subgroupStack:"false"}, _151522{content:"por_pagar(A)", id:"por_pagar/1", order:3, subgroupStack:"false"}, _151600{content:"validado(A,B,C)", id:"validado/3", order:3, subgroupStack:"false"}, _151666{content:"Actions", id:"action", order:4}], items:[_151788{content:"1", end:2, group:"cuenta_camion/1", id:0, start:1, subgroup:"1", title:"Fluent cuenta_camion(1) initiated at 1<br/>and terminated at transition to 2"}, _151914{content:"2", end:3, group:"cuenta_camion/1", id:1, start:2, subgroup:"2", title:"Fluent cuenta_camion(2) initiated at 2<br/>and terminated at transition to 3"}, _152040{content:"3", end:4, group:"cuenta_camion/1", id:2, start:3, subgroup:"3", title:"Fluent cuenta_camion(3) initiated at 3<br/>and terminated at transition to 4"}, _152166{content:"4", end:5, group:"cuenta_camion/1", id:3, start:4, subgroup:"4", title:"Fluent cuenta_camion(4) initiated at 4<br/>and terminated at transition to 5"}, _152292{content:"5", end:6, group:"cuenta_camion/1", id:4, start:5, subgroup:"5", title:"Fluent cuenta_camion(5) initiated at 5<br/>and terminated at transition to 6"}, _152418{content:"6", end:7, group:"cuenta_camion/1", id:5, start:6, subgroup:"6", title:"Fluent cuenta_camion(6) initiated at 6<br/>and terminated at transition to 7"}, _152544{content:"7", end:8, group:"cuenta_camion/1", id:6, start:7, subgroup:"7", title:"Fluent cuenta_camion(7) initiated at 7<br/>and terminated at transition to 8"}, _152670{content:"8", end:10, group:"cuenta_camion/1", id:7, start:8, subgroup:"8", title:"Fluent cuenta_camion(8) initiated at 8<br/>and terminated at transition to 10"}, _152796{content:"9", end:11, group:"cuenta_camion/1", id:8, start:10, subgroup:"9", title:"Fluent cuenta_camion(9) initiated at 10<br/>and terminated at transition to 11"}, _152922{content:"vacia", end:11, group:"especificacion/1", id:9, start:1, subgroup:"vacia", title:"Fluent especificacion(vacia) initiated at 1<br/>and terminated at transition to 11"}, _153048{content:"0", end:3, group:"por_pagar/1", id:10, start:1, subgroup:"0", title:"Fluent por_pagar(0) initiated at 1<br/>and terminated at transition to 3"}, _153174{content:"10", end:4, group:"por_pagar/1", id:11, start:3, subgroup:"10", title:"Fluent por_pagar(10) initiated at 3<br/>and terminated at transition to 4"}, _153300{content:"20", end:5, group:"por_pagar/1", id:12, start:4, subgroup:"20", title:"Fluent por_pagar(20) initiated at 4<br/>and terminated at transition to 5"}, _153426{content:"30", end:6, group:"por_pagar/1", id:13, start:5, subgroup:"30", title:"Fluent por_pagar(30) initiated at 5<br/>and terminated at transition to 6"}, _153552{content:"40", end:8, group:"por_pagar/1", id:14, start:6, subgroup:"40", title:"Fluent por_pagar(40) initiated at 6<br/>and terminated at transition to 8"}, _153678{content:"50", end:9, group:"por_pagar/1", id:15, start:8, subgroup:"50", title:"Fluent por_pagar(50) initiated at 8<br/>and terminated at transition to 9"}, _153804{content:"60", end:11, group:"por_pagar/1", id:16, start:9, subgroup:"60", title:"Fluent por_pagar(60) initiated at 9<br/>and terminated at transition to 11"}, _153930{content:"1,10,alli", end:11, group:"validado/3", id:17, start:2, subgroup:"1", title:"Fluent validado(1,10,alli) initiated at 2<br/>and terminated at transition to 11"}, _154056{content:"2,10,alli", end:11, group:"validado/3", id:18, start:3, subgroup:"2", title:"Fluent validado(2,10,alli) initiated at 3<br/>and terminated at transition to 11"}, _154182{content:"3,10,alli", end:11, group:"validado/3", id:19, start:4, subgroup:"3", title:"Fluent validado(3,10,alli) initiated at 4<br/>and terminated at transition to 11"}, _154308{content:"4,10,alli", end:11, group:"validado/3", id:20, start:5, subgroup:"4", title:"Fluent validado(4,10,alli) initiated at 5<br/>and terminated at transition to 11"}, _154434{content:"6,10,alli", end:11, group:"validado/3", id:21, start:7, subgroup:"6", title:"Fluent validado(6,10,alli) initiated at 7<br/>and terminated at transition to 11"}, _154560{content:"7,10,alli", end:11, group:"validado/3", id:22, start:8, subgroup:"7", title:"Fluent validado(7,10,alli) initiated at 8<br/>and terminated at transition to 11"}, _154686{content:"validar(A,10,alli)", group:"event", id:23, start:2, style:"color:#E19735", title:"happens(validar(A,10,alli),1,2)", type:"point"}, _154812{content:"dragar(1,10,B)", group:"action", id:24, start:2, style:"color:green", title:"happens(dragar(1,10,B),1,2)", type:"point"}, _154938{content:"validar(A,10,alli)", group:"event", id:25, start:3, style:"color:#E19735", title:"happens(validar(A,10,alli),2,3)", type:"point"}, _155064{content:"dragar(2,10,B)", group:"action", id:26, start:3, style:"color:green", title:"happens(dragar(2,10,B),2,3)", type:"point"}, _155190{content:"botar(1,10,alli)", group:"action", id:27, start:3, style:"color:green", title:"happens(botar(1,10,alli),2,3)", type:"point"}, _155316{content:"validar(A,10,alli)", group:"event", id:28, start:4, style:"color:#E19735", title:"happens(validar(A,10,alli),3,4)", type:"point"}, _155442{content:"botar(2,10,alli)", group:"action", id:29, start:4, style:"color:green", title:"happens(botar(2,10,alli),3,4)", type:"point"}, _155568{content:"dragar(3,10,B)", group:"action", id:30, start:4, style:"color:green", title:"happens(dragar(3,10,B),3,4)", type:"point"}, _155694{content:"validar(A,10,alli)", group:"event", id:31, start:5, style:"color:#E19735", title:"happens(validar(A,10,alli),4,5)", type:"point"}, _155820{content:"dragar(4,10,B)", group:"action", id:32, start:5, style:"color:green", title:"happens(dragar(4,10,B),4,5)", type:"point"}, _155946{content:"botar(3,10,alli)", group:"action", id:33, start:5, style:"color:green", title:"happens(botar(3,10,alli),4,5)", type:"point"}, _156072{content:"botar(4,10,alli)", group:"action", id:34, start:6, style:"color:green", title:"happens(botar(4,10,alli),5,6)", type:"point"}, _156198{content:"dragar(5,10,A)", group:"action", id:35, start:6, style:"color:green", title:"happens(dragar(5,10,A),5,6)", type:"point"}, _156324{content:"validar(A,10,alli)", group:"event", id:36, start:7, style:"color:#E19735", title:"happens(validar(A,10,alli),6,7)", type:"point"}, _156450{content:"dragar(6,10,B)", group:"action", id:37, start:7, style:"color:green", title:"happens(dragar(6,10,B),6,7)", type:"point"}, _156576{content:"botar(5,10,alli)", group:"action", id:38, start:7, style:"color:green", title:"happens(botar(5,10,alli),6,7)", type:"point"}, _156702{content:"validar(A,10,alli)", group:"event", id:39, start:8, style:"color:#E19735", title:"happens(validar(A,10,alli),7,8)", type:"point"}, _156828{content:"botar(6,10,alli)", group:"action", id:40, start:8, style:"color:green", title:"happens(botar(6,10,alli),7,8)", type:"point"}, _156954{content:"dragar(7,10,B)", group:"action", id:41, start:8, style:"color:green", title:"happens(dragar(7,10,B),7,8)", type:"point"}, _157080{content:"botar(7,10,alli)", group:"action", id:42, start:9, style:"color:green", title:"happens(botar(7,10,alli),8,9)", type:"point"}, _157206{content:"dragar(8,10,A)", group:"action", id:43, start:10, style:"color:green", title:"happens(dragar(8,10,A),9,10)", type:"point"}]}, [])). 4027% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'conveyor belt(1).pl')). 4028% run_lps_corner_file1(/.../(lps_user_examples, 'conveyor belt(1).pl')). 4029% /pack/logicmoo_ec/test/lps_user_examples/conveyor belt(1).pl:1 4030% push_lps_dialect. 4031% ops. 4032% [ti=user, load= /.../(lps_user_examples, 'conveyor belt(1).pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'conveyor belt(1).pl'), lps= /.../(lps_user_examples, 'conveyor belt(1).pl'), using= /.../(lps_user_examples, 'conveyor belt(1).pl')]. 4033% continue_lps_dialect. 4034% ops. 4035 4036% LPS: fluents((normalOperation,started,contents/2,empty/1,location/2)). 4037% Into: fluents([normalOperation,started,contents(_66506,_66508),empty(_66518),location(_66528,_66530)]). 4038 4039% LPS: initially((normalOperation,contents(bottle,0),contents(container,0),contents(tank1,100),contents(tank2,100),location(bottle,2),location(tank1,2),location(tank2,5),location(container,7))). 4040% Into: initial_state([normalOperation,contents(bottle,0),contents(container,0),contents(tank1,100),contents(tank2,100),location(bottle,2),location(tank1,2),location(tank2,5),location(container,7)]). 4041 4042% LPS: actions((pour/3,turnConveyor/1,waitCycle)). 4043% Into: actions([pour(_69440,_69442,_69444),turnConveyor(_69454),waitCycle]). 4044 4045% LPS: from(wait(0),to(_69398,_69398)). 4046% Into: l_events(happens(wait(0),_69398,_69398),[]). 4047 4048% LPS: if(from(wait(_70472),to(_70508,_70510)),(_70472>0,from(waitCycle,to(_70508,_70686)),_70828 is _70472-1,from(wait(_70828),to(_70686,_70510)))). 4049% Into: l_events(happens(wait(_70472),_70508,_70510),[_70472>0,happens(waitCycle,_70508,_70686),_70828 is _70472-1,happens(wait(_70828),_70686,_70510)]). 4050 4051% LPS: false((pour(_72968,_72970,_72972),turnConveyor(_73012))). 4052% Into: d_pre([happens(pour(_72968,_72970,_72972),_74056,_74062),happens(turnConveyor(_73012),_74056,_74062)]). 4053 4054% LPS: false((pour(_74154,_74156,_74158),location(_74154,_74214),location(_74156,_74270),_74214\=_74270)). 4055% Into: d_pre([happens(pour(_74154,_74156,_74158),_75516,_75522),holds(location(_74154,_74214),_75516),holds(location(_74156,_74270),_75516),_74214\=_74270]). 4056 4057% LPS: if(from(makeLocation(bottle,_75942),_75964),(at(location(bottle,_76046),_75964),at(location(_75942,_76150),_75964),_76282 is _76150-_76046,from(moveConveyor(_76282),_75964))). 4058% Into: l_events(happens(makeLocation(bottle,_75942),_75964,_77642),[holds(location(bottle,_76046),_75964),holds(location(_75942,_76150),_75964),_76282 is _76150-_76046,happens(moveConveyor(_76282),_75964,_77732)]). 4059 4060% LPS: from(moveConveyor(0),to(_78248,_78248)). 4061% Into: l_events(happens(moveConveyor(0),_78248,_78248),[]). 4062 4063% LPS: if(from(moveConveyor(_79322),to(_79358,_79360)),(_79322>0,from(turnConveyor(clockwise),to(_79358,_79560)),_79702 is _79322-1,from(moveConveyor(_79702),to(_79560,_79360)))). 4064% Into: l_events(happens(moveConveyor(_79322),_79358,_79360),[_79322>0,happens(turnConveyor(clockwise),_79358,_79560),_79702 is _79322-1,happens(moveConveyor(_79702),_79560,_79360)]). 4065 4066% LPS: if(moveConveyor(_81770),(_81770<0,turnConveyor(counterClockwise),_81958 is _81770+1,moveConveyor(_81958))). 4067% Into: l_events(happens(moveConveyor(_81770),_83200,_83206),[_81770<0,happens(turnConveyor(counterClockwise),_83200,_83482),_81958 is _81770+1,happens(moveConveyor(_81958),_83482,_83206)]). 4068 4069% LPS: if(updates(turnConveyor(counterClockwise),in(to(_83790,_83792),location(bottle,_83790))),_83792 is _83790-1). 4070% Into: updated(happens(turnConveyor(counterClockwise),_85266,_85272),location(bottle,_83790),_83790-_83792,[_83792 is _83790-1]). 4071 4072% LPS: if(updates(turnConveyor(clockwise),in(to(_85544,_85546),location(bottle,_85544))),_85546 is _85544+1). 4073% Into: updated(happens(turnConveyor(clockwise),_87020,_87026),location(bottle,_85544),_85544-_85546,[_85546 is _85544+1]). 4074 4075% LPS: if(empty(_87262),contents(_87262,0)). 4076% Into: l_int(holds(empty(_87262),_88346),[holds(contents(_87262,0),_88346)]). 4077 4078% LPS: if(updates(pour(_88392,_88394,_88396),in(to(_88432,_88434),contents(_88394,_88432))),_88434 is _88432+_88396). 4079% Into: updated(happens(pour(_88392,_88394,_88396),_89952,_89958),contents(_88394,_88432),_88432-_88434,[_88434 is _88432+_88396]). 4080 4081% LPS: if(updates(pour(_89848,_89850,_89852),in(to(_89888,_89890),contents(_89848,_89888))),_89890 is _89888-_89852). 4082% Into: updated(happens(pour(_89848,_89850,_89852),_91408,_91414),contents(_89848,_89888),_89888-_89890,[_89890 is _89888-_89852]). 4083 4084% LPS: then(if((at(normalOperation,_91342),at(empty(bottle),_91342),at(not(started),_91342))),(initiate(from(started,_91342)),from(makeLocation(bottle,tank1),to(_91342,_91830)),from(pour(tank1,bottle,5),to(_91830,_91998)),from(wait(3),to(_91998,_92134)),from(makeLocation(bottle,tank2),to(_92134,_92286)),from(pour(tank2,bottle,5),to(_92286,_92454)),from(wait(3),to(_92454,_92590)),from(makeLocation(bottle,container),to(_92590,_92742)),from(pour(bottle,container,10),to(_92742,_92910)),from(wait(3),to(_92910,_93046)),from(makeLocation(bottle,tank1),to(_93046,_93198)),terminate(from(started,_93198)))). 4085% Into: reactive_rule([holds(normalOperation,_91342),holds(empty(bottle),_91342),holds(not(started),_91342)],[happens(initiate(started),_91342,_95518),happens(makeLocation(bottle,tank1),_91342,_91830),happens(pour(tank1,bottle,5),_91830,_91998),happens(wait(3),_91998,_92134),happens(makeLocation(bottle,tank2),_92134,_92286),happens(pour(tank2,bottle,5),_92286,_92454),happens(wait(3),_92454,_92590),happens(makeLocation(bottle,container),_92590,_92742),happens(pour(bottle,container,10),_92742,_92910),happens(wait(3),_92910,_93046),happens(makeLocation(bottle,tank1),_93046,_93198),happens(terminate(started),_93198,_95482)]). 4086% /pack/logicmoo_ec/test/lps_user_examples/conveyor belt(1).pl:107 4087% pop_lps_dialect('$BLOB'("<stream>(0x562ef4162e00)"), (/.../(lps_user_examples, 'conveyor belt(1).pl')-> /.../(lps_user_examples, 'conveyor belt(1).pl'))). 4088% ops. 4089% :-listing('/pack/logicmoo_ec/test/lps_user_examples/conveyor belt(1).pl':_30064). 4090 4091 4092d_pre([happens(pour(_, _, _), A, B), happens(turnConveyor(_), A, B)]). 4093d_pre([happens(pour(A, B, _), C, _), holds(location(A, D), C), holds(location(B, E), C), D\=E]). 4094 4095d(location(bottle, Pos), [type:rectangle, fillColor:yellow, from:[X1, 60], to:[X2, 100], strokeColor:blue]) :- 4096 X1 is 100+Pos*30, 4097 X2 is 110+Pos*30. 4098d(timeless, [[type:line, strokeWidth:2, strokeColor:black, from:[100, 60], to:[400, 60]], [type:circle, strokeWidth:2, strokeColor:black, center:[100, 40], radius:20], [type:circle, strokeWidth:2, strokeColor:black, center:[400, 40], radius:20], [type:rectangle, fillColor:white, from:[130, 120], to:[190, 150], strokeColor:blue], [type:rectangle, fillColor:white, from:[210, 120], to:[270, 150], strokeColor:blue], [type:line, strokeWidth:2, strokeColor:black, from:[100, 20], to:[400, 20]]]). 4099 4100fluents([normalOperation, started, contents(_, _), empty(_), location(_, _)]). 4101 4102l_int(holds(empty(A), B), [holds(contents(A, 0), B)]). 4103 4104reactive_rule([holds(normalOperation, A), holds(empty(bottle), A), holds(not(started), A)], [happens(initiate(started), A, _), happens(makeLocation(bottle, tank1), A, B), happens(pour(tank1, bottle, 5), B, C), happens(wait(3), C, D), happens(makeLocation(bottle, tank2), D, E), happens(pour(tank2, bottle, 5), E, F), happens(wait(3), F, G), happens(makeLocation(bottle, container), G, H), happens(pour(bottle, container, 10), H, I), happens(wait(3), I, J), happens(makeLocation(bottle, tank1), J, K), happens(terminate(started), K, _)]). 4105 4106initial_state([normalOperation, contents(bottle, 0), contents(container, 0), contents(tank1, 100), contents(tank2, 100), location(bottle, 2), location(tank1, 2), location(tank2, 5), location(container, 7)]). 4107 4108l_events(happens(wait(0), A, A), []). 4109l_events(happens(wait(A), B, C), [A>0, happens(waitCycle, B, D), E is A-1, happens(wait(E), D, C)]). 4110l_events(happens(makeLocation(bottle, A), B, _), [holds(location(bottle, C), B), holds(location(A, D), B), E is D-C, happens(moveConveyor(E), B, _)]). 4111l_events(happens(moveConveyor(0), A, A), []). 4112l_events(happens(moveConveyor(A), B, C), [A>0, happens(turnConveyor(clockwise), B, D), E is A-1, happens(moveConveyor(E), D, C)]). 4113l_events(happens(moveConveyor(A), B, C), [A<0, happens(turnConveyor(counterClockwise), B, D), E is A+1, happens(moveConveyor(E), D, C)]). 4114 4115:- dynamic actions/1. 4116:- multifile actions/1. 4117 4118actions([pour(_, _, _), turnConveyor(_), waitCycle]). 4119 4120updated(happens(turnConveyor(counterClockwise), _, _), location(bottle, A), A-B, [B is A-1]). 4121updated(happens(turnConveyor(clockwise), _, _), location(bottle, A), A-B, [B is A+1]). 4122updated(happens(pour(_, A, B), _, _), contents(A, C), C-D, [D is C+B]). 4123updated(happens(pour(A, _, B), _, _), contents(A, C), C-D, [D is C-B]). 4124 4125maxTime(30). 4126% dB(/.../(lps_user_examples, 'conveyor belt(1).pl'), lps_visualization(_256476{groups:[_240304{content:"contents(A,B)", id:"contents/2", order:3, subgroupStack:"false"}, _240382{content:"location(A,B)", id:"location/2", order:3, subgroupStack:"false"}, _240460{content:"normalOperation", id:"normalOperation/0", order:3, subgroupStack:"false"}, _240538{content:"started", id:"started/0", order:3, subgroupStack:"false"}, _240604{content:"Actions", id:"action", order:4}], items:[_240714{content:"normalOperation", end:31, group:"normalOperation/0", id:0, start:1, title:"Fluent normalOperation initiated at 1<br/>and terminated at transition to 31"}, _240824{content:"started", end:31, group:"started/0", id:1, start:2, title:"Fluent started initiated at 2<br/>and terminated at transition to 31"}, _240946{content:"bottle,0", end:2, group:"contents/2", id:2, start:1, subgroup:"bottle", title:"Fluent contents(bottle,0) initiated at 1<br/>and terminated at transition to 2"}, ...(_268358)]}, _267376{cycles:[[_266964{create:[_266290{from:[100, 60], id:"timeless", strokeColor:"black", strokeWidth:2, to:[400, 60], type:"line"}, _266412{center:[100, 40], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _266534{center:[400, 40], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _266668{fillColor:"white", from:[130, 120], id:"timeless", strokeColor:"blue", to:[190, 150], type:"rectangle"}, _266802{fillColor:"white", from:[210, 120], id:"timeless", strokeColor:"blue", to:[270, 150], type:"rectangle"}, _266936{from:[100, 20], id:"timeless", strokeColor:"black", strokeWidth:2, to:[400, 20], type:"line"}]}], [_267128{create:_267100{fillColor:"yellow", from:[160, 60], id:"location(bottle,2)", strokeColor:"blue", to:[170, 100], type:"rectangle"}}], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [_267338{kill:"location(bottle,2)"}, _267368{kill:"timeless"}]]})). 4127% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'ConveyorBelt2.pl')). 4128% run_lps_corner_file1(/.../(lps_user_examples, 'ConveyorBelt2.pl')). 4129% /pack/logicmoo_ec/test/lps_user_examples/ConveyorBelt2.pl:1 4130% push_lps_dialect. 4131% ops. 4132% [ti=user, load= /.../(lps_user_examples, 'ConveyorBelt2.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'ConveyorBelt2.pl'), lps= /.../(lps_user_examples, 'ConveyorBelt2.pl'), using= /.../(lps_user_examples, 'ConveyorBelt2.pl')]. 4133% continue_lps_dialect. 4134% ops. 4135 4136% LPS: fluents((contents(_68840,_68842),empty/1,location(_68960,_68962))). 4137% Into: fluents([contents(_68840,_68842),empty(_70196),location(_68960,_68962)]). 4138 4139% LPS: initially((normalOperation,contents(bottle,0),contents(container,0),contents(tank1,200),contents(tank2,200),location(bottle,0),location(tank1,25),location(tank2,65),location(container,100))). 4140% Into: initial_state([normalOperation,contents(bottle,0),contents(container,0),contents(tank1,200),contents(tank2,200),location(bottle,0),location(tank1,25),location(tank2,65),location(container,100)]). 4141 4142% LPS: actions((pourChunk(_71938,_71940),turnConveyor(_71980))). 4143% Into: actions([pourChunk(_71938,_71940),turnConveyor(_71980)]). 4144 4145% LPS: if(from(makeLocation(bottle,_73150),to(_73186,_73188)),(at(location(bottle,_73302),_73186),at(location(_73150,_73406),_73186),_73538 is _73406-_73302,from(moveBottle(_73538,_73406),to(_73186,_73188)))). 4146% Into: l_events(happens(makeLocation(bottle,_73150),_73186,_73188),[holds(location(bottle,_73302),_73186),holds(location(_73150,_73406),_73186),_73538 is _73406-_73302,happens(moveBottle(_73538,_73406),_73186,_73188)]). 4147 4148% LPS: if(from(moveBottle(_75992,_75994),to(_76030,_76030)),(_75992>=0,at(location(bottle,_76210),_76030),_76210>=_75994)). 4149% Into: l_events(happens(moveBottle(_75992,_75994),_76030,_76030),[_75992>=0,holds(location(bottle,_76210),_76030),_76210>=_75994]). 4150 4151% LPS: if(from(moveBottle(_78136,_78138),to(_78174,_78174)),(_78136<0,at(location(bottle,_78354),_78174),_78354=<_78138)). 4152% Into: l_events(happens(moveBottle(_78136,_78138),_78174,_78174),[_78136<0,holds(location(bottle,_78354),_78174),_78354=<_78138]). 4153 4154% LPS: if(from(moveBottle(_80280,_80282),to(_80318,_80320)),(_80280>0,at(location(bottle,_80498),_80318),_80498<_80282,from(turnConveyor(clockwise),to(_80318,_80688)),from(moveBottle(_80280,_80282),to(_80688,_80320)))). 4155% Into: l_events(happens(moveBottle(_80280,_80282),_80318,_80320),[_80280>0,holds(location(bottle,_80498),_80318),_80498<_80282,happens(turnConveyor(clockwise),_80318,_80688),happens(moveBottle(_80280,_80282),_80688,_80320)]). 4156 4157% LPS: if(from(moveBottle(_82878,_82880),to(_82916,_82918)),(_82878<0,at(location(bottle,_83096),_82916),_83096>_82880,from(turnConveyor(counterClockwise),to(_82916,_83286)),from(moveBottle(_82878,_82880),to(_83286,_82918)))). 4158% Into: l_events(happens(moveBottle(_82878,_82880),_82916,_82918),[_82878<0,holds(location(bottle,_83096),_82916),_83096>_82880,happens(turnConveyor(counterClockwise),_82916,_83286),happens(moveBottle(_82878,_82880),_83286,_82918)]). 4159 4160% LPS: if(updates(turnConveyor(counterClockwise),in(to(_85498,_85500),location(bottle,_85498))),(conveyorSpeed(_85686),_85500 is _85498-_85686)). 4161% Into: updated(happens(turnConveyor(counterClockwise),_87068,_87074),location(bottle,_85498),_85498-_85500,[conveyorSpeed(_85686),_85500 is _85498-_85686]). 4162 4163% LPS: if(updates(turnConveyor(clockwise),in(to(_87546,_87548),location(bottle,_87546))),(conveyorSpeed(_87734),_87548 is _87546+_87734)). 4164% Into: updated(happens(turnConveyor(clockwise),_89116,_89122),location(bottle,_87546),_87546-_87548,[conveyorSpeed(_87734),_87548 is _87546+_87734]). 4165 4166% LPS: if(empty(_90922),contents(_90922,0)). 4167% Into: l_int(holds(empty(_90922),_92006),[holds(contents(_90922,0),_92006)]). 4168 4169% LPS: if(updates(pourChunk(_92038,_92040),in(to(_92076,_92078),contents(_92040,_92076))),(valveRate(_92264),_92078 is _92076+_92264)). 4170% Into: updated(happens(pourChunk(_92038,_92040),_93662,_93668),contents(_92040,_92076),_92076-_92078,[valveRate(_92264),_92078 is _92076+_92264]). 4171 4172% LPS: if(updates(pourChunk(_93546,_93548),in(to(_93584,_93586),contents(_93546,_93584))),(valveRate(_93772),_93586 is _93584-_93772)). 4173% Into: updated(happens(pourChunk(_93546,_93548),_95170,_95176),contents(_93546,_93584),_93584-_93586,[valveRate(_93772),_93586 is _93584-_93772]). 4174 4175% LPS: if(from(pour(_96104,_96106,_96108),to(_96144,_96146)),(at(contents(_96104,_96260),_96144),_96392 is _96260-_96108,from(pourUntil(_96104,_96106,_96392),to(_96144,_96146)))). 4176% Into: l_events(happens(pour(_96104,_96106,_96108),_96144,_96146),[holds(contents(_96104,_96260),_96144),_96392 is _96260-_96108,happens(pourUntil(_96104,_96106,_96392),_96144,_96146)]). 4177 4178% LPS: if(from(pourUntil(_97864,_97866,_97868),to(_97904,_97904)),(at(contents(_97864,_98020),_97904),_98020=<_97868)). 4179% Into: l_events(happens(pourUntil(_97864,_97866,_97868),_97904,_97904),[holds(contents(_97864,_98020),_97904),_98020=<_97868]). 4180 4181% LPS: if(from(pourUntil(_99308,_99310,_99312),to(_99348,_99350)),(at(contents(_99308,_99464),_99348),_99464>_99312,from(pourChunk(_99308,_99310),to(_99348,_99670)),from(pourUntil(_99308,_99310,_99312),to(_99670,_99350)))). 4182% Into: l_events(happens(pourUntil(_99308,_99310,_99312),_99348,_99350),[holds(contents(_99308,_99464),_99348),_99464>_99312,happens(pourChunk(_99308,_99310),_99348,_99670),happens(pourUntil(_99308,_99310,_99312),_99670,_99350)]). 4183 4184% LPS: if(from(dump(_101208,_101210),to(_101246,_101248)),(at(contents(_101208,_101362),_101246),from(pour(_101208,_101210,_101362),to(_101246,_101248)))). 4185% Into: l_events(happens(dump(_101208,_101210),_101246,_101248),[holds(contents(_101208,_101362),_101246),happens(pour(_101208,_101210,_101362),_101246,_101248)]). 4186 4187% LPS: then(if((at(empty(bottle),_102780),at(location(bottle,0),_102780))),(from(makeLocation(bottle,tank1),to(_102780,_103060)),from(pour(tank1,bottle,50),to(_103060,_103228)),from(makeLocation(bottle,tank2),to(_103228,_103380)),from(pour(tank2,bottle,50),to(_103380,_103548)),from(makeLocation(bottle,container),to(_103548,_103700)),from(dump(bottle,container),to(_103700,_103852)),from(makeLocation(bottle,tank1),_103852))). 4188% Into: reactive_rule([holds(empty(bottle),_102780),holds(location(bottle,0),_102780)],[happens(makeLocation(bottle,tank1),_102780,_103060),happens(pour(tank1,bottle,50),_103060,_103228),happens(makeLocation(bottle,tank2),_103228,_103380),happens(pour(tank2,bottle,50),_103380,_103548),happens(makeLocation(bottle,container),_103548,_103700),happens(dump(bottle,container),_103700,_103852),happens(makeLocation(bottle,tank1),_103852,_105710)]). 4189 4190% LPS: if(at(locatedContents(_105588,_105590,_105592),_105614),(at(location(_105588,_105590),_105614),at(contents(_105588,_105592),_105614))). 4191% Into: l_int(holds(locatedContents(_105588,_105590,_105592),_105614),[holds(location(_105588,_105590),_105614),holds(contents(_105588,_105592),_105614)]). 4192% /pack/logicmoo_ec/test/lps_user_examples/ConveyorBelt2.pl:101 4193% pop_lps_dialect('$BLOB'("<stream>(0x562ef4163d00)"), (/.../(lps_user_examples, 'ConveyorBelt2.pl')-> /.../(lps_user_examples, 'ConveyorBelt2.pl'))). 4194% ops. 4195% :-listing('/pack/logicmoo_ec/test/lps_user_examples/ConveyorBelt2.pl':_31056). 4196 4197 4198d(locatedContents(bottle, Location, Level), [Props, [type:rectangle, fillColor:blue, from:[X1, Y1], to:[X2, Y]]]) :- 4199 d_(location(bottle, Location), Props), 4200 member(from:[X1, Y1], Props), 4201 member(to:[X2, Y2], Props), 4202 Yrange is Y2-Y1, 4203 Y is round(Level/100*Yrange+Y1). 4204d(timeless, [[type:rectangle, from:[0, 0], to:[450, 300]], [type:line, strokeWidth:2, strokeColor:black, from:[Start, 100], to:[End, 100]], [type:circle, strokeWidth:2, strokeColor:black, center:[Start, 80], radius:20], [type:circle, strokeWidth:2, strokeColor:black, center:[End, 80], radius:20], [type:ellipse, fillColor:white, from:[Tank1Left, 200], to:[Tank1Right, 300], strokeColor:blue], [type:ellipse, fillColor:white, from:[Tank2Left, 200], to:[Tank2Right, 300], strokeColor:blue], [type:line, strokeWidth:2, strokeColor:black, from:[Start, 60], to:[End, 60]]]) :- 4205 locationToPixels(0, Start), 4206 locationToPixels(100, End), 4207 locationToPixels(25, Tank1Left), 4208 Tank1Right is Tank1Left+30, 4209 locationToPixels(65, Tank2Left), 4210 Tank2Right is Tank2Left+30. 4211 4212locationToPixels(L, P) :- 4213 P is 25+L*4. 4214 4215fluents([contents(_, _), empty(_), location(_, _)]). 4216 4217l_int(holds(empty(A), B), [holds(contents(A, 0), B)]). 4218l_int(holds(locatedContents(A, B, C), D), [holds(location(A, B), D), holds(contents(A, C), D)]). 4219 4220valveRate(10). 4221 4222reactive_rule([holds(empty(bottle), A), holds(location(bottle, 0), A)], [happens(makeLocation(bottle, tank1), A, B), happens(pour(tank1, bottle, 50), B, C), happens(makeLocation(bottle, tank2), C, D), happens(pour(tank2, bottle, 50), D, E), happens(makeLocation(bottle, container), E, F), happens(dump(bottle, container), F, G), happens(makeLocation(bottle, tank1), G, _)]). 4223 4224initial_state([normalOperation, contents(bottle, 0), contents(container, 0), contents(tank1, 200), contents(tank2, 200), location(bottle, 0), location(tank1, 25), location(tank2, 65), location(container, 100)]). 4225 4226l_events(happens(makeLocation(bottle, A), B, C), [holds(location(bottle, D), B), holds(location(A, E), B), F is E-D, happens(moveBottle(F, E), B, C)]). 4227l_events(happens(moveBottle(A, B), C, C), [A>=0, holds(location(bottle, D), C), D>=B]). 4228l_events(happens(moveBottle(A, B), C, C), [A<0, holds(location(bottle, D), C), D=<B]). 4229l_events(happens(moveBottle(A, B), C, D), [A>0, holds(location(bottle, E), C), E<B, happens(turnConveyor(clockwise), C, F), happens(moveBottle(A, B), F, D)]). 4230l_events(happens(moveBottle(A, B), C, D), [A<0, holds(location(bottle, E), C), E>B, happens(turnConveyor(counterClockwise), C, F), happens(moveBottle(A, B), F, D)]). 4231l_events(happens(pour(A, B, C), D, E), [holds(contents(A, F), D), G is F-C, happens(pourUntil(A, B, G), D, E)]). 4232l_events(happens(pourUntil(A, _, B), C, C), [holds(contents(A, D), C), D=<B]). 4233l_events(happens(pourUntil(A, B, C), D, E), [holds(contents(A, F), D), F>C, happens(pourChunk(A, B), D, G), happens(pourUntil(A, B, C), G, E)]). 4234l_events(happens(dump(A, B), C, D), [holds(contents(A, E), C), happens(pour(A, B, E), C, D)]). 4235 4236d_(location(bottle, Pos), [type:rectangle, fillColor:yellow, from:[X1, 100], to:[X2, 150], strokeColor:blue]) :- 4237 locationToPixels(Pos, X1), 4238 X2 is X1+10. 4239 4240:- dynamic actions/1. 4241:- multifile actions/1. 4242 4243actions([pourChunk(_, _), turnConveyor(_)]). 4244 4245updated(happens(turnConveyor(counterClockwise), _, _), location(bottle, A), A-B, [conveyorSpeed(C), B is A-C]). 4246updated(happens(turnConveyor(clockwise), _, _), location(bottle, A), A-B, [conveyorSpeed(C), B is A+C]). 4247updated(happens(pourChunk(_, A), _, _), contents(A, B), B-C, [valveRate(D), C is B+D]). 4248updated(happens(pourChunk(A, _), _, _), contents(A, B), B-C, [valveRate(D), C is B-D]). 4249 4250maxTime(60). 4251 4252conveyorSpeed(5). 4253% dB(/.../(lps_user_examples, 'ConveyorBelt2.pl'), lps_visualization(_353378{groups:[_335630{content:"contents(A,B)", id:"contents/2", order:3, subgroupStack:"false"}, _335708{content:"location(A,B)", id:"location/2", order:3, subgroupStack:"false"}, _335786{content:"normalOperation", id:"normalOperation/0", order:3, subgroupStack:"false"}, _335852{content:"Actions", id:"action", order:4}], items:[_335962{content:"normalOperation", end:61, group:"normalOperation/0", id:0, start:1, title:"Fluent normalOperation initiated at 1<br/>and terminated at transition to 61"}, _336084{content:"bottle,0", end:7, group:"contents/2", id:1, start:1, subgroup:"bottle", title:"Fluent contents(bottle,0) initiated at 1<br/>and terminated at transition to 7"}, _336210{content:"bottle,0", end:61, group:"contents/2", id:2, start:41, subgroup:"bottle", title:"Fluent contents(bottle,0) initiated at 41<br/>and terminated at transition to 61"}, ...(_365964)]}, _364982{cycles:[[_364578{create:[_363778{from:[0, 0], id:"timeless", to:[450, 300], type:"rectangle"}, _363904{from:[25, 100], id:"timeless", strokeColor:"black", strokeWidth:2, to:[425, 100], type:"line"}, _364026{center:[25, 80], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _364148{center:[425, 80], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _364282{fillColor:"white", from:[125, 200], id:"timeless", strokeColor:"blue", to:[155, 300], type:"ellipse"}, _364416{fillColor:"white", from:[285, 200], id:"timeless", strokeColor:"blue", to:[315, 300], type:"ellipse"}, _364550{from:[25, 60], id:"timeless", strokeColor:"black", strokeWidth:2, to:[425, 60], type:"line"}]}], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [_364974{kill:"timeless"}]]})). 4254% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'conveyor belt.pl')). 4255% run_lps_corner_file1(/.../(lps_user_examples, 'conveyor belt.pl')). 4256% /pack/logicmoo_ec/test/lps_user_examples/conveyor belt.pl:1 4257% push_lps_dialect. 4258% ops. 4259% [ti=user, load= /.../(lps_user_examples, 'conveyor belt.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'conveyor belt.pl'), lps= /.../(lps_user_examples, 'conveyor belt.pl'), using= /.../(lps_user_examples, 'conveyor belt.pl')]. 4260% continue_lps_dialect. 4261% ops. 4262 4263% LPS: fluents((normalOperation,started,contents/2,empty/1,location/2)). 4264% Into: fluents([normalOperation,started,contents(_72008,_72010),empty(_72020),location(_72030,_72032)]). 4265 4266% LPS: initially((normalOperation,contents(bottle,0),contents(container,0),contents(tank1,100),contents(tank2,100),location(bottle,2),location(tank1,2),location(tank2,5),location(container,7))). 4267% Into: initial_state([normalOperation,contents(bottle,0),contents(container,0),contents(tank1,100),contents(tank2,100),location(bottle,2),location(tank1,2),location(tank2,5),location(container,7)]). 4268 4269% LPS: actions((pour/3,turnConveyor/1,waitCycle)). 4270% Into: actions([pour(_74942,_74944,_74946),turnConveyor(_74956),waitCycle]). 4271 4272% LPS: from(wait(0),to(_74900,_74900)). 4273% Into: l_events(happens(wait(0),_74900,_74900),[]). 4274 4275% LPS: if(from(wait(_75974),to(_76010,_76012)),(_75974>0,from(waitCycle,to(_76010,_76188)),_76330 is _75974-1,from(wait(_76330),to(_76188,_76012)))). 4276% Into: l_events(happens(wait(_75974),_76010,_76012),[_75974>0,happens(waitCycle,_76010,_76188),_76330 is _75974-1,happens(wait(_76330),_76188,_76012)]). 4277 4278% LPS: false((pour(_78462,_78464,_78466),turnConveyor(_78506))). 4279% Into: d_pre([happens(pour(_78462,_78464,_78466),_79550,_79556),happens(turnConveyor(_78506),_79550,_79556)]). 4280 4281% LPS: false((pour(_79648,_79650,_79652),location(_79648,_79708),location(_79650,_79764),_79708\=_79764)). 4282% Into: d_pre([happens(pour(_79648,_79650,_79652),_81010,_81016),holds(location(_79648,_79708),_81010),holds(location(_79650,_79764),_81010),_79708\=_79764]). 4283 4284% LPS: if(from(makeLocation(bottle,_81436),_81458),(at(location(bottle,_81540),_81458),at(location(_81436,_81644),_81458),_81776 is _81644-_81540,from(moveConveyor(_81776),_81458))). 4285% Into: l_events(happens(makeLocation(bottle,_81436),_81458,_83136),[holds(location(bottle,_81540),_81458),holds(location(_81436,_81644),_81458),_81776 is _81644-_81540,happens(moveConveyor(_81776),_81458,_83226)]). 4286 4287% LPS: from(moveConveyor(0),to(_83742,_83742)). 4288% Into: l_events(happens(moveConveyor(0),_83742,_83742),[]). 4289 4290% LPS: if(from(moveConveyor(_84816),to(_84852,_84854)),(_84816>0,from(turnConveyor(clockwise),to(_84852,_85054)),_85196 is _84816-1,from(moveConveyor(_85196),to(_85054,_84854)))). 4291% Into: l_events(happens(moveConveyor(_84816),_84852,_84854),[_84816>0,happens(turnConveyor(clockwise),_84852,_85054),_85196 is _84816-1,happens(moveConveyor(_85196),_85054,_84854)]). 4292 4293% LPS: if(moveConveyor(_87264),(_87264<0,turnConveyor(counterClockwise),_87452 is _87264+1,moveConveyor(_87452))). 4294% Into: l_events(happens(moveConveyor(_87264),_88694,_88700),[_87264<0,happens(turnConveyor(counterClockwise),_88694,_88976),_87452 is _87264+1,happens(moveConveyor(_87452),_88976,_88700)]). 4295 4296% LPS: if(updates(turnConveyor(counterClockwise),in(to(_89284,_89286),location(bottle,_89284))),_89286 is _89284-1). 4297% Into: updated(happens(turnConveyor(counterClockwise),_90760,_90766),location(bottle,_89284),_89284-_89286,[_89286 is _89284-1]). 4298 4299% LPS: if(updates(turnConveyor(clockwise),in(to(_91038,_91040),location(bottle,_91038))),_91040 is _91038+1). 4300% Into: updated(happens(turnConveyor(clockwise),_92514,_92520),location(bottle,_91038),_91038-_91040,[_91040 is _91038+1]). 4301 4302% LPS: if(empty(_92756),contents(_92756,0)). 4303% Into: l_int(holds(empty(_92756),_93840),[holds(contents(_92756,0),_93840)]). 4304 4305% LPS: if(updates(pour(_93886,_93888,_93890),in(to(_93926,_93928),contents(_93888,_93926))),_93928 is _93926+_93890). 4306% Into: updated(happens(pour(_93886,_93888,_93890),_95446,_95452),contents(_93888,_93926),_93926-_93928,[_93928 is _93926+_93890]). 4307 4308% LPS: if(updates(pour(_95342,_95344,_95346),in(to(_95382,_95384),contents(_95342,_95382))),_95384 is _95382-_95346). 4309% Into: updated(happens(pour(_95342,_95344,_95346),_96902,_96908),contents(_95342,_95382),_95382-_95384,[_95384 is _95382-_95346]). 4310 4311% LPS: then(if((at(normalOperation,_96836),at(empty(bottle),_96836),at(not(started),_96836))),(initiate(from(started,_96836)),from(makeLocation(bottle,tank1),to(_96836,_97324)),from(pour(tank1,bottle,5),to(_97324,_97492)),from(wait(3),to(_97492,_97628)),from(makeLocation(bottle,tank2),to(_97628,_97780)),from(pour(tank2,bottle,5),to(_97780,_97948)),from(wait(3),to(_97948,_98084)),from(makeLocation(bottle,container),to(_98084,_98236)),from(pour(bottle,container,10),to(_98236,_98404)),from(wait(3),to(_98404,_98540)),from(makeLocation(bottle,tank1),to(_98540,_98692)),terminate(from(started,_98692)))). 4312% Into: reactive_rule([holds(normalOperation,_96836),holds(empty(bottle),_96836),holds(not(started),_96836)],[happens(initiate(started),_96836,_101012),happens(makeLocation(bottle,tank1),_96836,_97324),happens(pour(tank1,bottle,5),_97324,_97492),happens(wait(3),_97492,_97628),happens(makeLocation(bottle,tank2),_97628,_97780),happens(pour(tank2,bottle,5),_97780,_97948),happens(wait(3),_97948,_98084),happens(makeLocation(bottle,container),_98084,_98236),happens(pour(bottle,container,10),_98236,_98404),happens(wait(3),_98404,_98540),happens(makeLocation(bottle,tank1),_98540,_98692),happens(terminate(started),_98692,_100976)]). 4313% /pack/logicmoo_ec/test/lps_user_examples/conveyor belt.pl:107 4314% pop_lps_dialect('$BLOB'("<stream>(0x562ef3ca5b00)"), (/.../(lps_user_examples, 'conveyor belt.pl')-> /.../(lps_user_examples, 'conveyor belt.pl'))). 4315% ops. 4316% :-listing('/pack/logicmoo_ec/test/lps_user_examples/conveyor belt.pl':_114640). 4317 4318 4319d_pre([happens(pour(_, _, _), A, B), happens(turnConveyor(_), A, B)]). 4320d_pre([happens(pour(A, B, _), C, _), holds(location(A, D), C), holds(location(B, E), C), D\=E]). 4321 4322d(location(bottle, Pos), [type:rectangle, fillColor:yellow, from:[X1, 60], to:[X2, 100], strokeColor:blue]) :- 4323 X1 is 100+Pos*30, 4324 X2 is 110+Pos*30. 4325d(timeless, [[type:line, strokeWidth:2, strokeColor:black, from:[100, 60], to:[400, 60]], [type:circle, strokeWidth:2, strokeColor:black, center:[100, 40], radius:20], [type:circle, strokeWidth:2, strokeColor:black, center:[400, 40], radius:20], [type:rectangle, fillColor:white, from:[130, 120], to:[190, 150], strokeColor:blue], [type:rectangle, fillColor:white, from:[210, 120], to:[270, 150], strokeColor:blue], [type:line, strokeWidth:2, strokeColor:black, from:[100, 20], to:[400, 20]]]). 4326 4327fluents([normalOperation, started, contents(_, _), empty(_), location(_, _)]). 4328 4329l_int(holds(empty(A), B), [holds(contents(A, 0), B)]). 4330 4331reactive_rule([holds(normalOperation, A), holds(empty(bottle), A), holds(not(started), A)], [happens(initiate(started), A, _), happens(makeLocation(bottle, tank1), A, B), happens(pour(tank1, bottle, 5), B, C), happens(wait(3), C, D), happens(makeLocation(bottle, tank2), D, E), happens(pour(tank2, bottle, 5), E, F), happens(wait(3), F, G), happens(makeLocation(bottle, container), G, H), happens(pour(bottle, container, 10), H, I), happens(wait(3), I, J), happens(makeLocation(bottle, tank1), J, K), happens(terminate(started), K, _)]). 4332 4333initial_state([normalOperation, contents(bottle, 0), contents(container, 0), contents(tank1, 100), contents(tank2, 100), location(bottle, 2), location(tank1, 2), location(tank2, 5), location(container, 7)]). 4334 4335l_events(happens(wait(0), A, A), []). 4336l_events(happens(wait(A), B, C), [A>0, happens(waitCycle, B, D), E is A-1, happens(wait(E), D, C)]). 4337l_events(happens(makeLocation(bottle, A), B, _), [holds(location(bottle, C), B), holds(location(A, D), B), E is D-C, happens(moveConveyor(E), B, _)]). 4338l_events(happens(moveConveyor(0), A, A), []). 4339l_events(happens(moveConveyor(A), B, C), [A>0, happens(turnConveyor(clockwise), B, D), E is A-1, happens(moveConveyor(E), D, C)]). 4340l_events(happens(moveConveyor(A), B, C), [A<0, happens(turnConveyor(counterClockwise), B, D), E is A+1, happens(moveConveyor(E), D, C)]). 4341 4342:- dynamic actions/1. 4343:- multifile actions/1. 4344 4345actions([pour(_, _, _), turnConveyor(_), waitCycle]). 4346 4347updated(happens(turnConveyor(counterClockwise), _, _), location(bottle, A), A-B, [B is A-1]). 4348updated(happens(turnConveyor(clockwise), _, _), location(bottle, A), A-B, [B is A+1]). 4349updated(happens(pour(_, A, B), _, _), contents(A, C), C-D, [D is C+B]). 4350updated(happens(pour(A, _, B), _, _), contents(A, C), C-D, [D is C-B]). 4351 4352maxTime(30). 4353% dB(/.../(lps_user_examples, 'conveyor belt.pl'), lps_visualization(_256464{groups:[_240292{content:"contents(A,B)", id:"contents/2", order:3, subgroupStack:"false"}, _240370{content:"location(A,B)", id:"location/2", order:3, subgroupStack:"false"}, _240448{content:"normalOperation", id:"normalOperation/0", order:3, subgroupStack:"false"}, _240526{content:"started", id:"started/0", order:3, subgroupStack:"false"}, _240592{content:"Actions", id:"action", order:4}], items:[_240702{content:"normalOperation", end:31, group:"normalOperation/0", id:0, start:1, title:"Fluent normalOperation initiated at 1<br/>and terminated at transition to 31"}, _240812{content:"started", end:31, group:"started/0", id:1, start:2, title:"Fluent started initiated at 2<br/>and terminated at transition to 31"}, _240934{content:"bottle,0", end:2, group:"contents/2", id:2, start:1, subgroup:"bottle", title:"Fluent contents(bottle,0) initiated at 1<br/>and terminated at transition to 2"}, ...(_268346)]}, _267364{cycles:[[_266952{create:[_266278{from:[100, 60], id:"timeless", strokeColor:"black", strokeWidth:2, to:[400, 60], type:"line"}, _266400{center:[100, 40], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _266522{center:[400, 40], id:"timeless", radius:20, strokeColor:"black", strokeWidth:2, type:"circle"}, _266656{fillColor:"white", from:[130, 120], id:"timeless", strokeColor:"blue", to:[190, 150], type:"rectangle"}, _266790{fillColor:"white", from:[210, 120], id:"timeless", strokeColor:"blue", to:[270, 150], type:"rectangle"}, _266924{from:[100, 20], id:"timeless", strokeColor:"black", strokeWidth:2, to:[400, 20], type:"line"}]}], [_267116{create:_267088{fillColor:"yellow", from:[160, 60], id:"location(bottle,2)", strokeColor:"blue", to:[170, 100], type:"rectangle"}}], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [_267326{kill:"location(bottle,2)"}, _267356{kill:"timeless"}]]})). 4354% with_abs_paths(run_lps_corner_file1, /.../(lps_user_examples, 'cooking.pl')). 4355% run_lps_corner_file1(/.../(lps_user_examples, 'cooking.pl')). 4356% /pack/logicmoo_ec/test/lps_user_examples/cooking.pl:1 4357% push_lps_dialect. 4358% ops. 4359% [ti=user, load= /.../(lps_user_examples, 'cooking.pl'), strip=lps, ctx=lps, sm= /.../(lps_user_examples, 'cooking.pl'), lps= /.../(lps_user_examples, 'cooking.pl'), using= /.../(lps_user_examples, 'cooking.pl')]. 4360% continue_lps_dialect. 4361% ops. 4362 4363% LPS: fluents(location(_67890,_67892)). 4364% Into: fluents([location(_67890,_67892)]). 4365 4366% LPS: actions(setLocation(_69034,_69036)). 4367% Into: actions([setLocation(_69034,_69036)]). 4368 4369% LPS: if(updates(setLocation(_70094,_70096),in(to(_70132,_70096),location(_70094,_70132))),(_70096=point(_70350,_70352),number(_70350),number(_70352))). 4370% Into: updated(happens(setLocation(_70094,_70096),_71812,_71818),location(_70094,_70132),_70132-_70096,[_70096=point(_70350,_70352),number(_70350),number(_70352)]). 4371 4372% LPS: fluents(working(_72934,_72936)). 4373% Into: fluents([working(_72934,_72936)]). 4374 4375% LPS: actions((start(_74024),stop(_74064))). 4376% Into: actions([start(_74024),stop(_74064)]). 4377 4378% LPS: updates(start(_75148),in(to(_75184,true),working(_75148,_75184))). 4379% Into: updated(happens(start(_75148),_76488,_76494),working(_75148,_75184),_75184-true,[]). 4380 4381% LPS: updates(stop(_76370),in(to(_76416,false),working(_76370,_76416))). 4382% Into: updated(happens(stop(_76370),_77720,_77726),working(_76370,_76416),_76416-false,[]). 4383 4384% LPS: if(from(clone(_77646,_77648),to(_77684,_77686)),(_77646=..[_77800,_77820],objectName(_77894),_77648=..[_77800,_77894],findall(_78312,(holds(_78102,_77684),_78102=..[_78160,_77646|_78182],_78312=..[_78160,_77648|_78182]),_78426),from(initiateAll(_78426),to(_77684,_77686)))). 4385% Into: l_events(happens(clone(_77646,_77648),_77684,_77686),[_77646=..[_77800,_77820],objectName(_77894),_77648=..[_77800,_77894],holds(findall(_78312,[holds(_78102,_77684),_78102=..[_78160,_77646|_78182],_78312=..[_78160,_77648|_78182]],_78426),_77684),happens(initiateAll(_78426),_77684,_77686)]). 4386 4387% LPS: if(from(initiateAll([_82406|_82408]),to(_82456,_82458)),(initiate(from(_82406,_82456)),from(initiateAll(_82408),to(_82456,_82458)))). 4388% Into: l_events(happens(initiateAll([_82406|_82408]),_82456,_82458),[happens(initiate(_82406),_82456,_84020),happens(initiateAll(_82408),_82456,_82458)]). 4389 4390% LPS: if(from(initiateAll([]),to(_83942,_83944)),_83944=:=_83942+1). 4391% Into: l_events(happens(initiateAll([]),_83942,_83944),[_83944=:=_83942+1]). 4392 4393% LPS: if(from(clone(_85582,_85584,[_85568|_85570]),to(_85622,_85624)),(_85582>0,from(clone(_85584,_85568),to(_85622,_85624)),_85982 is _85582-1,from(clone(_85982,_85584,_85570),to(_85622,_85624)))). 4394% Into: l_events(happens(clone(_85582,_85584,[_85568|_85570]),_85622,_85624),[_85582>0,happens(clone(_85584,_85568),_85622,_85624),_85982 is _85582-1,happens(clone(_85982,_85584,_85570),_85622,_85624)]). 4395 4396% LPS: clone(0,_88166,[]). 4397% Into: l_events(happens(clone(0,_88166,[]),_89132,_89138),[]). 4398 4399% LPS: fluents((transports(_89296,_89298),conveyorEndpoint(_89352,_89354),conveyorSpeed(_89352,_89410))). 4400% Into: fluents([transports(_89296,_89298),conveyorEndpoint(_89352,_89354),conveyorSpeed(_89352,_89410)]). 4401 4402% LPS: actions(setConveyorSpeed(_90634,_90636)). 4403% Into: actions([setConveyorSpeed(_90634,_90636)]). 4404 4405% LPS: updates(setConveyorSpeed(_91694,_91696),in(to(_91732,_91696),conveyorSpeed(_91694,_91732))). 4406% Into: updated(happens(setConveyorSpeed(_91694,_91696),_93052,_93058),conveyorSpeed(_91694,_91732),_91732-_91696,[]). 4407 4408% LPS: if(from(placeOnConveyor(_92960,_92962,_92964),to(_93000,_93002)),(at(not(transports(_92962,_92960)),_93000),location(_92962,_93252),conveyorEndpoint(_92962,_93308),interpolate(_93252,_93308,_92964,_93396),update(in(to(_93440,_93396),from(location(_92960,_93440),to(_93000,_93002)))),initiate(from(transports(_92962,_92960),to(_93000,_93002))))). 4409% Into: l_events(happens(placeOnConveyor(_92960,_92962,_92964),_93000,_93002),[holds(not(transports(_92962,_92960)),_93000),holds(location(_92962,_93252),_95512),holds(conveyorEndpoint(_92962,_93308),_95576),interpolate(_93252,_93308,_92964,_93396),happens(update(_93440-_93396,location(_92960,_93440)),_93000,_93002),happens(initiate(transports(_92962,_92960)),_93000,_93002)]). 4410 4411% LPS: if(from(createConveyor(_95996,_95998,_96000,_96002),to(_96038,_96040)),(_96002=conveyor(_95996),objectName(_95996),initiate(from(location(_96002,_95998),to(_96038,_96040))),initiate(from(conveyorEndpoint(_96002,_96000),to(_96038,_96040))),initiate(from(conveyorSpeed(_96002,0),to(_96038,_96040))),initiate(from(working(_96002,false),to(_96038,_96040))))). 4412% Into: l_events(happens(createConveyor(_95996,_95998,_96000,_96002),_96038,_96040),[_96002=conveyor(_95996),objectName(_95996),happens(initiate(location(_96002,_95998)),_96038,_96040),happens(initiate(conveyorEndpoint(_96002,_96000)),_96038,_96040),happens(initiate(conveyorSpeed(_96002,0)),_96038,_96040),happens(initiate(working(_96002,false)),_96038,_96040)]). 4413 4414% LPS: if(at(conveyor(_98962,_98964,_98966,_98968,_98970),_98992),(at(conveyorEndpoint(_98962,_98966),_98992),at(location(_98962,_98964),_98992),at(working(_98962,_98968),_98992),at(conveyorSpeed(_98962,_98970),_98992))). 4415% Into: l_int(holds(conveyor(_98962,_98964,_98966,_98968,_98970),_98992),[holds(conveyorEndpoint(_98962,_98966),_98992),holds(location(_98962,_98964),_98992),holds(working(_98962,_98968),_98992),holds(conveyorSpeed(_98962,_98970),_98992)]). 4416 4417% LPS: then(if((at(conveyorSpeed(_105920,_105922),_105944),at(working(_105920,true),_105944),at(transports(_105920,_106130),_105944),at(conveyorEndpoint(_105920,_106234),_105944),at(location(_106130,_106338),_105944),at(location(_105920,_106442),_105944),notReachingConveyorEnds(_105922,_106442,_106234,_106338))),(newPosition(_106338,_106442,_106234,_105922,_106898),update(in(to(_106338,_106898),from(location(_106130,_106338),_105944))))). 4418% Into: reactive_rule([holds(conveyorSpeed(_105920,_105922),_105944),holds(working(_105920,true),_105944),holds(transports(_105920,_106130),_105944),holds(conveyorEndpoint(_105920,_106234),_105944),holds(location(_106130,_106338),_105944),holds(location(_105920,_106442),_105944),notReachingConveyorEnds(_105922,_106442,_106234,_106338)],[newPosition(_106338,_106442,_106234,_105922,_106898),happens(update(_106338-_106898,location(_106130,_106338)),_105944,_109198)]). 4419 4420% LPS: fluents(container(_112530,_112532)). 4421% Into: fluents([container(_112530,_112532)]). 4422 4423% LPS: if(from(createContainer(_113604,_113606,_113608),to(_113644,_113646)),(_113608=container(_113604),objectName(_113604),number(_113606),initiate(from(container(_113608,_113606),to(_113644,_113646))),initiate(from(location(_113608,point(0,0)),to(_113644,_113646))))). 4424% Into: l_events(happens(createContainer(_113604,_113606,_113608),_113644,_113646),[_113608=container(_113604),objectName(_113604),number(_113606),happens(initiate(container(_113608,_113606)),_113644,_113646),happens(initiate(location(_113608,point(0,0))),_113644,_113646)]). 4425 4426% LPS: if(at(container(_115664,_115666,_115668),_115690),(at(container(_115664,_115666),_115690),at(location(_115664,_115668),_115690))). 4427% Into: l_int(holds(container(_115664,_115666,_115668),_115690),[holds(container(_115664,_115666),_115690),holds(location(_115664,_115668),_115690)]). 4428 4429% LPS: fluents((heater(_20970,_20972,_20974,_20976),heatable(_20970,_20976),initialTemperature(_21100,_21102,_21104))). 4430% Into: fluents([heater(_20970,_20972,_20974,_20976),heatable(_20970,_20976),initialTemperature(_21100,_21102,_21104)]). 4431 4432% LPS: if(from(createHeater(_22358,_22360,_22362,_22364,_22366),to(_22402,_22404)),(_22366=heater(_22358),objectName(_22358),initiate(from(heater(_22366,_22360,_22362,_22364),to(_22402,_22404))),initiate(from(working(_22366,false),to(_22402,_22404))))). 4433% Into: l_events(happens(createHeater(_22358,_22360,_22362,_22364,_22366),_22402,_22404),[_22366=heater(_22358),objectName(_22358),happens(initiate(heater(_22366,_22360,_22362,_22364)),_22402,_22404),happens(initiate(working(_22366,false)),_22402,_22404)]). 4434 4435% LPS: then(if((at(heater(_24348,_24350,_24352,_24354),_24376),at(working(_24348,true),_24376),at(heatable(_24560,_24562),_24376),at(location(_24560,_24666),_24376),\+inside(_24666,_24350,_24352),at(location(_24560,_24874),_24376+1),inside(_24874,_24350,_24352))),initiate(from(initialTemperature(_24348,_24560,_24562),_24376+1))). 4436% Into: reactive_rule([holds(heater(_24348,_24350,_24352,_24354),_24376),holds(working(_24348,true),_24376),holds(heatable(_24560,_24562),_24376),holds(location(_24560,_24666),_24376),\+inside(_24666,_24350,_24352),holds(location(_24560,_24874),_24376+1),inside(_24874,_24350,_24352)],[happens(initiate(initialTemperature(_24348,_24560,_24562)),_24376+1,_27448)]). 4437 4438% LPS: then(if((at(heater(_26794,_26796,_26798,_26800),_26822),at(working(_26794,true),_26822),at(heatable(_27006,_27008),_26822),at(location(_27006,_27112),_26822),inside(_27112,_26796,_26798))),update(in(to(_27428,_26800),from(heatable(_27006,_27428),_26822)))). 4439% Into: reactive_rule([holds(heater(_26794,_26796,_26798,_26800),_26822),holds(working(_26794,true),_26822),holds(heatable(_27006,_27008),_26822),holds(location(_27006,_27112),_26822),inside(_27112,_26796,_26798)],[happens(update(_27428-_26800,heatable(_27006,_27428)),_26822,_29364)]). 4440 4441% LPS: then(if((at(heater(_28902,_28904,_28906,_28908),_28930),at(working(_28902,true),_28930),at(heatable(_29114,_29116),_28930),at(location(_29114,_29220),_28930),inside(_29220,_28904,_28906),at(location(_29114,_29396),_28930+1),\+inside(_29396,_28904,_28906),initialTemperature(_28902,_29114,_29668))),(terminate(from(initialTemperature(_28902,_29114,_29668),_28930+1)),update(in(to(_29116,_29668),from(heatable(_29114,_29116),_28930+1))))). 4442% Into: reactive_rule([holds(heater(_28902,_28904,_28906,_28908),_28930),holds(working(_28902,true),_28930),holds(heatable(_29114,_29116),_28930),holds(location(_29114,_29220),_28930),inside(_29220,_28904,_28906),holds(location(_29114,_29396),_28930+1),\+inside(_29396,_28904,_28906),holds(initialTemperature(_28902,_29114,_29668),_31770)],[happens(terminate(initialTemperature(_28902,_29114,_29668)),_28930+1,_32564),happens(update(_29116-_29668,heatable(_29114,_29116)),_28930+1,_32528)]). 4443 4444% LPS: fluents(cookable(_33888,_33890,_33892)). 4445% Into: fluents([cookable(_33888,_33890,_33892)]). 4446 4447% LPS: if(from(createCookable(_34978,_34980,_34982),to(_35018,_35020)),(_34982=cookable(_34978),objectName(_34978),initiate(from(location(_34982,point(0,0)),to(_35018,_35020))),initiate(from(heatable(_34982,_34980),to(_35018,_35020))),initiate(from(cookable(_34982,_34980,0),to(_35018,_35020))))). 4448% Into: l_events(happens(createCookable(_34978,_34980,_34982),_35018,_35020),[_34982=cookable(_34978),objectName(_34978),happens(initiate(location(_34982,point(0,0))),_35018,_35020),happens(initiate(heatable(_34982,_34980)),_35018,_35020),happens(initiate(cookable(_34982,_34980,0)),_35018,_35020)]). 4449 4450% LPS: then(if((at(cookable(_37194,_37196,_37198),_37220),at(heatable(_37194,_37302),_37220),_37302>_37196)),(_37698 is _37198+(_37302-_37196)*0.01,update(in(to(_37198,_37698),cookable(_37194,_37196,_37198))))). 4451% Into: reactive_rule([holds(cookable(_37194,_37196,_37198),_37220),holds(heatable(_37194,_37302),_37220),_37302>_37196],[_37698 is _37198+(_37302-_37196)*0.01,happens(update(_37198-_37698,cookable(_37194,_37196,_37198)),_39424,_39430)]). 4452 4453% LPS: if(at(cookable(_39230,_39232,_39234,_39236),_39258),(at(cookable(_39230,_39232,_39234),_39258),at(location(_39230,_39236),_39258))). 4454% Into: l_int(holds(cookable(_39230,_39232,_39234,_39236),_39258),[holds(cookable(_39230,_39232,_39234),_39258),holds(location(_39230,_39236),_39258)]). 4455 4456% LPS: fluents((pump(_42692,_42694,_42696),pumpFlow(_42692,_42752))). 4457% Into: fluents([pump(_42692,_42694,_42696),pumpFlow(_42692,_42752)]). 4458 4459% LPS: if(from(createPump(_43948,_43950,_43952,_43954),to(_43990,_43992)),(_43950\=_43952,_43950=container(_44170),_43952=container(_44258),_43954=pump(_43948),objectName(_43948),initiate(from(pump(_43954,_43950,_43952),to(_43990,_43992))),initiate(from(pumpFlow(_43954,0),to(_43990,_43992))),initiate(from(working(_43954,false),to(_43990,_43992))))). 4460% Into: l_events(happens(createPump(_43948,_43950,_43952,_43954),_43990,_43992),[_43950\=_43952,_43950=container(_44170),_43952=container(_44258),_43954=pump(_43948),objectName(_43948),happens(initiate(pump(_43954,_43950,_43952)),_43990,_43992),happens(initiate(pumpFlow(_43954,0)),_43990,_43992),happens(initiate(working(_43954,false)),_43990,_43992)]). 4461 4462% LPS: actions((setPumpFlow(_46500,_46502),switchPumpOutputTo(_46500,_46558),switchPumpInputTo(_46500,_46614),pumpIt(_46500,_46670))). 4463% Into: actions([setPumpFlow(_46500,_46502),switchPumpOutputTo(_46500,_46558),switchPumpInputTo(_46500,_46614),pumpIt(_46500,_46670)]). 4464 4465% LPS: if(updates(setPumpFlow(_47896,_47898),in(to(_47934,_47898),pumpFlow(_47896,_47934))),number(_47898)). 4466% Into: updated(happens(setPumpFlow(_47896,_47898),_49354,_49360),pumpFlow(_47896,_47934),_47934-_47898,[number(_47898)]). 4467 4468% LPS: if(updates(switchPumpOutputTo(_49230,_49232),in(to(_49268,_49232),pump(_49230,_49366,_49268))),_49232=container(_49488)). 4469% Into: updated(happens(switchPumpOutputTo(_49230,_49232),_50774,_50780),pump(_49230,_49366,_49268),_49268-_49232,[_49232=container(_49488)]). 4470 4471% LPS: if(updates(switchPumpInputTo(_50648,_50650),in(to(_50686,_50650),pump(_50648,_50686,_50786))),_50650=container(_50906)). 4472% Into: updated(happens(switchPumpInputTo(_50648,_50650),_52180,_52186),pump(_50648,_50686,_50786),_50686-_50650,[_50650=container(_50906)]). 4473 4474% LPS: then(if((at(pump(_52124,_52126,_52128),_52150),at(working(_52124,true),_52150),at(container(_52126,_52336),_52150))),(at(pumpFlow(_52124,_52528),_52150),_52336-_52528>=0,from(pumpIt(_52126,-_52528),_52150),from(pumpIt(_52128,_52528),_52150))). 4475% Into: reactive_rule([holds(pump(_52124,_52126,_52128),_52150),holds(working(_52124,true),_52150),holds(container(_52126,_52336),_52150)],[holds(pumpFlow(_52124,_52528),_52150),_52336-_52528>=0,happens(pumpIt(_52126,-_52528),_52150,_54792),happens(pumpIt(_52128,_52528),_52150,_54570)]). 4476 4477% LPS: if(updates(pumpIt(_54326,_54328),in(to(_54364,_54366),container(_54326,_54364))),_54366 is _54364+_54328). 4478% Into: updated(happens(pumpIt(_54326,_54328),_55868,_55874),container(_54326,_54364),_54364-_54366,[_54366 is _54364+_54328]). 4479 4480% LPS: fluents(dropper(_55878,_55880,_55882,_55884,_55886)). 4481% Into: fluents([dropper(_55878,_55880,_55882,_55884,_55886)]). 4482 4483% LPS: if(from(createDropper(_57028,_57030,_57032,_57034,_57036),to(_57072,_57074)),(_57036=dropper(_57028),objectName(_57028),number(_57030),_57034=conveyor(_57356),at(location(_57034,point(_57476,_57478)),_57072),_57616 is _57478+25,initiate(from(working(_57036,false),to(_57072,_57074))),initiate(from(location(_57036,point(_57476,_57616)),to(_57072,_57074))),initiate(from(dropper(_57036,_57030,_57032,_57034,_57072),to(_57072,_57074))))). 4484% Into: l_events(happens(createDropper(_57028,_57030,_57032,_57034,_57036),_57072,_57074),[_57036=dropper(_57028),objectName(_57028),number(_57030),_57034=conveyor(_57356),holds(location(_57034,point(_57476,_57478)),_57072),_57616 is _57478+25,happens(initiate(working(_57036,false)),_57072,_57074),happens(initiate(location(_57036,point(_57476,_57616))),_57072,_57074),happens(initiate(dropper(_57036,_57030,_57032,_57034,_57072)),_57072,_57074)]). 4485 4486% LPS: actions(setDroppingSpeed(_59914,_59916)). 4487% Into: actions([setDroppingSpeed(_59914,_59916)]). 4488 4489% LPS: if(updates(setDroppingSpeed(_60974,_60976),in(to(_61012,_60976),dropper(_60974,_61012,_61140,_61142,_61144))),number(_60976)). 4490% Into: updated(happens(setDroppingSpeed(_60974,_60976),_62492,_62498),dropper(_60974,_61012,_61140,_61142,_61144),_61012-_60976,[number(_60976)]). 4491 4492% LPS: then(if((at(dropper(_62412,_62414,_62416,_62418,_62420),_62442),at(working(_62412,true),_62442),_62414*(_62442-_62420)>=1)),(update(in(to(_62874,_62442),from(dropper(_62412,_62414,_62416,_62418,_62874),to(_62442,_62442+1)))),_63372 is round(_62414*(_62442-_62420)),from(clone(_63372,_62416,_63472),to(_62442,_62442+1)),from(drop(_63472,_62418),to(_62442+1,_62442+2)))). 4493% Into: reactive_rule([holds(dropper(_62412,_62414,_62416,_62418,_62420),_62442),holds(working(_62412,true),_62442),_62414*(_62442-_62420)>=1],[happens(update(_62874-_62442,dropper(_62412,_62414,_62416,_62418,_62874)),_62442,_62442+1),_63372 is round(_62414*(_62442-_62420)),happens(clone(_63372,_62416,_63472),_62442,_62442+1),happens(drop(_63472,_62418),_62442+1,_62442+2)]). 4494 4495% LPS: if(from(drop([_65318|_65320],_65348),to(_65384,_65386)),(from(placeOnConveyor(_65318,_65348,0),to(_65384,_65386)),from(drop(_65320,_65348),to(_65384,_65386)))). 4496% Into: l_events(happens(drop([_65318|_65320],_65348),_65384,_65386),[happens(placeOnConveyor(_65318,_65348,0),_65384,_65386),happens(drop(_65320,_65348),_65384,_65386)]). 4497 4498% LPS: drop([],_66964). 4499% Into: l_events(happens(drop([],_66964),_67926,_67932),[]). 4500 4501% LPS: if(at(dropper(_68018,_68020,_68022),_68044),(at(dropper(_68018,_68020,_68170,_68172,_68174),_68044),at(location(_68018,_68022),_68044))). 4502% Into: l_int(holds(dropper(_68018,_68020,_68022),_68044),[holds(dropper(_68018,_68020,_68170,_68172,_68174),_68044),holds(location(_68018,_68022),_68044)]). 4503 4504% LPS: then(if(at(true,1)),(from(createContainer(hotOil,50,_19546),to(_19562,_19564)),from(createContainer(usedOil,5,_19674),to(_19562,_19564)),from(createContainer(newOil,30,_19802),to(_19562,_19564)),from(setLocation(_19546,point(300,200)),to(_19564,_19970)),from(setLocation(_19674,point(200,0)),to(_19564,_19970)),from(setLocation(_19802,point(200,80)),to(_19564,_19970)),from(createPump(outward,_19546,_19674,_20394),to(_19564,_19970)),from(createPump(inward,_19674,_19546,_20536),to(_19564,_19970)),from(setPumpFlow(_20394,1),_19970),from(setPumpFlow(_20536,1),_19970),from(start(_20394),_19970),from(start(_20536),to(_19970,_20874)),from(createConveyor(feeding,point(550,140),point(50,140),_21070),to(_20874,_21088)),from(setConveyorSpeed(_21070,10),to(_21088,_21202)),from(start(_21070),to(_21088,_21202)),from(createHeater(_21504,point(100,75),point(500,290),150,_21512),to(_21202,_21530)),from(start(_21512),_21530),from(createCookable(shrimp,4,_21704),to(_21530,_21722)),from(setLocation(_21704,point(-20,-20)),_21722),from(createDropper(_21972,0.25,_21704,_21070,_21980),to(_21722,_21998)),from(start(_21980),_21998))). 4505% Into: reactive_rule([holds(true,1)],[happens(createContainer(hotOil,50,_19546),_19562,_19564),happens(createContainer(usedOil,5,_19674),_19562,_19564),happens(createContainer(newOil,30,_19802),_19562,_19564),happens(setLocation(_19546,point(300,200)),_19564,_19970),happens(setLocation(_19674,point(200,0)),_19564,_19970),happens(setLocation(_19802,point(200,80)),_19564,_19970),happens(createPump(outward,_19546,_19674,_20394),_19564,_19970),happens(createPump(inward,_19674,_19546,_20536),_19564,_19970),happens(setPumpFlow(_20394,1),_19970,_24816),happens(setPumpFlow(_20536,1),_19970,_24936),happens(start(_20394),_19970,_25056),happens(start(_20536),_19970,_20874),happens(createConveyor(feeding,point(550,140),point(50,140),_21070),_20874,_21088),happens(setConveyorSpeed(_21070,10),_21088,_21202),happens(start(_21070),_21088,_21202),happens(createHeater(_21504,point(100,75),point(500,290),150,_21512),_21202,_21530),happens(start(_21512),_21530,_25780),happens(createCookable(shrimp,4,_21704),_21530,_21722),happens(setLocation(_21704,point(-20,-20)),_21722,_26020),happens(createDropper(_21972,0.25,_21704,_21070,_21980),_21722,_21998),happens(start(_21980),_21998,_23804)]). 4506 4507% LPS: if(at(kitchenSummary(_24880,_24882,_24884,_24886),_24908),(findall(_25040,cookable(_25036,_25038,_25040),_25062),length(_25062,_24880),_24880>0,sum_list(_25062,_25238),_24882 is _25238/_24880,min_list(_25062,_24884),max_list(_25062,_24886))). 4508% Into: l_int(holds(kitchenSummary(_24880,_24882,_24884,_24886),_24908),[holds(findall(_25040,[holds(cookable(_25036,_25038,_25040),_24908)],_25062),_24908),length(_25062,_24880),_24880>0,sum_list(_25062,_25238),_24882 is _25238/_24880,min_list(_25062,_24884),max_list(_25062,_24886)]). 4509% /pack/logicmoo_ec/test/lps_user_examples/cooking.pl:315 4510% pop_lps_dialect('$BLOB'("<stream>(0x562ef32aac00)"), (/.../(lps_user_examples, 'cooking.pl')-> /.../(lps_user_examples, 'cooking.pl'))). 4511% ops. 4512% :-listing('/pack/logicmoo_ec/test/lps_user_examples/cooking.pl':_52454). 4513 4514 4515distance(point(X1, Y1), point(X2, Y2), D) :- 4516 D is sqrt((X2-X1)*(X2-X1)+(Y2-Y1)*(Y2-Y1)). 4517 4518updated(happens(setLocation(A, B), _, _), location(A, C), C-B, [B=point(D, E), number(D), number(E)]). 4519updated(happens(start(A), _, _), working(A, B), B-true, []). 4520updated(happens(stop(A), _, _), working(A, B), B-false, []). 4521updated(happens(setConveyorSpeed(A, B), _, _), conveyorSpeed(A, C), C-B, []). 4522updated(happens(setPumpFlow(A, B), _, _), pumpFlow(A, C), C-B, [number(B)]). 4523updated(happens(switchPumpOutputTo(A, B), _, _), pump(A, _, C), C-B, [B=container(_)]). 4524updated(happens(switchPumpInputTo(A, B), _, _), pump(A, C, _), C-B, [B=container(_)]). 4525updated(happens(pumpIt(A, B), _, _), container(A, C), C-D, [D is C+B]). 4526updated(happens(setDroppingSpeed(A, B), _, _), dropper(A, C, _, _, _), C-B, [number(B)]). 4527 4528maxTime(100). 4529 4530fluents([location(_, _)]). 4531fluents([working(_, _)]). 4532fluents([transports(_, _), conveyorEndpoint(A, _), conveyorSpeed(A, _)]). 4533fluents([container(_, _)]). 4534fluents([heater(A, _, _, B), heatable(A, B), initialTemperature(_, _, _)]). 4535fluents([cookable(_, _, _)]). 4536fluents([pump(A, _, _), pumpFlow(A, _)]). 4537fluents([dropper(_, _, _, _, _)]). 4538 4539interpolate(point(SX, Y), point(EX, Y), D, point(X, Y)) :- 4540 !, 4541 ( EX>=SX 4542 -> X is SX+D 4543 ; X is SX-D 4544 ). 4545interpolate(point(X, SY), point(X, EY), D, point(X, Y)) :- 4546 !, 4547 ( EY>=SY 4548 -> Y is SY+D 4549 ; Y is SY-D 4550 ). 4551interpolate(point(SX, SY), point(EX, EY), D, point(X, Y)) :- 4552 M is (EY-SY)/(EX-SX), 4553 DX is D/sqrt(1+M*M), 4554 DY is DX*M, 4555 X is round(SX+DX), 4556 Y is round(SY+DY). 4557 4558l_events(happens(clone(A, B), C, D), [A=..[E, _], objectName(F), B=..[E, F], holds(findall(G, [holds(H, C), H=..[I, A|J], G=..[I, B|J]], K), C), happens(initiateAll(K), C, D)]). 4559l_events(happens(initiateAll([A|B]), C, D), [happens(initiate(A), C, _), happens(initiateAll(B), C, D)]). 4560l_events(happens(initiateAll([]), A, B), [B=:=A+1]). 4561l_events(happens(clone(A, B, [C|D]), E, F), [A>0, happens(clone(B, C), E, F), G is A-1, happens(clone(G, B, D), E, F)]). 4562l_events(happens(clone(0, _, []), _, _), []). 4563l_events(happens(placeOnConveyor(A, B, C), D, E), [holds(not(transports(B, A)), D), holds(location(B, F), _), holds(conveyorEndpoint(B, G), _), interpolate(F, G, C, H), happens(update(I-H, location(A, I)), D, E), happens(initiate(transports(B, A)), D, E)]). 4564l_events(happens(createConveyor(A, B, C, D), E, F), [D=conveyor(A), objectName(A), happens(initiate(location(D, B)), E, F), happens(initiate(conveyorEndpoint(D, C)), E, F), happens(initiate(conveyorSpeed(D, 0)), E, F), happens(initiate(working(D, false)), E, F)]). 4565l_events(happens(createContainer(A, B, C), D, E), [C=container(A), objectName(A), number(B), happens(initiate(container(C, B)), D, E), happens(initiate(location(C, point(0, 0))), D, E)]). 4566l_events(happens(createHeater(A, B, C, D, E), F, G), [E=heater(A), objectName(A), happens(initiate(heater(E, B, C, D)), F, G), happens(initiate(working(E, false)), F, G)]). 4567l_events(happens(createCookable(A, B, C), D, E), [C=cookable(A), objectName(A), happens(initiate(location(C, point(0, 0))), D, E), happens(initiate(heatable(C, B)), D, E), happens(initiate(cookable(C, B, 0)), D, E)]). 4568l_events(happens(createPump(A, B, C, D), E, F), [B\=C, B=container(_), C=container(_), D=pump(A), objectName(A), happens(initiate(pump(D, B, C)), E, F), happens(initiate(pumpFlow(D, 0)), E, F), happens(initiate(working(D, false)), E, F)]). 4569l_events(happens(createDropper(A, B, C, D, E), F, G), [E=dropper(A), objectName(A), number(B), D=conveyor(_), holds(location(D, point(H, I)), F), J is I+25, happens(initiate(working(E, false)), F, G), happens(initiate(location(E, point(H, J))), F, G), happens(initiate(dropper(E, B, C, D, F)), F, G)]). 4570l_events(happens(drop([A|B], C), D, E), [happens(placeOnConveyor(A, C, 0), D, E), happens(drop(B, C), D, E)]). 4571l_events(happens(drop([], _), _, _), []). 4572 4573inside(point(X, Y), point(BLX, BLY), point(TRX, TRY)) :- 4574 X>BLX, 4575 X<TRX, 4576 Y>BLY, 4577 Y<TRY. 4578 4579:- dynamic actions/1. 4580:- multifile actions/1. 4581 4582actions([setLocation(_, _)]). 4583actions([start(_), stop(_)]). 4584actions([setConveyorSpeed(_, _)]). 4585actions([setPumpFlow(A, _), switchPumpOutputTo(A, _), switchPumpInputTo(A, _), pumpIt(A, _)]). 4586actions([setDroppingSpeed(_, _)]). 4587 4588newPosition(Current, _Start, End, Delta, NewPoint) :- 4589 Delta>=0, 4590 interpolate(Current, End, Delta, NewPoint). 4591newPosition(Current, Start, _End, Delta, NewPoint) :- 4592 Delta<0, 4593 interpolate(Current, Start, Delta, NewPoint). 4594 4595d(conveyor(C, point(SX, SY_), point(EX, EY_), _Working, Speed), [type:Type, arrow:Speed, headLength:10, strokeWidth:2, strokeColor:black, from:[RSX, RSY], to:[REX, REY]|Label]) :- 4596 SY is SY_+ -5, 4597 EY is EY_+ -5, 4598 format(string(Sp), "~w px/cycle", [Speed]), 4599 ( Speed=0 4600 -> Type=line, 4601 RSX=SX, 4602 RSY=SY, 4603 REX=EX, 4604 REY=EY, 4605 label=[] 4606 ; Speed>0 4607 -> Type=arrow, 4608 RSX=SX