evaluation of the implementation of an abstract
play

Evaluation of the Implementation of an Abstract Interpretation - PowerPoint PPT Presentation

ICLP19 Las Cruces, September 22, 2019 Evaluation of the Implementation of an Abstract Interpretation Algorithm using Tabled CLP n Arias 1 , 2 Manuel Carro 1 , 2 Joaqu 1 IMDEA Software Institute, 2 Universidad Polit ecnica de Madrid


  1. ICLP’19 – Las Cruces, September 22, 2019 Evaluation of the Implementation of an Abstract Interpretation Algorithm using Tabled CLP ın Arias 1 , 2 Manuel Carro 1 , 2 Joaqu´ 1 IMDEA Software Institute, 2 Universidad Polit´ ecnica de Madrid madrid institute for advanced studies in software development technologies

  2. www.software.imdea.org Introduction • Abstract interpretation is a theory for the approximation of the semantics of programs. • PLAI is an efficient abstract interpreter for logic programs implemented in CiaoPP . • Goal: improve the implementation of PLAI using Tabled CLP: • Reduce complexity and size. • Increase performance. madrid institute for advanced studies in software development technologies 1 / 16

  3. www.software.imdea.org Introduction • Abstract interpretation is a theory for the approximation of the semantics of programs. • PLAI is an efficient abstract interpreter for logic programs implemented in CiaoPP . • Goal: improve the implementation of PLAI using Tabled CLP: • Reduce complexity and size. • Increase performance. Main points • Tabling engine drives fixpoint. • Fair evaluation of tabling impact: • Preserve interfaces with rest of CiaoPP (abstract domains, etc). • Using abstract domains available in CiaoPP . • Analysing benchmarks from the CiaoPP distribution. • Entailment and LUB computation through constraint interface. madrid institute for advanced studies in software development technologies 1 / 16

  4. www.software.imdea.org Related Work • Tabling and abstract interpretation implementations share underlying principles: • Extension Tables [Dietrich 1987] for tabling. • Memo Tables with Dependency Tracking [Warren et al. 1988] for abstract interpretation. madrid institute for advanced studies in software development technologies 2 / 16

  5. www.software.imdea.org Related Work • Tabling and abstract interpretation implementations share underlying principles: • Extension Tables [Dietrich 1987] for tabling. • Memo Tables with Dependency Tracking [Warren et al. 1988] for abstract interpretation. • Implementation of Abstract Interpreters using tabling: • Initial proposals, no implementation/performance details. [Kanamori and Kawamura 1993; Warren 1999] • Some implementations used as benchmarks to compare tabling scheduling. [Demoen and Sagonas 1998; Freire et al. 2001] • Advanced techniques (e.g., answer merging) to improve their implementation. [Schrijvers et al. 2008; Chico de Guzm´ an et al. 2012; Swift and Warren 2010] madrid institute for advanced studies in software development technologies 2 / 16

  6. www.software.imdea.org Related Work • Tabling and abstract interpretation implementations share underlying principles: • Extension Tables [Dietrich 1987] for tabling. • Memo Tables with Dependency Tracking [Warren et al. 1988] for abstract interpretation. • Implementation of Abstract Interpreters using tabling: • Initial proposals, no implementation/performance details. [Kanamori and Kawamura 1993; Warren 1999] • Some implementations used as benchmarks to compare tabling scheduling. [Demoen and Sagonas 1998; Freire et al. 2001] • Advanced techniques (e.g., answer merging) to improve their implementation. [Schrijvers et al. 2008; Chico de Guzm´ an et al. 2012; Swift and Warren 2010] • To the best of our knowledge, only one tabled implementation [Janssens and Sagonas 1998] evaluated against non-tabled state-of-the-art Abs. Int. AMAI [Janssens et al. 1995] & PLAI [Muthukumar and Hermenegildo 1992] . • Conclusion: ”PLAI is the most efficient”. madrid institute for advanced studies in software development technologies 2 / 16

  7. www.software.imdea.org Background • Mod(ular) TCLP . [PPDP’16 & TPLP’19] . • Flexible, simple interface to use arbitrary constraint domains in tabled execution. • Three operations required: projection, entailment, application. • More particular calls (w.r.t. ⊑ ) suspend and reuse answers. � p(X) , X #> 1 � ⊑ � p(X) , X #> 0 � • More particular answers are discarded/removed. X #= 2 ⊑ X #> 0 ∧ X #< 5 madrid institute for advanced studies in software development technologies 3 / 16

  8. www.software.imdea.org Background • Mod(ular) TCLP . [PPDP’16 & TPLP’19] . • Flexible, simple interface to use arbitrary constraint domains in tabled execution. • Three operations required: projection, entailment, application. • More particular calls (w.r.t. ⊑ ) suspend and reuse answers. � p(X) , X #> 1 � ⊑ � p(X) , X #> 0 � • More particular answers are discarded/removed. X #= 2 ⊑ X #> 0 ∧ X #< 5 • Aggregate-TCLP . ’19] . [PADL • Incremental computation of join of elements in a lattice. Related to [Swift and Warren 2010; Guo and Gupta 2008; Zhou et al. 2010] . • Call entailment checking. Detection of semantically equivalent calls ⇒ termination. • Implemented on top of Mod TCLP . madrid institute for advanced studies in software development technologies 3 / 16

  9. www.software.imdea.org Abstract Interpretation [Cousot and Cousot 1977; Bruynooghe 1991] • Analyzes a finite # of abstract executions: • An abstract substitution (denoted X list ) approximates an infinite # of concrete substitutions. • It is defined on an abstract domain. • Given a clause of the form h :- p 1 , ... , p m : • β entry h β exit abstract entry and exit substitution of h . • λ i p i λ i + 1 abstract call and success substitution of call p i . β entry h :- λ 1 p 1 , λ 2 ... , λ m p m λ m + 1 . β exit • PLAI has a domain-independent interface. • PLAI constructs a finite abstract tree top-down: • Start with the λ call for a query. • Follow top-down execution. • Fixpoint algorithm used to terminate on recursive calls. madrid institute for advanced studies in software development technologies 4 / 16

  10. www.software.imdea.org Construction of the Abstract Tree λ call q 1 λ success . β entry q :- λ 1 p 1 , λ 2 ... , λ m p m λ m + 1 . β exit     β ′′ ... ⊔ exit ... entry q ′ :- λ ′ 1 , λ ′ 2 ... , λ ′ λ ′  1 p ′ m p ′  m + 1 . β ′ β ′  m exit madrid institute for advanced studies in software development technologies 5 / 16

  11. www.software.imdea.org Construction of the Abstract Tree λ call q 1 λ success . β entry q :- λ 1 p 1 , λ 2 ... , λ m p m λ m + 1 . β exit     β ′′ ... ⊔ exit ... entry q ′ :- λ ′ 1 , λ ′ 2 ... , λ ′ λ ′  1 p ′ m p ′  m + 1 . β ′ β ′  m exit ⊔ madrid institute for advanced studies in software development technologies 5 / 16

  12. www.software.imdea.org Construction of the Abstract Tree It loops in presence of recursion. λ call q 1 β entry q :- λ 1 p 1 , λ 2 ... , λ m p m λ m + 1 . β exit ... ... entry q ′ :- λ ′ 1 ... , λ call q 1 (loop) β ′ madrid institute for advanced studies in software development technologies 5 / 16

  13. www.software.imdea.org PLAI’s Fixpoint Algorithm λ call q 1 madrid institute for advanced studies in software development technologies 6 / 16

  14. www.software.imdea.org PLAI’s Fixpoint Algorithm λ call q 1 β entry q :- λ 1 p 1 , λ 2 ... , λ m p m λ m + 1 . β exit � β aprox . ⊔ non-recursive clauses ... madrid institute for advanced studies in software development technologies 6 / 16

  15. www.software.imdea.org PLAI’s Fixpoint Algorithm λ call q 1 β entry q :- λ 1 p 1 , λ 2 ... , λ m p m λ m + 1 . β exit �  β aprox .  ⊔     non-recursive clauses   ... β ′ ⊔ aprox . entry q ′ :- λ ′ 1 ... , λ call q 1 , λ ′ λ ′ aprox . p ′ m + 1 . β ′ β ′  m  exit      recursive clauses ... madrid institute for advanced studies in software development technologies 6 / 16

  16. www.software.imdea.org PLAI’s Fixpoint Algorithm λ call q 1 β entry q :- λ 1 p 1 , λ 2 ... , λ m p m λ m + 1 . β exit �   β aprox .   ⊔         non-recursive clauses     ... β ′  ⊔ aprox .   entry q ′ :- λ ′ 1 ... , λ call q 1 , λ ′ λ ′ aprox . p ′  β k − 1 m + 1 . β ′ β ′ ⊔  aprox . m  exit          recursive clauses  ...   entry q ′ :- λ ′ 1 ... , λ call q 1 , λ ′′ λ ′  aprox . p ′  β ′ m + 1 .  m ...  recursive clauses madrid institute for advanced studies in software development technologies 6 / 16

  17. www.software.imdea.org PLAI’s Fixpoint Algorithm λ call q 1  �   β entry q :- λ 1 p 1 , λ 2 ... , λ m p m λ m + 1 . β exit β aprox .    ⊔              non-recursive clauses      ... β ′   ⊔  aprox .    entry q ′ :- λ ′ 1 ... , λ call q 1 , λ ′ λ ′  aprox . p ′  β k − 1  m + 1 . β ′ β ′ ⊔   aprox . m   exit     β k aprox . ≡ β k − 1   ⊔ aprox .      recursive clauses   ...    entry q ′ :- λ ′ 1 ... , λ call q 1 , λ ′′ λ ′   aprox . p ′   m + 1 .  β ′  m  ...    recursive clauses    entry q ′ :- λ ′ 1 ... , λ call q 1 , λ k λ k  aprox . p ′  m + 1 . β ′  β k m  exit  recursive clauses madrid institute for advanced studies in software development technologies 6 / 16

Recommend


More recommend