{"title":"CP、IP和SAT求解器在通用接口上的比较","authors":"Neng-Fa Zhou, Masato Tsuru, E. Nobuyama","doi":"10.1109/ICTAI.2012.15","DOIUrl":null,"url":null,"abstract":"This paper presents a common interface for Prolog to three different types of discrete solvers including Constraint Programming (CP), Integer Programming (IP), and SAT solvers. The interface comprises primitives for creating decision variables, specifying constraints, and invoking a solver, possibly with an objective function to be optimized. Before a solver is actually called, the accumulated variables and constraints are transformed into a form acceptable to the solver. For a SAT solver, in particular, variables are Booleanized and constraints are compiled into CNF. Implemented in B-Prolog, the interface allows the programmer to use the features of the host language such as recursion, pattern matching, arrays, and loops to describe problems. The interface provides an easy and uniform platform for exploring different solvers and models. This paper compares the performance of the CLP(FD) of B-Prolog, the CPLEX IP solver, and the Lingeling SAT solver on several problems through the same interface and for each problem it compares a model that uses Boolean variables and another model that uses general integer variables. Our experience tells that it is effortless to switch from one solver to another.","PeriodicalId":155588,"journal":{"name":"2012 IEEE 24th International Conference on Tools with Artificial Intelligence","volume":"11 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-11-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"6","resultStr":"{\"title\":\"A Comparison of CP, IP, and SAT Solvers through a Common Interface\",\"authors\":\"Neng-Fa Zhou, Masato Tsuru, E. Nobuyama\",\"doi\":\"10.1109/ICTAI.2012.15\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This paper presents a common interface for Prolog to three different types of discrete solvers including Constraint Programming (CP), Integer Programming (IP), and SAT solvers. The interface comprises primitives for creating decision variables, specifying constraints, and invoking a solver, possibly with an objective function to be optimized. Before a solver is actually called, the accumulated variables and constraints are transformed into a form acceptable to the solver. For a SAT solver, in particular, variables are Booleanized and constraints are compiled into CNF. Implemented in B-Prolog, the interface allows the programmer to use the features of the host language such as recursion, pattern matching, arrays, and loops to describe problems. The interface provides an easy and uniform platform for exploring different solvers and models. This paper compares the performance of the CLP(FD) of B-Prolog, the CPLEX IP solver, and the Lingeling SAT solver on several problems through the same interface and for each problem it compares a model that uses Boolean variables and another model that uses general integer variables. Our experience tells that it is effortless to switch from one solver to another.\",\"PeriodicalId\":155588,\"journal\":{\"name\":\"2012 IEEE 24th International Conference on Tools with Artificial Intelligence\",\"volume\":\"11 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2012-11-07\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"6\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2012 IEEE 24th International Conference on Tools with Artificial Intelligence\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICTAI.2012.15\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2012 IEEE 24th International Conference on Tools with Artificial Intelligence","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICTAI.2012.15","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A Comparison of CP, IP, and SAT Solvers through a Common Interface
This paper presents a common interface for Prolog to three different types of discrete solvers including Constraint Programming (CP), Integer Programming (IP), and SAT solvers. The interface comprises primitives for creating decision variables, specifying constraints, and invoking a solver, possibly with an objective function to be optimized. Before a solver is actually called, the accumulated variables and constraints are transformed into a form acceptable to the solver. For a SAT solver, in particular, variables are Booleanized and constraints are compiled into CNF. Implemented in B-Prolog, the interface allows the programmer to use the features of the host language such as recursion, pattern matching, arrays, and loops to describe problems. The interface provides an easy and uniform platform for exploring different solvers and models. This paper compares the performance of the CLP(FD) of B-Prolog, the CPLEX IP solver, and the Lingeling SAT solver on several problems through the same interface and for each problem it compares a model that uses Boolean variables and another model that uses general integer variables. Our experience tells that it is effortless to switch from one solver to another.