SaveAndUpdate() private method

Saves variable to the trail and updates it.
private SaveAndUpdate ( object value, PrologContext context ) : void
value object
context PrologContext
return void
 /// <summary>
 /// This is an atributed variable with metastructure m, unify with unattributed and unbound variable v.
 /// </summary>
 /// <param name="m">This variable's metavalue</param>
 /// <param name="l">The completely unbound logic variable to which we are binding.</param>
 /// <param name="context">Prolog context</param>
 void UnifyMetaVar(Metastructure m, LogicVariable l, PrologContext context)
 {
     Debug.Assert(l.MetaBinding == null);
     l.SaveAndUpdate(this, context);
     this.SaveAndUpdate(m.MetaVarUnify(l, context), context);
 }
 /// <summary>
 /// This is an attributed variable with attribute myMetaStructure, unify it with attributed variable them, with attribute theirMetaStructure.
 /// </summary>
 /// <param name="myMetaStructure">This variable's metavalue</param>
 /// <param name="theirMetaStructure">The meta-value of the variable we're unifying with</param>
 /// <param name="them">The variable to unify with</param>
 /// <param name="context">Prolog context</param>
 void UnifyMetaMeta(Metastructure myMetaStructure, Metastructure theirMetaStructure, LogicVariable them, PrologContext context)
 {
     SaveAndUpdate(myMetaStructure.MetaMetaUnify(theirMetaStructure, context), context);
     them.SaveAndUpdate(this, context);
 }
Beispiel #3
0
 /// <summary>
 /// This is an atributed variable with metastructure m, unify with unattributed and unbound variable v.
 /// </summary>
 /// <param name="m">This variable's metavalue</param>
 /// <param name="l">The completely unbound logic variable to which we are binding.</param>
 /// <param name="context">Prolog context</param>
 void UnifyMetaVar(Metastructure m, LogicVariable l, PrologContext context)
 {
     System.Diagnostics.Debug.Assert(l.MetaBinding == null);
     l.SaveAndUpdate(this, context);
     this.SaveAndUpdate(m.MetaVarUnify(l, context), context);
 }
Beispiel #4
0
 void UnifyMetaVar(Metastructure m, LogicVariable l, PrologContext context)
 {
     System.Diagnostics.Debug.Assert(l.MetaBinding == null);
     l.SaveAndUpdate(this, context);
     m.MetaVarUnify(l, context);
 }
Beispiel #5
0
 /// <summary>
 /// This is an attributed variable with attribute myMetaStructure, unify it with attributed variable them, with attribute theirMetaStructure.
 /// </summary>
 /// <param name="myMetaStructure">This variable's metavalue</param>
 /// <param name="theirMetaStructure">The meta-value of the variable we're unifying with</param>
 /// <param name="them">The variable to unify with</param>
 /// <param name="context">Prolog context</param>
 void UnifyMetaMeta(Metastructure myMetaStructure, Metastructure theirMetaStructure, LogicVariable them, PrologContext context)
 {
     SaveAndUpdate(myMetaStructure.MetaMetaUnify(theirMetaStructure, context), context);
     them.SaveAndUpdate(this, context);
 }