| … | … | @@ -4,11 +4,29 @@ |
| 4 | 4 | (use-modules (opencog)) |
| 5 | 5 | |
| 6 | 6 | (define get-all-types |
| 7 | | (Query |
| 7 | (Query |
| 8 | 8 | (Variable "$atom") ; vardecl |
| 9 | 9 | (Variable "$atom") ; match anything |
| 10 | | (TypeOf (Variable "$atom")) ; rewrite |
| 10 | (TypeOf (DontExec (Variable "$atom"))) ; rewrite |
| 11 | 11 | )) |
| 12 | 12 | |
| 13 | 13 | (cog-execute! get-all-types) |
| 14 | 14 | |
| 15 | (define get-all-atoms |
| 16 | (Meet |
| 17 | (Variable "$atom") ; vardecl |
| 18 | (Variable "$atom") ; match anything |
| 19 | )) |
| 20 | |
| 21 | (cog-execute! get-all-atoms) |
| 22 | |
| 23 | (define get-all-queries |
| 24 | (Query |
| 25 | (TypedVariable (Variable "$atom") (Type 'Query)) |
| 26 | (Variable "$atom") ; match anything |
| 27 | (DontExec (Variable "$atom")) ; rewrite |
| 28 | )) |
| 29 | |
| 30 | (cog-execute! get-all-queries) |
| 31 | |
| 32 | |