Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Preloaded Examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Monterey Phoenix
MP Model Collection
Preloaded Examples
Commits
48ff08f2
Commit
48ff08f2
authored
3 years ago
by
Keane Reynolds
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
23cf1256
No related branches found
No related tags found
4 merge requests
!6
Keane branch
,
!5
Keane branch
,
!4
Keane branch
,
!3
Keane branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Example16_StackBehavior_ProbabilityCalculationsType1.mp
+22
-0
22 additions, 0 deletions
Example16_StackBehavior_ProbabilityCalculationsType1.mp
with
22 additions
and
0 deletions
Example16_StackBehavior_ProbabilityCalculationsType1.mp
0 → 100644
+
22
−
0
View file @
48ff08f2
/* Example16_StackBehavior_ProbabilityCalculationsType1.mp
Here is a simple stack behavior model. Valid behaviors don’t permit
a scenario when Pop operation is applied to the empty stack. For the
example’s purpose we assume probability of Push is higher than
probability of Pop. It is assumed also that probabilities to perform 0,
1 or more iterations by the iterative event pattern (* … *) are equal.
Consider a test at scope 2. Because pop cannot occur before a push,
the model rejects the scenarios where a single pop alone occurs, a pop
occurs before a push, and 2 pops with no pushing. These would all be
impossible in a real stack, so they are cut from the model.
By removing some scenarios, the remaining probabilities change.
*/
SCHEMA Stack_Behavior
ROOT Stack: (* (<<0.75>> Push | <<0.25>> Pop ) *)
BUILD { /* If an element is retrieved, it should have been stored before */
ENSURE FOREACH $x: Pop FROM Stack
( #Pop BEFORE $x < #Push BEFORE $x ); };
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment