/// <summary> /// Or operation of two Zen List of bool. /// </summary> /// <param name="ma">list a.</param> /// <param name="mb">list b.</param> /// <returns>list of a or b.</returns> public static Zen <IList <bool> > Or(this Zen <IList <bool> > ma, Zen <IList <bool> > mb) { var index = mb.Length(); var ret = ma.Select(_ => Language.Or(ma.At(index -= 1).Value(), mb.At(index).Value())); return(ret); }
// 0 - 1 - 2 (0 - 2) // The function encodes the property we want to verify public Zen <bool> Simple_CPV(Zen <IList <int> > costs, int src_node) { return(And(And(costs.At((Zen <ushort>) this.dst_node).Value() == 0, costs.At((Zen <ushort>)src_node).Value() <= GlobalVar.MAX_HOPS), costs.Length() == 7)); }