The current version of the ATS language apparently uses libgmp to avoid the mentioned overflow issue: http://sourceforge.net/p/ats-lang/mailman/message/30692243/ .
semantics : programs :: differential equations : physical states.
A lambda calculus is a calculus for programs with first-class functions :) term := x -- var
| \x . t -- lambda abstraction
| t1 t2 -- application
| n -- natural number
| div n1 n2
and let's call a term a value if it's "fully evaluated" according to our not-yet-existent semantics; i.e., either a number or a lambda. f := \x . div 1 0
to diverge when applied to any argument, so any semantics for our calculus should capture that somehow. n/m = p
------------
div n m -> p
(I've evilly conflated mathematical numbers with their syntactic representation in our language.) t -> t'
---------------------
div t t2 -> div t' t2
t2 -> t2'
---------------------
div v t2 -> div v t2'
If we had added an error term, we'd also add the following rule: ----------------
div n 0 -> error
(Exercise: what happens if we wrote "div t 0", as I did in an earlier edit?) t1 -> t1'
---------------
t1 t2 -> t1' t2
There are more rules for substitution and for reducing the argument (the usual choice gives strict semantics, but other choices are possible). f v
-> div 1 0 -- by substitution rule
stuck! (i.e., no rule applies)
If we'd added an error rule, we'd get instead -> error
There's a bit more work to show f t gets stuck (gives error) for all terms t - maybe an induction or something, right? But wait! That's not actually true! What if t is a nonterminating function call? What about f x (x is a variable)? Then we have a free variable in the program, and again get stuck! f v -> .... -> f v
in only a few steps. Then, we'd use our proof that "->" is deterministic (i.e., a partial function from terms to terms) to conclude that f v never reduces to a value, since otherwise one of the terms in the loop above would be a value also, but none of them are. qed