Exemplo n.º 1
0
        public override String ToString()
        {
            if (IsEmpty)
            {
                return("");
            }

            StringBuilder sb = new StringBuilder();

            for (int i = 1; i < dimention; i++)
            {
                sb.AppendLine("clock" + i + (DBMConstraint.dbm_rawIsStrict(Matrix[0 * dimention + i]) ? ":(" : ":[") + (DBMConstraint.dbm_raw2bound(Matrix[0 * dimention + i]) == int.MaxValue ? "-" + Constants.INFINITE : (Matrix[0 * dimention + i] * -1).ToString()) + "," + (Matrix[i * dimention + 0] == int.MaxValue ? Constants.INFINITE : Matrix[i * dimention + 0].ToString()) + (DBMConstraint.dbm_rawIsStrict(Matrix[i * dimention + 0]) ? ");" : "];"));
            }

            return(sb.ToString());
        }
Exemplo n.º 2
0
        public string GetID()
        {
            if (IsEmpty)
            {
                return("");
            }

            string toReturn = "";

            for (int i = 1; i < dimention; i++)
            {
                toReturn += (DBMConstraint.dbm_rawIsStrict(Matrix[0 * dimention + i]) ? "(" : "[") + DBMConstraint.dbm_raw2bound(Matrix[0 * dimention + i] * -1) + "," + DBMConstraint.dbm_raw2bound(Matrix[i * dimention + 0]) + (DBMConstraint.dbm_rawIsStrict(Matrix[i * dimention + 0]) ? ")" : "]");
            }

            return(toReturn);
        }
Exemplo n.º 3
0
        public String ToString(Dictionary <string, byte> clockMapping)
        {
            if (IsEmpty)
            {
                return("");
            }

            StringBuilder sb = new StringBuilder();

            foreach (KeyValuePair <string, byte> pair in clockMapping)
            {
                sb.AppendLine(pair.Key + (DBMConstraint.dbm_rawIsStrict(Matrix[0 * dimention + pair.Value]) ? ":(" : ":[") +
                              (Matrix[0 * dimention + pair.Value] == int.MaxValue ? "-" + Constants.INFINITE : (DBMConstraint.dbm_raw2bound(Matrix[0 * dimention + pair.Value] * -1)).ToString()) +
                              "," + (Matrix[pair.Value * dimention + 0] == int.MaxValue ? Constants.INFINITE : DBMConstraint.dbm_raw2bound(Matrix[pair.Value * dimention + 0]).ToString()) +
                              (DBMConstraint.dbm_rawIsStrict(Matrix[pair.Value * dimention + 0]) ? ");" : "];"));
            }


            return(sb.ToString());
        }