Paramorphism
   HOME
*





Paramorphism
In formal methods of computer science, a paramorphism (from Greek '' παρά'', meaning "close together") is an extension of the concept of catamorphism first introduced by Lambert Meertens to deal with a form which “eats its argument and keeps it too”, as exemplified by the factorial function. Its categorical dual is the apomorphism. It is a more convenient version of catamorphism in that it gives the combining step function immediate access not only to the result value recursively computed from each recursive subobject, but the original subobject itself as well. Example Haskell implementation, for lists: cata :: (a -> b -> b) -> b -> -> b para :: (a -> ( b) -> b) -> b -> -> b ana :: (b -> (a, b)) -> b -> apo :: (b -> (a, Either b)) -> b -> cata f b (a:as) = f a (cata f b as) cata _ b [] = b para f b (a:as) = f a (as, para f b as) para _ b [] = b ana u b = case u b of (a, b') -> a : ana u b' apo u b = case u b of ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Catamorphism
In category theory, the concept of catamorphism (from the Ancient Greek: "downwards" and "form, shape") denotes the unique homomorphism from an initial algebra into some other algebra. In functional programming, catamorphisms provide generalizations of '' folds'' of lists to arbitrary algebraic data types, which can be described as initial algebras. The dual concept is that of anamorphism that generalize ''unfolds''. A hylomorphism is the composition of an anamorphism followed by a catamorphism. Definition Consider an initial F-algebra (A, in) for some endofunctor F of some category into itself. Here in is a morphism from FA to A. Since it is initial, we know that whenever (X, f) is another F-algebra, i.e. a morphism f from FX to X, there is a unique homomorphism h from (A, in) to (X, f). By the definition of the category of F-algebra, this h corresponds to a morphism from A to X, conventionally also denoted h, such that h \circ in = f \circ Fh. In the context of F-algebra, ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Apomorphism
In formal methods of computer science, an apomorphism (from '' ἀπό'' — Greek for "apart") is the categorical dual of a paramorphism and an extension of the concept of anamorphism (coinduction). Whereas a paramorphism models primitive recursion over an inductive data type, an apomorphism models primitive corecursion over a coinductive data type. Origins The term "apomorphism" was introduced in ''Functional Programming with Apomorphisms (Corecursion)''. See also * Morphism * Morphisms of F-algebras ** From an initial algebra to an algebra: Catamorphism ** From a coalgebra to a final coalgebra: Anamorphism ** An anamorphism followed by an catamorphism: Hylomorphism Hylomorphism (also hylemorphism) is a philosophical theory developed by Aristotle, which conceives every physical entity or being (''ousia'') as a compound of matter (potency) and immaterial form (act), with the generic form as immanently real ... ** Extension of the idea of catamorphisms: Paramorphism R ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Catamorphism
In category theory, the concept of catamorphism (from the Ancient Greek: "downwards" and "form, shape") denotes the unique homomorphism from an initial algebra into some other algebra. In functional programming, catamorphisms provide generalizations of '' folds'' of lists to arbitrary algebraic data types, which can be described as initial algebras. The dual concept is that of anamorphism that generalize ''unfolds''. A hylomorphism is the composition of an anamorphism followed by a catamorphism. Definition Consider an initial F-algebra (A, in) for some endofunctor F of some category into itself. Here in is a morphism from FA to A. Since it is initial, we know that whenever (X, f) is another F-algebra, i.e. a morphism f from FX to X, there is a unique homomorphism h from (A, in) to (X, f). By the definition of the category of F-algebra, this h corresponds to a morphism from A to X, conventionally also denoted h, such that h \circ in = f \circ Fh. In the context of F-algebra, ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Anamorphism
In computer programming, an anamorphism is a function that generates a sequence by repeated application of the function to its previous result. You begin with some value A and apply a function f to it to get B. Then you apply f to B to get C, and so on until some terminating condition is reached. The anamorphism is the function that generates the list of A, B, C, etc. You can think of the anamorphism as unfolding the initial value into a sequence. The above layman's description can be stated more formally in category theory: the anamorphism of a coinductive type denotes the assignment of a coalgebra to its unique morphism to the final coalgebra of an endofunctor. These objects are used in functional programming as '' unfolds''. The categorical dual (aka opposite) of the anamorphism is the catamorphism. Anamorphisms in functional programming In functional programming, an anamorphism is a generalization of the concept of '' unfolds'' on coinductive lists. Formally, anamorph ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Hylomorphism (computer Science)
In computer science, and in particular functional programming, a hylomorphism is a recursive function, corresponding to the composition of an anamorphism (which first builds a set of results; also known as 'unfolding') followed by a catamorphism (which then folds these results into a final return value). Fusion of these two recursive computations into a single recursive pattern then avoids building the intermediate data structure. This is an example of deforestation, a program optimization strategy. A related type of function is a metamorphism, which is a catamorphism followed by an anamorphism. Formal definition A hylomorphism h : A \rightarrow C can be defined in terms of its separate anamorphic and catamorphic parts. The anamorphic part can be defined in terms of a unary function g : A \rightarrow B \times A defining the list of elements in B by repeated application (''"unfolding"''), and a predicate p : A \rightarrow \text providing the terminating condition. The catamorph ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Apomorphism
In formal methods of computer science, an apomorphism (from '' ἀπό'' — Greek for "apart") is the categorical dual of a paramorphism and an extension of the concept of anamorphism (coinduction). Whereas a paramorphism models primitive recursion over an inductive data type, an apomorphism models primitive corecursion over a coinductive data type. Origins The term "apomorphism" was introduced in ''Functional Programming with Apomorphisms (Corecursion)''. See also * Morphism * Morphisms of F-algebras ** From an initial algebra to an algebra: Catamorphism ** From a coalgebra to a final coalgebra: Anamorphism ** An anamorphism followed by an catamorphism: Hylomorphism Hylomorphism (also hylemorphism) is a philosophical theory developed by Aristotle, which conceives every physical entity or being (''ousia'') as a compound of matter (potency) and immaterial form (act), with the generic form as immanently real ... ** Extension of the idea of catamorphisms: Paramorphism R ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Formal Methods
In computer science, formal methods are mathematically rigorous techniques for the specification, development, and verification of software and hardware systems. The use of formal methods for software and hardware design is motivated by the expectation that, as in other engineering disciplines, performing appropriate mathematical analysis can contribute to the reliability and robustness of a design. Formal methods employ a variety of theoretical computer science fundamentals, including logic calculi, formal languages, automata theory, control theory, program semantics, type systems, and type theory. Background Semi-Formal Methods are formalisms and languages that are not considered fully “formal”. It defers the task of completing the semantics to a later stage, which is then done either by human interpretation or by interpretation through software like code or test case generators. Taxonomy Formal methods can be used at a number of levels: Level 0: Formal specificati ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Computer Science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (including the design and implementation of hardware and software). Computer science is generally considered an area of academic research and distinct from computer programming. Algorithms and data structures are central to computer science. The theory of computation concerns abstract models of computation and general classes of problems that can be solved using them. The fields of cryptography and computer security involve studying the means for secure communication and for preventing security vulnerabilities. Computer graphics and computational geometry address the generation of images. Programming language theory considers different ways to describe computational processes, and database theory concerns the management of repositories o ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Greek (language)
Greek ( el, label= Modern Greek, Ελληνικά, Elliniká, ; grc, Ἑλληνική, Hellēnikḗ) is an independent branch of the Indo-European family of languages, native to Greece, Cyprus, southern Italy ( Calabria and Salento), southern Albania, and other regions of the Balkans, the Black Sea coast, Asia Minor, and the Eastern Mediterranean. It has the longest documented history of any Indo-European language, spanning at least 3,400 years of written records. Its writing system is the Greek alphabet, which has been used for approximately 2,800 years; previously, Greek was recorded in writing systems such as Linear B and the Cypriot syllabary. The alphabet arose from the Phoenician script and was in turn the basis of the Latin, Cyrillic, Armenian, Coptic, Gothic, and many other writing systems. The Greek language holds a very important place in the history of the Western world. Beginning with the epics of Homer, ancient Greek literature includes many works of las ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Lambert Meertens
Lambert Guillaume Louis Théodore Meertens or L.G.L.T. Meertens (born 10 May 1944, in Amsterdam) is a Dutch computer scientist and professor. , he is a researcher at the Kestrel Institute, a nonprofit computer science research center in Palo Alto's Stanford Research Park. Life and career As a student at the Ignatius Gymnasium in Amsterdam, Meertens designed a computer with Kees Koster, a classmate. In the 1960s, Meertens applied affix grammars to the description and composition of music, and obtained a special prize from the jury at the 1968 International Federation for Information Processing (IFIP) Congress in Edinburgh for his computer-generated string quartet, Quartet No. 1 in C major for 2 violins, viola and violoncello, based on the first non- context-free affix grammar. The string quartet was published in 1968, as ''Mathematical Centre Report MR 96''. Meertens was one of the editors of the Revised ALGOL 68 Report. He was the originator and one of the designers of the p ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Philip Wadler
Philip Lee Wadler (born April 8, 1956) is an American computer scientist known for his contributions to programming language design and type theory. He is the chair of Theoretical Computer Science at the Laboratory for Foundations of Computer Science at School of Informatics, University of Edinburgh. He has contributed to the theory behind functional programming and the use of monads in functional programming, the design of the purely functional language Haskell, and the XQuery declarative query language. In 1984, he created the Orwell programming language. Wadler was involved in adding generic types to Java 5.0. He is also author of the paper ''Theorems for free!'' that gave rise to much research on functional language optimization (see also Parametricity). Education Wadler received a Bachelor of Science degree in mathematics from Stanford University in 1977, and a Master of Science degree in Computer Science from Carnegie Mellon University in 1979. He completed his Doct ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]