> It isn't possible to escape domain specific code entirely, however. For example, code is needed to know that the string “the 23rd of October 2007” denotes a date and to calculate square roots. However, in our system, such code is isolated from the core query processing system.
Why can't the algorithms for accomplishing these things be stored as facts (or rather, graphs of facts representing an AST) themselves, within the system? They could be JITed into real function pointers when they were needed, and then GCed (leaving only the AST) when they hadn't been called in a while.
I was trying to do just this in a project a few years ago, but I used LISP-like cons cells to express the AST. They which conflicted with the underlying triples the knowledge graph was expressed in, creating a lot of storage bloat and "facts" that weren't really informational by themselves. Thinking back, if I attempted it again, I would use an AST format very much like Smalltalk's labelled-blocks representation of code.
Why can't the algorithms for accomplishing these things be stored as facts (or rather, graphs of facts representing an AST) themselves, within the system? They could be JITed into real function pointers when they were needed, and then GCed (leaving only the AST) when they hadn't been called in a while.
I was trying to do just this in a project a few years ago, but I used LISP-like cons cells to express the AST. They which conflicted with the underlying triples the knowledge graph was expressed in, creating a lot of storage bloat and "facts" that weren't really informational by themselves. Thinking back, if I attempted it again, I would use an AST format very much like Smalltalk's labelled-blocks representation of code.