• Không có kết quả nào được tìm thấy

# Programming Languages and Systems

N/A
N/A
Nguyễn Gia Hào

Chia sẻ "Programming Languages and Systems"

Copied!
345
0
0

Văn bản

3 Account for the difference in the representation of security properties distinguishes us from recent work [8,33], which assumes that the source and target languages ​​have the same trace alphabet. Preserving all robust security properties (RSC) is therefore equivalent to ensuring that all target prefixes can also be generated (by some context) in the source (PF-RSC).

However, they can be sensitive to the "shape" of the heap or the values ​​stored in the heap. We drop this assumption (e.g. target value 0 is related to both source values0 and true) and so there can be multiple source values ​​related to a given target value.

The standard sandboxing primitive can be written(A&(2k−1))|&sbhwhere&sb is the address of the sandbox variable. Figure 4 shows the overhead of the standard sandboxing primitive versus the specialized sandboxing primitive.

Derivatives of Fixpoints, and the Recursive Semantics of Datalog

## 1 Introduction

It is common to liberalize the syntax of a formula with additional functions such as disjunction, existential quantification, negation, and aggregation.2 This allows us to. Most of the results have routine proofs, but proofs of more extensive results (especially those in Section 6.2) are included in the extended report [3], along with some extended worked examples and additional material on the accuracy of the derivations.

## 2 Change Actions and Derivatives

• Change Actions
• Derivatives
• Useful Facts About Change Actions and Derivatives
• Comparing Change Actions

This is useful since the differentiation of functions between change actions is characterized solely by the coarseness of the actions. The relation ≤ defines a preorder (but not a partial ordering) on ​​the set of all change operations over a fixed set A.

## 3 Posets and Boolean Algebras

### Posets

Then Aˆ1 is coarser than Aˆ2 if and only if the identity function id :A→A is distinguishable from Aˆ1 to Aˆ2. Let Aˆ be an act of change and Bˆ an ordered act of change, and let f :A→B and g:A×ΔA→ΔB be functions.

### Boolean Algebras

If there exist f↓↓ and f↑↑ that are unique minimum and maximum derivatives from respectively, then the derivatives from exactly functions f such that. Let L be a complete Boolean algebra with the corresponding change action Lˆ, Aˆ an arbitrary change action, and f : A→L a function.

## 4 Derivatives for Non-recursive Datalog

### Semantics of Datalog Formulae

Boolean algebras also have unique maximal and minimal derivatives under the usual partial order based on implication. Anamed tuple over Γ is an assignment of a value vi for each name xi in Γ. ym}, the choice function σΓ is defined as.

### Diﬀerentiability of Datalog Formula Semantics

A data formula T whose free term variables are contained in Γ denotes a function fromRelnΓ toRelΓ. Rn) is a choice of a relation Ri for each of the variables Ri, T(R) is determined inductively according to the rules in Fig.1. If we calculate it naively, the third link requires us to recalculate the entire recursive part.

Extensions to Datalog

## 5 Changes on Functions

### Pointwise Functional Change Actions

Fortunately, in many important cases there is a simple change operation on the set of differentiable functions. A functional change operation simply tells us that a derivative of the evaluation map exists - a point change operation actually gives us a definition of it.

## 6 Directed-Complete Partial Orders and Fixpoints

### Dcpos

As a direct consequence, when Li is a Boolean algebra (and thus has a complete change action), the pointwise functional change action Aˆ⇒ptLˆ is well defined. As a counterexample, consider the change action (N,N,+), where N denotes the dcpo of natural numbers extended by positive infinity.

### Fixpoints

The following theorems provide a generalization of semi-naive evaluation to any distinguishable function over a continuous change action. Theorem 14 (Derivative of the iteration map with respect to ton). Let Aˆ be a complete change action and let :A →A be a differentiable function.

## 7 Derivatives for Recursive Datalog

Semantics of Datalog Programs

### Incremental Evaluation of Datalog

Note that our approach does not make any particular distinction between changes in extensional relations (adding or removing facts) and changes in intensive relations (changing the definition). The latter simply constitutes a change in the denotation of that relation, which can be propagated incrementally in the same way that we would propagate a change in the extension relations.

## 8 Related Work

• Change Actions and Incremental Computation
• Datalog
• Diﬀerential λ-calculus
• Higher-Order Automatic Diﬀerentiation

Families of denotation models for the differential calculus have been studied in depth and the relationship between these and change actions is the subject of ongoing work. Automatic differentiation [23] is a technique that makes it possible to efficiently calculate the derivative of arbitrary programs, with applications in probabilistic modeling [31] and machine learning [10] among others.

