1 / 19

Generation Core: IBM's Systematic Constraint Solver

Generation Core: IBM's Systematic Constraint Solver. Outline. Introduction to constraint satisfaction problems (CSP) Constraint satisfaction at IBM Haifa Solving approaches Generation Core (GEC): IBM’s systematic CSP solver Special features Large domains Specialized propagators

niabi
Download Presentation

Generation Core: IBM's Systematic Constraint Solver

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Generation Core: IBM's Systematic Constraint Solver

  2. Outline • Introduction to constraint satisfaction problems (CSP) • Constraint satisfaction at IBM Haifa • Solving approaches • Generation Core (GEC): IBM’s systematic CSP solver • Special features • Large domains • Specialized propagators • Random solutions • Hierarchical soft constraints • Conditional sub-problems

  3. A CSP consists of: • A set of Variables v1, v2, ..., vn • A finite domain for each variable: for each vi, viє Di • Constraints A set of relations between the variables

  4. The round-table problem Lancelot knows Galahad Ector knows Kay Percival knows Lancelot Gareth knows Gawain Gareth knows Lionel Galahad knows Percival Pellinore knows Kay ... • King Arthur would like to seat all his knights around the round table • Each knight must sit between two knights he knows

  5. Solution for a CSP Every variable is assigned a value from its domain, such that all constraints are satisfied All solutions are created equal

  6. Constraint satisfaction at IBM Haifa Research Labs • Two state-of-the-art solving engines – systematic and stochastic • Major application: test generation for hardware verification • Other applications • Workforce management • Truck configuration • Floor planning

  7. Generation Core (GEC) • IBM’s systematic CSP engine • On a par with leading tools in the industry (ILOG, SICStus) • Generic • Dozens of engineers involved in development, modeling, and applications of CSP • 15 years of development experience • Research activity

  8. GEC solution algorithm Systematic approach Based on Maintain Arc Consistency (MAC) [Mackworth 1977] MAC Instantiation MAC Instantiation backtrack MAC Instantiation MAC

  9. X: {1,2,3} Y: {1,2,3} Z: {1,2,3} X: {1,2,3} Y: {1,2,3} Z: {1,2,3} X: {1,2,3} Y: {1,2,3} Z: {1,2,3} X: {1,2,3} Y: {1,2,3} Z: {1,2,3} MAC Example X: {1,2,3} Y: {1,2,3} Z: {1,2,3} R1: {(x,y,z): x=y+z} AC instantiation AC R2: {(y,z): ygz} AC Don’t give up yet

  10. X: {1,2,3} Y: {1,2,3} Z: {1,2,3} X: {1,2,3} Y: {1,2,3} Z: {1,2,3} X: {1,2,3} Y: {1,2,3} Z: {1,2,3} X: {1,2,3} Y: {1,2,3} Z: {1,2,3} MAC example - backtracking X: {1,2,3} Y: {1,2,3} Z: {1,2,3} R1: {(x,y,z): x=y+z} instantiation instantiation R2: {(y,z): ygz} AC

  11. GEC algorithm summary Repeat until all variables are reduced to a single value or failure occurs • Make all constraints locally consistent • Through reducing the variable domains • Iteratively until a fixed-point is achieved • Backtrack if a domain is reduced to an empty set • If backtracking is exhausted problem is unsolvable • Choose a variable (which was not yet assigned) • Choose and assign a value for the selected variable • Choose a soft constraint and activate it

  12. Main Application: Simulation-Based Functional Verification of Processors Stimuli Generator Stimuli (test-cases) Design Simulator Functional Specification ? Expected Behavior Actual Behavior =

  13. How GEC fits into the test generation process Expert knowledge defining corner cases Architecture specification Model Stimuli Generator Constraint solver GEC constraint solver Stimuli (test-cases) • Used to verify all PowerPC designs in IBM over the last seven years: • i/p series servers, Cell, Xbox™

  14. Example of constraints Quality: sum zero add R1  R2 , R3 load Rx  1000 (Ry) ???? ??  Rz mult Rz  ?? , ?? Validity: x != y Input scenario: same register

  15. Special features: Large number domains Represented as masks: 0X0X = {0000, 0100, 0001, 0101} Length of numbers often 64 or 128 bits long Domains can have sizes of 264

  16. Special Features: Specialized propagators • For arithmetic operations: +, *, /, ... • For logical expressions: and, or, implies, ... • For bit operations: shift, rotate, concatenate, ... Rich expression language to represent constraints But users also have the option of defining their ownpropagators in C++ code!

  17. Special Features: Random Solutions • Every operation of the solver on a given problem produces a different solution • Strive toward uniformity of solutions (sometimes difficult) • Guarantee not to ‘lose’ solutions • Essential for testing because of unpredictability of bugs All solutions are created equal User preferences allowed by • Allowing hierarchy of soft constraints • Value ordering • Variable ordering

  18. Special Features: Conditional Sub-problems • Existence variables control the existence of certain sub-problems {true,false} false

  19. Summary • CSP is a dynamic field used to solve ‘hard’ problems (non-polynomial, non-linear) • Haifa Research Labs have a large group working on research and development in CSP • Haifa CSP tools are already in usage as a critical link in the chain of processor development • Also used in other applications within and outside of IBM

More Related