text
stringlengths
128
2.05k
AtomicInteger can take. An instance of AtomicInteger as the coordinator of threads is specified using a globally known role Any thread calling a method of the
AtomicInteger can acquire or release a fraction of the shared resource, depending on its role and the current state of the atomic integer. This is specified in
AtomicInteger s contract. In order for a thread to be eligible to call a method, it has to possess a token indicating its role and the value of the atomic state upon its last visit. This is captured by an abstract predicate
handle (line of Listing LABEL:lst:SharedAtomicIntegerSpecification ). Essentially, this abstract predicate witnesses the role of the calling thread, its last seen value of
AtomicInteger , and the fraction of the token. The constructor of the AtomicInteger absorbs the resource associated with the initial value. Often, as seen e.g. in
Semaphore , if the resource is obtained by a compareAndSet -based competition, then the synchroniser owns the resource at the beginning. But, if the threads start their life with some resources in their hands (such as the active threads in
CountDownLatch ), then the synchroniser does not own any resource in its initial step. The get method exchanges the resources based on the view of the calling thread. In a competition-based synchronisation threads do not obtain any resource by calling the
get method; they only update their knowledge about the current state. Apart from the thread’s handle, any thread calling set int
has to provide (1) its permission to write the value to the atomic integer, (2) the resources associated to its current view, and (3) the resources associated to the value
i.e. the next state of the atomic integer. Upon return of the set method, the calling thread only obtains a handle updated with the thread’s new view. Also the thread trying to atomically update the value of an atomic integer by calling
compareAndSet int int has to have the permission for the transition from to and the right handle to call this operation. Following our formal specification (see Figure
), our extension of the contract of AtomicInteger captures that the compareAndSet int int method absorbs the difference between the resources that the synchroniser will hold in case of a successful update, i.e. the resources associated with
, and the resources that the synchroniser object currently holds, i.e. the resources associated with If the operation succeeds, the operation ensures the difference between the resources that the synchroniser owned before the call, i.e. the resources associated on
, and the resources that holds after the successful update, i.e. the resources associated with If the operation fails, no resources are exchanged. Instead all resources specified in the pre-condition are returned. In the specification of
AtomicInteger , the difference between the resources turns into the subtraction operation between two fraction types. The subtraction between two permissions is defined as zero if the result of the operation becomes negative. Besides, as explained above,
inv (0) is equivalent to true Therefore, as expressed in the contract of compareAndSet , the difference between the resources associated with the two states
and determines if the calling thread releases or obtains fractions of the shared resource. Essentially, our extension for the contract of
AtomicInteger class is realised by: (1) defining the share function to map the fractions to the atomic state, and (2) updating the specification of
compareAndSet with the cut-off subtraction between fractions. In the next section we demonstrate how one can use this specification of
AtomicInteger to verify an implementation of a shared-reading synchroniser. Verification In this section we demonstrate how to verify the specification of a shared-reading synchroniser w.r.t. its implementation using an instance of
AtomicInteger For space reasons, we only explain the verification of Semaphore using the VerCors tool set; the verification of CountDownLatch is very similar to
Semaphore . Moreover, to show that our new specification still supports verification of exclusive access synchronisers, we have also verified an implementation of a
SpinLock . All examples are available online The examples are automatically verified using the VerCors tool set VerCors is the tool that encodes our specified programs to intermediate languages like Viper
and Chalice to be verified by permission-based SL back-ends like Silicon 6.1 Semaphore: verification Class Semaphore implements a synchroniser where a group of threads simultaneously can have read access to a shared resource. The full code for this class is specified in LABEL:lst:semaphoreverification-cons LABEL:lst:se...
The Semaphore class is parametrized with the resource invariant defined by its client program. The instantiated semaphore uses two predicates as tokens to detect if a thread holds a fraction of the shared resource:
initialized and held An instance of a semaphore protects a shared resource with a specified maximum number of permits which is defined as a ghost variable within the class (line of LABEL:lst:semaphoreverification-cons ). To instantiate an object of
AtomicInteger , the Semaphore class has to define the required protocol. Resources are acquired using a compare-and-set based competition. All participating threads have identical roles in the specification. The shared resource to be protected by
AtomicInteger is the same as the surrounding program passes on to the semaphore ( LABEL:lst:semaphoreverification-cons , line ). The definition of the
share function defines the fraction of the shared resource that must be held by AtomicInteger in each state ( LABEL:lst:semaphoreverification-cons , line ). The definition given for the valid transitions expresses that in each update the difference between two states must be one unit ( LABEL:lst:semaphoreverification-c...
6.1.1 Constructor /*@ given group (frac -> resource) rinv; @*/ public class Semaphore /*@ ghost final int num; ghost Set<role> roles
{T}; group resource initialized(int d,frac p) sync.handle(T,d,p); resource held(int d,frac p) initialized(d,p); group resource inv(frac
p) rinv(p); frac share(role r, int c){ return (r==S && c>=0 && c<num)?(c/num):0; boolean trans(role r, int c, int n){ return (r==T
** n>0; ensures initialized(n,1) ** num == n; @*/ 13 Semaphore int ){ /*@ set num n; fold sync.inv(share(n)); @*/ 15 sync new AtomicInteger /*@<roles,inv,share,trans>@*/ );
/*@ fold initialized(n,1); @*/ 17 Listing 4: Verification of Semaphore : constructor. The client of the semaphore instantiates the object with a number of available units to acquire. Thus, it has to provide the resources associated with the initial value of the semaphore. After storing the maximum number of permits in ...
num , the body of the constructor can feed the AtomicInteger class with the resources associated with its initial value (see line of LABEL:lst:semaphoreverification-cons ). In return, the constructor of
AtomicInteger returns its handle, which can be used to establish the postcondition of the constructor of the semaphore as defined in line Finally, the semaphore ensures a full initialized token to the client program, which can be distributed in portions among the participating threads.
6.1.2 Methods The annotated versions of the methods acquire () and release () are presented in LABEL:lst:semaphoreverification-acquire and LABEL:lst:semaphoreverification-release , respectively. Having a fraction of the initialized token given by the client program, each thread is authorized to start its competition to...
get method from AtomicInteger (line of LABEL:lst:semaphoreverification-acquire ). According to the provided protocol for the AtomicInteger , the thread does not have any resource associated with its view. Therefore, having the right handle suffices to read the current state of the
sync object (see line of LABEL:lst:semaphoreverification-acquire ). To acquire a unit of the available permits the thread must decrement the current state by one. So it folds all the required abstract predicates as the specification of
compareAndSet demands. Based on the given definition for the protocol, the acquiring thread does not need to provide any resources at this step. In case of a successful update, the
compareAndSet nextc returns one unit of the shared resource, i.e. inv (1/ num (see of LABEL:lst:semaphoreverification-acquire ). The successful thread can then leave the body of
acquire after folding the held predicate using the available handle from AtomicInteger In the post-condition of the acquire method,
denotes the existence of a view for the calling thread after the call. Finally, if the thread fails to decrement the state, it continues reading the current state and trying to atomically decrement the state.
/*@ given int d, frac p; requires initialized(d, p) ** d<=num ** d>0; ensures held(?w,p) ** rinv(1/num) ** w<num ** w>=0; @*/ public
void acquire (){ /*@ unfold initialized(d,p); @*/ boolean stop false int 0; while (! stop /*@ fold sync.inv(sync.share(T,d)); @*/
sem get (); if ){ int nextc -1; /*@ fold sync.trans(T,c,nextc); 11 fold sync.inv(sync.share(S,nextc)-sync.share(S,c)); @*/ stop sem compareAndSet nextc );
13 /*@ fold held(nextc,p); @*/ 15 Listing 5: Verification of Semaphore :: acquire () Releasing a fraction of the shared resource is symmetric to the
acquire method. It should be easy to follow the reasoning steps presented in LABEL:lst:semaphoreverification-release We only note here that the thread calling the
release method provides the fraction of the shared resource it owns. Then, in an attempt to increment the current state of the atomic integer, if it succeeds it gives up the permit by folding the
inv abstract predicate required by compareAndSet nextc at line 11 of Listing LABEL:lst:semaphoreverification-release /*@ given inr
d,frac p; requires held(d,p) ** rinv(1/num) ** d<num ** d>=0; ensures initialized(?w,p) ** w<=num ** w>0 @*/ public void release (){
/*@ unfold held(d,p); unfold initialized(d,p); @*/ boolean stop false while (! stop int sync get (); int nextc +1; /*@ fold sync.trans(T,c,nextc);
@*/ /*@ fold sync.inv(sync.share(S,nextc)-sync.share(S,c)); @*/ 11 stop sync compareAndSet nextc ); /*@ fold initialized(nextc,p);
@*/ 13 Listing 6: Verification of Semaphore :: release () Conclusion and Related Work Many different extensions of CSL are proposed in the literature. After RGSep
and Deny-Guarantee Reasoning CAP was introduced to reason about atomic operations. In CAP, resources are encoded together with the environment interference in an atomic rule to reason about synchronisation with finer granularity. The dream of having an universal logic for concurrent programs resulted in developing vari...
, iCAP and, finally, Iris . Iris is a PBSL based logic to reason about fine-grained concurrent data structures. It supports resource algebras, invariants and higher-order predicates. The user has to instantiate the logic with the elements of the target programming language. Currently, Iris-based verification is perform...
is a verification tool where the core logic is based on CAP with additional features taken mainly from iCAP and Iris. All the above mentioned works focus on the development of a generic, universal and powerful program logics. Instead, we treat reasoning about atomic operations at the specification level using an alread...
and Verifast We modified our approach in such a way that the new specification of AtomicInteger can be used to verify both exclusive and shared-reading synchronisers. This is done by defining a function that associates the atomic state to the fractions of the shared resources. The definitions of protocols and resource ...
# Source: arxiv 1806.09884 # Title: On Guay's evaluation map for affine Yangians # Sections: all # Downloaded: 2026-03-03T02:41:24.658620+00:00
On Guay’s evaluation map for affine Yangians Abstract We give a detailed proof of the existence of evaluation map for affine Yangians of type A to clarify that it needs an assumption on parameters. This map was first found by Guay but a proof of its well-definedness and the assumption have not been written down in the ...
Introduction The affine Yangian [MATH] of type A is a two-parameter deformation of the universal enveloping algebra of the universal central extension of a double loop Lie algebra [MATH] It may be regarded as an additive degeneration of the quantum toroidal algebra. While the representation theory of quantum toroidal a...
Guay introduced an algebra homomorphism from the affine Yangian [MATH] to a completion of [MATH] in G2 This is an affine analog of the well-known evaluation map from the Yangian [MATH] to [MATH] We refer to Guay’s map as evaluation map for the affine Yangian. Since the classical evaluation map for [MATH] plays a fundam...
In G2 , explicit values of the evaluation map are given only for part of the generators of [MATH] It is stated that the values for other generators are determined from the defining relations of [MATH] and a property of the map, and a proof of its well-definedness is omitted. One of the goals of the present paper is to ...
In the course of checking the well-definedness, we have realized that we need to impose a certain relation among the parameters and the central element of the affine Yangian. To clarify this fact is also a purpose to write this paper. So far we have not yet been able to define the evaluation map for general parameters....
We can pull back integrable highest weight modules of [MATH] via the evaluation map in Theorem 3.8 to make them [MATH] -modules. The resulting modules satisfy the highest weight condition for affine Yangian. We determine the highest weights of these evaluation modules in Theorem 4.1 and investigate an analog of the Dri...
We note that we consider the affine Yangian [MATH] for [MATH] Although we expect the existence of the evaluation map for [MATH] case, we have not proved it. The main reason is absence of Theorem 2.2 which reduces the defining relations of the affine Yangian to those among the generators of degree zero and one. The case...
The quantum toroidal case is studied by Miki and Feigin-Jimbo-Mukhin FJM However, the evaluation map we consider here is not a direct analog of theirs. Our evaluation map has a formula only for the generators of degree zero and one, while it is given for all generators of the quantum toroidal algebra in FJM One can twi...
This paper is organized as follows. Section 2 is devoted to preliminaries on the affine Yangian [MATH] and the affine Lie algebra [MATH] We provide completions of [MATH] which are used to formulate the main results. In Section 3, we give a proof of the existence of the two kinds of evaluation map. Then we determine the...
Added remark After this paper was published online, an error was found. There was an error in the proof of Theorem 3.1 (main theorem) in the earlier version, and consequently it was wrong as stated. We need to correct the definition of the affine Lie algebra [MATH] More precisely we need to modify the defining relation...
Acknowledgments The author thanks to Mamoru Ueda for pointing out an error in the published version of this paper. This work was supported by JSPS KAKENHI Grant Number 17H06127 and 18K13390.
Preliminaries 2.1 Affine Yangian Fix an integer [MATH] throughout the paper. We use the notation [MATH] Definition 2.1 The affine Yangian [MATH] is the algebra over [MATH]
[MATH] [MATH] with parameters [MATH] subject to the relations: [EQUATION] [EQUATION] [EQUATION] [EQUATION] where [EQUATION] The subalgebra [MATH] [MATH] ) is isomorphic to [MATH] (see G2 , Theorem 6.1] for [MATH] and GRW , Theorem 6.9] in general). We set [MATH] and [MATH]
Theorem 2.2 (Guay G2 , Proposition 2.1, Guay-Nakajima-Wendlandt GNW , Theorem 2.12 and Section 6) The affine Yangian [MATH] is isomorphic to the algebra [MATH]
[MATH] subject to the relations: [EQUATION] [EQUATION] [EQUATION] [EQUATION] [EQUATION] where we set [MATH] We can slightly reduce the relations as follows. Proofs are straightforward.
Lemma 2.3 The relation [MATH] is deduced from the following: [EQUATION] Lemma 2.4 The relation [MATH] is deduced from the following:
[EQUATION] [EQUATION] For each [MATH] , we define an algebra automorphism [MATH] of [MATH] by [EQUATION] We can verify that [MATH] is well-defined in the same way as an automorphism [MATH] given in G1 , Lemma 3.5] The definition of [MATH] will be recalled in 3.2 Let [MATH] be the algebra anti-isomorphism from [MATH] to...
[EQUATION] It is easy to see that the assignment respects the defining relations. 2.2 Affine Lie algebra [MATH] Let [MATH] be the complex general linear Lie algebra consisting of [MATH] matrices. We denote by [MATH] the matrix unit with [MATH] -th entry [MATH] The indices [MATH] of [MATH] are regarded as elements of [M...
[EQUATION] Let [MATH] be the affine Lie algebra whose Lie bracket is given by [EQUATION] Let [MATH] be the Heisenberg Lie algebra whose Lie bracket is given by
[EQUATION] Define two kinds of the affine Lie algebra [MATH] by [EQUATION] Then we have [EQUATION] and [EQUATION] In the sequel, the symbol [MATH] denotes both [MATH] and [MATH] unless otherwise stated.
We denote the element [MATH] by [MATH] We set [EQUATION] Let [MATH] be the Lie subalgebras of [MATH] [MATH] [MATH] ) and [MATH] [MATH] ). That is,
[EQUATION] Let [MATH] be the Cartan subalgebra [MATH] [MATH] ) and [MATH] Let [MATH] be the algebra anti-automorphism of [MATH] defined by [MATH] and [MATH] We denote by [MATH] the algebra anti-isomorphism from [MATH] to [MATH] induced from the assignment [MATH] in [MATH]
[MATH] [MATH] in [MATH] The restriction of [MATH] to [MATH] gives an algebra anti-automorphism of [MATH] The anti-isomorphism [MATH] defined in the previous subsection is an extension of the restriction of [MATH] to [MATH]
We define gradings of [MATH] by [MATH] Then [MATH] become graded algebras. We denote by [MATH] the degree [MATH] components. Let us introduce completions of [MATH] and [MATH]
Definition 2.5 We define completions [MATH] and [MATH] of [MATH] and [MATH] , respectively, as follows: [EQUATION] [EQUATION] Both [MATH] and [MATH] have natural algebra structures which contain [MATH] and [MATH] as subalgebras, respectively. Moreover the anti-automorphism [MATH] of [MATH] extends to the completions an...
[MATH] extends to an algebra anti-isomorphism [EQUATION] Evaluation map 3.1 Main theorem From now on, we evaluate the central element [MATH] at a complex number, which is denoted also by the same letter [MATH]
Theorem 3.1 (Guay G2 Assume [MATH] Then there exists an algebra homomorphism [MATH] uniquely determined by [EQUATION] [EQUATION]
[EQUATION] [EQUATION] The formulas in the theorem are deduced from those for [MATH] [MATH] where [MATH] , given in G2 , Section 6, pp. 462–463] In G2 , computations for the well-definedness are omitted. Moreover we need the condition [MATH] to verify that those formulas preserve the defining relations of [MATH] and thi...
Remark 3.2 It is straightforward to deduce the following formula for [MATH] [EQUATION] [EQUATION] Proof. By the definition of [MATH] , the elements [MATH] [MATH] [MATH] ) automatically satisfy the defining relations of [MATH] By Theorem 2.2 , Lemma 2.3 and 2.4 , it is enough to show the following:
[EQUATION] [EQUATION] [EQUATION] [EQUATION] [EQUATION] Moreover the relations ( 3.4 ), ( 3.5 ) for [MATH] are deduced from those for [MATH] by applying the anti-automorphism [MATH] since we have [MATH] and [MATH]
Let us start to check the relations. We use the symbol [MATH] for [MATH] if [MATH] is true, [MATH] otherwise. The relation ( 3.1 ) clearly holds since [MATH] has only weight [MATH] terms.
We show ( 3.2 ). We may assume [MATH] Further assume [MATH] The proof for the case [MATH] is similar. Put [EQUATION] Since we have [MATH] for all [MATH] , it is enough to show
[EQUATION] We give a proof for [EQUATION] We can similarly prove [EQUATION] The identity ( 3.6 ) follows from next lemma. Lemma 3.3
We have [EQUATION] [EQUATION] [EQUATION] [EQUATION] Proof. We compute [MATH] as [EQUATION] The sum of the terms containing [EQUATION]
is [EQUATION] Similarly the sum of the terms containing [EQUATION] is [EQUATION] Hence the first identity holds. The second identity [MATH] is clear due to the condition [MATH]
A direct computation shows [EQUATION] The sums of the terms containing [EQUATION] are [EQUATION] [EQUATION] respectively. The former follows from
[EQUATION] and the latter is similarly obtained. Hence the third identity holds. A similar computation shows the last identity. We show ( 3.3 ). Assume [MATH] The proofs for the remaining cases are similar. We have
[EQUATION] Since we have [EQUATION] we see [EQUATION] and [EQUATION] Therefore [EQUATION] We show ( 3.4 ) for [MATH] Assume [MATH] The right-hand side of ( 3.4 ) is
[EQUATION] A direct computation shows [EQUATION] Hence the desired identity follows from [EQUATION] for the case [MATH] [EQUATION]
for the case [MATH] [EQUATION] for the case [MATH] We thus have proved the case [MATH] The proofs for the remaining cases are similar, but we give computations for the cases [MATH] [MATH] and [MATH] [MATH] to clarify a role of the condition [MATH] First assume [MATH] [MATH] Then the right-hand side of ( 3.4 ) is
[EQUATION] The left-hand side is [EQUATION] Hence the assertion holds. Next assume [MATH] [MATH] Then the right-hand side of ( 3.4 ) is