文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 计算机软件及应用 > Design and implementation of Triveni A process-algebraic API for threads + events
侵权投诉

Design and implementation of Triveni A process-algebraic API for threads + events

We describe Triveni, a framework and API for integrating threads and events. The design of Triveni is based on an algebra, including preemption combinators, of processes. Triveni is compatible with existing threads standards, such as Pthreads and Java thre

DesignandImplementationofTriveni:aProcess-algebraicAPIforThreads+Events

ChristopherColby

LalitaJategaonkarJagadeesanKonstantinL¨auferCarlosPuchol

RadhaJagadeesan

DepartmentofMathandCS,LoyolaUniversityChicago6525N.SheridanRoad,Chicago,IL60626

colby,radha,laufer@cs.luc.edu

doc.guandang.net colby,radha,laufer

BellLaboratories,LucentTechnologies1000WarrenvilleRoad,Naperville,IL60566

lalita,cpg@research.bell-labs.com

doc.guandang.net lalita,cpg

Abstract

WedescribeTriveni,aframeworkandAPIforintegratingthreadsandevents.ThedesignofTriveniisbasedonanalgebra,includingpreemptioncombinators,ofprocesses.Triveniiscompatiblewithexistingthreadsstandards,suchasPthreadsandJavathreads,andwiththeeventmodelsstructuredontheObserverpattern.Wedescribethesoft-warearchitectureandalgorithmsunderlyingaconcreteimplementationofTriveniinJava.Thisenvironmentin-cludesspeci cation-basedtestingofsafetyproperties.Theresultsdescribedinthispaperhavebeenusedtoin-tegrateprocess-algebraicmethodsinto(concurrent)objectorientedprogramming[8].

TheAPIshouldbecompatiblewiththeextensiveanalysismethodologies/toolsdevelopedfortestingandverifyingconcurrentsystems,suchascomputer-aidedveri cationviamodelchecking(e.g.,see[7]forasurvey)andspeci cation-basedtestingoftemporalproperties(e.g.,see[13,10]).

WehavedesignedandimplementedTriveni,anAPIthatachievestheabovegoals.

Design.WebaseTrivenionanovelalgebraofprocessesthataddspreemptioncombinators[3]tothestandardcom-binatorsfromprocessalgebrasuchasparallelcomposition,waitingforevents,spawningprocesses,etc.Therequire-mentthatTrivenibecompatiblewitheventmodelsbasedontheObserverpatterndictatesthatthecommunicationmodelbemulticastandinputeventsarealwaysenabled.Implementation.WedescribeanimplementationofTriveniasaJavalibrarycalledJavaTriveni.

1Introduction

Theaimofthisresearchistoenhancethepracticeofthreadsprogrammingwithideasfromthetheoryofconcur-rency,suchasprocessalgebras[21,15,2]andsynchronousprogramminglanguages(see[14,4]forsurveys).Inpartic-ular,wewanttobuildaprocess-algebraicapplicationpro-gramminginterface(API)combiningthreadsandevents.ToensurethatthisAPIcan(re)usetheextensiveexistingworkinboththedesignandimplementationofprogram-minglanguagesandtheanalysisofconcurrentsystems,wehavethefollowingcompatibilityrequirements.

AnyJavathreadthatusesanObserver-basedinterfaceforeventscanbeusedasaprimitiveJavaTrivenipro-cess.Inotherwords,userscan texistingJavacodeintoJavaTriveniunchanged.

JavaTriveniincludesaspeci cation-basedtestingen-vironmentthatautomatestestingsafetypropertiesex-pressedin(propositional)lineartimetemporallogic.

TheAPIshouldbecompatiblewithexistingthreadsstandards,suchasPthreadsandJavathreads.TheAPIshouldbecompatiblewiththeeventmodelsstructuredontheObserverpattern[12].InJava(1.1),forinstance,eventsaregeneratedbyeventsources(subjects),andoneormorelisteners(observers)canregisterwithasourcetobenoti edabouteventsofaparticularkind.

Relatedwork.OccamandPict[24]aretwootherpro-gramminglanguagesthatarebuiltonideasfromconcur-rencytheory.OccamisbasedonCSP;Pictisbasedonthe(asynchronous)pi-calculus[16]andincorporatesapow-erfultypingsystem.ThedifferencesbetweenPictand

第1页

你可能喜欢

热门文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email