source: examples/python_tests/alumni3_rt1/README @ b92a620

mei_rt2mei_rt2_fix_1
Last change on this file since b92a620 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
RevLine 
[7211a95]1#
[f824a9e]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.
[7211a95]11#
12# Credentials 2, 3, 4, 5, and 6 each assign a diploma credential to Bob (a 1961
[f824a9e]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)
[7211a95]15#
[f824a9e]16# The query.py asks if each of these principals are favored alums, and only
17# Bob and Jan are.
[7211a95]18
[f824a9e]19# alumni3_rt1
[7211a95]20
21# Credential 1
[f824a9e]22# [keyid:stateU].role:foundingAlumni
23#              <- [keyid:stateU].role:diploma([string:?D:['mathmatics','psychology']],
24#                                        [integer:?Year:[1960,1961,1963]])
[7211a95]25
26# Credential 2
[f824a9e]27# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1961]) <- [keyid:bob]
[7211a95]28
29# Credential 3
[f824a9e]30# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1965]) <- [keyid:mark]
[7211a95]31
32# Credential 4
[f824a9e]33# [keyid:stateU].role:diploma([string:'zoology'],[integer:1961]) <- [keyid:joe]
[7211a95]34
35# Credential 5
[f824a9e]36# [keyid:stateU].role:diploma([string:'psychology'],[integer:1962]) <- [keyid:maryann]
[7211a95]37
38# Credential 6
[f824a9e]39# [keyid:stateU].role:diploma([string:'psychology'],[integer:1960]) <- [keyid:jan]
[7211a95]40
Note: See TracBrowser for help on using the repository browser.