[Attempto] Representing code (C++ etc)

Theodore H. Smith delete at elfdata.com
Mon Jan 30 19:43:36 CET 2012


Hi everyone,

It's my first post here. I was very interested in representing concepts in a formal, computable form. So I asked some questions and found this place!

How does attempto handle representing code. Let's say a simple function:

int GCD(int a, int b) {
// calculates the greatest common divisor of two numbers.
  if (b > a) { goto b_larger; }
  
  while (true) {
    a = a % b;
    if (a = 0) return b;
    b_larger:;
    b = b % a;
    if (b = 0) return a;
  } 
 }


How would you describe that in attempto?

I think describing code is very important. Doing reasoning about code could achieve many things, the smallest and most obvious of things would be to help eliminate bugs in code ;)

Also, could attempto ever get the ability to RUN code? Not just describe code, but run it. I mean, it stands to reason, that if you can describe code, the next step is to give the ability to run it?

--
http://angelcog.org/
"A true logic processing language." (currently under development)



More information about the attempto mailing list