DOI 10.1017S0956796803004702 Printed in the United Kingdom C
We characterize the impact of a linear β-reduction on the result of a control-flow analysis. (By ‘a linear β-reduction ’ we mean the β-reduction of a linear λ-abstraction, i.e., of a λabstraction whose parameter occurs exactly once in its body.) As
c2003CambridgeUniversityPressJFP13(5):925–933,September2003.
DOI:10.1017/S0956796803004702PrintedintheUnitedKingdom925
CPStransformationof owinformation,
PartII:administrativereductions
DANIELDAMIAN
LIONBioscienceLtd.,CompassHouse,80–82NewmarketRoad,CambridgeCB58DZ,UK
(e-mail:Daniel.Damian@http://www.77cn.com.cn)
OLIVIERDANVY
BRICS,DepartmentofComputerScience,UniversityofAarhus,NyMunkegade,Building540,
DK-8000AarhusC,Denmark
(e-mail:danvy@brics.dk)
Abstract
Wecharacterizetheimpactofalinearβ-reductionontheresultofacontrol- owanalysis.(By‘alinearβ-reduction’wemeantheβ-reductionofalinearλ-abstraction,i.e.,ofaλ-abstractionwhoseparameteroccursexactlyonceinitsbody.)Asacorollary,weconsidertheadministrativereductionsofaPlotkin-styletransformationintoContinuation-PassingStyle(CPS),andhowtheya ecttheresultofaconstraint-basedcontrol- owanalysisand,inparticular,theleastelementinthespaceofsolutions.Weshowthatadministrativereductionspreservetheleastsolution.PreservationofleastsolutionssolvesaproblemthatwasleftopeninPalsbergandWand’sarticle‘CPSTransformationofFlowInformation.’Together,PalsbergandWand’sarticleandthepresentarticleshowhowtomapinlineartimetheleastsolutionofthe owconstraintsofaprogramintotheleastsolutionofthe owconstraintsoftheCPScounterpartofthisprogram,afteradministrativereductions.Furthermore,weshowhowtoCPStransformcontrol- owinformationinonepass.
1Backgroundandintroduction
Sincetheirinception,over30yearsago(Reynolds,1993),continuationsandthetransformationintoContinuation-PassingStyle(CPS)havebeenthetopicofmuchstudy,rangingfromsemanticsandlogictoimplementationsofsequential,concurrent,anddistributedprogramminglanguagesandsystems.Fifteenyearsago,MeyerandWand(Meyer&Wand,1985;Wand,1985)noticedthattheCPStransformationpreservestypesandtheyconstructedaCPStransformationoftypes.
CPStransformationtype_______________typeoftypestypeinference
direct-styleprogramtypeinferenceCPStransformationCPSprogramofterms
Thisworkwascarriedoutwhilethe rstauthorwasatBRICS.BasicResearchinComputerScience(www.brics.dk),fundedbytheDanishNationalResearchFoundation.
We characterize the impact of a linear β-reduction on the result of a control-flow analysis. (By ‘a linear β-reduction ’ we mean the β-reduction of a linear λ-abstraction, i.e., of a λabstraction whose parameter occurs exactly once in its body.) As
926D.DamianandO.Danvy
Overthelastcoupleofyears,PalsbergandWandhaveextendedthisobservationto owtypesandthe owinformationgatheredbyacontrol- owanalysis(Palsberg&Wand,2002),designingaCPStransformationof owinformation.
ow ow__CPS__transformation________informationinformationof ow owanalysis
direct-styleprogram owanalysisCPStransformationCPSprogramofterms
Independently,andwithadi erentmotivation,wehavealsodesignedaCPStrans-formationof owinformationforcontrol owandbindingtimes(Damian,2001;Damian&Danvy,2000;Damian&Danvy,2002).ThetwoCPStransformationsof owinformationcorrespondtotwodi erenttakesontheCPStransformationofλ-terms:
CPSwithadministrativeredexesadministrativeCPSUUUUreductionslllUUUUtransformationlllUUllllCPSwithoutdirectstyleadministrativeredexesRRRRRRiiiiRRRiiiitransformationintoRRiiiiintroductionofmonadicstylecontinuationsmonadicnormalform
TheCPStransformationisPlotkin’s(1975).Itisa rst-order,compositionalrewritingsystemgeneratingnumerousadministrativeredexesthatneedtobepost-reducedinpractice(Steele,1978).Alternatively(Hatcli &Danvy,1994;Sabry&Wadler,1997),theCPStransformationcanbestagedintoatransformationintomonadicnormalformfollowedbyanintroductionofcontinuations.
ThetwoCPStransformationsof owinformationcanbedepictedasfollows:
CPSwithadministrativeredexesPalsberg&Wand,UUUUthisworklllUUUUl2002llUUllllCPSwithoutdirectstyleadministrativeredexesRRRRRRiRRRiiiiiiRiDamian&Danvy,RiiiiDamian&Danvy,2002monadic2000normalform
PalsbergandWandshowhowtoconstructinlineartimethe owinform-ationcorrespondingtoaCPSprogramobtainedthroughaPlotkin-styleCPStransformation(Palsberg&Wand,2002;Plotkin,1975).TheresultingprogramscontainalladministrativeredexesinducedbyPlotkin’stransformation.Therefore,
We characterize the impact of a linear β-reduction on the result of a control-flow analysis. (By ‘a linear β-reduction ’ we mean the β-reduction of a linear λ-abstraction, i.e., of a λabstraction whose parameter occurs exactly once in its body.) As
CPStransformationof owinformation,PartII:administrativereductions927
e
π
n∈∈∈∈ExpLamLabLit::= 2 0 1π 1x|n|e 1e2|if0ee0e1|λx.e(λ-abstractionlabels)(termlabels)(integerliterals)
Fig.1.Thelanguageoflabelledλ-terms.
thecorrespondingCPSinformationof owalsocontainsspuriousinformationwhichaccountsfortheextraneousλ-abstractionsandtheir ow.Theproblemofeliminatingthisspuriousinformationisopen.
DamianandDanvyshowhowtoconstructinlineartimethe owinformationcorrespondingtotheintroductionofcontinuations,startingfrommonadicnormalforms(Damian&Danvy,2000;Hatcli &Danvy,1994).Theyalsoshowhowtoconstructinlineartimethe owinformationcorrespondingtothetransformationintomonadicnormalforms(Damian,2001;Damian&Danvy,2002).
Inthiswork,wecompletethepictureabovebyshowinghowtoperforminlineartimeadministrativereductionsonCPS-transformedprograms(Section4).Ourresulthingesonlinearreductions(Section3).But rst,wepresentthesourcelanguageandaconstraint-basedcontrol- owanalysis(Section2).
2Preliminaries
2.1Thesourcelanguage
InputtermsaregivenbythegrammarinFigure1.
distinctlabelstakenfromacountablesetLab.E …… 此处隐藏:16944字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [公文资料]市场营销专员岗位职责
- [公文资料]综合部经理岗位职责
- [公文资料]会计助理岗位职责
- [公文资料]林业站站长职责
- [公文资料]菜品研发部岗位职责
- [公文资料]街道综治办工作职责
- [公文资料]酒店前台的工作职责
- [公文资料]销售部经理岗位职责
- [公文资料]工程部副经理岗位职责
- [公文资料]手术室护士工作职责
- [公文资料]银行客户经理职责
- [公文资料]汽车4s店市场专员职责
- [公文资料]服装店长工作职责
- [公文资料]采购总监岗位职责
- [公文资料]大学行政秘书工作职责
- [公文资料]学校财务人员岗位职责
- [公文资料]财务统计员岗位职责
- [公文资料]物业工程主管工作职责
- [公文资料]公司后勤工作职责
- [公文资料]采矿工程师岗位职责
- 门面出租合同样板(门面出租的合同)
- 自用房屋租赁合同 自住房租房合同(汇总
- 最新酒店劳动合同管理制度(11篇)(酒店
- 2025年无产权车库买卖合同实用(14篇)(
- 建筑工程农民工劳动合同十五篇(通用)(
- 最新深圳标准劳动合同 深圳劳动合同如
- 解除劳动合同通知书(实用6篇)(解除劳动
- 2025年二手房屋买卖合同范围精选(二十
- 最新融资贷款居间合同大全(22篇)(融资
- 2025年个人二手房屋买卖合同协议书四篇
- 2025年果树苗木买卖合约书 签订果树苗
- 广东省劳动合同书填写(21篇)(广东省劳
- 最新餐饮行业没有劳动合同 劳动法餐饮
- 农村土地买卖合同(汇总21篇)(农村土地
- 最新房屋转租合同模版21篇(通用)(标准
- 2025年进口合同号查询五篇(大全)(进口
- 农村建房包工包料合同(通用8篇)(农村建
- 2025年安装监控合同协议书(15篇)(2025
- 2025年企业租赁经营合同(模板9篇)(2025
- 最新郊区土地租赁合同(优质23篇)(最新




