示例#1
0
        internal bool Evaluate(LiteralSet labels)
        {
            //Console.WriteLine (string.Join (",", labels));
            //Console.WriteLine (string.Join (",", state.Select (kv => kv.Key + "=" + kv.Value)));

            foreach (var l in labels) {
                if (l is False) return false;
                if (l is Proposition) {
                    if (!state [(Proposition)l]) return false;
                }
                if (l is Negation) {
                    if (state [((Proposition)((Negation)l).Enclosed)]) return false;
                }
            }
            //Console.WriteLine (">> true");
            return true;
        }
示例#2
0
        /// <summary>
        /// Updates the node with the set of successor nodes (for the specified literals) in the corresponding Buchi Automata.
        /// The procedure is recursively applied on all children.
        /// </summary>
        /// <param name="a">The literals.</param>
        public void Update(LiteralSet a)
        {
            MacroState = new HashSet<AutomatonNode> (ba.Post (MacroState, a));

            foreach (var c in Children) {
                c.Update (a);
            }
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="LtlSharp.Translators.SafraDeterminization+SafraTransition"/> class
 /// with the specified label and target safra tree.
 /// </summary>
 /// <param name="labels">Labels.</param>
 /// <param name="target">Target.</param>
 public SafraTransition(LiteralSet labels, SafraTree target)
 {
     this.Labels = labels;
     this.Target = target;
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:LtlSharp.Automata.AutomatonNode"/> class with the specified
 /// name (if not empty or null) and the provided literals.
 /// </summary>
 /// <param name="name">Name.</param>
 /// <param name="literals">Literals.</param>
 public AutomatonNode(int id, string name, IEnumerable<ILiteral> literals)
 {
     Id = id;
     Name = string.IsNullOrEmpty (name) ? "s" + Id : name;
     Label = new LiteralSet (literals);
 }