Exploiting Constraint Dependency Information For Debugging and Explanation

ExploitingConstraintDep endencyInformationForDebuggingandExplanationWalid T. Keirouz, Glenn A. Kramer, Jahir Pab onSchlumb erger Lab ora toryforComputer Science8311North RR 620POBox 20001 5Austin, TX 78720 -00 15fwalid,gak,jahirg@austin.slcs.slb.comAbstractConstraintprogrammingisanotherformofprogrammi ngand,assuch,shouldb esupp ortedbyappropria te environments that supp ort debuggin g, explanati on and optimiza tion .We are build in g to olsneeded in such an environment and using them in the context of geometric constraint programming forgraphics and mechanica l design.Inthispap er,we presentthe comp onentsof suchanenvironmentandtheircapabil iti es.Wealsodescrib e an algorithm for identi fyi ng constraints that cause a mo del to b e over-constrain ed.1Intro ductionConstraints b etween entities in a mo del form a declarative sp eci cation that is used by a constraint solver tosatisfy and maintain relations b etween entities in the mo del. The solution steps taken by a solver to satisfythese constraints can b e collected in a \solution plan" and can b e viewed as a pro cedural program for solvingthese constraints.Thus, a constraint mo del forms a declarative sp eci cation of a pro cedural program that isgenerated automatically to solve the mo del's constraints.As such, constraint programming is another formof programming and should b e supp orted by appropriate environments that supp ort debugging, explanationand optimization.We are building to ols neededin such an environment and using them in the contextofgeometric constraint programming for graphics and mechanical design.Graphics was one of the rstdomains to which constraint-based techniqueswereapplied [Sutherland,1963; Borning, 1979].Since then, commercial constraint-based computer-aided design (CAD) systems haveemerged [Mills, 1992].While they are consideredfar sup erior to previous CAD to ols, engineersexp eriencediculty understanding the constraint models that underlie their designs (constraints may b e sp eci edbyusersorinferredby CADsystems).Attimes,theconstraintsin alarge mo del b ecome soconfusingthata designermight scrapa design and startanew [Tee, 1992].Furthermore, whenreturnsto thesame design several months later, there is no record of how the constraints were solved and what the designdep endenc ies are; the designer must rediscover the original design intent.Peopletypicallydeveloptheirownmentalmo delsoftheplanhowconstraintsaresatis edbyaconstraint system.However, these mo dels often do not reect the true solution plan.The diculties usersencounterare thencomp ounded b ecausethereis no way to view and understandthedep endenc iesin theconstraint mo dels they have built.2GeometricConstraintEngineWehavdevelop edaGeometricConstraintEngine(GCE)thatiscurrentlyusedinsketchingpro duct[Belleville, 1992]. GCE is based on research in the use of geometric constraints in kinematics and conceptual