public class JifContext_c extends polyglot.types.Context_c implements JifContext
JifContext interface.| Modifier and Type | Class and Description |
|---|---|
protected static class |
JifContext_c.Key |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<polyglot.types.LocalInstance,Label> |
checkedEndorsements
Map of local variables that have been endorsed
using a checked endorse statement
|
protected boolean |
checkingInits |
protected Label |
constructorReturnLabel |
protected java.util.Map<JifContext_c.Key,Label> |
gotos
Map from JifContext_c.Key (pairs of Branch.Kind and String) to Labels.
|
protected boolean |
inConstructorCall |
protected boolean |
inPrologue |
protected JifTypeSystem |
jifts |
protected polyglot.types.TypeSystem |
jlts |
protected ProviderLabel |
provider
Limit authority of classes and code in this context.
|
| Modifier | Constructor and Description |
|---|---|
protected |
JifContext_c(JifTypeSystem ts,
polyglot.types.TypeSystem jlts) |
| Modifier and Type | Method and Description |
|---|---|
void |
addActsFor(ActsForParam actor,
Principal granter) |
void |
addActsFor(Label L,
Principal p)
Adds a label-actsfor-principal assumption to the label environment.
|
void |
addActsFor(Principal p1,
Principal p2)
Add an actsfor relation to the principal hierarchy.
|
void |
addAssertionLE(Label L1,
Label L2)
Add a less than or equal assertion to the label environment.
|
void |
addCheckedEndorse(polyglot.types.LocalInstance li,
Label downgradeTo)
Add a checked endorse for the local instance li.
|
void |
addDefinitionalAssertionEquiv(AccessPath p,
AccessPath q)
Adds the assertion that the access path p is equivalent to the
access path q to this context, and all outer contexts up to
the method/constructor/initializer level
|
void |
addDefinitionalAssertionEquiv(Label L1,
Label L2)
Adds the assertion to this context, and all outer contexts up to
the method/constructor/initializer level
|
void |
addDefinitionalAssertionEquiv(Label L1,
Label L2,
boolean addToClass)
Adds the assertion to this context, and all outer contexts up to
the method/constructor/initializer level
|
void |
addDefinitionalEquiv(Principal p1,
Principal p2)
Adds the assertion to this context, and all outer contexts up to
the method/constructor/initializer level
|
void |
addEquiv(AccessPath p,
AccessPath q)
Adds the assertion that the access path p is equivalent to the
access path q to this context
|
void |
addEquiv(Label L1,
Label L2)
Add an equivalence to the label environment.
|
void |
addEquiv(Principal p1,
Principal p2)
Add an actsfor relation both ways to the principal hierarchy.
|
Label |
authLabel()
Get the authority of the current code, represented as a confidentiality label.
|
Label |
authLabelInteg()
Get the authority of the current code, represented as an integrity label.
|
java.util.Set<Principal> |
authority()
The authority of a class or a procedure is the set of principals
who have authorized that code.
|
boolean |
checkingInits()
Indicates if we are currently checking the initializers within a
constructor.
|
void |
clearPH()
Clears the principal hierarchy of all actsfor relations.
|
Label |
constructorReturnLabel()
If the current code is a constructor, returns the return label of that
constructor.
|
JifContext_c |
copy() |
Label |
currentCodePCBound()
The currentCodePCBound is an upper bound on the
PC of the caller of the current code, and a lower bound
on the observable effects of the current code.
|
protected void |
envModification() |
protected polyglot.types.VarInstance |
findStaticPrincipal(java.lang.String name) |
polyglot.types.VarInstance |
findVariableSilent(java.lang.String name) |
Label |
gotoLabel(polyglot.ast.Branch.Kind kind,
java.lang.String label)
Retrieve the
Label associated with branching to the
location label, with the branch kind kind. |
void |
gotoLabel(polyglot.ast.Branch.Kind kind,
java.lang.String label,
Label L)
Record the
Label associated with branching to the
location label, with the branch kind kind. |
boolean |
inConstructorCall()
Is the Context in a constructor call, e.g.
|
boolean |
inPrologue() |
LabelEnv |
labelEnv() |
PathMap |
pathMapForLocal(polyglot.types.LocalInstance li,
LabelChecker lc)
Return the path map for evaluating a local variable
|
Label |
pc() |
PrincipalHierarchy |
ph() |
ProviderLabel |
provider() |
polyglot.types.Context |
pushClass(polyglot.types.ParsedClassType classScope,
polyglot.types.ClassType type) |
polyglot.types.Context |
pushCode(polyglot.types.CodeInstance ci) |
polyglot.types.Context |
pushConstructorCall()
Push a Context onto the stack for a constructor call, e.g.
|
polyglot.types.Context |
pushPrologue() |
void |
setAuthority(java.util.Set<Principal> auth) |
void |
setCheckingInits(boolean checkingInits)
Set whether we are currently checking the initializers within a
constructor.
|
void |
setConstructorReturnLabel(Label Lr) |
void |
setCurrentCodePCBound(Label currentCodePCBound) |
void |
setPc(Label pc,
LabelChecker lc) |
void |
setProvider(ProviderLabel provider) |
boolean |
updateAllowed(polyglot.ast.Expr e)
Can this expression be updated, e.g.
|
addMethod, addNamed, addNamedToThisScope, addVariable, addVariableToThisScope, currentClass, currentClassScope, currentCode, definingCodeDef, find, findField, findFieldScope, findInThisScope, findLabelSilent, findLocal, findLocalSilent, findMethod, findMethodContainerInThisScope, findMethodScope, findVariable, findVariableInThisScope, importTable, inCode, inStaticContext, isBlock, isClass, isCode, isLocal, isOuter, isSource, lang, mapsToString, outerResolver, package_, pop, push, pushBlock, pushLabel, pushSource, pushStatic, toString, typeSystemclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddMethod, addNamed, addVariable, currentClass, currentClassScope, currentCode, definingCodeDef, findField, findFieldScope, findLabelSilent, findLocal, findLocalSilent, findMethod, findMethodScope, findVariable, importTable, inCode, inStaticContext, isLocal, lang, outerResolver, package_, pop, pushBlock, pushLabel, pushSource, pushStatic, typeSystemprotected final polyglot.types.TypeSystem jlts
protected final JifTypeSystem jifts
protected java.util.Map<polyglot.types.LocalInstance,Label> checkedEndorsements
protected java.util.Map<JifContext_c.Key,Label> gotos
protected boolean checkingInits
protected boolean inConstructorCall
protected boolean inPrologue
protected Label constructorReturnLabel
protected ProviderLabel provider
protected JifContext_c(JifTypeSystem ts, polyglot.types.TypeSystem jlts)
public JifContext_c copy()
copy in interface polyglot.util.Copy<polyglot.types.Context>copy in class polyglot.types.Context_cpublic polyglot.types.VarInstance findVariableSilent(java.lang.String name)
findVariableSilent in interface polyglot.types.ContextfindVariableSilent in class polyglot.types.Context_cprotected polyglot.types.VarInstance findStaticPrincipal(java.lang.String name)
public LabelEnv labelEnv()
labelEnv in interface JifContextprotected void envModification()
public void addAssertionLE(Label L1, Label L2)
JifContextaddAssertionLE in interface JifContextpublic void addActsFor(Label L, Principal p)
JifContextaddActsFor in interface JifContextpublic void addDefinitionalAssertionEquiv(Label L1, Label L2)
JifContextaddDefinitionalAssertionEquiv in interface JifContextpublic void addDefinitionalAssertionEquiv(Label L1, Label L2, boolean addToClass)
addDefinitionalAssertionEquiv in interface JifContextL1 - L2 - public void addDefinitionalAssertionEquiv(AccessPath p, AccessPath q)
JifContextaddDefinitionalAssertionEquiv in interface JifContextpublic void addEquiv(Label L1, Label L2)
JifContextaddEquiv in interface JifContextpublic void addEquiv(Principal p1, Principal p2)
JifContextaddEquiv in interface JifContextpublic void addActsFor(Principal p1, Principal p2)
JifContextaddActsFor in interface JifContextpublic void addActsFor(ActsForParam actor, Principal granter)
addActsFor in interface JifContextpublic void addEquiv(AccessPath p, AccessPath q)
JifContextaddEquiv in interface JifContextpublic void addDefinitionalEquiv(Principal p1, Principal p2)
addDefinitionalEquiv in interface JifContextpublic void clearPH()
JifContextclearPH in interface JifContextpublic Label gotoLabel(polyglot.ast.Branch.Kind kind, java.lang.String label)
JifContextLabel associated with branching to the
location label, with the branch kind kind.gotoLabel in interface JifContextpublic void gotoLabel(polyglot.ast.Branch.Kind kind,
java.lang.String label,
Label L)
JifContextLabel associated with branching to the
location label, with the branch kind kind.gotoLabel in interface JifContextpublic Label currentCodePCBound()
JifContextcurrentCodePCBound in interface JifContextpublic void setCurrentCodePCBound(Label currentCodePCBound)
setCurrentCodePCBound in interface JifContextpublic Label pc()
pc in interface JifContextpublic void setPc(Label pc, LabelChecker lc)
setPc in interface JifContextpublic java.util.Set<Principal> authority()
JifContextauthority in interface JifContextpublic void setAuthority(java.util.Set<Principal> auth)
setAuthority in interface JifContextpublic PrincipalHierarchy ph()
ph in interface JifContextpublic Label authLabel()
JifContextauthLabel in interface JifContextpublic Label authLabelInteg()
JifContextauthLabelInteg in interface JifContextpublic boolean checkingInits()
JifContextcheckingInits in interface JifContextpublic void setCheckingInits(boolean checkingInits)
JifContextsetCheckingInits in interface JifContextpublic Label constructorReturnLabel()
JifContextcheckingInits
is true, and is used for more permissive label checking for field
assignments.constructorReturnLabel in interface JifContextpublic void setConstructorReturnLabel(Label Lr)
setConstructorReturnLabel in interface JifContextpublic polyglot.types.Context pushConstructorCall()
JifContextpushConstructorCall in interface JifContextpublic polyglot.types.Context pushClass(polyglot.types.ParsedClassType classScope,
polyglot.types.ClassType type)
pushClass in interface polyglot.types.ContextpushClass in class polyglot.types.Context_cpublic polyglot.types.Context pushCode(polyglot.types.CodeInstance ci)
pushCode in interface polyglot.types.ContextpushCode in class polyglot.types.Context_cpublic boolean inConstructorCall()
JifContextinConstructorCall in interface JifContextpublic PathMap pathMapForLocal(polyglot.types.LocalInstance li, LabelChecker lc)
JifContextpathMapForLocal in interface JifContextpublic boolean updateAllowed(polyglot.ast.Expr e)
JifContextupdateAllowed in interface JifContextpublic void addCheckedEndorse(polyglot.types.LocalInstance li,
Label downgradeTo)
JifContextaddCheckedEndorse in interface JifContextpublic ProviderLabel provider()
provider in interface JifContextpublic void setProvider(ProviderLabel provider)
setProvider in interface JifContextpublic polyglot.types.Context pushPrologue()
pushPrologue in interface JifContextpublic boolean inPrologue()