Programming Language Theory: Difference between revisions

No edit summary
Line 4: Line 4:
* Formal functional system (<tt>ffp</tt>): Extensible functional forms, functions represented by objects, translation of object representation to applicable form, formal semantics
* Formal functional system (<tt>ffp</tt>): Extensible functional forms, functions represented by objects, translation of object representation to applicable form, formal semantics
* Applicative state transition system (<tt>ast</tt>): <tt>ffp</tt> plus mutable state and coarse-grained operations thereupon
* Applicative state transition system (<tt>ast</tt>): <tt>ffp</tt> plus mutable state and coarse-grained operations thereupon
===Combinatory Logic===
===Untyped λ-calculus===
===Untyped λ-calculus===
Two operators (function ''definition'' and ''application'') upon one operand type (λ-expression).
Two operators (function ''definition'' and ''application'') upon one operand type (λ-expression).
* Function definition: <tt>(λ''boundparam''. body)</tt>
* Function definition: <tt>(λ''boundparam''. body)</tt>
* Function application: <tt>function(''actualparam'')</tt>
* Function application: <tt>function(''actualparam'')</tt>
The body is made up of ''free'' and ''bound'' variables. Those not present in the λ's list of bound variables are free. A λ-expression with no free variables is ''closed'' (closed expressions are equivalent in power to [http://en.wikipedia.org/wiki/Combinatory_logic combinatory logic]).  
The body is made up of ''free'' and ''bound'' variables. Those not present in the λ's list of bound variables are free. A λ-expression with no free variables is ''closed'' (closed expressions are equivalent in power to [[Programming_Language_Theory#Combinatory_Logic|combinatory logic]]).  


The integers (or any countably infinite set) can be represented via the [http://en.wikipedia.org/wiki/Church_encoding Church encoding] (or [http://en.wikipedia.org/wiki/Mogensen-Scott_encoding Mogensen-Scott], or others):
The integers (or any countably infinite set) can be represented via the [http://en.wikipedia.org/wiki/Church_encoding Church encoding] (or [http://en.wikipedia.org/wiki/Mogensen-Scott_encoding Mogensen-Scott], or others):