|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.types.Context_c
jif.types.JifContext_c
public class JifContext_c
An implementation of the JifContext
interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class polyglot.types.Context_c |
---|
polyglot.types.Context_c.Kind |
Field Summary |
---|
Fields inherited from class polyglot.types.Context_c |
---|
BLOCK, CLASS, code, CODE, inCode, it, kind, outer, OUTER, scope, SOURCE, staticContext, ts, type, types, vars |
Constructor Summary | |
---|---|
protected |
JifContext_c(JifTypeSystem ts,
polyglot.types.TypeSystem jlts)
|
Method Summary | |
---|---|
boolean |
actsFor(java.util.Collection actorGrp,
java.util.Collection grantorGrp)
Test an actsfor relation, using the principal hierarchy. |
boolean |
actsFor(Principal p1,
Principal p2)
Test an actsfor relation, using the principal hierarchy. |
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 |
addDefinitionalAssertionEquiv(Label L1,
Label L2)
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(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 |
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. |
java.lang.Object |
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. |
boolean |
equiv(Principal p1,
Principal p2)
Test if p1 actsfor p2 and vice versa, using the principal hierarchy. |
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. |
LabelEnv |
labelEnv()
|
Label |
pc()
|
PrincipalHierarchy |
ph()
|
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. |
void |
setAuthority(java.util.Set 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)
|
Methods inherited from class polyglot.types.Context_c |
---|
addMethod, addNamed, addNamedToThisScope, addVariable, addVariableToThisScope, currentClass, currentClassScope, currentCode, find, findField, findFieldScope, findInThisScope, findLocal, findMethod, findMethodContainerInThisScope, findMethodScope, findVariable, findVariableInThisScope, importTable, inCode, inStaticContext, isBlock, isClass, isCode, isLocal, isOuter, isSource, mapsToString, outerResolver, package_, pop, push, pushBlock, pushSource, pushStatic, toString, typeSystem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface polyglot.types.Context |
---|
addMethod, addNamed, addVariable, currentClass, currentClassScope, currentCode, findField, findFieldScope, findLocal, findMethod, findMethodScope, findVariable, importTable, inCode, inStaticContext, isLocal, outerResolver, package_, pop, pushBlock, pushSource, pushStatic, typeSystem |
Methods inherited from interface polyglot.types.Resolver |
---|
find |
Constructor Detail |
---|
protected JifContext_c(JifTypeSystem ts, polyglot.types.TypeSystem jlts)
Method Detail |
---|
public java.lang.Object copy()
copy
in interface polyglot.util.Copy
copy
in class polyglot.types.Context_c
public polyglot.types.VarInstance findVariableSilent(java.lang.String name)
findVariableSilent
in interface polyglot.types.Context
findVariableSilent
in class polyglot.types.Context_c
public LabelEnv labelEnv()
labelEnv
in interface JifContext
public void addAssertionLE(Label L1, Label L2)
JifContext
addAssertionLE
in interface JifContext
public void addDefinitionalAssertionEquiv(Label L1, Label L2)
addDefinitionalAssertionEquiv
in interface JifContext
L1
- L2
- public void addEquiv(Label L1, Label L2)
JifContext
addEquiv
in interface JifContext
public void addEquiv(Principal p1, Principal p2)
JifContext
addEquiv
in interface JifContext
public void addActsFor(Principal p1, Principal p2)
JifContext
addActsFor
in interface JifContext
public void addDefinitionalEquiv(Principal p1, Principal p2)
addDefinitionalEquiv
in interface JifContext
public boolean actsFor(Principal p1, Principal p2)
JifContext
actsFor
in interface JifContext
public boolean equiv(Principal p1, Principal p2)
JifContext
equiv
in interface JifContext
public boolean actsFor(java.util.Collection actorGrp, java.util.Collection grantorGrp)
JifContext
actsFor
in interface JifContext
public void clearPH()
JifContext
clearPH
in interface JifContext
public Label gotoLabel(polyglot.ast.Branch.Kind kind, java.lang.String label)
JifContext
Label
associated with branching to the
location label
, with the branch kind kind
.
gotoLabel
in interface JifContext
public void gotoLabel(polyglot.ast.Branch.Kind kind, java.lang.String label, Label L)
JifContext
Label
associated with branching to the
location label
, with the branch kind kind
.
gotoLabel
in interface JifContext
public Label currentCodePCBound()
JifContext
currentCodePCBound
in interface JifContext
public void setCurrentCodePCBound(Label currentCodePCBound)
setCurrentCodePCBound
in interface JifContext
public Label pc()
pc
in interface JifContext
public void setPc(Label pc)
setPc
in interface JifContext
public java.util.Set authority()
JifContext
authority
in interface JifContext
public void setAuthority(java.util.Set auth)
setAuthority
in interface JifContext
public PrincipalHierarchy ph()
ph
in interface JifContext
public Label authLabel()
JifContext
authLabel
in interface JifContext
public Label authLabelInteg()
JifContext
authLabelInteg
in interface JifContext
public boolean checkingInits()
JifContext
checkingInits
in interface JifContext
public void setCheckingInits(boolean checkingInits)
JifContext
setCheckingInits
in interface JifContext
public Label constructorReturnLabel()
JifContext
checkingInits
is true, and is used for more permissive label checking for field
assignments.
constructorReturnLabel
in interface JifContext
public void setConstructorReturnLabel(Label Lr)
setConstructorReturnLabel
in interface JifContext
public polyglot.types.Context pushConstructorCall()
JifContext
pushConstructorCall
in interface JifContext
public polyglot.types.Context pushClass(polyglot.types.ParsedClassType classScope, polyglot.types.ClassType type)
pushClass
in interface polyglot.types.Context
pushClass
in class polyglot.types.Context_c
public polyglot.types.Context pushCode(polyglot.types.CodeInstance ci)
pushCode
in interface polyglot.types.Context
pushCode
in class polyglot.types.Context_c
public boolean inConstructorCall()
JifContext
inConstructorCall
in interface JifContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |