Praline a programming language for primitive recursive arithmetic
Download
1 / 11

PRALine A programming language for primitive recursive arithmetic - PowerPoint PPT Presentation


  • 146 Views
  • Uploaded on

PRALine A programming language for primitive recursive arithmetic. Ben Braun, Joe Rogers The University of Texas at Austin November 28, 2012. Why primitive recursive arithmetic?. Primitive recursive arithmetic is consistent. Many functions over natural numbers are primitive recursive:.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'PRALine A programming language for primitive recursive arithmetic' - jonco


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Praline a programming language for primitive recursive arithmetic

PRALineA programming language for primitive recursive arithmetic

Ben Braun, Joe Rogers

The University of Texas at Austin

November 28, 2012


Why primitive recursive arithmetic
Why primitive recursive arithmetic?

  • Primitive recursive arithmetic is consistent.

  • Many functions over natural numbers are primitive recursive:

ADD, MULTIPLY, EXPONENT, LESS-THAN, GREATER-THAN, FACTORIAL, PREDECESSOR, MINIMUM, MAXIMUM, ABS, SIGN, EQUALS, MOD,

DIVISIBLE, IS-PRIME, …

Proof in G. Gentzen, 1936. 'Die Widerspruchfreiheit der reinenZahlentheorie'. MathematischeAnnalen, 112:493–565. Translated as 'The consistency of arithmetic', in (M. E. Szabo 1969).


Objective
Objective

  • Develop a language, PRALine, for expressing primitive recursive arithmetic

  • Develop tools which output proofs for primitive recursive arithmetic queries


Example
Example

Output

PRALine code

Defadd as

(x 0 x)

(x y' (x y add)')

end

eval (2 3 add)

(2 0 2) in add

(2 1 3) in add

(2 2 4) in add

(2 3 5) in add

Successor


Example

Defadd as

(x 0 x)

(x y' (x y add)')

end

eval (2 3 add)




Live demo
Live demo

DefLT as

(x 0 0)

(0 x 1)

(x' y' (x y LT))

end


Relational notation pr
Relational notation ⊇ PR

  • Relational notation can describe functions which are not strictly primitive recursive, such as the Ackermann function:

DefAckermann as

(0 n n’)

(m’ 0 (m 1 Ackermann))

(m’ n’ (m (m’ n Ackermann) Ackermann))

end

Proof that the Ackermann function is not PR: Doetzel, G. “A function to End All Functions.” Algorithm: Recreational Programming 2.4, 16-17, 1991.


Conclusions
Conclusions

  • The PRALine language expresses functions in Relational Notation

  • We present tools which can verifiably compute a query expressed in PRALine

  • The code is designed to be extensible


Future work
Future Work

  • Check that all functions are strictly primitive recursive

  • Add lists to the language (where list lengths known at compile time)

  • Emitting to different languages, especially those that support tail recursion, to allow larger computations