Coeffects: Unified static analysis of context-dependence
|
|
|
- Kelly Reynolds
- 10 years ago
- Views:
Transcription
1 Coeffects: Unified static analysis of context-dependence Tomas Petricek, Dominic Orchard and Alan Mycroft University of Cambridge, UK Abstract. Monadic effect systems provide a unified way of tracking effects of computations, but there is no unified mechanism for tracking how computations rely on the environment in which they are executed. This is becoming an important problem for modern software we need to track where distributed computations run, which resources a program uses and how they use other capabilities of the environment. We consider three examples of context-dependence analysis: liveness analysis, tracking the use of implicit parameters (similar to tracking of resource usage in distributed computation), and calculating caching requirements for dataflow programs. Informed by these cases, we present a unified calculus for tracking context dependence in functional languages together with a categorical semantics based on indexed comonads. We believe that indexed comonads are the right foundation for constructing context-aware languages and type systems and that following an approach akin to monads can lead to a widespread use of the concept. Modern applications run in diverse environments such as mobile phones or the cloud that provide additional resources and meta-data about provenance and security. For correct execution of such programs, it is often more important to understand how they depend on the environment than how they affect it. Understanding how programs affect their environment is a well studied area: effect systems [13] provide a static analysis of effects and monads [8] provide a unified semantics to different notions of effect. Wadler and Thiemann unify the two approaches [17], indexing a monad with effect information, and showing that the propagation of effects in an effect system matches the semantic propagation of effects in the monadic approach. No such unified mechanism exists for tracking the context requirements. We use the term coeffect for such contextual program properties. Notions of context have been previously captured using comonads [14] (the dual of monads) and by languages derived from modal logic [12,9], but these approaches do not capture many useful examples which motivate our work. We build mainly on the former comonadic direction ( 3) and discuss the modal logic approach later ( 5). We extend a simply-typed lambda calculus with a coeffect system based on comonads, replicating the successful approach of effect systems and monads. Examples of coeffects. We present three examples that do not fit the traditional approach of effect systems and have not been considered using the modal logic perspective, but can be captured as coeffect systems ( 1) the tracking of implicit dynamically-scoped parameters (or resources), analysis of variable liveness, and tracking the number of required past values in dataflow computations. This is the authors copy of the paper appearing in the proceedings of ICALP 2013.
2 2 Petricek, Orchard, Mycroft Coeffect calculus. Informed by the examples, we identify a general algebraic structure for coeffects. From this, we define a general coeffect calculus that unifies the motivating examples ( 2) and discuss its syntactic properties ( 4). Indexed comonads. Our categorical semantics ( 3) extends the work of Uustalu and Vene [14]. By adding annotations, we generalize comonads to indexed comonads, which capture notions of computation not captured by ordinary comonads. 1 Motivation Effect systems, introduced by Gifford and Lucassen [5], track effects of computations, such as memory access or message-based communication [6]. Their approach augments typing judgments with effect information: Γ e : τ, F. In Moggi s semantics, well-typed terms Γ e : τ are mapped to morphisms Γ M τ where M encodes effects and has the structure of a monad [8]. Wadler and Thiemann annotate monads with effect information, written M F [17]. In contrast to the analysis of effects, our analysis of context-dependence differs in the treatment of lambda abstraction. Wadler and Thiemann explain that in the rule for abstraction, the effect is empty because evaluation immediately returns the function, with no side effects. The effect on the function arrow is the same as the effect for the function body, because applying the function will have the same side effects as evaluating the body [17]. We instead consider systems where λ-abstraction places requirements on both the call-site (latent requirements) and declaration-site (immediate requirements), resulting in different program properties. We informally discuss three examples that demonstrate how contextual requirements propagate. Section 2 unifies these in a single calculus. We write coeffect judgements C s Γ e : τ where the coeffect annotation s associates context requirements with the free-variable context Γ. Function types have the form C s τ 1 τ 2 associating latent coeffects s with the parameter. The C s Γ syntax and C s τ types are a result of the indexed comonadic semantics ( 3). Implicit parameters and resources. Implicit parameters [7] are dynamicallyscoped variables. They can be used to parameterize a computation without propagating arguments explicitly through a chain of calls and are part of the context in which expressions evaluate. As correctly expected [7], they can be modelled by comonads. Rebindable resources in distributed computations (e.g., a local clock) follow a similar pattern, but we discuss implicit parameters for simplicity. The following function prints a number using implicit parameters?culture (determining the decimal mark) and?format (the number of decimal places): λn.printnumber n?culture?format Figure 1 shows a type-and-coeffect system tracking the set of an expression s implicit parameters. For simplicity here, all implicit parameters have type ρ. Context requirements are created in (access), while (var) requires no implicit parameters; (app) combines requirements of both sub-expressions as well as the latent requirements of the function.
3 Coeffects: Unified static analysis of context-dependence 3 (var) x : τ Γ C Γ x : τ (app) C r Γ e 1 : C t τ 1 τ 2 C s Γ e 2 : τ 1 C r s t Γ e 1 e 2 : τ 2 (access) C {?a} Γ?a : ρ (abs) C r s (Γ, x : τ 1 ) e : τ 2 C r Γ λx.e : C s τ 1 τ 2 Fig. 1. Selected coeffect rules for implicit parameters The (abs) rule is where the example differs from effect systems. Function bodies can access the union of the parameters (or resources) available at the declaration-site (C r Γ ) and at the call-site (C s τ 1 ). Two of the nine permissible judgements for the above example are: C Γ (...) : C {?culture,?format} int string C {?culture,?format} Γ (...) : C {?format} int string The coeffect system infers multiple, i.e. non-principal, coeffects for functions. Different judgments are desirable depending on how a function is used. In the first case, both parameters have to be provided by the caller. In the second, both are available at declaration-site, but?format may be rebound (the precise meaning is provided by the semantics, discussed in 3). Implicit parameters can be captured by the reader monad, where parameters are associated with the function codomain M (int M {?culture,?format} string), modelling only the first case. Whilst the reader monad can be extended to model rebinding, the next example cannot be structured by any monad. Liveness analysis. Liveness analysis detects whether a free variable of an expression may be used (live) or whether it is definitely not used (dead). A compiler can remove bindings to dead variables as the result is never used. We start with a restricted analysis and briefly mention how to make it practical later ( 5). The restricted form is interesting theoretically as it gives rise to the indexed partiality comonad ( 3), which is a basic but instructive example. The coeffect system in Fig. 2 detects whether all free variables are dead (C D Γ ) or whether at least one variable is live (C L Γ ). Variable use (var) is annotated with L and constants with D, i.e., if c N then C D Γ c : int. A dead context may be marked as live by letting D L and adding sub-coeffecting ( 2). The (app) rule can be understood by discussing its semantics. Consider semantic functions f, g, h annotated by r, s, t respectively. The sequential composition g f is live in its parameter only when both f and g are live. In the coeffect semantics, f is not evaluated if g ignores its parameter (regardless of evaluation order). Thus, g f is annotated by conjunction r s (where L L = L). A pointwise composition of g and h, passing the same parameter to both, is live in its parameter if either g or h is live (i.e., disjunction s t). Application uses both compositions, thus Γ is live if it is needed by e 1 or by the function and by e 2. (var) x : τ Γ C L Γ x : τ (app) C r Γ e 1 : C t τ 1 τ 2 C s Γ e 2 : τ 1 C r (s t) Γ e 1 e 2 : τ 2 Fig. 2. Selected coeffect rules for liveness analysis
4 4 Petricek, Orchard, Mycroft (var) x : τ Γ C 0 Γ x : τ (app) C m Γ e 1 : C p τ 1 τ 2 C n Γ e 2 : τ 1 C max(m,n+p) Γ e 1 e 2 : τ 2 (prev) C n Γ e : τ C n+1 Γ prev e : τ (abs) C min(m,n) (Γ, x : τ 1 ) e : τ 2 C m Γ λx.e : C n τ 1 τ 2 Fig. 3. Selected coeffect rules for causal data flow An (abs) rule (not shown) compatible with the structure in Fig. 1 combines the context annotations using. Thus, if the body uses some variables, both the function argument and the context of the declaration-site are marked as live. The coeffect system thus provides a call-by-name-style semantics, where redundant computations are omitted. Liveness cannot be modelled using monads with denotations τ 1 M r τ 2. In call-by-value languages, the argument τ 1 is always evaluated. Using indexed comonads ( 3), we model liveness as a morphism C r τ 1 τ 2 where C r is the parametric type Maybe τ = τ + 1 (which contains a value τ when r = L and does not contain value when r = D). Efficient dataflow. Dataflow languages (e.g., Lucid [16]) declaratively describe computations over streams. In causal data flow, programs may access past values. In this setting, a function τ 1 τ 2 becomes a function from a list of historical values [τ 1 ] τ 2. A coeffect system here tracks how many past values to cache. Figure 3 annotates contexts with an integer specifying the maximum number of required past values. The current value is always present, so (var) is annotated with 0. The expression prev e gets the previous value of stream e and requires one additional past value (prev); e.g. prev (prev e) requires 2 past values. The (app) rule follows the same intuition as for liveness. Sequential composition adds the tags (the first function needs n + p past values to produce p past inputs for the second function); passing the context to two subcomputations requires the maximum number of the elements required by the two subcomputations. The (abs) rule for data-flow needs a distinct operator min therefore, the declaration-site and call-site must each provide at least the number of past values required by the function body (as the body may use variables coming from the declaration-site as well as the argument). Soundness follows from our categorical model ( 3). Uustalu and Vene model causal dataflow by a non-empty list comonad NeList τ = τ (NeList τ + 1) [14]. However, this model leads to (inefficient) unbounded lists of past elements. The coeffect system above infers a (sound) over-approximation of the number of required past elements and so fixed-length lists may be used instead. 2 Generalized coeffect calculus The previous three examples exhibit a number of commonalities. We capture these in the coeffect calculus. We do not overly restrict the calculus to allow for notions of context-dependent computations not discussed above.
5 Coeffects: Unified static analysis of context-dependence 5 The syntax of our calculus is that of the simply-typed lambda calculus (where v ranges over variables, T over base types, and r over coeffect annotations): e ::= v λv.e e 1 e 2 τ ::= T τ 1 τ 2 C r τ The type C r τ captures values of type τ in a context specified by the annotation r. This type appears only on the left-hand side of a function arrow C r τ 1 τ 2. In the semantics, C r corresponds to some data type (e.g., List or Maybe). Extensions such as explicit let-binding are discussed later ( 4). The coeffect tags r, that were demonstrated in the previous section, can be generalized to a structure with three binary operators and a particular element. Definition 1. A coeffect algebra (S,,,, e) is a set S with an element e S, a semi-lattice (S, ), a monoid (S,, e), and a binary. That is, r, s, t S: r (s t) = (r s) t e r = r = r e (monoid) r s = s r r (s t) = (r s) t r r = r (semi-lattice) The generalized coeffect calculus captures the three motivating examples ( 1), where some operators of the coeffect algebra may coincide. The operator represents sequential composition; guided by the categorical model ( 3), we require it to form a monoid with e. The operator corresponds to merging of context requirements in pointwise composition and the semi-lattice (S, ) defines a partial order: r s when r s = s. This ordering implies a sub-coeffecting rule. The coeffect e is often the top or bottom of the lattice. The operator corresponds to splitting requirements of a function body between the call- and definition-site. This operator is unrestricted in the general system, though it has additional properties in some coeffects systems, e.g., semilattice structure on. Possibly these laws should hold for all coeffect systems, but we start with as few laws as possible to avoid limiting possible uses of the calculus. We consider constrained variants with useful properties later ( 4). Implicit parameters use sets of names S = P(Id) as tags with union for all three operators. Variable use is annotated with e = and is subset ordering. Liveness uses a two point lattice S = {D, L} where D L. Variables are annotated with the top element e = L and constants with bottom D. The operation is (join) and and are both (meet). Dataflow tags are natural numbers S = N and operations, and correspond to max, min and +, respectively. Variable use is annotated with e = 0 and the order is the standard ordering of natural numbers. Coeffect typing rules. Figure 4 shows the rules of the coeffect calculus, given some coeffect algebra (S,,,, e). The context required by a variable (var) is annotated with e. The sub-coeffecting rule (sub) allows the contextual requirements of an expression to be generalized. The (abs) rule checks the body of the function in a context r s, which is a combination of the coeffects available in the context r where the function
6 6 Petricek, Orchard, Mycroft (var) x : τ Γ C e Γ x : τ (app) C r Γ e 1 : C t τ 1 τ 2 C s Γ e 2 : τ 1 C r (s t) Γ e 1 e 2 : τ 2 (sub) C s Γ e : τ C r Γ e : τ (s r) (abs) C r s (Γ, x : τ 1 ) e : τ 2 C r Γ λx.e : C s τ 1 τ 2 Fig. 4. Type and coeffect system for the coeffect calculus is defined and in a context s provided by the caller of the function. Note that none of the judgements create a value of type C r τ. This type appears only immediately to the left of an arrow C r τ 1 τ 2. In function application (app), context requirements of both expressions and the function are combined as previously: the pointwise composition is used to combine the coeffect r of the expression representing a function and the coeffects of the argument, sequentially composed with the coeffects of the function: s t. For space reasons, we omit recursion. We note that this would require adding coeffect variables and extending the coeffect algebra with a fixed-point operation. 3 Coeffect semantics using indexed comonads The approach of categorical semantics interprets terms as morphisms in some category. For typed calculi, typing judgments x 1 : τ 1... x n : τ n e : τ are usually mapped to morphisms τ 1... τ n τ. Moggi showed the semantics of various effectful computations can be captured generally using the (strong) monad structure [8]. Dually, Uustalu and Vene showed that (monoidal) comonads capture various kinds of context-dependent computation [14]. We extend Uustalu and Vene s approach to give a semantics for the coeffect calculus by generalising comonads to indexed comonads. We emphasise semantic intuition and abbreviate the categorical foundations for space reasons. Indexed comonads. Uustalu and Vene s approach interprets well-typed terms as morphisms C(τ 1... τ n ) τ, where C encodes contexts and has a comonad structure [14]. Indexed comonads comprise a family of object mappings C r indexed by a coeffect r describing the contextual requirements satisfied by the encoded context. We interpret judgments C r (x 1 : τ 1,..., x n : τ n ) e : τ as morphisms C r ( τ 1... τ n ) τ. The indexed comonad structure provides a notion of composition for computations with different contextual requirements. Definition 2. Given a monoid (S,, e) with binary operator and unit e, an indexed comonad over a category C comprises a family of object mappings C r where for all r S and A obj(c) then C r A obj(c) and: a natural transformation ε A : C e A A, called the counit; a family of mappings ( ) r,s from morphisms C r A B to morphisms C r s A C s B in C, natural in A, B, called coextend;
7 Coeffects: Unified static analysis of context-dependence 7 such that for all f : C r τ 1 τ 2 and g : C s τ 2 τ 3 the following equations hold: ε f r,e = f (ε) e,r = id (g f r,s) (r s),t = g s,t f r,(s t) The coextend operation gives rise to an associative composition operation for computations with contextual requirements (with counit as the identity): ˆ : (C r τ 1 τ 2 ) (C s τ 2 τ 3 ) (C r s τ 1 τ 3 ) g ˆ f = g f r,s The composition ˆ best expresses the intention of indexed comonads: contextual requirements of the composed functions are combined. The properties of the composition follow from the indexed comonad laws and the monoid (S,, e). Example 1. Indexed comonads are analogous to comonads (in cokleisli form), but with the additional monoidal structure on indices. Indeed, comonads are a special case of indexed comonads with a trivial singleton monoid, e.g., ({1},, 1) with 1 1 = 1 where C 1 is the underlying functor of the comonad and ε and ( ) 1,1 are the usual comonad operations. However, as demonstrated next, not all indexed comonads are derived from ordinary comonads. Example 2. The indexed partiality comonad encodes free-variable contexts of a computation which are either live or dead (i.e., have liveness coeffects) with the monoid ({D, L},, L), where C L A = A encodes live contexts and C D A = 1 encodes dead contexts, where 1 is the unit type inhabited by a single value (). The counit operation ε : C L A A and coextend operations f r,s : C r s A C s B (for all f : C r A B), are defined: ε x = x f D,D x = () f D,L x = f() f L,D x = () f L,L x = f x The indexed family C r here is analogous to the non-indexed Maybe (or option) data type Maybe A = A + 1. This type does not permit a comonad structure since ε : Maybe A A is undefined at (inr ()). For the indexed comonad, ε need only be defined for C L A = A. Thus, indexed comonads capture a broader range of contextual notions of computation than comonads. Moreover, indexed comonads are not restricted by the shape preservation property of comonads [11]: that a coextended function cannot change the shape of the context. For example, in the second case above f D,L : CD A C L B where the shape changes from 1 (empty context) to B (available context). Monoidal indexed comonads. Indexed comonads provide a semantics to sequential composition, but additional structure is needed for the semantics of the full coeffect calculus. Uustalu and Vene [14] additionally require a (lax semi-) monoidal comonad structure, which provides a monoidal operation m : CA CB C(A B) for merging contexts (used in the semantics of abstraction). The semantics of the coeffect calculus requires an indexed lax semi-monoidal structure for combining contexts as well as an indexed colax monoidal structure for splitting contexts. These are provided by two families of morphisms (given a coeffect algebra with and ):
8 8 Petricek, Orchard, Mycroft C r Γ λx.e : C s τ 1 τ 2 = curry ( C r s (Γ, x : τ 1 ) e : τ 2 m r,s ) C r (s t) Γ e 1 e 2 : τ = (uncurry C r Γ e 1 : C t τ 1 τ 2 ) (id C s Γ e 2 : τ 1 s,t) n r,s t C r (s t) C e Γ x i : τ i = π i ε Fig. 5. Categorical semantics for the coeffect calculus m r,s : C r A C s B C (r s) (A B) natural in A, B; n r,s : C (r s) (A B) C r A C s B natural in A, B; The m r,s operation merges contextual computations with tags combined by (greatest lower-bound), elucidating the behaviour of m r,s : that merging may result in the loss of some parts of the contexts r and s. The n r,s operation splits context-dependent computations and thus the contextual requirements. To obtain coeffects r and s, the input needs to provide at least r and s, so the tags are combined using the operator (least upper-bound). For the sake of brevity, we elide the indexed versions of the laws required by Uustalu and Vene (e.g., most importantly, merging and splitting are associative). Example 3. For the indexed partiality comonad, given the liveness coeffect algebra ({D, L},,,, L), the additional lax/colax monoidal operations are: m L,L (x, y) = (x, y) n D,D () = ((), ()) n D,L (x, y) = ((), y) m r,s (x, y) = () n L,D (x, y) = (x, ()) n L,L (x, y) = (x, y) Example 4. Uustalu and Vene model causal dataflow computations using the non-empty list comonad NEList A = A (1+NEList A) [14]. Whilst this comonad implies a trivial indexed comonad, we define an indexed comonad with integer indices for the number of past values demanded of the context. We define C n A = A (A... A) where the first A is the current (always available) value, followed by a finite product of n past values. The definition of the operations is a straightforward extension of the work of Uustalu and Vene. Categorical Semantics. Figure 5 shows the categorical semantics of the coeffect calculus using additional operations π i for projection of the i th element of a product, usual curry and uncurry operations, and : A A A duplicating a value. While C r is a family of object mappings, it is promoted to a family of functors with the derived morphism mapping C r (f) = (f ε) e,r. The semantics of variable use and abstraction are the same as in Uustalu and Vene s semantics, modulo coeffects. Abstraction uses m r,s to merge the outer context with the argument context for the context of the function body. The indices of e for ε and r, s for m r,s match the coeffects of the terms. The semantics of application is more complex. It first duplicates the free-variable values inside the context and then splits this context using n r,s t. The two contexts (with different coeffects) are passed to the two sub-expressions, where the argument subexpression, passed a context (s t), is coextended to produce
9 Coeffects: Unified static analysis of context-dependence 9 a context t which is passed into the parameter of the function subexpression (cf. given f : A (B C), g : A B, then uncurry f (id g) : A C). A semantics for sub-coeffecting is omitted, but may be provided by an operation ι r,s : C r A C s A natural in A, for all r, s S where s r, which transforms a value C r A to C s A by ignoring some of the encoded context. 4 Syntax-based equational theory The operational semantics of every context-dependent language here differs as the notion of context is always different. However, for coeffect calculi satisfying certain conditions we can define a universal equational theory. This suggests a pathway to an operational semantics for two out of our three examples (the notion of context for data-flow is more complex). In a pure λ-calculus, β- and η-equality for functions (also called local soundness and completeness respectively [12]) describe how pairs of abstraction and application can be eliminated: (λx.e 2 )e 1 β e 1 [x e 2 ] and (λx.e x) η e. The β-equality rule, using the usual Barendregt convention of syntactic substitution, implies a reduction, giving part of an operational semantics for the calculus. The call-by-name evaluation strategy modelled by β-reduction is not suitable for impure calculi therefore a restricted β rule, corresponding to call-by-value, is used, i.e. (λx.e 2 )v e 2 [x v]. Such reduction can be encoded by a let-binding term, let x = e 1 in e 2, which corresponds to sequential composition of two computations, where the resulting pure value of e 1 is substituted into e 2 [4,8]. For an equational theory of coeffects, consider first a notion of let-binding equivalent to (λx.e 2 ) e 1, which has the following type and coeffect rule: C s Γ e 1 : τ 1 C r1 r2 (Γ, x : τ 1 ) e 2 : τ 2 C r1 (r2 s) Γ let x = e 1 in e 2 : τ 2 (1) For our examples, is idempotent (i.e., r r = r) implying a simpler rule: C s Γ e 1 : τ 1 C r (Γ, x : τ 1 ) e 2 : τ 2 C r (r s) Γ let x = e 1 in e 2 : τ 2 (2) For our examples (but not necessarily all coeffect systems), this defines a more precise coeffect with respect to where r (r s) r 1 (r 2 s). This rule removes the non-principality of the first rule (i.e., multiple possible typings). However, using idempotency to split coeffects in abstraction would remove additional flexibility needed by the implicit parameters example. The coeffect r (r s) can also be simplified for all our examples, leading to more intuitive rules for implicit parameters r (r s) = r s; for liveness we get that r (r s) = r and for dataflow we obtain max(r, r + s) = r + s. Our calculus can be extended with let-binding and (2). However, we also consider the cases when a syntactic substitution e 2 [x e 1 ] has the coeffects specified by the above rule (2) and prove subject reduction theorem for certain coeffect calculi. We consider two common special cases when the coeffect of
10 10 Petricek, Orchard, Mycroft variables e is the greatest ( ) or least ( ) element of the semi-lattice (S, ) and derive additional properties that hold about the coeffect algebra: Lemma 1 (Substitution). Given C r (Γ, x : τ 2 ) e 1 : τ 1 and C s Γ e 2 : τ 2 then C r (r s) Γ e 2 [x e 1 ] : τ 1 if the coeffect algebra satisfies the conditions that e is either the greatest or least element of the semi-lattice, =, and distributes over, i.e., X (Y Z) = (X Y ) (X Z). Proof. By induction over, using the laws ( 2) and additional assumptions. Assuming β is the usual call-by-name reduction, the following theorem models the evaluation of coeffect calculi with coeffect algebra that satisfies the above requirements. We do not consider call-by-value, because our calculus does not have a notion of value, unless explicitly provided by let-binding (even a function value λx.e may have immediate contextual requirements). Theorem 1 (Subject reduction). For a coeffect calculus, satisfying the conditions of Lemma 1, if C r Γ e : τ and e β e then C r Γ e : τ. Proof. A direct consequence of Lemma 1. The above theorem holds for both the liveness and resources examples, but not for dataflow. In the case of liveness, e is the greatest element (r e = e); in the case of resources, e is the least element (r e = r) and the proof relies on the fact that additional context requirements can be placed at the context C r Γ (without affecting the type of function when substituted under λ-abstraction). However, the coeffect calculus also captures context-dependence in languages with more complex evaluation strategies than call-by-name reduction based on syntactic substitution. In particular, syntactic substitution does not provide a suitable evaluation for dataflow (because a substituted expression needs to capture the context of the original scope). Nevertheless, the above results show that unlike effects context-dependent properties can be integrated with call-by-name languages. Our work also provides a model of existing work, namely Haskell implicit parameters [7]. 5 Related and further work This paper follows the approaches of effect systems [5,13,17] and categorical semantics based on monads and comonads [8,14]. Syntactically, coeffects differ from effects in that they model systems where λ-abstraction may split contextual requirements between the declaration-site and call-site. Our indexed (monoidal) comonads ( 3) fill the gap between (non-indexed) (monoidal) comonads of Uustalu and Vene [14] and indexed monads of Atkey [2], Wadler and Thiemann [17]. Interestingly, indexed comonads are more general than comonads, capturing more notions of context-dependence ( 1).
11 Coeffects: Unified static analysis of context-dependence 11 Comonads and modal logics. Bierman and de Paiva [3] model the modality of an intuitionistic S4 modal logic using monoidal comonads, which links our calculus to modal logics. This link can be materialized in two ways. Pfenning et al. and Nanevski et al. derive term languages using the Curry- Howard correspondence [12,3,9], building a metalanguage (akin to Moggi s monadic metalanguage [8]) that includes as a type constructor. For example, in [12], the modal type τ represents closed terms. In contrast, the semantic approach uses monads or comonads only in the semantics. This has been employed by Uustalu and Vene and (again) Moggi [8,14]. We follow the semantic approach. Nanevski et al. extend an S4 term language to a contextual modal type theory (CMTT) [9]. The context is a set of variables required by a computation, which makes CMTT useful for meta-programming and staged computations. Our contextual types are indexed by a coeffect algebra, which is more general and can capture variable contexts, but also integers, two-point lattices, etc.. The work on CMTT suggests two extensions to coeffects. The first is developing the logical foundations. We briefly considered special cases of our system that permits local soundness in 4; local completeness can be treated similarly. The second is developing a coeffect metalanguage. The use of coeffect algebras provides an additional flexibility over CMTT, allowing a wider range of applications via a richer metalanguage. Relating effects and coeffects. The difference between effects and coeffects is mainly in the (abs) rule. While the semantic models (monads vs. comonads) are different, they can be extended to obtain equivalent syntactic rules. To allow splitting of implicit parameters in lambda abstraction, the reader monad needs an operation that eagerly performs some effects of a function: (τ 1 M r s τ 2 ) M r (τ 1 M s τ 2 ). To obtain a pure lambda abstraction for coeffects, we need to restrict the m r,s operation of indexed comonads, so that the first parameter is annotated with e (meaning no effects): C e A C r B C r (A B). Structural coeffects. To make the liveness analysis practical, we need to associate information with individual variables (rather than the entire context). We can generalize the calculus from this paper by adding a product operation to the coeffect algebra. A variable context x : τ 1, y : τ 2, z : τ 3 is then annotated with r s t where each component of the tag corresponds to a single variable. The system is then extended with structural rules such as: (abs) C r s (Γ, x : τ 1 ) e : τ 2 C r Γ λx.e : C s τ 1 τ 2 (contr) C r s (x : τ 1, y : τ 1 ) e : τ 2 C r s (z : τ 1 ) e[x z][y z] : τ 2 The context requirements associated with function are exactly those linked to the specific variable of the lambda abstraction. Rules such as contraction manipulate variables and perform a corresponding operation on the indices. The structural coeffect system is related to bunched typing [10] (but generalizes it by adding indices). We are currently investigating how to use structural coeffects to capture fine-grained context-dependence properties such as secure information flow [15] or, more generally, those captured by the dependency core calculus [1].
12 12 Petricek, Orchard, Mycroft 6 Conclusions We examined three simple calculi with associated coeffect systems (liveness analysis, implicit parameters, and dataflow analysis). These were unified in the coeffect calculus, providing a general coeffect system parameterised by an algebraic structure describing propagation of context requirements throughout a program. We model the semantics of the coeffect calculus using the indexed (monoidal) comonad structure a novel structure, which is more powerful than (monoidal) comonads. Indices of the indexed comonad operations manifest the semantic propagation of context so that the propagation of information in the general coeffect type system corresponds exactly to the semantic propagation of context in our categorical model. We consider the analysis of context to be essential, not least for the examples here but also given increasingly rich and diverse distributed systems. Acknowledgements. We thank Gavin Bierman, Tarmo Uustalu, Varmo Vene and reviewers of earlier drafts. This work was supported by the EPSRC and CHESS. References 1. M. Abadi, A. Banerjee, N. Heintze, and J. G. Riecke. A core calculus of dependency. In Proceedings of POPL, R. Atkey. Parameterised notions of computation. J. Funct. Program., 19, G. M. Bierman and V. C. V. de Paiva. On an intuitionistic modal logic. Studia Logica, 65:2000, A. Filinski. Monads in action. In Proceedings of POPL, D. K. Gifford and J. M. Lucassen. Integrating functional and imperative programming. In Proceedings of Conference on LISP and func. prog., LFP 86, P. Jouvelot and D. K. Gifford. Communication Effects for Message-Based Concurrency. Technical report, Massachusetts Institute of Technology, J. R. Lewis, M. B. Shields, E. Meijert, and J. Launchbury. Implicit parameters: dynamic scoping with static types. In Proceedings of POPL, POPL 00, E. Moggi. Notions of computation and monads. Inf. Comput., 93:55 92, July A. Nanevski, F. Pfenning, and B. Pientka. Contextual modal type theory. ACM Trans. Comput. Logic, 9(3):23:1 23:49, June P. O Hearn. On bunched typing. J. Funct. Program., 13(4): , July D. Orchard and A. Mycroft. A Notation for Comonads. In Post-Proceedings of IFL 12, LNCS. Springer Berlin / Heidelberg, F. Pfenning and R. Davies. A judgmental reconstruction of modal logic. Mathematical. Structures in Comp. Sci., 11(4): , Aug J. Talpin and P. Jouvelot. The type and effect discipline. In Logic in Computer Science, LICS 92., pages , T. Uustalu and V. Vene. Comonadic Notions of Computation. Electron. Notes Theor. Comput. Sci., 203: , June D. Volpano, C. Irvine, and G. Smith. A sound type system for secure flow analysis. J. Comput. Secur., 4: , January W. W. Wadge and E. A. Ashcroft. LUCID, the dataflow programming language. Academic Press Professional, Inc., San Diego, CA, USA, P. Wadler and P. Thiemann. The marriage of effects and monads. ACM Trans. Comput. Logic, 4:1 32, January 2003.
Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic
Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic Lars Birkedal Rasmus Ejlers Møgelberg Rasmus Lerchedahl Petersen IT University Technical Report Series TR-00-7 ISSN 600 600 February 00
Linear Types for Continuations
1/28 Linear Types for Continuations Alex Simpson LFCS, School of Informatics University of Edinburgh, UK Joint work with: Jeff Egger (LFCS, Edinburgh) Rasmus Møgelberg (ITU, Copenhagen) Linear Types for
Embedding effect systems in Haskell
Embedding effect systems in Haskell Dominic Orchard Tomas Petricek Computer Laboratory, University of Cambridge [email protected] Abstract Monads are now an everyday tool in functional programming
The countdown problem
JFP 12 (6): 609 616, November 2002. c 2002 Cambridge University Press DOI: 10.1017/S0956796801004300 Printed in the United Kingdom 609 F U N C T I O N A L P E A R L The countdown problem GRAHAM HUTTON
Functional Programming. Functional Programming Languages. Chapter 14. Introduction
Functional Programming Languages Chapter 14 Introduction Functional programming paradigm History Features and concepts Examples: Lisp ML 1 2 Functional Programming Functional Programming Languages The
Linearly Used Effects: Monadic and CPS Transformations into the Linear Lambda Calculus
Linearly Used Effects: Monadic and CPS Transformations into the Linear Lambda Calculus Masahito Hasegawa Research Institute for Mathematical Sciences, Kyoto University hassei@kurimskyoto-uacjp Abstract
Chapter 7: Functional Programming Languages
Chapter 7: Functional Programming Languages Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Fun: a language
Modal Proofs as Distributed Programs (Extended Abstract)
Modal Proofs as Distributed Programs (Extended Abstract) Limin Jia and David Walker Princeton University 35 Olden St., Princeton, NJ 08544, USA {ljia,dpw}@cs.princeton.edu Abstract. We develop a new foundation
Andrew Pitts chapter for D. Sangorgi and J. Rutten (eds), Advanced Topics in Bisimulation and Coinduction, Cambridge Tracts in Theoretical Computer
Andrew Pitts chapter for D. Sangorgi and J. Rutten (eds), Advanced Topics in Bisimulation and Coinduction, Cambridge Tracts in Theoretical Computer Science No. 52, chapter 5, pages 197 232 ( c 2011 CUP)
Categorical Monads and Computer Programming
London Mathematical Society Impact150 Stories 1 (2015) 9 14 C 2015 Author(s) doi:10.1112/i150lms/t.0002 Categorical Monads and Computer Programming Nick Benton Abstract The categorical notion of monad
A Note on Context Logic
A Note on Context Logic Philippa Gardner Imperial College London This note describes joint work with Cristiano Calcagno and Uri Zarfaty. It introduces the general theory of Context Logic, and has been
CHAPTER 7 GENERAL PROOF SYSTEMS
CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes
Class notes Program Analysis course given by Prof. Mooly Sagiv Computer Science Department, Tel Aviv University second lecture 8/3/2007
Constant Propagation Class notes Program Analysis course given by Prof. Mooly Sagiv Computer Science Department, Tel Aviv University second lecture 8/3/2007 Osnat Minz and Mati Shomrat Introduction This
Bindings, mobility of bindings, and the -quantifier
ICMS, 26 May 2007 1/17 Bindings, mobility of bindings, and the -quantifier Dale Miller, INRIA-Saclay and LIX, École Polytechnique This talk is based on papers with Tiu in LICS2003 & ACM ToCL, and experience
Research Note. Bi-intuitionistic Boolean Bunched Logic
UCL DEPARTMENT OF COMPUTER SCIENCE Research Note RN/14/06 Bi-intuitionistic Boolean Bunched Logic June, 2014 James Brotherston Dept. of Computer Science University College London Jules Villard Dept. of
Introduction to type systems
Introduction to type systems p. 1/5 Introductory Course on Logic and Automata Theory Introduction to type systems [email protected] Based on slides by Jeff Foster, UMD Introduction to type systems
A Propositional Dynamic Logic for CCS Programs
A Propositional Dynamic Logic for CCS Programs Mario R. F. Benevides and L. Menasché Schechter {mario,luis}@cos.ufrj.br Abstract This work presents a Propositional Dynamic Logic in which the programs are
OPERATIONAL TYPE THEORY by Adam Petcher Prepared under the direction of Professor Aaron Stump A thesis presented to the School of Engineering of
WASHINGTON NIVERSITY SCHOOL OF ENGINEERING AND APPLIED SCIENCE DEPARTMENT OF COMPTER SCIENCE AND ENGINEERING DECIDING JOINABILITY MODLO GROND EQATIONS IN OPERATIONAL TYPE THEORY by Adam Petcher Prepared
Non-deterministic Semantics and the Undecidability of Boolean BI
1 Non-deterministic Semantics and the Undecidability of Boolean BI DOMINIQUE LARCHEY-WENDLING, LORIA CNRS, Nancy, France DIDIER GALMICHE, LORIA Université Henri Poincaré, Nancy, France We solve the open
No: 10 04. Bilkent University. Monotonic Extension. Farhad Husseinov. Discussion Papers. Department of Economics
No: 10 04 Bilkent University Monotonic Extension Farhad Husseinov Discussion Papers Department of Economics The Discussion Papers of the Department of Economics are intended to make the initial results
A Generic Type-and-Effect System
A Generic Type-and-Effect System Daniel Marino Todd Millstein Computer Science Department University of California, Los Angeles dlmarino,todd}@cs.ucla.edu Abstract Type-and-effect systems are a natural
POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful
POLYTYPIC PROGRAMMING OR: Programming Language Theory is Helpful RALF HINZE Institute of Information and Computing Sciences Utrecht University Email: [email protected] Homepage: http://www.cs.uu.nl/~ralf/
[Refer Slide Time: 05:10]
Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety
Direct models of the computational lambda-calculus
Electronic Notes in Theoretical Computer Science 20 (1999) URL: http://www.elsevier.nl/locate/entcs/volume20.html 49 pages Direct models of the computational lambda-calculus Carsten Führmann 1 Division
Regular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
Types, Polymorphism, and Type Reconstruction
Types, Polymorphism, and Type Reconstruction Sources This material is based on the following sources: Pierce, B.C., Types and Programming Languages. MIT Press, 2002. Kanellakis, P.C., Mairson, H.G. and
Denotational design with type class morphisms (extended version)
LambdaPix technical report 2009-01, March 2009 (minor revisions February 15, 2011) 1 Denotational design with type class morphisms (extended version) Conal Elliott LambdaPix [email protected] Abstract Type
Journal of Functional Programming, volume 3 number 4, 1993. Dynamics in ML
Journal of Functional Programming, volume 3 number 4, 1993. Dynamics in ML Xavier Leroy École Normale Supérieure Michel Mauny INRIA Rocquencourt Abstract Objects with dynamic types allow the integration
NOTES ON CATEGORIES AND FUNCTORS
NOTES ON CATEGORIES AND FUNCTORS These notes collect basic definitions and facts about categories and functors that have been mentioned in the Homological Algebra course. For further reading about category
WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?
WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly
Type and Effect Systems
Type and Effect Systems Flemming Nielson & Hanne Riis Nielson Department of Computer Science, Aarhus University, Denmark. Abstract. The design and implementation of a correct system can benefit from employing
Pretty-big-step semantics
Pretty-big-step semantics Arthur Charguéraud INRIA October 2012 1 / 34 Motivation Formalization of JavaScript with Sergio Maeis, Daniele Filaretti, Alan Schmitt, Martin Bodin. Previous work: Semi-formal
Testing LTL Formula Translation into Büchi Automata
Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland
Programming Languages Featherweight Java David Walker
Programming Languages Featherweight Java David Walker Overview Featherweight Java (FJ), a minimal Javalike language. Models inheritance and subtyping. Immutable objects: no mutation of fields. Trivialized
Observational Program Calculi and the Correctness of Translations
Observational Program Calculi and the Correctness of Translations Manfred Schmidt-Schauss 1, David Sabel 1, Joachim Niehren 2, and Jan Schwinghammer 1 Goethe-University, Frankfurt, Germany 2 INRIA Lille,
Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.
Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets. Logic is the study of reasoning. A language of propositions is fundamental to this study as well as true
Describing, manipulating and pricing financial contracts: The MLFi language
Describing, manipulating and pricing financial contracts: The MLFi language Centre for Financial Research, Judge Institute of Management Cambridge, 14 March 2003 (revised January 2005) Jean-Marc Eber LexiFi,
Semantics and Verification of Software
Semantics and Verification of Software Lecture 21: Nondeterminism and Parallelism IV (Equivalence of CCS Processes & Wrap-Up) Thomas Noll Lehrstuhl für Informatik 2 (Software Modeling and Verification)
Chapter 15 Functional Programming Languages
Chapter 15 Functional Programming Languages Introduction - The design of the imperative languages is based directly on the von Neumann architecture Efficiency (at least at first) is the primary concern,
Introducing Formal Methods. Software Engineering and Formal Methods
Introducing Formal Methods Formal Methods for Software Specification and Analysis: An Overview 1 Software Engineering and Formal Methods Every Software engineering methodology is based on a recommended
Adding GADTs to OCaml the direct approach
Adding GADTs to OCaml the direct approach Jacques Garrigue & Jacques Le Normand Nagoya University / LexiFi (Paris) https://sites.google.com/site/ocamlgadt/ Garrigue & Le Normand Adding GADTs to OCaml 1
Fixed-Point Logics and Computation
1 Fixed-Point Logics and Computation Symposium on the Unusual Effectiveness of Logic in Computer Science University of Cambridge 2 Mathematical Logic Mathematical logic seeks to formalise the process of
OutsideIn(X) Modular type inference with local assumptions
Under consideration for publication in J. Functional Programming 1 OutsideIn(X) Modular type inference with local assumptions 11 April 2011 Dimitrios Vytiniotis Microsoft Research Simon Peyton Jones Microsoft
! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs
,!0((,.+#$),%$(-&.& *,2(-$)%&2.'3&%!&, Logics for Data and Knowledge Representation Alessandro Agostini [email protected] University of Trento Fausto Giunchiglia [email protected] The Logic of Descriptions!$%&'()*$#)
Simulation-Based Security with Inexhaustible Interactive Turing Machines
Simulation-Based Security with Inexhaustible Interactive Turing Machines Ralf Küsters Institut für Informatik Christian-Albrechts-Universität zu Kiel 24098 Kiel, Germany [email protected]
2. Basic Relational Data Model
2. Basic Relational Data Model 2.1 Introduction Basic concepts of information models, their realisation in databases comprising data objects and object relationships, and their management by DBMS s that
System Description: Delphin A Functional Programming Language for Deductive Systems
System Description: Delphin A Functional Programming Language for Deductive Systems Adam Poswolsky 1 and Carsten Schürmann 2 1 Yale University [email protected] 2 IT University of Copenhagen [email protected]
Type Classes with Functional Dependencies
Appears in Proceedings of the 9th European Symposium on Programming, ESOP 2000, Berlin, Germany, March 2000, Springer-Verlag LNCS 1782. Type Classes with Functional Dependencies Mark P. Jones Department
Unboxed Polymorphic Objects for Functional Numerical Programming
Unboxed Polymorphic Objects for Functional Numerical Programming Christopher Rodrigues [email protected] Wen-Mei Hwu [email protected] IMPACT Technical Report IMPACT-12-02 University of Illinois at
Likewise, we have contradictions: formulas that can only be false, e.g. (p p).
CHAPTER 4. STATEMENT LOGIC 59 The rightmost column of this truth table contains instances of T and instances of F. Notice that there are no degrees of contingency. If both values are possible, the formula
discuss how to describe points, lines and planes in 3 space.
Chapter 2 3 Space: lines and planes In this chapter we discuss how to describe points, lines and planes in 3 space. introduce the language of vectors. discuss various matters concerning the relative position
CONTENTS 1. Peter Kahn. Spring 2007
CONTENTS 1 MATH 304: CONSTRUCTING THE REAL NUMBERS Peter Kahn Spring 2007 Contents 2 The Integers 1 2.1 The basic construction.......................... 1 2.2 Adding integers..............................
StaRVOOrS: A Tool for Combined Static and Runtime Verification of Java
StaRVOOrS: A Tool for Combined Static and Runtime Verification of Java Jesús Mauricio Chimento 1, Wolfgang Ahrendt 1, Gordon J. Pace 2, and Gerardo Schneider 3 1 Chalmers University of Technology, Sweden.
Left-Handed Completeness
Left-Handed Completeness Dexter Kozen Computer Science Department Cornell University RAMiCS, September 19, 2012 Joint work with Alexandra Silva Radboud University Nijmegen and CWI Amsterdam Result A new
AURA: A language with authorization and audit
AURA: A language with authorization and audit Steve Zdancewic University of Pennsylvania WG 2.8 2008 Security-oriented Languages Limin Jia, Karl Mazurak, Jeff Vaughan, Jianzhou Zhao Joey Schorr and Luke
Functional Programming
FP 2005 1.1 3 Functional Programming WOLFRAM KAHL [email protected] Department of Computing and Software McMaster University FP 2005 1.2 4 What Kinds of Programming Languages are There? Imperative telling
Foundational Proof Certificates
An application of proof theory to computer science INRIA-Saclay & LIX, École Polytechnique CUSO Winter School, Proof and Computation 30 January 2013 Can we standardize, communicate, and trust formal proofs?
Object-Oriented Software Specification in Programming Language Design and Implementation
Object-Oriented Software Specification in Programming Language Design and Implementation Barrett R. Bryant and Viswanathan Vaidyanathan Department of Computer and Information Sciences University of Alabama
Generating models of a matched formula with a polynomial delay
Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic
11 Ideals. 11.1 Revisiting Z
11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(
FreshML: Programming with Binders Made Simple
FreshML: Programming with Binders Made Simple Mark R. Shinwell Andrew M. Pitts Murdoch J. Gabbay Cambridge University Computer Laboratory, Cambridge, CB3 0FD, UK {Mark.Shinwell,Andrew.Pitts,Murdoch.Gabbay}@cl.cam.ac.uk
Mathematical Induction
Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,
Integrating Formal Models into the Programming Languages Course
Integrating Formal Models into the Programming Languages Course Allen B. Tucker Robert E. Noonan Computer Science Department Computer Science Department Bowdoin College College of William and Mary Brunswick,
Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification
Introduction Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification Advanced Topics in Software Engineering 1 Concurrent Programs Characterized by
This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.
3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but
ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS
ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS John A. Beachy Northern Illinois University 2014 ii J.A.Beachy This is a supplement to Abstract Algebra, Third Edition by John A. Beachy and William D. Blair
Computer certified efficient exact reals in Coq
Computer certified efficient exact reals in Coq Robbert Krebbers and Bas Spitters Radboud University Nijmegen Abstract. Floating point operations are fast, but require continuous effort on the part of
3 Extending the Refinement Calculus
Building BSP Programs Using the Refinement Calculus D.B. Skillicorn? Department of Computing and Information Science Queen s University, Kingston, Canada [email protected] Abstract. We extend the
GROUPS ACTING ON A SET
GROUPS ACTING ON A SET MATH 435 SPRING 2012 NOTES FROM FEBRUARY 27TH, 2012 1. Left group actions Definition 1.1. Suppose that G is a group and S is a set. A left (group) action of G on S is a rule for
Monads for functional programming
Monads for functional programming Philip Wadler, University of Glasgow Department of Computing Science, University of Glasgow, G12 8QQ, Scotland ([email protected]) Abstract. The use of monads to
Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson
Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement
CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e.
CHAPTER II THE LIMIT OF A SEQUENCE OF NUMBERS DEFINITION OF THE NUMBER e. This chapter contains the beginnings of the most important, and probably the most subtle, notion in mathematical analysis, i.e.,
Local periods and binary partial words: An algorithm
Local periods and binary partial words: An algorithm F. Blanchet-Sadri and Ajay Chriscoe Department of Mathematical Sciences University of North Carolina P.O. Box 26170 Greensboro, NC 27402 6170, USA E-mail:
Termination Checking: Comparing Structural Recursion and Sized Types by Examples
Termination Checking: Comparing Structural Recursion and Sized Types by Examples David Thibodeau Decemer 3, 2011 Abstract Termination is an important property for programs and is necessary for formal proofs
How To Know If A Domain Is Unique In An Octempo (Euclidean) Or Not (Ecl)
Subsets of Euclidean domains possessing a unique division algorithm Andrew D. Lewis 2009/03/16 Abstract Subsets of a Euclidean domain are characterised with the following objectives: (1) ensuring uniqueness
Separation Properties for Locally Convex Cones
Journal of Convex Analysis Volume 9 (2002), No. 1, 301 307 Separation Properties for Locally Convex Cones Walter Roth Department of Mathematics, Universiti Brunei Darussalam, Gadong BE1410, Brunei Darussalam
Unified Language for Network Security Policy Implementation
Unified Language for Network Security Policy Implementation Dmitry Chernyavskiy Information Security Faculty National Research Nuclear University MEPhI Moscow, Russia [email protected] Natalia Miloslavskaya
Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 [email protected].
Some Polynomial Theorems by John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 [email protected] This paper contains a collection of 31 theorems, lemmas,
Full and Complete Binary Trees
Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full
Blame for All. Jeremy G. Siek. Amal Ahmed. Robert Bruce Findler. Philip Wadler. Abstract. 1. Introduction
Blame for All Amal Ahmed Indiana University [email protected] Robert Bruce Findler Northwestern University [email protected] Jeremy G. Siek University of Colorado at Boulder [email protected]
Authenticity by Typing for Security Protocols
Authenticity by Typing for Security Protocols Andrew D. Gordon Microsoft Research Alan Jeffrey DePaul University June 2002 Technical Report To appear in the Journal of Computer Security Microsoft Research
SURVEY ON DYNAMICAL YANG-BAXTER MAPS. Y. Shibukawa
SURVEY ON DYNAMICAL YANG-BAXTER MAPS Y. Shibukawa Department of Mathematics, Faculty of Science, Hokkaido University, Sapporo 060-0810, Japan e-mail: [email protected] Abstract In this survey,
INTRODUCTORY SET THEORY
M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,
