Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions tutorials/online/sidenote-levels-of-understanding.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<h2>How to think about an Alloy model: 3 levels</h2>

There are three basic levels of abstraction at which you can read an
There are three basic levels of abstraction at which you can understand an
Alloy model.
<ul>
<li> The highest level of abstraction is the OO paradigm. This level
Expand All @@ -24,8 +24,8 @@ <h2>How to think about an Alloy model: 3 levels</h2>

<hr WIDTH="50%">

<p> Consider the following excerpt. A signature <b><tt>sig
S</b></tt>, extending <b><tt>E</b></tt>, has a field
<p> Consider the following excerpt. A signature <b><tt>
S</b></tt>, extending signature <b><tt>E</b></tt>, has a field
<b><tt>F</b></tt> of type <b><tt>T</b></tt>.

<b><pre>
Expand All @@ -49,9 +49,25 @@ <h2>How to think about an Alloy model: 3 levels</h2>
<b><tt>T</b></tt>
<li> <b><tt>s</b></tt> is an instance of <b><tt>S</b></tt>
<li> <b><tt>.</b></tt> accesses a field
so
<li> <b><tt>s.F</b></tt> returns something of type <b><tt>T</b></tt>
</ul>

<hr WIDTH="50%">
<p> The way to understand it in terms of set theory is as follows:
S is a set containing elements of a particular type
E is also a set containing elements of a particular type
F is a set that contains tuples of (S1->E1) where
S1 is an element from set S,
E1 is an element from set E,
-> is the relational operator

Think of the dot operator now in terms of sets;
S1.F would result in S1 being matched with every tuple in F and
the resulting set would contain only the elements of type T that
are related to S1.

</p>

<hr WIDTH="50%">

<p> The fragment can be safely read as being about sets, elements, and
Expand Down