Exemple #1
0
        /// <summary>
        /// For each result, unify the _freeVariables and unify Bag with the associated bag which is sorted
        /// with duplicates removed, as in setof.
        /// </summary>
        /// <param name="Bag"></param>
        /// <returns></returns>
        public IEnumerable <bool> resultSet(object Bag)
        {
            Variable bagArrayVariable = new Variable();

            foreach (bool l1 in resultArray(bagArrayVariable))
            {
                List <object> bagArray = (List <object>)bagArrayVariable.getValue();
                YP.sortArray(bagArray);
                foreach (bool l2 in YP.unify(Bag, ListPair.makeWithoutRepeatedTerms(bagArray)))
                {
                    yield return(false);
                }
            }
        }