## 9 Conclusions and Future Work

To this end, some authors have proposed the incremental λ-calculus as a fundamental framework on which automatic differentiation models can be based [ 28 ]. We believe that our transformation actions are better suited for this purpose than the incremental λ-calculus, as they can easily be given a synthetic diﬀerential geometric reading (by interpreting ˆA as the Euclidean modulus and ΔA as its corresponding spectrum, for example).

Second, in our mechanized formalization (Sect. 3), we give a new proof of correctness for ILC differentiation for untyped λ-calculus, based on step-indexed logical relations (Sect. 3.4). The speedup of incremental computation over recomputing from scratch increases with the size of the base input sequences due to the difference in time complexity.

## From Duality to Time-Sensitive Processes

Command(x <5,{x}).SC ?Command(y=5,{y}).SS (2) Patterns like that in (1) are common (e.g. the SMPT fragment mentioned at the beginning of ​​this introduction), but unfortunately they are not wait-free, and therefore excluded in previous work [12]. Conversely, non-urgent receive semantics allow receive actions to fire at any time and satisfy the time constraint as long as the message is in the queue.

## 2 Asynchronous Timed Session Types

### Type Formation

The sentinel of judgment is true because the end is the final state (since the end has no continuation, the moral constraint on its continuation is always satisfactory). A [delegate] rule behaves like an [interaction] with two additional premises per delegated session: (1) S must be well-formed and (2) the next-action guard in S must be satisfactory with respect to δ.

## 3 Asynchronous Session Types Semantics and Subtyping

Types in Isolation

### Asynchronous Timed Subtyping

In our subtype definition, we are interested in simple type configurations that are not stuck. The subtype has been shown to be solvable in the timeless setting [19] and in the first-order setting with time [6].

### Types with Queues, and Their Composition

This is to model urgency: when the configuration is in the receive state and a message is queued, the receive action must occur without delay. In Example 4 we also illustrate that without the necessary semantics the system in Example 3 gets stuck.

4 Timed Asynchronous Duality

## 5 A Calculus for Asynchronous Timed Processes

We ensure that queues are well-placed via a well-formedness property of processes (see [11] for an inductive definition). -formation excludes processes of the following form:. νab) (an(c).(ba:h |P)|Q|ab:h) (11) The process in (11) is not well designed, since queue ba for communication to endpoint a is not usable as it is in the continuation of the receiving action.

## 6 Typing for Asynchronous Timed Processes

Rule [Drcv], for processes receiving delegated sessions, is like [Vrcv] except: (a) continuationP is written against a session environment extended by the received session S, and (b) the clock valuation ν of the receiving session must satisfy δ . As usual, the continuation of the process must be well-written in terms of the continuation of the type (where ν is reset according to λ, and Γ is expanded with information about the type b).

## 7 Subject Reduction and Time Safety

Time Safety builds on a condition not related to time, but to the structure of the process interactions. Time Safety builds on the results in [17] by using an assumption (received liveness) on the underlying structure of the timed processes.

## 8 Conclusion and Related Work

In terms of applications, timed session types are used for runtime monitoring [7,30] and static verification [12]. A promising future direction is the integration of static typing with runtime checking and enforcement towards the theory of timed session hybrid types.

## Session Types

Manifest sharing greatly increases the number of programs that can be written, as it restores the expressiveness of the untyped asynchronousπ calculus [3]. Process thinking has two shared channel references as arguments, for the left and right splits of the philosopher trying to acquire the process.

## 2 Manifest Sharing

The typing and dynamics of the remaining linear connectors are standard, and we detail them in the context of SILLS+ (see Section 3). While the process (ie, the session) is linear, it yields along aL while dividing along aS.

• Competition and Collaboration
• Type System
• Dining Philosophers in SILL S +
• Dynamics

For example, in the eating philosophers (Fig.1), the philosophersnesp0,p1 andp2 compete with each other for the set of forksf0,f1 andf2, whereas the process that spawns the philosophers and forks cooperates with one of them. The rules are checked against a process definition found in the signatureΣ and against a world substitution mappingγ :|Ψ| → |Ψ|, such that for each δ ∈ Ψ we have Ψ γ(δ), where |Ψ| denotes the field of Ψ (i.e. the union of its domain and range).

4 Extended Example: An Imperative Shared Queue

## 5 Semantics

### Configuration Typing and Preservation

Our progression theorem crucially depends on the guarantee that Invariants 1 and 2 of Section 3 hold for every linear process in the configuration tree. This is expressed by the premises Inv1(proc(aL,wa1wwa3a2,PaL)) and Inv2(proc(aL,wa1wwa3a2,PaL)) in the rule (T-Θ2) based on definitions1 and 2 below, which again state the invariants1 and 2 for the entire configuration.

