public void ShouldCreateVariables()
        {
            PrologMachine pm = new PrologMachine();

            Variable v1 = pm.GetVariable(0);
            Variable v2 = pm.GetVariable(0);

            Assert.IsTrue(v1.Equals(v2));
            Assert.AreEqual("_0", v1.ToString());
        }
        public void EqualPrimitiveUnifyInternalAtomVariable()
        {
            StructureObject so = new StructureObject("=", new StructureObject("f", "a"), new StructureObject("f", "X"));
            PrologMachine   pm = new PrologMachine();

            Assert.IsTrue(pm.Resolve(so));
            Assert.AreEqual("a", pm.GetVariable(0).Dereference().ToString());
        }
        public void ShouldCreateVariable()
        {
            PrologMachine pm = new PrologMachine();

            Variable v1 = pm.GetVariable(0);

            Assert.IsNotNull(v1);
        }
        public void EqualPrimitiveUnifyAtomWithVariable()
        {
            StructureObject so = new StructureObject("=", "a", "X");
            PrologMachine   pm = new PrologMachine();

            Assert.IsTrue(pm.Resolve(so));
            Assert.AreEqual(so.Parameters[0], pm.GetVariable(0).Dereference());
        }