<html> <head> <script> function open_div(xid){ document.getElementById(xid).style.display = 'block'; } function close_div(xid){ document.getElementById(xid).style.display = 'none'; } </script> </head> <body style="font-family: arial; font-size: 12pt;"> reset file to empty <h2> <pre> </pre> </h2><h2> in directory: </h2><h2>H:/metta-wam-main/src/canary/</h2> <hr> <br>   <br> <br>   <br> *** <i><b> metta_eval.pl</i></b> <b>       canary</b>       src H:/metta-wam-main/src/canary <a onclick="prompt('copy path','H:/metta-wam-main/src/canary/metta_eval.pl');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('srccanarymetta_eval.pl')" style="cursor:pointer"> Open </a> <a onclick="close_div('srccanarymetta_eval.pl')" style="cursor:pointer"> Close </a> <div id="srccanarymetta_eval.pl" style="border: 1px solid black; " > echo     coerce     let*     chain     eval-for     let     stringToChars <br>   <br> charsToString <br>   <br> repl!     rtrace!     no-rtrace!     trace!     trace     profile!     time!     print     println!     assertTrue     assertFalse     assertEqual     assertNotEqual <br>   <br> assertEqualToResult <br>   <br> new-space     case     collapse     superpose     sequential     nop     empty     do     call!     call-fn!     call-fn-nth! <br>   <br> if     If     car-atom     cdr-atom     Cons     change-state! <br>   <br> new-state     get-state     get-types     get-type     length     CountElement <br>   <br> get-metatype <br>   <br> extend-py!     register-module! <br>   <br> include!     include     load-ascii     import!     load-file!     bind!     pragma!     transfer!     save-space!     and     or     not     function     return     catch     throw     number-of     findall!     limit!     limit     offset!     offset     max-time!     max-time     call-cleanup! <br>   <br> setup-call-cleanup! <br>   <br> with-output-to! <br>   <br> maplist!     concurrent-maplist! <br>   <br> concurrent-forall! <br>   <br> hyperpose     predicate-arity <br>   <br> function-arity <br>   <br> compile-space! <br>   <br> compile!     TupleConcat     range     dedup!     intersect     make_list     call-string! <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> metta_interp.pl</i></b> <b>       canary</b>       src H:/metta-wam-main/src/canary <a onclick="prompt('copy path','H:/metta-wam-main/src/canary/metta_interp.pl');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('srccanarymetta_interp.pl')" style="cursor:pointer"> Open </a> <a onclick="close_div('srccanarymetta_interp.pl')" style="cursor:pointer"> Close </a> <div id="srccanarymetta_interp.pl" style="border: 1px solid black; " > 'intersect'( Lx1, Lx2 , Lx_intersct ):- !, eval_H( [ 'intersect', Lx1, Lx2 ], Lx_intersct ).'intersect' <br>   <br> 'car-atom'(List, Head):- eval_H(['car-atom', List], Head).'car-atom' <br>   <br> 'cdr-atom'(List, Tail):- eval_H(['cdr-atom', List], Tail).'cdr-atom' <br>   <br> 'collapse'(List, CollapsedList):- eval_H(['collapse', List], CollapsedList).'collapse' <br>   <br> 'superpose'(List, SuperposedList):- eval_H(['superpose', List], SuperposedList).'superpose' <br>   <br> 'assertEqual'(Expected, Actual, Result):- ignore(Expected=Actual), eval_H(['assertEqual', Expected, Actual], Result).'assertEqual' <br>   <br> 'assertEqualToResult'(Expected, Actual, Result):- eval_H(['assertEqualToResult', Expected, Actual], Result).'assertEqualToResult' <br>   <br> 'assertNotEqual'(Expected, Actual, Result):- eval_H(['assertNotEqual', Expected, Actual], Result).'assertNotEqual' <br>   <br> 'assertFalse'(EvalThis, Result):- eval_H(['assertFalse', EvalThis], Result).'assertFalse' <br>   <br> 'assertTrue'(EvalThis, Result):- eval_H(['assertTrue', EvalThis], Result).'assertTrue' <br>   <br> 'rtrace!'(Condition, EvalResult):- eval_H(['rtrace', Condition], EvalResult).'rtrace!' <br>   <br> 'time!'(EvalThis, EvalResult):- eval_H(['time', EvalThis], EvalResult).'time!' <br>   <br> 'repl!'(EvalResult):- eval_H(['repl!'], EvalResult).'repl!' <br>   <br> 'import!'(Environment, Filename, Namespace):- eval_H(['import!', Environment, Filename], Namespace).'import!' <br>   <br> 'pragma!'(Environment, Expression, EvalValue):- eval_H(['pragma!', Environment, Expression], EvalValue).'pragma!' <br>   <br> 'print'(Message, EvalResult):- eval_H(['print', Message], EvalResult).'print' <br>   <br> 'nop'(Expression, EvalResult):- eval_H(['nop', Expression], EvalResult).'nop' <br>   <br> 'bind!'(Environment, Variable, Value):- eval_H(['bind!', Environment, Variable], Value).'bind!' <br>   <br> 'let'(Variable, Expression, Body, Result):- eval_H(['let', Variable, Expression, Body], Result).'let' <br>   <br> 'let*'(Bindings, Body, Result):- eval_H(['let*', Bindings, Body], Result).'let*' <br>   <br> 'get-type'(Value, Type):- eval_H(['get-type', Value], Type).'get-type' <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> metta_ontology.pfc.pl</i></b> <b>       canary</b>       src H:/metta-wam-main/src/canary <a onclick="prompt('copy path','H:/metta-wam-main/src/canary/metta_ontology.pfc.pl');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('srccanarymetta_ontology.pfc.pl')" style="cursor:pointer"> Open </a> <a onclick="close_div('srccanarymetta_ontology.pfc.pl')" style="cursor:pointer"> Close </a> <div id="srccanarymetta_ontology.pfc.pl" style="border: 1px solid black; " > properties('&corelib','if', [flow_control, qhelp("Conditional execution."), conditional_execution]).'if' <br>   <br> properties('&corelib','case', [flow_control, qhelp("Case selection."), conditional_execution]).'case' <br>   <br> properties('&corelib','let', [variable_assignment, qhelp("Variable assignment.")]).'let' <br>   <br> properties('&corelib','let*', [variable_assignment, qhelp("Sequential variable assignment."), sequential]).'let*' <br>   <br> properties('&corelib','function', [function_definition, qhelp("Function block.")]).'function' <br>   <br> properties('&corelib','return', [function_definition, qhelp("Return value of a function block."), return_value]).'return' <br>   <br> properties('&corelib','catch', [error_handling, qhelp("Catches exceptions."), exception_handling]).'catch' <br>   <br> properties('&corelib','throw', [error_handling, qhelp("Throws exceptions."), exception_handling]).'throw' <br>   <br> properties('&corelib','collapse', [data_structures, qhelp("Collapses a structure."), manipulation]).'collapse' <br>   <br> properties('&corelib','sequential', [data_structures, qhelp("Sequentially applies operations."), sequential_operations]).'sequential' <br>   <br> properties('&corelib','superpose', [data_structures, qhelp("Superposes data structures."), manipulation]).'superpose' <br>   <br> properties('&corelib','dedup!', [iteration_control, qhelp("Removes duplicate elements from iteration."), manipulation]).'dedup!' <br>   <br> properties('&corelib','limit!', [iteration_control, qhelp("Limits the number of iterations.")]).'limit!' <br>   <br> properties('&corelib','offset!', [iteration_control, qhelp("Adjusts the starting point of iteration.")]).'offset!' <br>   <br> properties('&corelib','number-of', [iteration_control, qhelp("Returns iteration count.")]).'number-of' <br>   <br> properties('&corelib','nop', [iteration_control, qhelp("Suppresses iteration result."), suppression]).'nop' <br>   <br> properties('&corelib','do', [iteration_control, qhelp("Suppresses iteration result."), suppression]).'do' <br>   <br> properties('&corelib','pragma!', [compiler_directive, qhelp("Compiler directive for optimizations/settings."), optimization]).'pragma!' <br>   <br> properties('&corelib','include!', [code_inclusion, qhelp("Includes code from another file or context.")]).'include!' <br>   <br> properties('&corelib','load-ascii', [file_handling, qhelp("Loads ASCII file content.")]).'load-ascii' <br>   <br> properties('&corelib','extend-py!', [integration, qhelp("Extends integration with Python."), python]).'extend-py!' <br>   <br> properties('&corelib','import!', [module_import, qhelp("Imports an external module or file.")]).'import!' <br>   <br> properties('&corelib','eval-for', [evaluation, qhelp("Evaluates assuming a return type."), type_assumption]).'eval-for' <br>   <br> properties('&corelib','call!', [dynamic_call, qhelp("Tries to dynamically guess if predicate or function.")]).'call!' <br>   <br> properties('&corelib','predicate-arity', [function_definition, qhelp("Defines the arity of predicates/functions."), arity]).'predicate-arity' <br>   <br> properties('&corelib','call-fn!', [dynamic_call, qhelp("Calls a function dynamically."), function]).'call-fn!' <br>   <br> properties('&corelib','call-string!', [evaluation, qhelp("Evaluates a string of Prolog code."), prolog_code]).'call-string!' <br>   <br> properties('&corelib','new-space', [memory_allocation, qhelp("Allocates new space or memory region.")]).'new-space' <br>   <br> properties('&corelib','transfer!', [memory_management, qhelp("Transfers space content to another space.")]).'transfer!' <br>   <br> properties('&corelib','coerce', [type_conversion, qhelp("Forces argument types for compatibility."), compatibility]).'coerce' <br>   <br> properties('&corelib','or', [logic, qhelp("Logical OR."), logical_or]).'or' <br>   <br> properties('&corelib','and', [logic, qhelp("Logical AND."), logical_and]).'and' <br>   <br> properties('&corelib','not', [logic, qhelp("Logical NOT."), logical_not]).'not' <br>   <br> properties('&corelib','repl!', [debugging, qhelp("Interactive read-eval-print loop."), interactive]).'repl!' <br>   <br> properties('&corelib','time!', [execution_timing, qhelp("Execution timing.")]).'time!' <br>   <br> properties('&corelib','trace!', [debugging, qhelp("Prints some debug information."), information_printing]).'trace!' <br>   <br> properties('&corelib','no-rtrace!', [debugging, qhelp("Disables tracing for debugging."), trace_control]).'no-rtrace!' <br>   <br> properties('&corelib','rtrace!', [debugging, qhelp("Enables tracing for debugging."), trace_control]).'rtrace!' <br>   <br> properties('&corelib','println!', [output, qhelp("Prints text with newline to output."), text_printing]).'println!' <br>   <br> properties('&corelib','with-output-to!', [output, qhelp("Redirects output to a specified target."), redirection]).'with-output-to!' <br>   <br> properties('&corelib','print', [output, qhelp("Prints text to output."), text_printing]).'print' <br>   <br> properties('&corelib','assertEqual', [testing, qhelp("Asserts a condition is true."), assertion]).'assertEqual' <br>   <br> properties('&corelib','assertFalse', [testing, qhelp("Asserts a condition is false."), assertion]).'assertFalse' <br>   <br> properties('&corelib','assertEqual', [testing, qhelp("Asserts two values are equal."), assertion]).'assertEqual' <br>   <br> properties('&corelib','assertNotEqual', [testing, qhelp("Asserts two values are not equal."), assertion]).'assertNotEqual' <br>   <br> properties('&corelib','assertEqualToResult', [testing, qhelp("Asserts equality to a result."), assertion]).'assertEqualToResult' <br>   <br> properties('&corelib','change-state!', [state_management, qhelp("Changes the state of a system component."), system_integration]).'change-state!' <br>   <br> properties('&corelib','get-state', [state_management, qhelp("Gets the state of a component or system."), data_retrieval]).'get-state' <br>   <br> properties('&corelib','car-atom', [list_operations, qhelp("Retrieves the head of a list."), head_retrieval]).'car-atom' <br>   <br> properties('&corelib','cdr-atom', [list_operations, qhelp("Retrieves the tail of a list."), tail_retrieval]).'cdr-atom' <br>   <br> properties('&corelib','range', [list_operations, qhelp("Generates a range of numbers."), range_generation]).'range' <br>   <br> properties('&corelib','make_list', [list_operations, qhelp("Creates a list with specified elements."), creation]).'make_list' <br>   <br> properties('&corelib','Cons', [list_operations, qhelp("Constructs a list."), construction]).'Cons' <br>   <br> properties('&corelib','length', [list_operations, qhelp("Determines the length of a list."), length_determination]).'length' <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> reverse-arithmetic.metta</i></b> <b>       bidirectional_computation</b>       features H:/metta-wam-main/tests/features/bidirectional_computation <a onclick="prompt('copy path','H:/metta-wam-main/tests/features/bidirectional_computation/reverse-arithmetic.metta');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('featuresbidirectional_computationreverse-arithmetic.metta')" style="cursor:pointer"> Open </a> <a onclick="close_div('featuresbidirectional_computationreverse-arithmetic.metta')" style="cursor:pointer"> Close </a> <div id="featuresbidirectional_computationreverse-arithmetic.metta" style="border: 1px solid black; " > ;; probes whether functions can be executed in reverse. This involves inferring the ;; input values from given output values through inverse operations or pattern matching, !(pragma! compile full) !(pragma! table false) (= (f $x) (* 2 $x)) !(print (match &self (= (f 1) $y) $y)) !(assertEqual (match &self (= (f 1) $y) $y) (superpose (2))) ; Expected Output: [2] !(print (match &self (= (f $x) 2) $x)) !(assertEqual (match &self (= (f $x) 2) $x) (superpose (1))) ; Expected Output: [1] (print <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> hyperon_experimental_issue_481.metta.answers</i></b> <b>       debugging</b>       features H:/metta-wam-main/tests/features/debugging <a onclick="prompt('copy path','H:/metta-wam-main/tests/features/debugging/hyperon_experimental_issue_481.metta.answers');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('featuresdebugginghyperon_experimental_issue_481.metta.answers')" style="cursor:pointer"> Open </a> <a onclick="close_div('featuresdebugginghyperon_experimental_issue_481.metta.answers')" style="cursor:pointer"> Close </a> <div id="featuresdebugginghyperon_experimental_issue_481.metta.answers" style="border: 1px solid black; " > Doing: timeout --foreground --kill-after=5 --signal=SIGINT 61 time metta /opt/logicmoo_workspace/packs_sys/logicmoo_opencog/MeTTa/hyperon-wam/reports/features/debugging/hyperon_experimental_issue_481.metta [False] [((Error (superpose Empty) superpose expects single expression as an argument))] [(Empty)] 0.07user 0.01system 0:00.08elapsed 100%CPU (0avgtext+0avgdata 33308maxresident)k 0inputs+0outputs (0major+3635minor)pagefaults 0swaps (superpose <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> use-one-server.metta</i></b> <b>       distributed-processing</b>       features H:/metta-wam-main/tests/features/distributed-processing <a onclick="prompt('copy path','H:/metta-wam-main/tests/features/distributed-processing/use-one-server.metta');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('featuresdistributed-processinguse-one-server.metta')" style="cursor:pointer"> Open </a> <a onclick="close_div('featuresdistributed-processinguse-one-server.metta')" style="cursor:pointer"> Close </a> <div id="featuresdistributed-processinguse-one-server.metta" style="border: 1px solid black; " > !(bind! &ps1 (eval-for $pid (process-create! (bash) (:: -c "MeTTa server1-with-some-data.metta server2-with-some-data.metta -G \'(create-vspace-server &self 3021)\')")) (:: (process $pid)))) !(assertEqualToResult (remote-eval "localhost:3021" (match &self (, ($obj is $prop) ($prop is-a Color) ($obj is-a Planet)) (Color of Planet $obj is $prop)) ((Color of Planet Mars is Red))) !(process-kill! &ps1) (eval-for <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> ioioioi_using_equality.metta.answers</i></b> <b>       multidirectional</b>       features H:/metta-wam-main/tests/features/multidirectional <a onclick="prompt('copy path','H:/metta-wam-main/tests/features/multidirectional/ioioioi_using_equality.metta.answers');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('featuresmultidirectionalioioioi_using_equality.metta.answers')" style="cursor:pointer"> Open </a> <a onclick="close_div('featuresmultidirectionalioioioi_using_equality.metta.answers')" style="cursor:pointer"> Close </a> <div id="featuresmultidirectionalioioioi_using_equality.metta.answers" style="border: 1px solid black; " > [(Error (assertEqualToResult (let $_ (append (Cons 1 (Cons 2 Nil)) (Cons 3 (Cons 4 Nil)) $Out) $Out) ((Cons 1 (Cons 2 (Cons 3 (Cons 4 Nil)))))) Expected: [(Cons 1 (Cons 2 (Cons 3 (Cons 4 Nil))))] Got: [(Cons 1 (Cons 2 $R#36))] Missed result: (Cons 1 (Cons 2 (Cons 3 (Cons 4 Nil)))))] 0.06user 0.01system 0:00.08elapsed 98%CPU (0avgtext+0avgdata 34488maxresident)k 0inputs+0outputs (0major+3839minor)pagefaults 0swaps (let <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> composing.metta</i></b> <b>       structures</b>       features H:/metta-wam-main/tests/features/structures <a onclick="prompt('copy path','H:/metta-wam-main/tests/features/structures/composing.metta');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('featuresstructurescomposing.metta')" style="cursor:pointer"> Open </a> <a onclick="close_div('featuresstructurescomposing.metta')" style="cursor:pointer"> Close </a> <div id="featuresstructurescomposing.metta" style="border: 1px solid black; " > ; insert an argument into a compound term.. 0= functor, 1 = arg1 etc (= (insert-at $nth $item $list) (collapse (limit $nth (superpose $list)) $item (ofset $nth (superpose $list)))) ; call a relation making $nth the return value (= (renth $nth $list) (let $call (insert-at $nth $retval $list) (match &self (call! $call) $ret))) (let <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> enforced-types.metta</i></b> <b>       typed-variables</b>       features H:/metta-wam-main/tests/features/typed-variables <a onclick="prompt('copy path','H:/metta-wam-main/tests/features/typed-variables/enforced-types.metta');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('featurestyped-variablesenforced-types.metta')" style="cursor:pointer"> Open </a> <a onclick="close_div('featurestyped-variablesenforced-types.metta')" style="cursor:pointer"> Close </a> <div id="featurestyped-variablesenforced-types.metta" style="border: 1px solid black; " > ; ============================================================= ; Purpose: Define predicate 'is-even' to check if a number is even. ; Operation: Uses modulo operator to determine if a number is divisible by 2 without remainder. ; Usage: General utility function for checking evenness of numbers. ; ============================================================= ; Define 'is-even' predicate (: is-even (-> Number Bool)) (= (is-even $X) (== (% $X 2) 0)) (= (: $v EvenNumber) (if (is-even $v) () (empty))) !(assertEqual (sequential ((== (get-type $even) EvenNumber) (let $even (superpose (1 2 3 4 5 6)) $even)) (superpose (2 4 6))) (let <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> even-number.metta</i></b> <b>       typed-variables</b>       features H:/metta-wam-main/tests/features/typed-variables <a onclick="prompt('copy path','H:/metta-wam-main/tests/features/typed-variables/even-number.metta');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('featurestyped-variableseven-number.metta')" style="cursor:pointer"> Open </a> <a onclick="close_div('featurestyped-variableseven-number.metta')" style="cursor:pointer"> Close </a> <div id="featurestyped-variableseven-number.metta" style="border: 1px solid black; " > (: is-even (-> Number Bool)) (= (is-even $X) (== (% $X 2) 0)) (= (fail-not-even $v) (if (is-even $v) () (empty))) !(superpose ; using nop to hide results (nop (freeze! $even fail-not-even)) ; freeze (terible name chosen by Furtwidth)) (assertEqual ; nondetermisticaly implants coide that will accept or reject bindings (let $even (superpose (1 2 3 4 5 6)) $even) (superpose (2 4 6)))) (let <br>   <br> </div> <br>   <br> <br>   <br> *** <i><b> even-number.metta.answers</i></b> <b>       typed-variables</b>       features H:/metta-wam-main/tests/features/typed-variables <a onclick="prompt('copy path','H:/metta-wam-main/tests/features/typed-variables/even-number.metta.answers');" style="cursor: pointer"> Fullpath </a> <br> <a onclick="open_div('featurestyped-variableseven-number.metta.answers')" style="cursor:pointer"> Open </a> <a onclick="close_div('featurestyped-variableseven-number.metta.answers')" style="cursor:pointer"> Close </a> <div id="featurestyped-variableseven-number.metta.answers" style="border: 1px solid black; " > Doing: timeout --foreground --kill-after=5 --signal=SIGINT 61 time metta /opt/logicmoo_workspace/packs_sys/logicmoo_opencog/MeTTa/hyperon-wam/reports/features/typed-variables/even-number.metta [(Error (superpose (nop (freeze! $even fail-not-even)) (assertEqual (let $even (superpose (1 2 3 4 5 6)) $even) (superpose (2 4 6)))) IncorrectNumberOfArguments)] 0.06user 0.01system 0:00.07elapsed 98%CPU (0avgtext+0avgdata 33400maxresident)k 0inputs+0outputs (0major+3654minor)pagefaults 0swaps (let <br>   <br> </div> </pre>