Browse Source

MPIDE-25: clarify documentation on interactions

Added some clarifying statements to interactions in the documentation.
The overview as a whole is still quite rough, but should be serviceable.
Updated the features checklist to reflect, as well.
Austin Meagher 10 years ago
parent
commit
a0b886ef18
2 changed files with 36 additions and 36 deletions
  1. 31 33
      FEATURES.md
  2. 5 3
      docs/overview.md

+ 31 - 33
FEATURES.md

@@ -5,22 +5,21 @@ A master list of the features for our new modeling language:
 - [ ] documentation
 	- [ ] overview
 		- [ ] who
-		- [ ] what
-		- [ ] why
-		- [ ] easy example
+		- [x] what
+		- [x] why
+		- [x] easy example
 	- [ ] the language
-		- [ ] spaces and comments
-		- [ ] patterns
-			- [ ] sequences
-			- [ ] alternations
-			- [ ] groups
-			- [ ] quantifiers
-		- [ ] behaviors
-			- [ ] system
-			- [ ] behavior
+		- [x] spaces and comments
+		- [x] patterns
+			- [x] sequences
+			- [x] alternations
+			- [x] groups
+			- [x] quantifiers
+		- [x] behaviors
+			- [x] system
+			- [x] behavior
 		- [ ] interactions
 			- [ ] system item selectors
-				- [ ] `sys1`
 				- [ ] `sys1:pattern`
 			- [ ] `sys1:a -> sys2:b` (ordering)
 				- [ ] `sys1:a -> sys2:b -> sys3:b` (chained ordering)
@@ -42,27 +41,26 @@ A master list of the features for our new modeling language:
 	- [ ] parser API
 	- [ ] generator API
 - [ ] code parser
-	- [ ] spaces and comments
+	- [x] spaces and comments
 	- [ ] error handling
-	- [ ] patterns
-		- [ ] sequences
-		- [ ] alternations
-		- [ ] groups
-		- [ ] quantifiers
-	- [ ] behaviors
-		- [ ] system
-		- [ ] behavior
-	- [ ] interactions
-		- [ ] system item selectors
-			- [ ] `sys1`
-			- [ ] `sys1:pattern`
-		- [ ] `sys1:a -> sys2:b` (ordering)
-			- [ ] `sys1:a -> sys2:b -> sys3:b` (chained ordering)
-		- [ ] `sys1:a == sys2:b` (joining)
-		- [ ] `expr -> sys1:a` (conditionals)
-	- [ ] triggers
-		- [ ] `WHEN pattern { ... }`
-		- [ ] `WHEN expr { ... }`
+	- [x] patterns
+		- [x] sequences
+		- [x] alternations
+		- [x] groups
+		- [x] quantifiers
+	- [x] behaviors
+		- [x] system
+		- [x] behavior
+	- [x] interactions
+		- [x] system item selectors
+			- [x] `sys1:pattern`
+		- [x] `sys1:a -> sys2:b` (ordering)
+			- [x] `sys1:a -> sys2:b -> sys3:b` (chained ordering)
+		- [x] `sys1:a == sys2:b` (joining)
+		- [x] `expr -> sys1:a` (conditionals)
+	- [x] triggers
+		- [x] `WHEN pattern { ... }`
+		- [x] `WHEN expr { ... }`
 	- [ ] expressions and code blocks
 		- [ ] properties
 			- [ ] global scope

+ 5 - 3
docs/overview.md

@@ -16,13 +16,15 @@ A `modellang` model is composed of systems of behaviors, interactions between th
 A **system** is a top-level event, and is where trace generation starts. Can consist of composite events (behaviors) or atomic events.
 
 ```
-SYSTEM: sys = behavior_pattern1 behavior_pattern2;
-BEHAVIOR: behavior_pattern1 = expanded detail;
+SYSTEM: sys = behavior_pattern atomic_event;
+BEHAVIOR: behavior_pattern = expanded detail;
 ```
 
 An **interaction** can fall into one of three categories: relations. pre-conditions, and post-conditions:
 - the two relations supported are "->" (order) and "==" (join)
 - pre- and post-conditions guarantee your resultant traces abide by certain rules
+- an interaction is a condition iff one operand of the "->" is an expression and the other is a selector; two selector operands makes for a relation; and two expressions makes for an invalid interaction
+- selectors (also found in triggers) are patterns just like system and behavior definitions, but come with a prepended `system:` to inform the generator where to look for the pattern
 
 ```
 INTERACTION: sys:before -> other_sys:after;
@@ -31,7 +33,7 @@ INTERACTION: property > 5 -> thing:happens_only_above_5;
 INTERACTION: thing:never_drops_below_three -> other_property >= 3;
 ```
 
-A **trigger** is a chunk of code that will execute whenever a specified pattern occurs during trace generation.
+A **trigger** is a chunk of code that will execute whenever the specified selector pattern occurs during trace generation.
 
 ```
 WHEN: sys:event1 event2 { property++ };