Semantics of constraint logic programs with bounde

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

UppsalaMaster’sThesisinComputingScience125ExamensarbeteDV31998-05-18ISSN1100-1836SemanticsofConstraintLogicProgramswithBoundedQuantiersMartinArgeniusComputingScienceDepartmentUppsalaUniversityBox311,S-75105Uppsala,Swedenemaild90mar@csd.uu.seSupervisor:AndreiVoronkovExaminer:Sven-OlofNystromPassed:AbstractWesurveytheareasofConstraintprogramming,BoundedQuantiersandCollectionTypes,thenwedescribeanextensionofconstraintlogicprogrammingbyboundedquantiers.Boundedquan-tiersprovidethesupportfornitedomainconstraintprogramminginanaturalway.Wedeneseveralsemanticsforconstraintlogicprogramswithboundedquantiersandprovetheirequiva-lence.Ourresultscanbeusedtodenesemanticsforsomeexistingconstraintlogicprogramminglanguages,likecc(FD).Contents1Introduction21.1Constraintprogramming..................................21.2Boundedquantiers....................................41.3CollectiontypesinLogicProgrammingandDeductiveDatabases..........................................72Constraintlogicprogramswithboundedquantiers102.1Sortsandlists........................................102.2BoundedquantiersandCBQ-programs........................112.3Theorder-sortedpredicatecalculus............................123SemanticsofCBQ-programs133.1Model-theoreticsemantics.................................133.2Fixpointsemantics.....................................173.3Provabilitysemantics....................................193.4Thenaturalsemantics...................................204Operationalsemantics225Relatedwork271Section1IntroductionConstraintlogicprogrammingisadeclarativeextensionofHornclauselogicprogrammingwhereconstraintsandconstraintsolvingtechniquesareincorporatedinalogic-basedlanguage.AnotherdeclarativeextensionofHornclauselogicprogrammingbyboundedquantiersisdenedin[42,43].Boundedquantiersallowonetonaturallyexpressthesearchovernitedomains.Thisthesisextendstheresultsof[43]toconstraintlogicprogramming.Thatis,weshowhowtoincludeboundedquantiersintotheconstraintlogicprogrammingparadigm.Itallowsonetohandlebothniteandinnitedomainconstraints.Inaddition,boundedquantiersmakeitpossibletoconstructnitedomainswiththedesiredproperties.Weonlytreatsemanticsandaproceduralinterpretationhere,buttheresultsontheexpressivepowerandonnegationfrom[43]couldalsobestraightforwardlygeneralizedtoconstraintlogicprograms.Therestofthissectionwillserveasanintroductiontotheeldsofconstraintprogramming,boundedquantiersandcollectiontypes.Thefollowingsectionsarefromthetechnicalreport[2].InSection2wegivethebasicdenitionsofsorts,listsandCBQ-programs,i.e.constraintlogicprogramswithboundedquantiers.InSection3weintroduceseveralsemanticsoflogicprogramswithboundedquantiersandprovetheirequivalence.Section4describesCBQ-resolutionthatservesastheproceduralsemanticsofthelanguage.InSection5wediscussrelatedworks.1.1ConstraintprogrammingConstraintprogrammingisawayofincorporatingconstraintsolvingtechniquesintoaprogramminglanguage.Ithasbeendonebothforfunctionalandprocedurallanguagesaswellasforlogicpro-gramminglanguages.Theworkonconstraintprogramminglanguagesprecededlogicprogrammingwhichisshowninthefollowingsurveyofsomeearlylanguages,mainlyfrom[25].Constraintprogramminglanguageswasatrstusedintheareasofgraphicalsystems,electriccircuitengineeringandforsolvingcombinatorialproblems.TherstlanguageconsideredtobeaconstraintlanguagewasSKETCHPAD[37].Itwasaninteractivedrawingsystemwheretheusercouldbuildgeometricobjectsfromlanguageprimitivesandstaticconstraintsthatweresolvedbylocalpropagationandrelaxationtechniques.AnotherlanguagewasTHINGLAB[7]thatwasasomewhatobject-orientedgraphicalsystem,localpropagationandrelaxationwereusedtohandlethestaticconstraints.IntheareaofelectriccircuitingCONSTRAINTS[36]wasalanguagewherevariablesandconstraintswerestatic,i.e.couldnotbedynamicallygenerated,andtheconstraintsolvingwaslimitedtousinglocalpropagation,itwasusedinapplicationsforelectricalcircuitanalysisandsynthesis.EL/ARS2[35]andSYN[11]wasrelatedsystemsthatusedtheconstraintsolverMACSYMA[32]toavoidtherestrictionsoflocalpropagation.AnearlysystemdesignedforproblemsolvingwastheREF-ARF[15]system.REFisaprocedurallanguagewithnondeterminismbecauseofstaticconstraintsusedinconditionalstatements,ARFistheconstraintsolverusingbacktracking.DuringthistimealotofworkwasalsodoneinmodelingcombinatorialproblemsasConstraintSatisfactionProblems(CSP’s)anddevelopingtechniquesfortheirsolvingindependentofahostlanguage.TheseproblemscanbeclassiedasBooleanconstraintsatisfactionproblems,forexamplethemap-coloringproblem,andasconstraintoptimizationproblems.Constraintlogicprogramming(CLP)istheincorporationofconstraintsandconstraintsolvingmethodsinlogic-basedlanguages.Thelanguagescombinethedeclarativesemanticsandnondeter-minismoflogicprogrammingwithecientconstraint-solvingalgorithms.ThewellknownCLP-scheme[24]denestheclassoflanguagesCLP(X)obtainedbyinstanti-atingtheparameterX.Inthisschemealogic-basedprogramminglanguage,itsoperationalanddeclarativesemanticsandtherelationshipsbetweenthesesemanticsareallparameterizedbyachoiceofdomai

1 / 32
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功