Unify() public méthode

public Unify ( AbstractTerm term ) : bool
term AbstractTerm
Résultat bool
Exemple #1
0
        public void Unify_after_assignment()
        {
            AbstractTerm term = new AbstractTerm();
            ConstantTerm con = new ConstantTerm("test");

            term.Assign(con);

            Assert.AreEqual(term.Unify(con), con.Unify(term));
        }
Exemple #2
0
        public void Unify_con_str()
        {
            ConstantTerm con = new ConstantTerm("ali");
            StructureTerm term = new StructureTerm("samir", 2);

            Assert.IsFalse(con.Unify(term));
        }
Exemple #3
0
        public void Unify_con_ref()
        {
            AbstractTerm term = new AbstractTerm();

            ConstantTerm con = new ConstantTerm("ali");

            Assert.IsTrue(con.Unify(term));

            Assert.AreSame(term.Data(), con.Data());
        }
Exemple #4
0
        public void Unify_con_ne_con()
        {
            ConstantTerm con = new ConstantTerm("ali");
            ConstantTerm term = new ConstantTerm("samir");

            Assert.IsFalse(con.Unify(term));
        }
Exemple #5
0
        public void Unify_con_lis()
        {
            ConstantTerm con = new ConstantTerm("ali");
            ListTerm term = new ListTerm();

            Assert.IsFalse(con.Unify(term));
        }
Exemple #6
0
        public void Unify_con_eq_con()
        {
            ConstantTerm con = new ConstantTerm("ali");
            ConstantTerm term = new ConstantTerm("ali");

            Assert.IsTrue(con.Unify(term));
        }