First implementation of questions management
This commit is contained in:
+15
-1
@@ -81,6 +81,20 @@ def concept thousands from bnf number=n1 'thousand' 'and' number=n2 as n1 * 1000
|
||||
last_created_concept() is number
|
||||
def concept history as history()
|
||||
def concept plus from a plus b as a + b
|
||||
def concept mult from a mult b as a * b
|
||||
def concept minus from a plus b as a - b
|
||||
def concept multiplied from a multiplied by b as a * b
|
||||
def concept divided from a divided by b as a * b
|
||||
set_is_greater_than(BuiltinConcepts.PRECEDENCE, multiplied, plus)
|
||||
set_is_greater_than(BuiltinConcepts.PRECEDENCE, divided, plus)
|
||||
set_is_greater_than(BuiltinConcepts.PRECEDENCE, multiplied, minus)
|
||||
set_is_greater_than(BuiltinConcepts.PRECEDENCE, divided, minus)
|
||||
def concept explain as get_results() | filter("id == 0") | recurse(2)
|
||||
def concept explain last as get_last_results() | filter("id == 0") | recurse(2)
|
||||
set_isa(c:explain:, __COMMAND)
|
||||
set_isa(c:explain last:, __COMMAND)
|
||||
def concept precedence a > precedence b as set_is_greater_than(BuiltinConcepts.PRECEDENCE, a, b)
|
||||
set_isa(c:precedence a > precedence b:, __COMMAND)
|
||||
def concept x is a command as set_isa(x, __COMMAND)
|
||||
set_isa(c:x is a command:, __COMMAND)
|
||||
def concept q from q ? as question(q) pre in_context(BuiltinConcepts.EVAL_QUESTION_REQUESTED)
|
||||
def concept x is a 'concept' as isinstance(x, Concept) pre in_context(BuiltinConcepts.EVAL_QUESTION_REQUESTED)
|
||||
Reference in New Issue
Block a user