MkFiniteDomainSort() public method

Create a new finite domain sort. The result is a sort
public MkFiniteDomainSort ( Symbol name, ulong size ) : FiniteDomainSort
name Symbol The name used to identify the sort
size ulong The size of the sort
return FiniteDomainSort
Ejemplo n.º 1
0
        public static void FiniteDomainExample(Context ctx)
        {
            Console.WriteLine("FiniteDomainExample");

            FiniteDomainSort s = ctx.MkFiniteDomainSort("S", 10);
            FiniteDomainSort t = ctx.MkFiniteDomainSort("T", 10);
            FiniteDomainNum s1 = (FiniteDomainNum)ctx.MkNumeral(1, s);
            FiniteDomainNum t1 = (FiniteDomainNum)ctx.MkNumeral(1, t);
            Console.WriteLine("{0} of size {1}", s, s.Size);
            Console.WriteLine("{0} of size {1}", t, t.Size);
            Console.WriteLine("{0}", s1);
            Console.WriteLine("{0}", t1);
            Console.WriteLine("{0}", s1.Int);
            Console.WriteLine("{0}", t1.Int);
            // But you cannot mix numerals of different sorts
            // even if the size of their domains are the same:
            // Console.WriteLine("{0}", ctx.MkEq(s1, t1));
        }
Ejemplo n.º 2
0
        public static void FiniteDomainExample(Context ctx)
        {
            Console.WriteLine("FiniteDomainExample");

            var s = ctx.MkFiniteDomainSort("S", 10);
            var t = ctx.MkFiniteDomainSort("T", 10);
            var s1 = ctx.MkNumeral(1, s);
            var t1 = ctx.MkNumeral(1, t);
            Console.WriteLine("{0}", s);
            Console.WriteLine("{0}", t);
            Console.WriteLine("{0}", s1);
            Console.WriteLine("{0}", ctx.MkNumeral(2, s));
            Console.WriteLine("{0}", t1);
            // But you cannot mix numerals of different sorts
            // even if the size of their domains are the same:
            // Console.WriteLine("{0}", ctx.MkEq(s1, t1));
        }