[Attempto] Representing code (C++ etc)

Theodore H. Smith delete at elfdata.com
Mon Jan 30 20:47:28 CET 2012


I understand, but code can (clumsily) be expressed in English.

"function GCD has parameters a as integer, and b as integer"
"function GCD returns an integer"
"line 1 of function GCD states that "if b is larger than a, jump to label b_larger""

Really, the root of my question is: "Can attempto describe everything that can be described in English"

If you can describe code in English, and attempto can describe everything that English can describe, then attempto can describe code. Right?


On 30 Jan 2012, at 18:53, Brad Cox wrote:

> No parenthesis, braces, brackets. None. Think about it.
> 
> On Mon, Jan 30, 2012 at 1:43 PM, Theodore H. Smith <delete at elfdata.com> wrote:
> 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)
> 
> _______________________________________________
> attempto mailing list
> attempto at lists.ifi.uzh.ch
> https://lists.ifi.uzh.ch/listinfo/attempto
> 
> 
> 
> -- 
> Cell: 703-594-1883
> Blog: http://bradjcox.blogspot.com
> Web: http://virtualschool.edu
> Manassas VA 20111
> 

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



More information about the attempto mailing list