• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Alloy Analyzer のこと
 

Alloy Analyzer のこと

on

  • 4,946 views

Alloy Analyzer について社内セミナーで発表した資料です。

Alloy Analyzer について社内セミナーで発表した資料です。

実際の模様→ http://www.ustream.tv/recorded/17430540

Statistics

Views

Total Views
4,946
Views on SlideShare
3,714
Embed Views
1,232

Actions

Likes
1
Downloads
16
Comments
0

4 Embeds 1,232

http://d.hatena.ne.jp 1189
https://twitter.com 39
http://webcache.googleusercontent.com 2
http://webcache.googleusercontent.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Alloy Analyzer のこと Alloy Analyzer のこと Presentation Transcript

    • Alloy Analyzer2011 9 23
    • • (id:mr_konn / @mr_konn) • • • Haskell Lover • 2010 Summer Intern PFI2011 9 23
    • • Alloy • • Alloy Analyzer http://alloy.mit.edu/alloy4/2011 9 23
    • Alloy Analyzer • • → / • •“ ”2011 9 23
    • • …… • • •2011 9 23
    • “ ” • Alloy SAT • • (10 ) • • •2011 9 23
    • 2011 9 23
    • • • , •2011 9 23
    • • • • • •2011 9 23
    • Alloy enum { , } enum { , } abstract sig { : one } abstract sig { : lone , : } { some => ( = <=> . = ) } • •2011 9 23
    • Alloy (2) one sig extends {} { in } one sig extends {} { no } one sig extends {} { = <=> ( . = => . = ) } pred show {} run show • • run : pred2011 9 23
    • • •2011 9 23
    • • • • Yes/No2011 9 23
    • Alloy (1) module marsandvenus abstract sig { : , enum { , } : , enum { , } : -> one enum { , } } { all q : | sig { (( = and = ) ! : -> one or ( = and = )) } <=> [q] = q. [this] } • • /2011 9 23
    • Alloy (2) • …… one sig extends {} { in and in } • • ……2011 9 23
    • pred ( : ) { all : | . in <=> ( . [ ] = ) } fact { one } run • Yes • run2011 9 23
    • • •2011 9 23
    • ○ No ○ Yes × No × Yes • YES2011 9 23
    • 2011 9 23
    • • • …… • • • or2011 9 23
    • module tour/filesystem abstract sig Object {} sig Directory extends Object { contents: set Object } one sig Root extends Directory {} sig File extends Object {} sig Alias extends File {to: Object} pred show {} run show2011 9 23
    • …… • 1. (File) 2. 3.2011 9 23
    • fact FileBelongsSomewhere { all f : File | one d : Directory | f in d.contents } fact NoRecursiveDirs { ! no d : Directory | d in d.contents } fact RootHasNoSuperDir { no d: Directory | Root in d.contents } • fact : • • ( )2011 9 23
    • • Directory • FileBelongsSomewhere fact ObjBelongsSomewhere { all o : Object | one d : Directory | o in d.contents }2011 9 23
    • …… • • RootHasNoSuperDir ObjBelongsSomewhere • all o : Object all o : Object - Root2011 9 23
    • • • • ……2011 9 23
    • Alloy • Alloy • Object = Directory ⊔ File, Alias ⊆ File • • ( ) • Root one • contents : Directory Object • n n • 12011 9 23
    • • A+B:A B • A&B:A B • A-B:A B • A in B : A B (A ⊆ B) • (A∈B) • A = B :A B2011 9 23
    • • P→Q: P, Q • A.B : • A B • {(1)} . {1→A, 1→B, 3→B} = {(A), (B)} {1→A, 1→B, 3→B} . {(B)} = {(1), (3)} •2011 9 23
    • • A[B] : B. A • a.b [c] = c.(a.b) • • ~a : a • ^a, *a : • ^{1→2, 2→3} = {1→2, 2→3, 1→3} • *{1→2, 2→3} = {1→2, 2→3, 1→3, 1→1, 2→2, 3→3}2011 9 23
    • • none : • • univ : • • iden : • a.iden = a , iden.a = a (forall a)2011 9 23
    • • all x : e | F = e x F • some x : e | F = x F • no x : e | F = x F • lone x : e | F = x F • one x : e | F = x F •2011 9 23
    • … • / •2011 9 23
    • fact NoRecursiveDirs { ! no d : Directory | d in d.^contents } fact NoRecursiveAliases { ! no a : Alias | a in a.^to } • •2011 9 23
    • •2011 9 23
    • run pred show {} run show • run hoge : hoge • show • ( )2011 9 23
    • pred show {} for 4 run show • for n n • n=3 • • for 4 but 2 Alias, exactly 1 Directory • 4 2 Alias, 1 Dir •2011 9 23
    • • Object Root • … •2011 9 23
    • assert assert TrackableFromRoot { all o : Object | o in Root.^contents } check TrackableFromRoot • ( ) • check hoge hoge • run (default: 3)2011 9 23
    • • …… • Root Root • Object - Root Root.*contents2011 9 23
    • assert TrackableFromRoot { all o : Object | o in Root.*contents } check TrackableFromRoot • •2011 9 23
    • Alloy • fact NoRecursiveDirsOrAlias { ! no iden & (^contents + ^to) } fact RootHasNoSuperDir {no contents.Root} fact AllObjBelongSomewhere { all o : Object - Root | some contents.o } assert TrackableFromRoot { Object in Root.*contents }2011 9 23
    • • Alloy • • • Alloy •2011 9 23
    • Any Questions?2011 9 23
    • 2011 9 23