资源描述:
《An_Automatic_Program_Generator_for_Multi-Level_Specialization》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、P1:MVG/SFIP2:MVGLISPandSymbolicComputationKL453-03-gluckMay16,199712:18LISPandSymbolicComputation10,113–158(1997)°c1997KluwerAcademicPublishers.ManufacturedinTheNetherlands.AnAutomaticProgramGeneratorforMulti-LevelSpecializationROBERTGLUCK¨glueck@diku.dkDIKU,D
2、epartmentofComputerScience,UniversityofCopenhagen,Universitetsparken1,DK-2100Copenhagen,DenmarkJESPERJØRGENSENjesper@dina.kvl.dkDepartmentofMathematicsandPhysics,RoyalVeterinaryandAgriculturalUniversity,Thorvaldsensvej40,DK-1871FrederiksbergC,DenmarkAbstract.P
3、rogramspecializationcandivideacomputationintoseveralcomputationstages.Thispaperin-vestigatesthetheoreticallimitationsandpracticalproblemsofstandardspecializationtools,presentsmulti-levelspecialization,anddemonstratesthat,incombinationwiththecogenapproach,itisf
4、armorepracticalthanpre-viouslysupposed.Theprogramgeneratorwhichwedesignedandimplementedforahigher-orderfunctionallanguageconvertsprogramsintoverycompactmulti-levelgeneratingextensionsthatguaranteefastsuccessivespecialization.Experimentalresultsshowaremarkabler
5、eductionofgenerationtimeandgeneratorsizecomparedtopreviousattemptsofmulti-levelspecializationbyself-application.Ourapproachtomulti-levelspecializationseemswell-suitedforapplicationswheregenerationtimeandprogramsizearecritical.Keywords:programminglanguages,prog
6、ramtransformation,partialevaluation,generatingextensions,binding-timeanalysis,functionallanguages,Scheme1.IntroductionStagesofcomputationarisenaturallyinmanyprograms,dependingontheavailabilityofdataorthefrequencywithwhichdatachanges.Codeforlaterstagescanoftenb
7、eoptimizedbasedondataavailableinearlierstages.Thedivisionofprogramsintotwostageshasbeenstudiedintensivelyintheareaofpartialevaluation[8,18,35]toseparatethoseprogramexpressionsthatcanbesafelyevaluatedatspecializationtimefromthosethatcannot.Partialevaluationcann
8、owbeconsideredasoneofthemostadvancedtechniquesforautomaticprogrammanipulation.Themainproblemwithstandardpartialevaluation,e.g.,aspresentedin[37],istheneedtospecifytheavailabilityof