Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Semantics by lub's of Approximations fact
 

Summary: Semantics by lub's of Approximations
fact :: Int -> Int
fact = \x -> if x <= 0 then 1 else fact(x-1) * x
Regard non-recursively defined approximations
fact0 = \x -> bot
fact1 = \x -> if x <= 0 then 1 else fact0(x - 1) x
fact2 = \x -> if x <= 0 then 1 else fact1(x - 1) x
. . .
Thus: facti+1 = ff facti where
ff :: (Int -> Int) -> (Int -> Int)
ff g = \x -> if x <= 0 then 1 else g(x-1) * x
Define semantics fact of fact as
fact = {fact0, fact1, . . .} = {ff i
() | i IN}
Semantics by Least Fixpoints
fact :: Int -> Int
fact = \x -> if x <= 0 then 1 else fact(x-1) * x
Semantics fact of fact should satisfy the defining equation
fact = \x -> if x <= 0 then 1 else fact(x - 1) x
ff (fact)

  

Source: Ábrahám, Erika - Fachgruppe Informatik, Rheinisch Westfälische Technische Hochschule Aachen (RWTH)

 

Collections: Computer Technologies and Information Sciences