# HG changeset patch # User Yasutaka Higa # Date 1424352148 -32400 # Node ID 8d1325911030e6b2310a78f59eb6e12552005392 # Parent 65fdfe9c3997d99a178ec9c79bebdd204a6902a8 Mini fixes diff -r 65fdfe9c3997 -r 8d1325911030 english_presentation/slide.md --- a/english_presentation/slide.md Thu Feb 19 20:24:16 2015 +0900 +++ b/english_presentation/slide.md Thu Feb 19 22:22:28 2015 +0900 @@ -12,14 +12,14 @@ # Formalization using Monad * Monad is a notion of Category theory * Monad represents meta computations in functional programming languages -* We proposed delta monad representation of program modifications +* We proposed Delta Monad representation of program modifications * We give definitions and the proof -* Delta monad can be used with other monads +* Delta Monad can be used with other monads # Merits of formalizing program modifications * Formal methods give verification of program based on mathematics and logics * Such as lambda calculus and corresponding proofs -* Moggi[1990] , introduce Monad as notion of meta computation in program +* Moggi[1989] , introduce Monad as notion of meta computation in program * A meta computation represented as a Monad has one to one mapping * We define program modification as meta computation which includes all modifications @@ -50,8 +50,8 @@ * ``data`` is a data type definition in Haskell * `` a `` is a type variable -* `` Mono a`` has a type `` Delta a`` -* `` Delta a (Delta a) `` has a type ``Delta a`` +* `` Mono a`` and `` Delta a (Delta a) `` has a type `` Delta a`` +* Delta can be stores all modification like list structure # How to define meta computation in Haskell * original function : f :: a -> b @@ -80,7 +80,7 @@ * Gives Delta Monad representation of the versions * Various computation can be possible in the Delta -# numberCount (Version 1) +# An Example Program: numberCount (Version 1) ``` generator x = [1..x] @@ -90,7 +90,7 @@ numberCount x = count (numberFilter (generator x)) ``` -# numberCount (Version 2) +# An Example Program: numberCount (Version 2) ``` generator x = [1..x] @@ -110,10 +110,22 @@ numberCount x = count =<< numberFilter =<< generator x ``` -# Combine Delta Monad and other Monads -* TODO +# Execution Program includes two version +* result + * Version 1 : 168 + * Version 2 : 500 -# Example +``` +*Main> numberCount 1000 +Delta 500 (Mono 168) +``` + +# Combine Delta Monad with other Monads +* Delta Monad can be used with other monads +* Meta computations can be added function to Delta + * Exception, Logging , I/O + +# An Example Delta Monad with Traces ``` *Main> numberCountM 10 DeltaM (Delta (Writer (4, ["[1,2,3,4,5,6,7,8,9,10]",