inductive program synthesis for bidirectional
play

Inductive Program Synthesis for Bidirectional Transformations - PowerPoint PPT Presentation

Inductive Program Synthesis for Bidirectional Transformations Tobias G odderz, Helmut Grohne, Janis Voigtl ander University of Bonn Dagstuhl Seminar 15442 Bidirectional Transformation source view get s v v s 1 1/4


  1. Inductive Program Synthesis for Bidirectional Transformations Tobias G¨ odderz, Helmut Grohne, Janis Voigtl¨ ander University of Bonn Dagstuhl Seminar 15442

  2. Bidirectional Transformation source view get s v v ′ s ′ 1 – 1/4

  3. Bidirectional Transformation source view get s v update v ′ s ′ 1 – 2/4

  4. Bidirectional Transformation source view get s v update v ′ s ′ put 1 – 3/4

  5. Bidirectional Transformation source view get s v update v ′ s ′ put 1 – 4/4

  6. Bidirectional Transformation Examples: tail “abc” “bc” “ade” “de” 2 – 5/13

  7. Bidirectional Transformation Examples: tail “abc” “bc” update “ade” “de” 2 – 6/13

  8. Bidirectional Transformation Examples: tail “abc” “bc” update “ade” “de” put 2 – 7/13

  9. Bidirectional Transformation Examples: flatten “abac” ‘a’ ‘b’ ‘a’ ‘c’ “abxc” ‘a’ ‘b’ ‘x’ ‘c’ 2 – 8/13

  10. Bidirectional Transformation Examples: flatten “abac” ‘a’ ‘b’ ‘a’ ‘c’ update “abxc” ‘a’ ‘b’ ‘x’ ‘c’ 2 – 9/13

  11. Bidirectional Transformation Examples: flatten “abac” ‘a’ ‘b’ ‘a’ ‘c’ update “abxc” put ‘a’ ‘b’ ‘x’ ‘c’ 2 – 10/13

  12. Bidirectional Transformation Examples: nub ◦ flatten “abc” ‘a’ ‘b’ ‘a’ ‘c’ “xbc” ‘x’ ‘b’ ‘x’ ‘c’ 2 – 11/13

  13. Bidirectional Transformation Examples: nub ◦ flatten “abc” ‘a’ ‘b’ ‘a’ ‘c’ update “xbc” ‘x’ ‘b’ ‘x’ ‘c’ 2 – 12/13

  14. Bidirectional Transformation Examples: nub ◦ flatten “abc” ‘a’ ‘b’ ‘a’ ‘c’ update “xbc” put ‘x’ ‘b’ ‘x’ ‘c’ 2 – 13/13

  15. Bidirectional Transformation source view get s v update v ′ s ′ put 3 – 14/15

  16. Bidirectional Transformation – Laws source view get s v update v ′ s ′ put 3 – 15/15

  17. Bidirectional Transformation – Laws source view get s v = s v Acceptability / GetPut 4 – 16/19

  18. Bidirectional Transformation – Laws source view get s v = = s v put Acceptability / GetPut 4 – 17/19

  19. Bidirectional Transformation – Laws source view get s v update v ′ s ′ put Consistency / PutGet 4 – 18/19

  20. Bidirectional Transformation – Laws source view get s v update s ′ v ′ put get Consistency / PutGet 4 – 19/19

  21. Bidirectional Transformation source view get s v update v ′ s ′ put 5 – 20/22

  22. Bidirectional Transformation – PL Approaches source view get s v update s ′ v ′ put Lenses, DSLs [Foster et al., ACM TOPLAS’07, . . . ] 5 – 21/22

  23. Bidirectional Transformation – PL Approaches source view get s v update v ′ s ′ put Bidirectionalization [Matsuda et al., ICFP’07], [V., POPL’09], . . . 5 – 22/22

  24. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" 6 – 23/33

  25. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" 6 – 24/33

  26. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" 6 – 25/33

  27. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" put "abcde" "xyz" = 6 – 26/33

  28. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" put "abcde" "xyz" = "axcyez" 6 – 27/33

  29. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" put "abcde" "xyz" = "axcyez" or "axcyez " ? 6 – 28/33

  30. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" put "abcde" "xyz" = "axcyez" or "axcyez " ? "xyz" = "axcy z" put "abcd" 6 – 29/33

  31. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" put "abcde" "xyz" = "axcyez" or "axcyez " ? "xyz" = "axcy z" put "abcd" = put "abcd" "x" 6 – 30/33

  32. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" put "abcde" "xyz" = "axcyez" or "axcyez " ? "xyz" = "axcy z" put "abcd" = "axc" put "abcd" "x" 6 – 31/33

  33. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" put "abcde" "xyz" = "axcyez" or "axcyez " ? "xyz" = "axcy z" put "abcd" = "axc" or "ax" ? put "abcd" "x" 6 – 32/33

  34. Nondeterminism / Choices to make Let get = sieve with: s "" "a" "ab" "abc" "abcd" "abcde" sieve s "" "" "b" "b" "bd" "bd" Then, for example: "xy" = "axcy" put "abcd" put "abcde" "xy" = "axcye" put "abcde" "xyz" = "axcyez" or "axcyez " ? "xyz" = "axcy z" put "abcd" = "axc" or "ax" ? , or "cx" ? put "abcd" "x" 6 – 33/33

  35. Nondeterminism / Choices to make Let get = head with: head ( x : xs ) = x 7 – 34/38

  36. Nondeterminism / Choices to make Let get = head with: head ( x : xs ) = x Maybe: put ( x : xs ) y = [ y ] 7 – 35/38

  37. Nondeterminism / Choices to make Let get = head with: head ( x : xs ) = x Maybe: put ( x : xs ) y = [ y ] But that violates put s ( get s ) = s ! 7 – 36/38

  38. Nondeterminism / Choices to make Let get = head with: head ( x : xs ) = x Maybe: put ( x : xs ) y = [ y ] But that violates put s ( get s ) = s ! Better: put ( x : xs ) y | y == x = ( x : xs ) | otherwise = [ y ] 7 – 37/38

  39. Nondeterminism / Choices to make Let get = head with: head ( x : xs ) = x Maybe: put ( x : xs ) y = [ y ] But that violates put s ( get s ) = s ! Better: put ( x : xs ) y | y == x = ( x : xs ) | otherwise = [ y ] But “really intended”: put ( x : xs ) y = ( y : xs ) 7 – 38/38

  40. A slightly more complex case, with recursion Let get = init with: init [ x ] = [ ] init ( x : xs ) = ( x : ( init xs )) 8 – 39/42

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend