$ ./the_semantic_db_console.py Welcome! sa: h q, quit, exit : quit the agent. h, help : print this message context : print current context name context string : set current context to string dump : print current context dump multi : print context list load file.sw : load file.sw save file.sw : save current context to file.sw save multi file.sw : save context list to file.sw files : show the available .sw files create inverse : create inverse for current context create multi inverse : create inverse for all context in context list x = foo: bah : set x (the default ket) to |foo: bah> s, store : set x to the result of the last computation . : repeat last computation if none of the above : process_input_line(C,line,x) sa: files bot-bella.sw bot-emma.sw bot-madison.sw bot-personality-data.sw friends.sw frog.sw methanol.sw simple-molecules.sw sa: load bot-bella.sw loading sw file: bot-bella.sw sa: load bot-emma.sw loading sw file: bot-emma.sw sa: load bot-madison.sw loading sw file: bot-madison.sw sa: dump ---------------------------------------- |context> => |context: bot profile> supported-ops |bot: Bella> => |op: name> + |op: mother> + |op: father> + |op: birth-sign> + |op: number-siblings> + |op: wine-preference> + |op: favourite-fruit> + |op: favourite-music> + |op: favourite-play> + |op: hair-colour> + |op: eye-colour> + |op: where-live> + |op: favourite-holiday-spot> + |op: make-of-car> + |op: religion> + |op: personality-type> + |op: current-emotion> + |op: bed-time> name |bot: Bella> => |Bella> mother |bot: Bella> => |Mia> father |bot: Bella> => |William> birth-sign |bot: Bella> => |birth-sign: Cancer> number-siblings |bot: Bella> => |number: 1> wine-preference |bot: Bella> => |wine: Merlot> favourite-fruit |bot: Bella> => |fruit: pineapples> favourite-music |bot: Bella> => |music: genre: punk> favourite-play |bot: Bella> => |play: Endgame> hair-colour |bot: Bella> => |hair-colour: gray> eye-colour |bot: Bella> => |eye-colour: hazel> where-live |bot: Bella> => |location: Sydney> favourite-holiday-spot |bot: Bella> => |location: Paris> make-of-car |bot: Bella> => |car: Porsche> religion |bot: Bella> => |religion: Christianity> personality-type |bot: Bella> => |personality-type: the guardian> current-emotion |bot: Bella> => |emotion: fear> bed-time |bot: Bella> => |time: 8pm> supported-ops |bot: Emma> => |op: name> + |op: mother> + |op: father> + |op: birth-sign> + |op: number-siblings> + |op: wine-preference> + |op: favourite-fruit> + |op: favourite-music> + |op: favourite-play> + |op: hair-colour> + |op: eye-colour> + |op: where-live> + |op: favourite-holiday-spot> + |op: make-of-car> + |op: religion> + |op: personality-type> + |op: current-emotion> + |op: bed-time> name |bot: Emma> => |Emma> mother |bot: Emma> => |Madison> father |bot: Emma> => |Nathan> birth-sign |bot: Emma> => |birth-sign: Capricorn> number-siblings |bot: Emma> => |number: 4> wine-preference |bot: Emma> => |wine: Pinot Noir> favourite-fruit |bot: Emma> => |fruit: oranges> favourite-music |bot: Emma> => |music: genre: hip hop> favourite-play |bot: Emma> => |play: No Exit> hair-colour |bot: Emma> => |hair-colour: red> eye-colour |bot: Emma> => |eye-colour: gray> where-live |bot: Emma> => |location: New York> favourite-holiday-spot |bot: Emma> => |location: Taj Mahal> make-of-car |bot: Emma> => |car: BMW> religion |bot: Emma> => |religion: Taoism> personality-type |bot: Emma> => |personality-type: the visionary> current-emotion |bot: Emma> => |emotion: kindness> bed-time |bot: Emma> => |time: 2am> supported-ops |bot: Madison> => |op: name> + |op: mother> + |op: father> + |op: birth-sign> + |op: number-siblings> + |op: wine-preference> + |op: favourite-fruit> + |op: favourite-music> + |op: favourite-play> + |op: hair-colour> + |op: eye-colour> + |op: where-live> + |op: favourite-holiday-spot> + |op: make-of-car> + |op: religion> + |op: personality-type> + |op: current-emotion> + |op: bed-time> name |bot: Madison> => |Madison> mother |bot: Madison> => |Mia> father |bot: Madison> => |Ian> birth-sign |bot: Madison> => |birth-sign: Cancer> number-siblings |bot: Madison> => |number: 6> wine-preference |bot: Madison> => |wine: Pinot Noir> favourite-fruit |bot: Madison> => |fruit: pineapples> favourite-music |bot: Madison> => |music: genre: blues> favourite-play |bot: Madison> => |play: Death of a Salesman> hair-colour |bot: Madison> => |hair-colour: red> eye-colour |bot: Madison> => |eye-colour: amber> where-live |bot: Madison> => |location: Vancouver> favourite-holiday-spot |bot: Madison> => |location: Uluru> make-of-car |bot: Madison> => |car: Bugatti> religion |bot: Madison> => |religion: Islam> personality-type |bot: Madison> => |personality-type: the performer> current-emotion |bot: Madison> => |emotion: indignation> bed-time |bot: Madison> => |time: 10:30pm> ---------------------------------------- sa: x = bot: Emma sa: name op: name op is literal py: .apply_op(context,"name") python: x.apply_op(context,"name") |Emma> sa: father op: father op is literal py: .apply_op(context,"father") python: x.apply_op(context,"father") |Nathan> sa: mother op: mother op is literal py: .apply_op(context,"mother") python: x.apply_op(context,"mother") |Madison> sa: age op: age op is literal py: .apply_op(context,"age") python: x.apply_op(context,"age") In context "bot profile": I have no knowledge of the "age" operator applied to "bot: Emma". |> sa: bed-time op: bed-time op is literal py: .apply_op(context,"bed-time") python: x.apply_op(context,"bed-time") |time: 2am> sa: eye-colour op: eye-colour op is literal py: .apply_op(context,"eye-colour") python: x.apply_op(context,"eye-colour") |eye-colour: gray> sa: where-live op: where-live op is literal py: .apply_op(context,"where-live") python: x.apply_op(context,"where-live") |location: New York> sa: religion op: religion op is literal py: .apply_op(context,"religion") python: x.apply_op(context,"religion") |religion: Taoism> sa: religion |bot: Madison> op: religion label: bot: Madison rest: op: religion op is literal py: .apply_op(context,"religion") python: x.apply_op(context,"religion") |religion: Islam> sa: religion |bot: Bella> op: religion label: bot: Bella rest: op: religion op is literal py: .apply_op(context,"religion") python: x.apply_op(context,"religion") |religion: Christianity> sa: where-live |bot: Bella> op: where-live label: bot: Bella rest: op: where-live op is literal py: .apply_op(context,"where-live") python: x.apply_op(context,"where-live") |location: Sydney> sa: x = bot: Bella sa: father op: father op is literal py: .apply_op(context,"father") python: x.apply_op(context,"father") |William> sa: hair-colour op: hair-colour op is literal py: .apply_op(context,"hair-colour") python: x.apply_op(context,"hair-colour") |hair-colour: gray> sa: eye-colour op: eye-colour op is literal py: .apply_op(context,"eye-colour") python: x.apply_op(context,"eye-colour") |eye-colour: hazel> sa: favourite-wine op: favourite-wine op is literal py: .apply_op(context,"favourite-wine") python: x.apply_op(context,"favourite-wine") In context "bot profile": I have no knowledge of the "favourite-wine" operator applied to "bot: Bella". |> sa: wine-preference op: wine-preference op is literal py: .apply_op(context,"wine-preference") python: x.apply_op(context,"wine-preference") |wine: Merlot> sa: wine-prefernce |bot: Emma> op: wine-prefernce label: bot: Emma rest: op: wine-prefernce op is literal py: .apply_op(context,"wine-prefernce") python: x.apply_op(context,"wine-prefernce") In context "bot profile": I have no knowledge of the "wine-prefernce" operator applied to "bot: Emma". |> sa: wine-preference |bot: Emma> op: wine-preference label: bot: Emma rest: op: wine-preference op is literal py: .apply_op(context,"wine-preference") python: x.apply_op(context,"wine-preference") |wine: Pinot Noir> sa: x = bot: Madison sa: hungry op: hungry op is literal py: .apply_op(context,"hungry") python: x.apply_op(context,"hungry") In context "bot profile": I have no knowledge of the "hungry" operator applied to "bot: Madison". |> sa: hungry |bot: Madison> => |starving> op: hungry label: bot: Madison rest: => |starving> rule: |starving> None sa: hungry op: hungry op is literal py: .apply_op(context,"hungry") python: x.apply_op(context,"hungry") |starving> sa: age op: age op is literal py: .apply_op(context,"age") python: x.apply_op(context,"age") In context "bot profile": I have no knowledge of the "age" operator applied to "bot: Madison". |> sa: age |bot: Madison> => |age: 23> op: age label: bot: Madison rest: => |age: 23> rule: |age: 23> None sa: age op: age op is literal py: .apply_op(context,"age") python: x.apply_op(context,"age") |age: 23> sa: age |bot: Emma> => |age: 29> op: age label: bot: Emma rest: => |age: 29> rule: |age: 29> None sa: age op: age op is literal py: .apply_op(context,"age") python: x.apply_op(context,"age") |age: 23> sa: friends |bot: Madison> => |bot: Emma> op: friends label: bot: Madison rest: => |bot: Emma> rule: |bot: Emma> None sa: python: x |bot: Madison> sa: friends op: friends op is literal py: .apply_op(context,"friends") python: x.apply_op(context,"friends") |bot: Emma> sa: friends |bot: Madison> +=> |bot: Bella> op: friends label: bot: Madison rest: +=> |bot: Bella> rule: |bot: Bella> None sa: friends op: friends op is literal py: .apply_op(context,"friends") python: x.apply_op(context,"friends") |bot: Emma> + |bot: Bella> sa: name op: name op is literal py: .apply_op(context,"name") python: x.apply_op(context,"name") |Madison> sa: age friends op: friends op is literal py: .apply_op(context,"friends") op: age op is literal py: .apply_op(context,"age") python: x.apply_op(context,"friends").apply_op(context,"age") In context "bot profile": I have no knowledge of the "age" operator applied to "bot: Bella". |age: 29> sa: age |bot: Bella> => |age: 31> op: age label: bot: Bella rest: => |age: 31> rule: |age: 31> None sa: age friends op: friends op is literal py: .apply_op(context,"friends") op: age op is literal py: .apply_op(context,"age") python: x.apply_op(context,"friends").apply_op(context,"age") |age: 29> + |age: 31> sa: dump ---------------------------------------- |context> => |context: bot profile> supported-ops |bot: Bella> => |op: name> + |op: mother> + |op: father> + |op: birth-sign> + |op: number-siblings> + |op: wine-preference> + |op: favourite-fruit> + |op: favourite-music> + |op: favourite-play> + |op: hair-colour> + |op: eye-colour> + |op: where-live> + |op: favourite-holiday-spot> + |op: make-of-car> + |op: religion> + |op: personality-type> + |op: current-emotion> + |op: bed-time> + |op: age> name |bot: Bella> => |Bella> mother |bot: Bella> => |Mia> father |bot: Bella> => |William> birth-sign |bot: Bella> => |birth-sign: Cancer> number-siblings |bot: Bella> => |number: 1> wine-preference |bot: Bella> => |wine: Merlot> favourite-fruit |bot: Bella> => |fruit: pineapples> favourite-music |bot: Bella> => |music: genre: punk> favourite-play |bot: Bella> => |play: Endgame> hair-colour |bot: Bella> => |hair-colour: gray> eye-colour |bot: Bella> => |eye-colour: hazel> where-live |bot: Bella> => |location: Sydney> favourite-holiday-spot |bot: Bella> => |location: Paris> make-of-car |bot: Bella> => |car: Porsche> religion |bot: Bella> => |religion: Christianity> personality-type |bot: Bella> => |personality-type: the guardian> current-emotion |bot: Bella> => |emotion: fear> bed-time |bot: Bella> => |time: 8pm> age |bot: Bella> => |age: 31> supported-ops |bot: Emma> => |op: name> + |op: mother> + |op: father> + |op: birth-sign> + |op: number-siblings> + |op: wine-preference> + |op: favourite-fruit> + |op: favourite-music> + |op: favourite-play> + |op: hair-colour> + |op: eye-colour> + |op: where-live> + |op: favourite-holiday-spot> + |op: make-of-car> + |op: religion> + |op: personality-type> + |op: current-emotion> + |op: bed-time> + |op: age> name |bot: Emma> => |Emma> mother |bot: Emma> => |Madison> father |bot: Emma> => |Nathan> birth-sign |bot: Emma> => |birth-sign: Capricorn> number-siblings |bot: Emma> => |number: 4> wine-preference |bot: Emma> => |wine: Pinot Noir> favourite-fruit |bot: Emma> => |fruit: oranges> favourite-music |bot: Emma> => |music: genre: hip hop> favourite-play |bot: Emma> => |play: No Exit> hair-colour |bot: Emma> => |hair-colour: red> eye-colour |bot: Emma> => |eye-colour: gray> where-live |bot: Emma> => |location: New York> favourite-holiday-spot |bot: Emma> => |location: Taj Mahal> make-of-car |bot: Emma> => |car: BMW> religion |bot: Emma> => |religion: Taoism> personality-type |bot: Emma> => |personality-type: the visionary> current-emotion |bot: Emma> => |emotion: kindness> bed-time |bot: Emma> => |time: 2am> age |bot: Emma> => |age: 29> supported-ops |bot: Madison> => |op: name> + |op: mother> + |op: father> + |op: birth-sign> + |op: number-siblings> + |op: wine-preference> + |op: favourite-fruit> + |op: favourite-music> + |op: favourite-play> + |op: hair-colour> + |op: eye-colour> + |op: where-live> + |op: favourite-holiday-spot> + |op: make-of-car> + |op: religion> + |op: personality-type> + |op: current-emotion> + |op: bed-time> + |op: hungry> + |op: age> + |op: friends> name |bot: Madison> => |Madison> mother |bot: Madison> => |Mia> father |bot: Madison> => |Ian> birth-sign |bot: Madison> => |birth-sign: Cancer> number-siblings |bot: Madison> => |number: 6> wine-preference |bot: Madison> => |wine: Pinot Noir> favourite-fruit |bot: Madison> => |fruit: pineapples> favourite-music |bot: Madison> => |music: genre: blues> favourite-play |bot: Madison> => |play: Death of a Salesman> hair-colour |bot: Madison> => |hair-colour: red> eye-colour |bot: Madison> => |eye-colour: amber> where-live |bot: Madison> => |location: Vancouver> favourite-holiday-spot |bot: Madison> => |location: Uluru> make-of-car |bot: Madison> => |car: Bugatti> religion |bot: Madison> => |religion: Islam> personality-type |bot: Madison> => |personality-type: the performer> current-emotion |bot: Madison> => |emotion: indignation> bed-time |bot: Madison> => |time: 10:30pm> hungry |bot: Madison> => |starving> age |bot: Madison> => |age: 23> friends |bot: Madison> => |bot: Emma> + |bot: Bella> ---------------------------------------- sa: save bots.sw saving current context to: bots.sw sa: friends op: friends op is literal py: .apply_op(context,"friends") python: x.apply_op(context,"friends") |bot: Emma> + |bot: Bella> sa: s stored: |bot: Emma> + |bot: Bella> sa: python: x |bot: Emma> + |bot: Bella> sa: age op: age op is literal py: .apply_op(context,"age") python: x.apply_op(context,"age") |age: 29> + |age: 31> sa: eye-colour op: eye-colour op is literal py: .apply_op(context,"eye-colour") python: x.apply_op(context,"eye-colour") |eye-colour: gray> + |eye-colour: hazel> sa: hair-colour op: hair-colour op is literal py: .apply_op(context,"hair-colour") python: x.apply_op(context,"hair-colour") |hair-colour: red> + |hair-colour: gray> sa: religion op: religion op is literal py: .apply_op(context,"religion") python: x.apply_op(context,"religion") |religion: Taoism> + |religion: Christianity> sa: where-live op: where-live op is literal py: .apply_op(context,"where-live") python: x.apply_op(context,"where-live") |location: New York> + |location: Sydney> sa: bed-time op: bed-time op is literal py: .apply_op(context,"bed-time") python: x.apply_op(context,"bed-time") |time: 2am> + |time: 8pm> sa: mother op: mother op is literal py: .apply_op(context,"mother") python: x.apply_op(context,"mother") |Madison> + |Mia> sa: birth-sign op: birth-sign op is literal py: .apply_op(context,"birth-sign") python: x.apply_op(context,"birth-sign") |birth-sign: Capricorn> + |birth-sign: Cancer> sa: favourite-fruit op: favourite-fruit op is literal py: .apply_op(context,"favourite-fruit") python: x.apply_op(context,"favourite-fruit") |fruit: oranges> + |fruit: pineapples> sa: number-siblings op: number-siblings op is literal py: .apply_op(context,"number-siblings") python: x.apply_op(context,"number-siblings") |number: 4> + |number: 1> sa: favourite-music op: favourite-music op is literal py: .apply_op(context,"favourite-music") python: x.apply_op(context,"favourite-music") |music: genre: hip hop> + |music: genre: punk> sa: favourie-play op: favourie-play op is literal py: .apply_op(context,"favourie-play") python: x.apply_op(context,"favourie-play") In context "bot profile": I have no knowledge of the "favourie-play" operator applied to "bot: Emma". In context "bot profile": I have no knowledge of the "favourie-play" operator applied to "bot: Bella". |> sa: favourite-play op: favourite-play op is literal py: .apply_op(context,"favourite-play") python: x.apply_op(context,"favourite-play") |play: No Exit> + |play: Endgame> sa: make-of-car op: make-of-car op is literal py: .apply_op(context,"make-of-car") python: x.apply_op(context,"make-of-car") |car: BMW> + |car: Porsche> sa: personality-type op: personality-type op is literal py: .apply_op(context,"personality-type") python: x.apply_op(context,"personality-type") |personality-type: the visionary> + |personality-type: the guardian> sa: father op: father op is literal py: .apply_op(context,"father") python: x.apply_op(context,"father") |Nathan> + |William> sa: