śĪ|/uĪr      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq Safe-InferedA primitive operator. A primitive constructor. Cons data constructor. Nil data constructor. List data type constructor. Int type constructor. Unit data constructor (()). Unit type constructor (Unit). EThese are primitive witnesses that guarantee the associated property F of the program. Ostensibly, they are only introduced by the system E at runtime, but for testing purposes we can also inject them into  the source program. #Witness that a region is manifest. 3 This ensures there are no thunks in the region, & which prevents it from being Lazy. Witness that a region is lazy. 1 This lets is allocate thunks into the region, ( and prevents it from being Manifest. "Witness that a region is mutable. / This lets us update objects in the region, ( and prevents it from being Constant. #Witness that a region is constant. : This lets us purify read and allocation effects on it, ' and prevents it from being Mutable. !Witness that a region is global. C Global regions live for the duration of the program and are not D deallocated in a stack like manner. This lets us hide the use of B such regions, and rely on the garbage collector to reclaim the  space. A region handle. These are pretty printed like R5#. A store location. These are pretty printed like L4#. -Names of things recognised by the evaluator. Store capabilities. Region handles. Store locations. Primitive operators (eg addInt, subInt). Primitive constructors (eg  List, Nil). ,Integer literals (which data constructors). User constructors. !User variables. "Read a primitive name. #/Lex a string to tokens, using primitive names. :The first argument gives the starting source line number. *  !"#rstuvw$  !"#$!  "# ! "#rstuvw Safe-Infered$Store binding. I These are naked objects that can be allocated directly into the heap. %#A thunk, used for lazy evaluation. '1Lambda abstraction, used for recursive bindings. P The flag indicates whether each binder is level-1 (True) or level-0 (False). *An algebraic data constructor. /!Next store location to allocate. 0 Next region handle to allocate. 1"Region handles already allocated. 2/Regions that are marked as global, and are not ( deallocated with a stack discipline. 3$Map of locations to store bindings,  their types, & and the handle for the regions they're in. 4-An empty store, with no bindings or regions. 5$Create a new location in the store. 6+Create several new locations in the store. 7"Create a new region in the store. 8(Create several new regions in the store 9,Delete a region, removing all its bindings. :1Check whether a store contains the given region. ;Set a region as being global. <9Add a store binding to the store, at the given location. =.Allocate a new binding into the given region,  returning the new location. >6Alloc some recursive bindings into the given region, " returning the new locations. ?%Lookup a the binding for a location. @%Lookup the type of a store location. A;Lookup the region handle, type and binding for a location. $%&'()*+,-./0123456789:;<=>?@Axy"$%&'()*+,-./0123456789:;<=>?@A"-./0123$*'%+,()&456789:;<=>?@A$*'%+,()&-./0123456789:;<=>?@Axy Safe-Infered B/Application of the Unit data type constructor. C.Application of the Int data type constructor. D/Application of the List data type constructor. O5Check whether a witness is a capability constructor. P5Check whether an expression is the unit constructor. Q"Take a region handle from a type. R)Take a region handle from an expression. S*Take a store location from an expression.  We strip off forget casts along the way T=Take a store location from an expression, reaching under any forget casts. U1Take a witness of mutability from an expression. BCDEFGHIJKLMNOPQRSTUBCDEFGHIJKLMNOPQRSTUBCDEFGHIJKLMNOPQRSTUBCDEFGHIJKLMNOPQRSTU Safe-InferedVData type definitions for:  Type Constructors  ---- ------------  Unit ()  Int 0 1 2 3 ...  List Nil Cons W;Kind environment containing kinds of primitive data types. X#Take the kind of a primitive name. Returns z if the name isn't primitive. YIType environment containing types of primitive data constructors as well ) as the following primitive operators:  8negInt, addInt, subInt, mulInt, divInt, eqInt, updateIntBIt also contains types for the primitive capability constructors: Global#, Const# , Mutable#, Lazy# , Manifest#Z#Take the type of a primitive name. Returns z if the name isn't primitive. [$Take the arity of a primitive name. VWXYZ[VWXYZ[VWXYZ[VWXYZ[ Safe-Infered\FStep a primitive constructor, which allocates an object in the store. ]Step a primitive operator. ^Like 7+ but return the region handle wrapped in a {. _Like 9) but accept a region handle wrapped in a {. \!Name of constructor to allocate. Arguments to constructor. Current store. "New store and result expression, $ if the operator steps, otherwise z. ]Name of operator to evaluate. Arguments to operator. Current store. "New store and result expression, $ if the operator steps, otherwise z. ^_\]^_\]^_\]^_ Safe-Infered `(The result of stepping some expression. a,Expression is stuck, and we know for sure it' s mistyped. b3Expression cannot step, and is not a (weak) value. ) The original expression was mistyped, / or something is wrong with the interpreter. c.Expression cannot step and is a (weak) value.  We're done already. d&Expression progressed to a new state. e*Single step a core expression to a value. As opposed to f2, if the provided expression is the location of a ) Thunk, then the thunk will be forced. f/Single step a code expression to a weak value. As opposed to e3, if the provided expression is the location of a ( Thunk, then the thunk is not forced. g#Check if an expression is a value.  Values can')t be progressed any further, with either e or f. h)Check if an expression is a weak values. A These are all the values, and locations that point to thunks. #Weak values can be progressed with e , but not f. `abcdeCurrent store. Expression to force. Result of forcing it. fCurrent store. Expression to step. Result of stepping it. gh `abcdefgh `dcbaefgh`dcbaefgh Safe-Inferedi=Things that can go wrong with the capabilities in a program. j9A capability constructor applied to a non-region handle.  As with k* we only need to check for this because we're H using general witness application to represent capabilities, instead  of having an atomic form. k,A partially applied capability constructor. @ In the formal semantics, capabilities are atomic, so this isn't  a problem. However, as we'*re representing them with general witness 5 appliction we need to ensure the constructors aren' t partially  applied. m%Conflicting capabilities in program. q9Check for conflicting store capabilities in the program. ijklmnopq| ijklmnopq qimkjnopllimkjnopllq| Safe-Infered`abcdef`dcbaef}      !"#$%&'()*+,-./01234456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ddc-core-eval-0.2.0.1DDC.Core.Eval.NameDDC.Core.Eval.StoreDDC.Core.Eval.CompoundsDDC.Core.Eval.EnvDDC.Core.Eval.PrimDDC.Core.Eval.StepDDC.Core.Eval.Check DDC.Core.EvalPrimOpPrimOpUpdateInt PrimOpEqInt PrimOpDivInt PrimOpMulInt PrimOpSubInt PrimOpAddInt PrimOpNegIntPrimCon PrimDaConCons PrimDaConNil PrimTyConList PrimTyConInt PrimDaConUnit PrimTyConUnitCap CapManifestCapLazy CapMutableCapConst CapGlobalRgnLocNameNameCapNameRgnNameLoc NamePrimOp NamePrimConNameIntNameConNameVarreadName lexStringSBindSThunk sbindThunkExpSLams sbindLamBinds sbindLamBodySObj sbindDataTag sbindDataArgsStore storeNextLoc storeNextRgn storeRegions storeGlobal storeBindsemptynewLocnewLocsnewRgnnewRgnsdelRgnhasRgn setGlobaladdBind allocBind allocBinds lookupBindlookupTypeOfLoclookupRegionTypeBindtUnittInttListwGlobalwConstwMutablewLazy wManifestwcGlobalwcConst wcMutablewcLazy wcManifest isCapConWisUnitX takeHandleT takeHandleXtakeLocX stripLocX takeMutableX primDataDefs primKindEnvkindOfPrimName primTypeEnvtypeOfPrimName arityOfName stepPrimCon stepPrimOp primNewRegion primDelRegion StepResultStepStuckMistyped StepStuckStepDone StepProgressforcestepisValue isWeakValueErrorErrorNonHandle ErrorPartial errorWitness ErrorConflict errorRegions errorCap1 errorCap2 checkCapsX$fPrettyPrimOp$fPrettyPrimCon $fPrettyCap $fPrettyRgn $fPrettyLoc $fPrettyName $fPrettySBind $fPrettyStorebase Data.MaybeNothingddc-core-0.2.0.2 DDC.Type.ExpBound $fPrettyError