Changes introduced in jif, to develop jrif
==========================================

1) Introduce syntax for RIF labels, annotated expressions "reclassify(E,f)",
where E is an expression and f is a reclassifier, and transitions on
RIF labels "tr(L,f)", where L is a RIF label.

Modified files in jif/scr/jif/parse: jif.flex, jif.ppg

2) New AST nodes are created to represent the syntactic entities we intro-
duced above.

Modified/Added files in jif/src/jif/ast: AbstractJifExtFactory c.java, AmbRifDy-
namicLabelNode c.java, AmbRifDynamicLabelNode.java, AmbRifiLabelNode c.java, Am-
bRifLabelNode c.java, AmbRifTransLabelNode c.java, JifExtFactory.java, JifNodeFac-
tory c.java, JifNodeFactory.java, RifComponentNode c.java, RifComponentNode.java, Ri-
fiLabelNode.java, RifiPolicyNode c.java, RifiPolicyNode.java, RifLabelNode c.java, Rif-
PolicyNode c.java, RifPolicyNode.java, RifStateNode c.java, RifStateNode.java, RifTran-
sitionNode c.java, RifTransitionNode.java, ReclassifyExpr c.java, ReclassifyExpr.java.

3) Through a disambiguation process, the AST nodes, which are syntactic
entities, are mapped to semantic entities, which are types. We provided new types that cor-
respond to Rif labels. The new types should be well-formed according to some Jif rules.

Modified file in jif/src/jif/extension: LabelTypeCheckUtil.java.

4) Implementation of the join and meet operations for these new types.

Modified/Added files in jif/src/jif/types/label: RifConfPolicy.java, RifDynam-
icLabel c.java, RifDynamicLabel.java, RifIntegPolicy.java, RifJoinConfPolicy c.java,
RifJoinConfPolicy.java, RifJoinIntegPolicy c.java, RifJoinIntegPolicy.java, RifReaderPol-
icy c.java, RifVarLabel c.java, RifVarLabel.java, RifWriterPolicy c.java, TransitionVarLa-
bel c.java, TransitionVarLabel.java.

Modified/Added files in jif/src/jif/types: JifTypeSystem c.java, JifTypeSystem.java,
RifComponent.java, RifFSM c.java, RifFSM.java, RifFSMstate c.java, RifFSMstate.java,
RIFstate c.java, RIFtransition c.java.

5) The phase of type-checking is enriched with the typing rule for annotated
expressions. The type of an annotated expression reclassify(E,f) is the type
of expression E after having taken the transition that corresponds to f.
Specifically, if L is the type of E, then dynamic Rif-label tr(L,f) is the type
of that annotated expression. Notice that L may or may not be statically known.

Added file in jif/src/jif/extension: JifReclassifyExprExt.java.

6) We provide a new decision procedure for the restrictiveness relation. 
We enrich this decision procedure with the fact that the transition function
is monotone with respect to the restrictiveness relation. Specifically, if 
L1 <= L2 , then the decision procedure can deduce
that tr(L1,f) <= tr(L2,f).

Modified file in jif/src/jif/types/hierarchy: LabelEnv c.java.

7) We enriched the solver. Originally, the solver takes as
input a set of restrictiveness relations (e.g. L1 <= L2 ), and it decides whether
they are satisfied. During this process, values of specific unknown labels may
be found. Now, once an unknown label L is found, the solver deduces
the values of other unknown labels that are computed based on L, say
tr(tr(L,f1),f2).

Modified file in jif/src/jif/types: VarMap.java.

Modified file in jif/src/jif/types: JifSubst c.java.

8) After successful type-checking, the program that is written in RIFinJIF
is translated into Java, in order to be executed by Java VM. Annotated
expressions and Rif labels (with applied transitions or without) in the code
are also translated into Java objects. So, we added methods in the compiler
to generate these objects

Modified/Added files in jif/rt-src/jif/lang: LabelUtil.java, RifFSMstate.java, RifRead-
erPolicy.java, RifWriterPolicy.java.

Modified/Added files in jif/src/jif/translate: PairLabelToJavaExpr c.java, RifDynami-
cLabelToJavaExpr c.java, ReclassifyExprTojavaExt c.java.










