śĪMĪGB      !"#$%&'()*+,-./0123456789:;<=> ? @ A 9Implementation of the Boyer-Moore Majority Vote Algorithm7(c) 2011 National Institute of Aerospace / Galois, Inc.Safe)/Majority vote first pass: choosing a candidate.ZMajority vote second pass: checking that a candidate indeed has more than half the votes. Vote streamsCandidate streamB Vote streamsCandidate stream True if candidate holds majorityCBC9Utility bounded-list functions (e.g., folds, scans, etc.)7(c) 2011 National Institute of Aerospace / Galois, Inc.Safe ŗCase-like function: The index of the first predicate that is true in the predicate list selects the stream result. If no predicate is true, the last element is chosen (default element) QIndex. WARNING: Very expensive! Consider using this only for very short lists.       Basic bounded statistics7(c) 2011 National Institute of Aerospace / Galois, Inc.Safe Summation.Maximum value.Minimum value. Mean value. n" must not overflow for word size a0 for streams over which computation is peformed.5Mean value over the current set of streams passed in.Stream for a stack machine7(c) 2011 National Institute of Aerospace / Galois, Inc.SafepStack stream in which the pop signal has precedence over the push signal in case both are true in the same tickpStack stream in which the push signal has precedence over the pop signal in case both are true in the same tickDepth Start value Pop signal Push signal Push stream Stack topDepth Start value Pop signal Push signal Push stream Stack topRegular expression library7(c) 2011 National Institute of Aerospace / Galois, Inc.Safe:EDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{| !8DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{| !Past-Time Linear-Temporal Logic7(c) 2011 National Institute of Aerospace / Galois, Inc.Safe)Did s hold in the previous period?*Has s5 always held (up to and including the current state)?+Did s= hold at some time in the past (including the current state)?,Once s2. holds, in the following state (period), does s1 continuously hold?)*+,)*+,,*+))*+,Safe -./012345678 -./012345678 -./013245768 -./012345678-Bounded Linear Temporal Logic (LTL) operators7(c) 2011 National Institute of Aerospace / Galois, Inc.Safe9 Property s( holds at the next period. For example: T 0 1 2 3 4 5 6 7 s => F F F T F F T F ... next s => F F T F F T F ... (Note: s must have sufficient history to } a value from it.: Property s holds for the next n periods. We require n >= 0. If n == 0, then s' holds in the current period, e.g., if p = always 2 sI, then we have the following relationship between the streams generated: C 0 1 2 3 4 5 6 7 s => T T T F T T T T ... p => T F F F T T ... ; Property s" holds at some period in the next n periods. If n == 0, then s* holds in the current period. We require n >= 0 . E.g., if p = eventually 2 sI, then we have the following relationship between the streams generated: 2s => F F F T F F F T ... p => F T T T F T T T ... < until n s0 s1 means that eventually n s1+, and up until at least the period before s1 holds, s0 continuously holds.=release n s0 s1 means that either  always n s1, or s10 holds up to and including the period at which s0 becomes true.9:;ns<=9:;<=9;:<=9:;<= 'Clocks based on a base period and phase7(c) 2011 National Institute of Aerospace / Galois, Inc.Safe>Constructor for a ~*. Note that period must be greater than 0.?Constructor for a X. Note that phase must be greater than or equal to 0, and must be less than the period.@#Generate a clock that counts every n ticks, starting at tick m, by using an array of size n.A$This follows the same convention as @0, but uses a counter variable of integral type a rather than an array.€~>?@Period n of clockPhase m of clockClock signal - ‚ on clock ticks, ƒ otherwiseAPeriod n of clockPhase m of clockClock signal - ‚ on clock ticks, ƒ otherwise>?@A@A>?€~>?@A  Main import module for libraries7(c) 2011 National Institute of Aerospace / Galois, Inc.Safe% )*+,9:;<=>?@A„    !"#$%&'()*+,-./012345678695:7;<=>?@A98:; B C D EFGHHIJKLMNOPQRSSTUVWXWYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€  ‚ ‚ ƒ„…ƒ„†‡-copilot-libraries-2.2.1-f8u1zvBXwuAodaUrcdaxPCopilot.Library.VotingCopilot.Library.UtilsCopilot.Library.StatisticsCopilot.Library.StacksCopilot.Library.RegExpCopilot.Library.PTLTLCopilot.Library.MTLCopilot.Library.LTLCopilot.Library.ClocksCopilot.Library.Librariesmajority aMajoritytailstakenfoldlnfoldl1nfoldrnfoldr1nscanlnscanrnscanl1nscanr1case'!!cyclesummaxminmeanmeanNowstackstack' copilotRegexpcopilotRegexpB$fSymbolParserP$fSymbolParserInt64$fSymbolParserInt32$fSymbolParserInt16$fSymbolParserInt8$fSymbolParserWord64$fSymbolParserWord32$fSymbolParserWord16$fSymbolParserWord8$fSymbolParserBool$fEqSym$fOrdSym $fShowSym $fEqNumSym $fShowNumSym $fShowRegExp$fEqPprevious alwaysBeeneventuallyPrevsince eventuallyalwaysuntilreleasetrigger matchingUntil matchingSincematchingReleasematchingTriggernextperiodphaseclkclk1 majority' aMajority'PgetName StreamName SymbolParserparseSymRegExpREpsilonRSymbolROrRConcatRStarNumSym symbolNumsymbolNumTSymAnylquoterquotelparenrparenstarplusqmarkpointminusnondigit followedBycPrefix optCPrefixciregexptermfactorfactor'anySym parseWordSym parseIntSym parsePSymopOropConcatopSuffixparser hasEpsilonfirstreverse'last'follow preceding hasFinitePath getSymbolsenumSymsregexp2CopilotNFAregexp2CopilotNFAB-copilot-language-2.2.1-4dZCSfwV4US6MQJiQ2X02I#Copilot.Language.Operators.TemporaldropPeriodPhaseghc-prim GHC.TypesTrueFalse