#!/usr/bin/env python import sys from the_semantic_db_code import * from the_semantic_db_functions import * from the_semantic_db_processor import * C = context_list("stored rule play") C.learn("foo","x","foo-x") C.learn("foo","y","foo-y") print(C.dump_universe()) X = stored_rule("foo |x>") Y = stored_rule("foo 5|y>") Z = stored_rule("foo |_self>") print("X:",X) print("Y:",Y) print("Z:",Z) result = Y.activate(C,"y") print("result:",result) print() C.learn("op","u",Y) print(C.dump_universe())