### Progress

A red arrow points from a linear proc(aL,wa1wwa3a2, Q) to a linear proc(bL, wb1wwb3b2,P), if the former attempts to obtain a resource held by the latter and consequently waits for the latter to release that resource loose. A green arrow points from a linear proc(aL,wa1wwa3a2,Q) to a linear proc(bL,wb1wwb3b2,P), as the former waits to synchronize with the latter.

### Synchronization Dependency — “Green Arrow”)

Example (a) represents the case where a processPaL waits for synchronization with its child PbL while holding a resource that the child PbL or the PbL itself wants to acquire. Example (b) represents a case in which processPaL is waiting to synchronize with its slave PbL, while another slave, processPcL, is waiting to synchronize with PaL.

The theorem shows that, as long as there are at least two linear processes in the configuration, the configuration can always open. Such techniques are studied in the context of hybrid logic processes in [7] considering session types of the form ∀δ.Aand.

## 7 Related Work

Their work considers only a limited form of replication common in linear logic-based works, not including recursive types or recursive process definitions. Their work distills CCS processes from programs, which are then checked for deadlock by some form of symbolic execution [40] and model-checked against modalμ calculus [41], which encodes deadlock freedom for the abstract process (among other properties of interest). .

## 8 Concluding Remarks

Castro, D., Hu, R., Jongmans, S., Ng, N., Yoshida, N.: Distributed programming using role-parametric session types in motion: statically typed endpoint APIs for communication frameworks dynamically instantiated. Neykova, R., Hu, R., Yoshida, N., Abdeljallal, F.: A session type provider: API-time generation of distributed protocols with improvements in F#.

Combining the two structures described above, this paper introduces a categorical structure, which we call compact closed Freyd category, as a categorical model of the π calculus.2 Despite its simplicity, compact closed Freyd. One is a variant of the π calculus, called πF; the design of πF is based on the observations described above.

## 2 A Polyadic, Asynchronous π -calculus with i / o-types

### The π F -calculus

In Section 5, we discuss (1) how our work relates to linear logic and (2) present some ideas for how to extend the range of applications of our model.

### Equivalences on Processes

However, there is a subtle difference in the side condition: (E-GC) requires that a and ¯a do not appear at all in P. In particular, the latter implies that testing equivalence is within the scope of the categorical framework of this paper; see Theorem 5.

## 3 Categorical Semantics

• Overview
• Compact Closed Freyd Category
• Interpretation
• Term Model
• Theory/Model Correspondence

A compact closed Freyd category is a Freyd categoryJ :C −→ K such that (1)K is compact closed and (2)J has the (chosen) right adjoint I⇒ −:K → C. The most basic example of a compact closed Freyd category is (the strict monoidal version of) J:Sets ⊥ Rel: P.

## 4 A Concurrent λ -calculus and (de)compilation

### The λ ch -calculus

The interpretation of the λc calculation part is standard [24,37]; the constant channelσ (resp. sendσ) is interpreted as the "closure". The categorical semantics is sound and complete with respect to the equation theory of the λch calculus.

### Relation to Other Calculi and Translations

Once you consider AHOπ as a fragment ofλch, the translation of AHOπ to πF is obtained by restricting to AHOπ. Sangiorgi also gave a translation in the opposite direction, from Lπ to AHOπ in the same paper.

## 5 Discussions

An important example of πF with non-empty signature is the non-repeated entry calculus, which we consider to be a calculus with additional "process constants" but without any additional types. The addition of these processes as constants and the calculation rules of the equational axioms a(x).¯bxas results in a calculation with non-repeating inputs.

## 6 Related Work

The idea of ​​using a closed Freyd category to model the π calculus was strongly inspired by Laird [22]. The translation of AHOπ to Lπ [42] is, among other things, the closest to our translation of the λch calculus to the πF calculus.

## 7 Conclusion and Future Work

That is, we can obtain Milner's translation by combining CPS transformation and the composition of dieλch calculus. In: Proceedings of the Fourth Annual Symposium on Logic in Computer Science (LICS 1989), Pacific Grove, California, USA, 5–8 June 1989, pp.

Layer Protocols

Hình ảnh

+7

Tài liệu tham khảo

Tài liệu liên quan

Tiết học thực hành ngoài khóa giúp học sinh hệ thống hóa kiến thức về pháp luật, từ đó hiểu được các phẩm chất đạo đức cần có, biết được những việc làm được và không được làm theo quy định của pháp