-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement an interpreter for atomese programs #18
Comments
@Bitseat I appreciate you taking the steps to writing that issue, however I think we'll begin with a different road, that I'll explain below. But first let me make a few corrections
So now with my simpler suggestion: Directly write the interpreter in C++, define in a recursive manner, in the spirit of the Combo' Instead of using the representation (Set
(List (Node "r1") (Number 1))
(List (Node "r2") (Number 1))
(List (Node "r3") (Number 0))) use directly the list of output values using the proto atom I know that this somewhat contradictory to what I had suggested before, and it is because it ignores the reasoning aspect. However I think it's a better road to take. First it will give us a very efficient Atomese interpreter (possibly even more efficient than Combo's if subprogram memoization is enabled), and reasoning capabilities can be added later on (using the kind of representation I have initially suggested) when the port has reached the desired level of maturity. |
I was particularly concerned about the reasoning aspect because I wanted to be sure the decisions we take today are compatible with the long term vision, I see things more clearly now thus the change of plan for the interpreter. |
Thank you Nil. @kasimebrahim I hope this will give you some insight into the code you're writing. |
The task here is to implement an atomese interpreter program to execute such programs
(Plus (Schema "i1") (Schema "i2"))
(times (Schema "i1") (Schema "i2"))
etc and represent the result.given an input-table of
present the result of
in the format
Proposed approach
define a plus/times function which takes two arguments (two specified schemas)
A program that auto generates a program for each feature variables.
The above program is expected to generate programs like
which return the specified schema value for each row.
an attempt has been made by defining a function for the number of featurevariables. Both approaches don't seem to be efficient though.
problems with the proposed approach
The program can handle any two schemas but not three or four. For example
(cog-execute! (Plus "Schema-i1" "Schema-i2" "Schema-i3")))
can not be handled.
Questions
Is there any way to define a function with unknown number of arguments?
Are programs like
(cog-execute! (Plus "Schema-i1" (Times "Schema-i2" "Schema-i3")))
are expected to work?The text was updated successfully, but these errors were encountered: