Matches in DBpedia 2014 for { <http://dbpedia.org/resource/Total_functional_programming> ?p ?o. }
Showing items 1 to 27 of
27
with 100 items per page.
- Total_functional_programming abstract "Total functional programming (also known as strong functional programming, to be contrasted with ordinary, or weak functional programming) is a programming paradigm that restricts the range of programs to those that are provably terminating.Termination is guaranteed by the following restrictions: A restricted form of recursion, which operates only upon ‘reduced’ forms of its arguments, such as Walther recursion, substructural recursion, or "strongly normalizing" as proven by abstract interpretation of code. Every function must be a total (as opposed to partial) function. That is, it must have a definition for everything inside its domain. There are several possible ways to extend commonly used partial functions such as division to be total: choosing an arbitrary result for inputs on which the function is normally undefined (such as for division); adding another argument to specify the result for those inputs; or excluding them by use of type system features such as refinement types.These restrictions mean that total functional programming is not Turing-complete. However, the set of algorithms that can be used is still huge. For example, any algorithm for which an asymptotic upper bound can be calculated (by a program that itself only uses Walther recursion) can be trivially transformed into a provably-terminating function by using the upper bound as an extra argument decremented on each iteration or recursion.For example, quicksort is not trivially shown to be substructural recursive, but it only recurs to a maximum depth of the length of the vector (in the worst-case O(n^2) case). A quicksort implementation on lists (which would be rejected by a substructural recursive checker) is:qsort [] = []qsort [a] = [a]qsort (a:as) = let (lesser, greater) = partition a as in qsort lesser ++ [a] ++ qsort greaterTo make it substructural recursive using the length of the vector as a limit, we could do:qsort x = qsortSub x x-- minimum caseqsortSub [] as = as -- shows termination-- standard qsort casesqsortSub (l:ls) [] = [] -- nonrecursive, so acceptedqsortSub (l:ls) [a] = [a] -- nonrecursive, so acceptedqsortSub (l:ls) (a:as) = let (lesser, greater) = partition a as -- recursive, but recurs on ls, which is a substructure of -- its first input. in qsortSub ls lesser ++ [a] ++ qsortSub ls greaterSome classes of algorithms that have no theoretical upper bound but have a practical upper bound (for example, some heuristic-based algorithms) can be programmed to "give up" after so many recursions, also ensuring termination.Another outcome of total functional programming is that both strict evaluation and lazy evaluation result in the same behaviour, in principle; however, one or the other may still be preferable (or even required) for performance reasons.In total functional programming, a distinction is made between data and codata—the former is finitary, while the latter is potentially infinite. Such potentially infinite data structures are used for applications such as I/O. Using codata entails the usage of such operations as corecursion. However, it is possible to do I/O in a total functional programming language (with dependent types) also without codata.Both Epigram and Charity could be considered total functional programming languages, even though they don't work in the way Turner specifies in his paper. So could programming directly in plain System F, in Martin-Löf type theory or the Calculus of Constructions.".
- Total_functional_programming wikiPageID "11599902".
- Total_functional_programming wikiPageRevisionID "600624563".
- Total_functional_programming hasPhotoCollection Total_functional_programming.
- Total_functional_programming subject Category:Functional_programming.
- Total_functional_programming subject Category:Programming_paradigms.
- Total_functional_programming subject Category:Proof_assistants.
- Total_functional_programming type Assistant109815790.
- Total_functional_programming type CausalAgent100007347.
- Total_functional_programming type LivingThing100004258.
- Total_functional_programming type Object100002684.
- Total_functional_programming type Organism100004475.
- Total_functional_programming type Person100007846.
- Total_functional_programming type PhysicalEntity100001930.
- Total_functional_programming type ProofAssistants.
- Total_functional_programming type Whole100003553.
- Total_functional_programming type Worker109632518.
- Total_functional_programming type YagoLegalActor.
- Total_functional_programming type YagoLegalActorGeo.
- Total_functional_programming comment "Total functional programming (also known as strong functional programming, to be contrasted with ordinary, or weak functional programming) is a programming paradigm that restricts the range of programs to those that are provably terminating.Termination is guaranteed by the following restrictions: A restricted form of recursion, which operates only upon ‘reduced’ forms of its arguments, such as Walther recursion, substructural recursion, or "strongly normalizing" as proven by abstract interpretation of code. ".
- Total_functional_programming label "Total functional programming".
- Total_functional_programming sameAs m.02rl3rf.
- Total_functional_programming sameAs Q17146827.
- Total_functional_programming sameAs Q17146827.
- Total_functional_programming sameAs Total_functional_programming.
- Total_functional_programming wasDerivedFrom Total_functional_programming?oldid=600624563.
- Total_functional_programming isPrimaryTopicOf Total_functional_programming.