|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Title : util.BindingContext Interface
Description : This interface concerns variable binding. Collection (AmineList and AmineSet) and complex structures (Term, Concept and CG) of Amine, as well as any Java class that is used in the context of Amine, can contain variables. Of course, the basic feature of a variable is its binding with a value. The modality of this binding relation depends on the programming context where the structures (with variables) are used. For instance, Prolog+CG has an unification-based programming context with unification stack and variables renaming (or variables indices) as binding information related to each variable. Synergy has another programming context and various other programming contexts can be defined and used with their proper binding resolution mechanism.
See aminePlatform.test.util.SimpleBindingContext for a simple example of binding context.
To enable this genericity and independence (independence of the structures and operations toward bindingContext), we provide this interface and the binding information object as two kind of parameters related to operations of AmineObject interface.
Copyright: Copyright (c) Adil KABBAJ, 2004-2009
Method Summary | |
void |
clearCGConstrs()
Clear the set of constraints that was formed during a CG unification |
CGOperations |
getCGOperations()
|
ObjectWithBindInf |
getValue(java.lang.Object obj,
java.lang.Object bindInf)
This method should return the value of the variable obj, according to the current binding context. |
boolean |
isBoundVariable(java.lang.Object obj,
java.lang.Object bindInf)
|
boolean |
isFreeVariable(java.lang.Object obj,
java.lang.Object bindInf)
|
void |
removeCGUnifConstrs()
remove the binding that occurred during unification of two CGs |
void |
setCGUnification(boolean state)
Is the unification applies inside an (embeeded) CG or not ? |
void |
setValue(java.lang.Object obj1,
java.lang.Object bindInfObj1,
java.lang.Object obj2,
java.lang.Object bindInfObj2)
Associate value to variable in this binding context |
Method Detail |
public ObjectWithBindInf getValue(java.lang.Object obj, java.lang.Object bindInf)
obj
- An object that corresponds in general to a variablebindInf
- The binding information for the parameter obj
public void setValue(java.lang.Object obj1, java.lang.Object bindInfObj1, java.lang.Object obj2, java.lang.Object bindInfObj2)
obj1
- It corresponds in general to a variable (Variable). But in some case,
it can be any object that should be set to obj2 which corresponds to the variable.bindInfObj1
- The binding information for obj1obj2
- It corresponds in general to a value, an (Amine) Object. But in some case,
it can be a variable.bindInfObj2
- The binding information for obj2public boolean isFreeVariable(java.lang.Object obj, java.lang.Object bindInf)
public boolean isBoundVariable(java.lang.Object obj, java.lang.Object bindInf)
public CGOperations getCGOperations()
public void setCGUnification(boolean state)
state
- public void removeCGUnifConstrs()
public void clearCGConstrs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |