adding #pragma warnings to yprolog language support
parent
05fb40dc0b
commit
ae0bcab35e
|
@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
|
|
||||||
// disable warning on l1, don't see how we can
|
// disable warning on l1, don't see how we can
|
||||||
// code this differently
|
// code this differently
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For each result, unify the _freeVariables and unify bagArrayVariable with the associated bag.
|
/// For each result, unify the _freeVariables and unify bagArrayVariable with the associated bag.
|
||||||
|
@ -208,7 +208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
bagOfAnswers.add();
|
bagOfAnswers.add();
|
||||||
return bagOfAnswers.resultSet(Bag);
|
return bagOfAnswers.resultSet(Bag);
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A TermArrayEqualityComparer implements IEqualityComparer to compare two object arrays using YP.termEqual.
|
/// A TermArrayEqualityComparer implements IEqualityComparer to compare two object arrays using YP.termEqual.
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
|
|
||||||
// disable warning on l1, don't see how we can
|
// disable warning on l1, don't see how we can
|
||||||
// code this differently
|
// code this differently
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is a simplified findall when the goal is a single call.
|
/// This is a simplified findall when the goal is a single call.
|
||||||
|
@ -103,6 +103,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
findallAnswers.add();
|
findallAnswers.add();
|
||||||
return findallAnswers.resultArray();
|
return findallAnswers.resultArray();
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
|
|
||||||
// disable warning on l1, don't see how we can
|
// disable warning on l1, don't see how we can
|
||||||
// code this differently
|
// code this differently
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If arg is another Functor1, then succeed (yield once) if this and arg have the
|
/// If arg is another Functor1, then succeed (yield once) if this and arg have the
|
||||||
/// same name and the functor args unify, otherwise fail (don't yield).
|
/// same name and the functor args unify, otherwise fail (don't yield).
|
||||||
|
@ -78,7 +78,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
yield return false;
|
yield return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
|
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
|
|
||||||
// disable warning on l1, don't see how we can
|
// disable warning on l1, don't see how we can
|
||||||
// code this differently
|
// code this differently
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
/// If arg is another Functor2, then succeed (yield once) if this and arg have the
|
/// If arg is another Functor2, then succeed (yield once) if this and arg have the
|
||||||
/// same name and all functor args unify, otherwise fail (don't yield).
|
/// same name and all functor args unify, otherwise fail (don't yield).
|
||||||
/// If arg is a Variable, then call its unify to unify with this.
|
/// If arg is a Variable, then call its unify to unify with this.
|
||||||
|
@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
yield return false;
|
yield return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
|
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
|
|
||||||
// disable warning on l1, don't see how we can
|
// disable warning on l1, don't see how we can
|
||||||
// code this differently
|
// code this differently
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
/// If arg is another Functor3, then succeed (yield once) if this and arg have the
|
/// If arg is another Functor3, then succeed (yield once) if this and arg have the
|
||||||
/// same name and all functor args unify, otherwise fail (don't yield).
|
/// same name and all functor args unify, otherwise fail (don't yield).
|
||||||
/// If arg is a Variable, then call its unify to unify with this.
|
/// If arg is a Variable, then call its unify to unify with this.
|
||||||
|
@ -84,7 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
yield return false;
|
yield return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
|
|
@ -249,7 +249,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
object[] arguments = YP.getFunctorArgs(Head);
|
object[] arguments = YP.getFunctorArgs(Head);
|
||||||
|
|
||||||
// We always match Head from _allAnswers, and the Body is Atom.a("true").
|
// We always match Head from _allAnswers, and the Body is Atom.a("true").
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
|
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
|
||||||
{
|
{
|
||||||
// The caller can assert another answer into this same predicate during yield, so we have to
|
// The caller can assert another answer into this same predicate during yield, so we have to
|
||||||
|
@ -260,7 +260,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
yield return false;
|
yield return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<bool> retract(object Head, object Body)
|
public IEnumerable<bool> retract(object Head, object Body)
|
||||||
|
@ -271,7 +271,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
object[] arguments = YP.getFunctorArgs(Head);
|
object[] arguments = YP.getFunctorArgs(Head);
|
||||||
|
|
||||||
// We always match Head from _allAnswers, and the Body is Atom.a("true").
|
// We always match Head from _allAnswers, and the Body is Atom.a("true").
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
|
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
|
||||||
{
|
{
|
||||||
// The caller can assert another answer into this same predicate during yield, so we have to
|
// The caller can assert another answer into this same predicate during yield, so we have to
|
||||||
|
@ -286,7 +286,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -116,10 +116,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
{
|
{
|
||||||
// disable warning on l1, don't see how we can
|
// disable warning on l1, don't see how we can
|
||||||
// code this differently
|
// code this differently
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
foreach (bool l1 in YP.unify(this, arg))
|
foreach (bool l1 in YP.unify(this, arg))
|
||||||
yield return false;
|
yield return false;
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -623,7 +623,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
|
|
||||||
// disable warning on l1, don't see how we can
|
// disable warning on l1, don't see how we can
|
||||||
// code this differently
|
// code this differently
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
public static IEnumerable<bool> univ(object Term, object List)
|
public static IEnumerable<bool> univ(object Term, object List)
|
||||||
{
|
{
|
||||||
Term = YP.getValue(Term);
|
Term = YP.getValue(Term);
|
||||||
|
@ -704,10 +704,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
object[] args = new object[(int)Arity];
|
object[] args = new object[(int)Arity];
|
||||||
for (int i = 0; i < args.Length; ++i)
|
for (int i = 0; i < args.Length; ++i)
|
||||||
args[i] = new Variable();
|
args[i] = new Variable();
|
||||||
#pragma warning disable 0219
|
|
||||||
foreach (bool l1 in YP.unify(Term, Functor.make((Atom)FunctorName, args)))
|
foreach (bool l1 in YP.unify(Term, Functor.make((Atom)FunctorName, args)))
|
||||||
yield return false;
|
yield return false;
|
||||||
#pragma warning restore 0219
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2632,7 +2630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A ClauseHeadAndBody is used in Compiler.compileAnonymousFunction as a base class
|
/// A ClauseHeadAndBody is used in Compiler.compileAnonymousFunction as a base class
|
||||||
/// in order to implement YP.IClause. After creating the object, you must call setHeadAndBody.
|
/// in order to implement YP.IClause. After creating the object, you must call setHeadAndBody.
|
||||||
|
@ -2653,13 +2651,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
if (_Head == null || _Body == null)
|
if (_Head == null || _Body == null)
|
||||||
yield break;
|
yield break;
|
||||||
|
|
||||||
#pragma warning disable 0168
|
#pragma warning disable 0168, 0219
|
||||||
foreach (bool l1 in YP.unify(Head, _Head))
|
foreach (bool l1 in YP.unify(Head, _Head))
|
||||||
{
|
{
|
||||||
foreach (bool l2 in YP.unify(Body, _Body))
|
foreach (bool l2 in YP.unify(Body, _Body))
|
||||||
yield return false;
|
yield return false;
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168
|
#pragma warning restore 0168, 0219
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
|
|
||||||
// disable warning on l1, don't see how we can
|
// disable warning on l1, don't see how we can
|
||||||
// code this differently
|
// code this differently
|
||||||
#pragma warning disable 0168,0164,0162
|
#pragma warning disable 0168, 0164, 0162, 0219
|
||||||
public static bool isDetNoneOut(object State, object Term)
|
public static bool isDetNoneOut(object State, object Term)
|
||||||
{
|
{
|
||||||
State = YP.getValue(State);
|
State = YP.getValue(State);
|
||||||
|
@ -241,7 +241,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#pragma warning restore 0168,0164,0162
|
#pragma warning restore 0168, 0164, 0162, 0219
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return false if any of args is out, otherwise true.
|
/// Return false if any of args is out, otherwise true.
|
||||||
|
|
Loading…
Reference in New Issue