# # This example shows an example of reasoning about a role's parameters with # range constraints. There are 6 principals StateU, Bob, Mark, Maryann, # Joe, and Jan. StateU wants to establish a set of founding alum # based on the year of graduation. On graduation each alum has previously # been issued a credential parameterized with their major and graduation year. # StateU sets up a policy that says that a principal is a founding alumni # if they graduated in 1960, 1961, or 1963 in either mathematics or psychology # only. One assumes there was some kind of NCAA suspension in 1962. This # policy is expressed in Credential 1. # # Credentials 2, 3, 4, 5, and 6 each assign a diploma credential to Bob (a 1961 # mathematics degree), Mark (a 1965 mathematics degree), Joe (a 1961 zoology degree), # Maryann (a 1962 psychology degree), and Jan (a 1960 psychology degree) # # The query.py asks if each of these principals are favored alums, and only # Bob and Jan are. # alumni3_rt1 # Credential 1 # [keyid:stateU].role:foundingAlumni # <- [keyid:stateU].role:diploma([string:?D:['mathmatics','psychology']], # [integer:?Year:[1960,1961,1963]]) # Credential 2 # [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1961]) <- [keyid:bob] # Credential 3 # [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1965]) <- [keyid:mark] # Credential 4 # [keyid:stateU].role:diploma([string:'zoology'],[integer:1961]) <- [keyid:joe] # Credential 5 # [keyid:stateU].role:diploma([string:'psychology'],[integer:1962]) <- [keyid:maryann] # Credential 6 # [keyid:stateU].role:diploma([string:'psychology'],[integer:1960]) <- [keyid:jan]