v݇R      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                   ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ  !"#$%&  !"#$%& !"#$%&   !"#$%& '=Takes a type and a list of variable names and declares them. (FTakes a type and a list of array names and their sizes declares them. )KTakes a type and a variable and initializes it. It is YOUR responsibility  to ensure that val is of type t. R*LTakes a type and an array and initializes it. It is YOUR responsibility to  ensure that vals is of type t. +IDeclare function prototypes, given a return type, a function name, and a  | list of argument types. Use S for a return type of void. ,Add an include of a library - Add an include of a header file TUV.3printf, with and without a newline (nl) character. / '()*+,-./ '()*+,-/. '()*+,-./0000S123456789:;<=>?@WAWFor each typed variable, this type holds all its successive values in an infinite list C Beware : each element of one of those lists corresponds to a full Atom period,  not to a single clock tick. BThis is a generalization of a N which is used for storing Maps over values parameterized by different types. HIt is extensively used in the internals of Copilot, in conjunction with  t and v CDEFGHIJKLMNOPQ?A type is streamable iff a stream may emit values of that type $There are very strong links between Q and B :  the types aggregated in B are exactly the Q types 1 and that invariant should be kept (see methods) RBProvides access to the Map in a StreamableMaps which store values  of the good type SRProvides a way to modify (mostly used for insertions) the Map in a StreamableMaps % which store values of the good type TA default value for the type a. Its value is not important. UA constructor to produce an Atom value VA constructor to get an Atom! value from an external variable W5The argument only coerces the type, it is discarded. I Returns the format for outputting a value of this type with printf in C  For example %f for a float X>The same, only adds the wanted precision for floating points. Y5The argument only coerces the type, it is discarded.  Returns the corresponding Atom type. ZJLike Show, except that the formatting is exactly the same as the one of C P for example the booleans are first converted to 0 or 1, and floats and doubles  have the good precision. [JTo make customer C triggers. Only for Spec Bool (others throw an error).  XXX make them throw errors! \:Holds the complete specification of a distributed monitor ]RContainer for all the instructions sending data, parameterised by different types ^7An instruction to send data on a port at a given phase _`A named stream aFContainer for mutually recursive streams, whose specifications may be " parameterized by different types bRSpecification of a stream, parameterized by the type of the values of the stream.  The only requirement on a is that it should be Q. cdefghijkl)Port over which to broadcast information mPhase of an Atom phase n Atom period o C file name p+Names of the streams or external variables q)Lookup into the map of the right type in B r)Lookup into the map of the right type in B / Launch an exception if the index is not in it stJThis function is used to iterate on all the values in all the maps stored  by a B!, accumulating a value over time uJThis function is used to iterate on all the values in all the maps stored  by a B!, accumulating a value over time vwxOnly keeps in sm" the values whose key+type are in l. Also returns a K bool saying whether all the elements in sm were in l. Works even if some  elements in l are not in sm. Not optimised at all. yGet the Copilot variables. zAn empty streamableMaps. {-Verifies if its argument is equal to emptySM |GReplace all accepted special characters by sequences of underscores. XY}~P123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Pponmlbkjihgfedca`]^_\QRSTUVWXYZ[OPBCDEFGHIJKLMNz{qrtuvwx|yA12?34567~@><=:;89}sP122345674567899:;;<==>?@AB CDEFGHIJKLMNCDEFGHIJKLMNOPPQ RSTUVWXYZ[RSTUVWXYZ[\]^__`ab kjihgfedccdefghijklmnopqrstuvwxyz{|}~ZAUsed for representing an error in the specification, detected by  $If an output depends of a future of ( an input it will be hard to compile to  say the least Could be compiled, but  would need bigger  prophecyArrays The algorithm to compile  Copilot specification can  only work if there is no  negative weighted closed  path in the specification,  as described in the original  research paper 2either a variable is not defined, or not with the 9 good type ; there is no implicit conversion of types in  Copilot %External array indexes can only take $ variables or constants as indexes. &if an external variable is sampled at ' phase 0 then there is no time for the  stream to be updated &if an external variable is sampled at ' phase 0 then there is no time for the  stream to be updated )A drop expression of less than 0 is used the BNF is not respected [\]Check a Copilot specification. F If it is not compilable, then returns an error describing the issue.  Else, returns Nothing ^_>Checks that streams are well defined (i.e., can be compiled).  "The main function of this module.  It takes a Copilot4 specification, the values of the monitored values, ( and returns the values of the streams. `  Compiles an Copilot specification to an Atom one. V The period is given as a Maybe : if it is Nothing, an optimal period will be chosen. abcdefgJFind the maximum phase as which an array sampling depends on this stream.  | Returns zero by default. hijk lmnopqr stuvwxyz{|}~jIBeware : crash without any possible recovery if a division by 0 happens. 2 Same risk with mod. Use div0 and mod0 if unsure. EAs mod and div, except that if the division would be by 0, the first  argument is used as a default. OBeware : both sides are executed, even if the result of one is later discarded @opsF, opsF2 and opsF3 are feeded to Tests.Random.randomStreams. H They allows the random generated streams to include lots of operators. S If you add a new operator to Copilot, it would be nice to add it to one of those, C that way it could be used in the random streams used for testing. O opsF holds all the operators of arity 1, opsF2 of arity 2 and opsF3 of arity3 S They are StreamableMaps, because operators are sorted based on their return type. Stream variable reference A constant stream Drop i elements from a stream.  Just a trivial wrapper over the d constructor Define a stream variable. Allows to build a ] from specification ` `  S Did s hold in the previous period? Has s always held? 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?  Name of the C file to generate  Options to pass to the compiler The optional period Interpret the program or not Where to put the executable Which compiler to use 4Code to replace the default initialization and main  &A list of Copilot variable C function * name pairs. The C funciton is called if ' the Copilot stream becomes True. The & Stream must be of Booleans and the C  function must be of type void  foo(void).   This function is the core of Copilot : L it glues together analyser, interpreter and compiler, and does all the IO. X It can be called either from interface (which justs decodes the command-line argument) 2 or directly from the interactive prompt in ghci.  streams is a specification,   inputExts/ allows the user to give at runtime values for c the monitored variables. Useful for testing on randomly generated values and specifications, & or for the interpreted version.  be0 chooses between compilation or interpretation, S and if compilation is chosen (AtomToC) holds a few additionnal informations.  see description of    iterationsF just gives the number of periods the specification must be executed. h If you would rather execute it by hand, then just choose AtomToC for backEnd and 0 for iterations  verbose determines what is output.             ) If there',s no Streams, then generate random streams. For distributed monitors. %Assign values to external variables. Set gcc options. RSet the period. If none is given, then the smallest feasible period is computed. Interpreting? +How many iterations are we simulating for? 8Verbosity level: OnlyErrors | DefaultVerbose | Verbose. *Random seed for generating Copilot specs. Name of the C file generated. 4The C compiler to use, as a path to the executable. 8Where to place the output C files (.c, .h, and binary). +Code to append above and below the C file. A list of Copilot variable C & function name pairs. The C funciton ! is called if the Copilot stream & becomes True. The Stream must be of % Booleans and the C function must be  of type void  foo(void) . There % should be no more than one function & per trigger variable. Triggers fire # in the same phase (1) that output  vars are assigned.  DSets the environment for simulation by giving a mapping of external % variables to lists of values. E.g.,  $ setE (emptySM {w32Map = fromList [("ext", [0,1..])]}) ...!sets the external variable names ext9 to take the natural numbers, up to the limit of Word32. )Sets the options for the compiler, e.g.,   setC "-O2" ...Sets gcc options. sManually set the period for the program. Otherwise, the minimum required period is computed automatically. E.g.,  setP 100 ...  < sets the period to be 100. The period must be at least 1. <Sets the number of iterations of the program to simulation:  setN 50  ' simulations the program for 50 steps. Set the verbosity level. JSets the compiler to use, given as a path to the executable. The default  is "gcc". HSets the directory into which the output of compiled programs should be ? placed. If the directory does not exist, it will be created. >Sets the code to precede and follow the copilot specification W If nothing, then code appropriate for communication with the interpreter is generated KGive C function triggers for Copilot Boolean streams. The tiggers fire if  the stream becoms true.  The main function !-      !   !   !"#$"#$#"$"#$%Returns the smallest m <= n such that drop m s is true, and -1 if no  such m exists. &Returns the smallest m <= n such that drop m s is false, and -1 if no  such m exists. 'Returns the largest m <= n such that drop m s is true, and -1 if no  such m exists. (Returns the largest m <= n such that drop m s is false, and -1 if no  such m exists. %&'(%&'(%&'() Property s holds for the next n periods. If n == 0, then s holds $ in the current period. We require n >= 0.  E.g., if p = always 2 sI, then we have the following relationship between the streams generated:    s => T T T T F F F F ...  p => T T F F F F F F ...   * Property s holds at the next period. + 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:    s => F F F F T F T F ...  p => F F T T T 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 s1 holds up to and  including the period at which s0 becomes true. )*+,-)*+,-)*+,-. Summation. /Maximum value. 0Minimum value. 1 Mean value. n must not overflow  for word size a1 for streams over which computation is peformed. ./01/0.1./0123232323 0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !%&'()*+,-456789:;<=>?@ABCDEFG456789:;<=>?@ABCDEFG456789:;<=>?@ABCDEFG456789:;<=>?@ABCDEFG  HIJKLMNOPQ HIJKLMNOPQ HIJKLMNOPQ HIJKLMNOPQ !" !# !$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyzz{|}~                               ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv%wxyz{|}~                                 "                   copilot-0.23Language.Copilot.LanguageLanguage.Copilot.VariablesLanguage.Copilot.AdHocCLanguage.Copilot.HelpLanguage.Copilot.CoreLanguage.Copilot.AnalyserLanguage.Copilot.InterpreterLanguage.Copilot.CompilerLanguage.Copilot.AtomToCLanguage.Copilot.Tests.RandomLanguage.Copilot.Libs.PTLTLLanguage.Copilot.DispatchLanguage.Copilot.InterfaceLanguage.Copilot.Libs.ErrorChksLanguage.Copilot.Libs.IndexesLanguage.Copilot.Libs.LTL Language.Copilot.Libs.Statistics&Language.Copilot.Examples.StatExamples"Language.Copilot.Examples.Examples'Language.Copilot.Examples.PTLTLExamplesLanguage.Copilot.PrettyPrinterLanguage.Copilot%Language.Copilot.Examples.LTLExamplesbaseGHC.Num fromInteger-negateGHC.Real FractionalNumghc-primGHC.BoolBoolFalseTrue/signumabs*+abcdefghijklmnopqrstuvwxyzvarDeclarrDeclvarInit arrayInitfuncDeclincludeBracket includeQuote printfNewlineprintfhelpStr BoundedArrayB TmpSamplestmpVarstmpArrstmpIdxsPhasedValueIdxPhIdxPhasedValueArrPhAPhasedValueVarPhVIndexesOutputs ProphArrsVarsStreamableMapsSMbMapi8Mapi16Mapi32Mapi64Mapw8Mapw16Mapw32Mapw64MapfMapdMapSendablesend Streamable getSubMap updateSubMapunitatomConstructorexternalAtomConstructortypeId typeIdPrecatomTypeshowAsC makeTriggerDistributedStreamsSendsSendStreamStreamsSpecDropAppendF3F2FPArrPVarConstVarPortPhasePeriodName getMaybeElemgetElem getAtomTypefoldStreamableMapsfoldSendableMapsmapStreamableMapsmapStreamableMapsMfilterStreamableMapsgetVarsemptySM isEmptySM normalizeVar tmpVarNameemptyTmpSamples tmpArrNamenextStExtVarsExtAExtVSpecSetPArrSet DropSpecSet FunSpecSet AllSpecSetErrorDependsOnFutureDependsOnClosePastNonNegativeWeightedClosedPathBadType BadPArrSpecBadSamplingArrPhaseBadSamplingPhaseBadDrop BadSyntaxcheckgetExternalVarsinterpretStreams copilotToAtom tmpSampleStrgetPrePostCode OperatorsOperatorfromOp randomStreams CastIntTocastnotmoddivmod0div0<<=>=>==/=||&&^==>muxboolint8int16int32int64word8word16word32word64floatdoubleextBextI8extI16extI32extI64extW8extW16extW32extW64extFextDextArrBextArrI8 extArrI16 extArrI32 extArrI64extArrW8 extArrW16 extArrW32 extArrW64extArrFextArrDopsFopsF2opsF3varvarBvarI8varI16varI32varI64varW8varW16varW32varW64varFvarDsendW8constconstBconstI8constI16constI32constI64constW8constW16constW32constW64constFconstDdrop++.=..|previous alwaysBeeneventuallyPrevsinceVerboseDefaultVerbose OnlyErrors Iterations InterpretedNotInterpretedBackEnd InterpreterOptsAtomToCcNamegccOpts getPeriod interpreted outputDircompiler prePostCodetriggersarrDecsdispatchOptionsbaseOptstest interpretcompileverifysetSsetEsetArrssetCsetPsetIsetNsetVsetRsetOsetGCCsetDirsetPP setTriggers interfacehelpnPosChknOneChkint16Chksoonest soonestFaillatest latestFailalwaysnext eventuallyuntilreleasesummaxminmeant0tMeanfibt1t2t3t4t5yyzzxxenginedistgcdgcd' testCoercionstestCoercionsInt testRulesi8traptestArrt99 tstdatprvtprvtstdatABtABtstdatEPtEP tstdat1Sin tstdat2SintSintSinExtbracesListShow Data.MaybeNothing printfPre printfPostnewlineArrIndex showIndentedshowRawExsWeight&&>||> syntaxCheckdefCheck initProphArr initOutputinitExtSamplesmakeUpdateIndexmakeOutputIndexmakeRule maxSampleDepmakeSend sampleExtsgetIdxgetOptimalPeriodextDeclspreCodevPrepostCode inputExtVars sampleExtVars outputVars VariablesVNamemaxDropmaxSamplePhaseweightsContinueVarweightsContinuePVarweightsVarTypesweightsPVarTypesweightsAllSpecSetweightsFunSpecSetweightsDropSpecSetfoldRandomableMapsrandomWeightedaddRandomVNames addRandomSpec randomSpecaddRandomExternalrandomExternalValuesmkOpmkOp2mkOp3 mkOp2CoercemkOp2OrdmkOp2Eqnot_+$-$*$/$<$<=$>=$>$==$/=$||$&&$^$==>$mux_createMapFromElemscheckTriggerVars copilotToCgccCallexecuteshowVars preludeText optStreamsoptSendsoptExts optCompile optPeriod optInterpret optIterations optVerbose optRandomSeedoptCName optCompiler optOutputDiroptPrePostCode optTriggersoptArrs createSeedgetStreamsVars getBackendchk soonestHlp latestHlp foldDropstestingoutputtSoonesttLatesttAlwaystFuturetUntil tRelease0 tRelease1