1 / 33

An Efficient Implementation for Calculating Stable Models of Kernel Programs

University of Milan. Helsinki university of technology. An Efficient Implementation for Calculating Stable Models of Kernel Programs. Fabrizio Magni Relatore: Prof. Alessandro Provetti Corelatore: Prof. Ilka Niemela. Aims of this Thesis. Studying of kernel semantic,

senona
Télécharger la présentation

An Efficient Implementation for Calculating Stable Models of Kernel Programs

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. University of Milan Helsinki university of technology An Efficient Implementation for Calculating Stable Models of Kernel Programs Fabrizio Magni Relatore: Prof. Alessandro Provetti Corelatore: Prof. Ilka Niemela

  2. Aims of this Thesis • Studying of kernel semantic, • Studying of SMODELS and its algorithms; • Modifing SMODELS in order to handle kernel program efficiently.

  3. Secondary Aims • Improving SMODELS under ussumption of input kernel programs • Testing with SAT problems and benchmarking; • Kernel program generator.

  4. Logic Program a  not b.b  not c.c  not a, not d.d b.e not b, a.

  5. Kernel Program a  not b.b  not c.c  not a.e not b.

  6. Kernel of a logic Program Main characteristic: • It contains only the information useful for the computetion of the Stable Models. • It is well-founded; • It is totally negative; • It contains only negative loops and bridges. For further information look at the papers of Brignoli, Costantini, D’Antona and Provetti. Further Information:

  7. How to Calculate a Kernel Program (Kernelization) • Well-founded semantic; •  operator; • Iterating unfolding; • Iterating top; • Erasing the still positive rules (or partially positive). Read the paper: Costantini et al., 1999. Further Information:

  8. Main Steps of the previos thesis: Kernelizer SMODELS Logic Program Parsed Kernel Stable Models

  9. Improvment of a Kernel Program • Faster than a normal logic program (usually the program is shorter in lenght); • Semantically homogeneous.

  10. Functions in SMODELS See the text slides

  11. Works in progress • Improving of Smodels calculation time • Inserting the kernel semantic in smodels rules • benchmarking

  12. Smodel –kernelized Test program kernel MakeWFF generator cnf2ksm Script CNF Smodels Lparse program Conjunctive normal form

  13. MakeWff parameter: Makewff #length #variables #rules #rules / #variables = 1,5 ...... 10

  14. Number of Stable Models: 2191578960 Duration: 513.322 Number of choice points: 2191579236 Number of wrong choices: 2191579236 Number of atoms: 101 Number of rules: 300 Number of picked atoms: 2455708082 Number of forced atoms: 393430 Number of truth assignments: 1078181615 Size of searchspace (removed): 100 (0) real 14:42:33.7 user 14:27:31.9 sys 1.0 NORMAL VERSION 4_50_200.res

  15. Reading...done Number of Stable Models: 2191578960 Duration: 2048.026 Number of choice points: 2234501931 Number of wrong choices: 2234501931 Number of atoms: 101 Number of rules: 300 Number of picked atoms: 2234501931 Number of forced atoms: 0 Number of truth assignments: 2384993934 Size of searchspace (removed): 101 (0) real 7:47:24.3 user 7:43:37.5 sys 0.3 4_50_200.res KERNEL VERSION

  16. Testing We tested smodels with about 200 kernelized program The results show that the effeciency is increased about 30..50%

  17. Benchmark

  18. University of Milan Helsinki university of technology Alan Franzi University of Milan (now accomodated at the Teknillinen korkeakoulu) BASp & Co. Question can be send: -> Email: afranzi@cs.hut.fi -> Voice: Sorry, only in italian version 

  19. BASp Benchmark for ASP THE benchmark suite to test ASP implementation software

  20. BASp • 1. why ? • 2. architecture • 3. features • 4. future works • Smodels –kernelized performance • 1. our preliminar test • 2. results

  21. Main idea: Computing with default logic [P. Cholewinski] TheoryBase The Stanford Graph Base Others 

  22. Why ? • a lot of programs that works width different, and sometimes incomparable, type of logic programs. We can not compare one to each other 2. random programs are not significative in the real application We can’t understand if one implementation is more efficient compared with others in the real application.

  23. What we need • Easy to use !! • Easy to expand with new problems • Flexible • Ready for future ASP implementation

  24. BASp architecture BASp Encoding module engine Problem module engine Block world generator Stanford graph base Smodels DeRes Dlv Future Ksmodels Smodels Queen graph Simplex graph

  25. Module engine Encoding module engine Block world generator Stanford graph base generator • Convert specific output from each generator into generic format for the problem engine. • Trasform the input command line of BASp and pass at the generetor

  26. Encoding module engine • Used as a graph generator • Common characteristic • Increasing size Block world generator Stanford graph base Queen graph Simplex graph Future work

  27. Encoding module engine Fact: a ,b and c Block world generator Stanford graph base A Queen graph Simplex graph C B

  28. Module engine test Problem module engine Smodels DeRes Dlv Future Takes in input the generic format and selected problem and then creates the program for the specific implementation Ksmodels Smodels Future work

  29. Problem module engine Each solver module describe specific problems Smodels DeRes Dlv Coloring Hamilton Cover Vertx Future Ksmodels Smodels Coloring Hamilton Coloring

  30. Features %1> BASp –syntax Smodels –p hamilton –g simplex –n 23 %1> BASp –syntax all –p all –g simplex –n 23 %1> BASp –syntax all –p all –g all –n 0 Random generation size All avaible problem

  31. Future work • Implement DLV and DeRes module • Create block world engine and problem • Design a graphic interface • Extend problems set

  32. Special thanks Ilkka Niemelä Alessandro Provetti Tommi Syrjänen Stefania Costantini James T. Kirk

More Related