source: examples/python_tests/alumni3_rt1/README @ f824a9e

mei_rt2mei_rt2_fix_1
Last change on this file since f824a9e was f824a9e, checked in by Mei <mei@…>, 12 years ago

1) add more doc to python_tests

  • Property mode set to 100755
File size: 1.7 KB
Line 
1#
2# This example shows an example of reasoning about a role's parameters with
3# range constraints.  There are 6 principals StateU, Bob, Mark, Maryann,
4# Joe, and Jan.  StateU wants to establish a set of founding alum
5# based on the year of graduation.  On graduation each alum has previously
6# been issued a credential parameterized with their major and graduation year.
7# StateU sets up a policy that says that  a principal is a founding alumni
8# if they graduated in 1960, 1961, or 1963 in either mathematics or psychology
9# only.  One assumes there was some kind of NCAA suspension in 1962.  This
10# policy is expressed in Credential 1.
11#
12# Credentials 2, 3, 4, 5, and 6 each assign a diploma credential to Bob (a 1961
13# mathematics degree), Mark (a 1965 mathematics degree), Joe (a 1961 zoology degree),
14# Maryann (a 1962 psychology degree), and Jan (a 1960 psychology degree)
15#
16# The query.py asks if each of these principals are favored alums, and only
17# Bob and Jan are.
18
19# alumni3_rt1
20
21# Credential 1
22# [keyid:stateU].role:foundingAlumni
23#              <- [keyid:stateU].role:diploma([string:?D:['mathmatics','psychology']],
24#                                        [integer:?Year:[1960,1961,1963]])
25
26# Credential 2
27# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1961]) <- [keyid:bob]
28
29# Credential 3
30# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1965]) <- [keyid:mark]
31
32# Credential 4
33# [keyid:stateU].role:diploma([string:'zoology'],[integer:1961]) <- [keyid:joe]
34
35# Credential 5
36# [keyid:stateU].role:diploma([string:'psychology'],[integer:1962]) <- [keyid:maryann]
37
38# Credential 6
39# [keyid:stateU].role:diploma([string:'psychology'],[integer:1960]) <- [keyid:jan]
40
Note: See TracBrowser for help on using the repository browser.