mei_rt2mei_rt2_fix_1
Last change
on this file since 658e7ef was
f824a9e,
checked in by Mei <mei@…>, 13 years ago
|
1) add more doc to python_tests
|
-
Property mode set to
100755
|
File size:
1.3 KB
|
Rev | Line | |
---|
[5f551d3] | 1 | # |
---|
| 2 | # This example shows an example of reasoning about a role's parameters. There |
---|
| 3 | # are 4 principals StateU, Bob, Maryann, and Joe. StateU wants to establish a |
---|
| 4 | # set of founding alumni based on the year of graduation. On graduation each |
---|
| 5 | # alum has previously been issued a credential parameterized with their major |
---|
| 6 | # and graduation year. StateU sets up a policy that says that a principal is a |
---|
| 7 | # founding alum if they graduated in 1960, 1961, or 1963 no matter what major |
---|
| 8 | # the principal had. One assumes there was some kind of NCAA suspension in |
---|
| 9 | # 1962. This policy is expressed in Credential 1. |
---|
| 10 | # |
---|
| 11 | # Credentials 2, 3, and 4 each assign a diploma credential to Bob (a 1961 |
---|
| 12 | # mathematics degree), Joe (a 1955 zoology degree) and Maryann (a 1962 |
---|
| 13 | # psychology degree). |
---|
| 14 | # |
---|
[f824a9e] | 15 | # The query.py file asks if each of these principals are favored |
---|
[5f551d3] | 16 | # alums, and only Bob is. |
---|
| 17 | |
---|
[f824a9e] | 18 | # alumni2_rt1 |
---|
[5f551d3] | 19 | |
---|
[f824a9e] | 20 | # Credential #1 |
---|
[5f551d3] | 21 | # [keyid:stateU].role:foundingAlumni |
---|
[f824a9e] | 22 | # <- [keyid:stateU].role:diploma([?], [integer:?Year:[1960,1961,1963]]) |
---|
[5f551d3] | 23 | |
---|
| 24 | # Credential 2 |
---|
[f824a9e] | 25 | # [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1961]) <- [keyid:bob] |
---|
[5f551d3] | 26 | |
---|
| 27 | # Credential 3 |
---|
[f824a9e] | 28 | # [keyid:stateU].role:diploma([string:'zoology'],[integer:1955]) <- [keyid:joe] |
---|
[5f551d3] | 29 | |
---|
| 30 | # Credential 4 |
---|
[f824a9e] | 31 | # [keyid:stateU].role:diploma([string:'psychology'],[integer:1962]) <- [keyid:maryann] |
---|
[5f551d3] | 32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.