N. Shimizu (chikoski@gmail.com / @chikoski)4.7                                                                       
4.8N...
N. Shimizu (chikoski@gmail.com / @chikoski)•        #                                                               #     ...
N. Shimizu (chikoski@gmail.com / @chikoski)4.7
N. Shimizu (chikoski@gmail.com / @chikoski)Alloy•                                         #•           1        1         ...
N. Shimizu (chikoski@gmail.com / @chikoski)• module modulePathName#•         #• 
N. Shimizu (chikoski@gmail.com / @chikoski)• open modulePathName#• modulePathName                                         ...
N. Shimizu (chikoski@gmail.com / @chikoski)module library/graphs#pred Acyclic (r: univ -> univ){ no ^r & iden}
N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs#sig Person { parents: set Person}#fact { Acyc...
N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs#sig Person { parents: set Person}#fact { Acyc...
N. Shimizu (chikoski@gmail.com / @chikoski)•                                                       #•                     ...
N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs#sig Person { parents: set Person}#pred Acycli...
N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs#sig Person { parents: set Person}#pred Acycli...
N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs as g#sig Person { parents: set Person}#pred A...
N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs as g#sig Person { parents: set Person}#pred A...
N. Shimizu (chikoski@gmail.com / @chikoski)•                                                  #•                          ...
N. Shimizu (chikoski@gmail.com / @chikoski)module library/graphs [t]#pred Acyclic ( r: t -> t ) { no ^r & iden}
N. Shimizu (chikoski@gmail.com / @chikoski)module library/graphs [t]#pred Acyclic ( r: t -> t ) { no ^r & iden}
N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs [Person]#sig Person {parents : set Person}#fa...
N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs [Person]#sig Person {parents : set Person}#fa...
N. Shimizu (chikoski@gmail.com / @chikoski)4.8
N. Shimizu (chikoski@gmail.com / @chikoski)#e• e                                  #• 
N. Shimizu (chikoski@gmail.com / @chikoski)sig Card { suit: Suit}#sig Suit {}#pred ThreeOfAKind (hand : set Card ){#    #h...
N. Shimizu (chikoski@gmail.com / @chikoski)•           #• Int
N. Shimizu (chikoski@gmail.com / @chikoski)Intsig Node { adj: Node -> lone Int }#fact {#    all n : Node | #      let w = ...
N. Shimizu (chikoski@gmail.com / @chikoski)• •                                                          #                 ...
N. Shimizu (chikoski@gmail.com / @chikoski)Int• Int                                                                  #•  #...
N. Shimizu (chikoski@gmail.com / @chikoski)•    #•          #• 
N. Shimizu (chikoski@gmail.com / @chikoski)sig Boolean {}#one True, False extends Boolean {}
N. Shimizu (chikoski@gmail.com / @chikoski)•        #                                                               #     ...
Upcoming SlideShare
Loading in...5
×

Alloy20110922 02

553

Published on

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
553
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Alloy20110922 02"

  1. 1. N. Shimizu (chikoski@gmail.com / @chikoski)4.7 
4.8N. Shimizu (chikoski@gmail.com / @chikoski)
  2. 2. N. Shimizu (chikoski@gmail.com / @chikoski)•  #   #   #• Int#   #  
  3. 3. N. Shimizu (chikoski@gmail.com / @chikoski)4.7
  4. 4. N. Shimizu (chikoski@gmail.com / @chikoski)Alloy•  #•  1 1 #• 
  5. 5. N. Shimizu (chikoski@gmail.com / @chikoski)• module modulePathName#•  #• 
  6. 6. N. Shimizu (chikoski@gmail.com / @chikoski)• open modulePathName#• modulePathName #•  #
  7. 7. N. Shimizu (chikoski@gmail.com / @chikoski)module library/graphs#pred Acyclic (r: univ -> univ){ no ^r & iden}
  8. 8. N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs#sig Person { parents: set Person}#fact { Acyclic [parents] }
  9. 9. N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs#sig Person { parents: set Person}#fact { Acyclic [parents] }
  10. 10. N. Shimizu (chikoski@gmail.com / @chikoski)•  #•  #  m/X m X#  
  11. 11. N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs#sig Person { parents: set Person}#pred Acyclic { graphs/Acyclic [parents]}
  12. 12. N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs#sig Person { parents: set Person}#pred Acyclic { graphs/Acyclic [parents]}
  13. 13. N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs as g#sig Person { parents: set Person}#pred Acyclic { g/Acyclic [parents]}
  14. 14. N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs as g#sig Person { parents: set Person}#pred Acyclic { g/Acyclic [parents]}
  15. 15. N. Shimizu (chikoski@gmail.com / @chikoski)•  #•  #•  #•  #
  16. 16. N. Shimizu (chikoski@gmail.com / @chikoski)module library/graphs [t]#pred Acyclic ( r: t -> t ) { no ^r & iden}
  17. 17. N. Shimizu (chikoski@gmail.com / @chikoski)module library/graphs [t]#pred Acyclic ( r: t -> t ) { no ^r & iden}
  18. 18. N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs [Person]#sig Person {parents : set Person}#fact { Acyclic [parents] }
  19. 19. N. Shimizu (chikoski@gmail.com / @chikoski)module family#open library/graphs [Person]#sig Person {parents : set Person}#fact { Acyclicpred Acyclic ( r: } [parents] Person -> Person) { no ^r & iden}
  20. 20. N. Shimizu (chikoski@gmail.com / @chikoski)4.8
  21. 21. N. Shimizu (chikoski@gmail.com / @chikoski)#e• e #• 
  22. 22. N. Shimizu (chikoski@gmail.com / @chikoski)sig Card { suit: Suit}#sig Suit {}#pred ThreeOfAKind (hand : set Card ){# #hand.suit = 1 and #hand = 3#}
  23. 23. N. Shimizu (chikoski@gmail.com / @chikoski)•  #• Int
  24. 24. N. Shimizu (chikoski@gmail.com / @chikoski)Intsig Node { adj: Node -> lone Int }#fact {# all n : Node | # let w = n.adj [n] | some w => w = 0#}
  25. 25. N. Shimizu (chikoski@gmail.com / @chikoski)• •  #   #   #   #
  26. 26. N. Shimizu (chikoski@gmail.com / @chikoski)Int• Int #•  #  run A for 6 Int#   Int -32 31
  27. 27. N. Shimizu (chikoski@gmail.com / @chikoski)•  #•  #• 
  28. 28. N. Shimizu (chikoski@gmail.com / @chikoski)sig Boolean {}#one True, False extends Boolean {}
  29. 29. N. Shimizu (chikoski@gmail.com / @chikoski)•  #   #   #• Int#   #  

×