• Keine Ergebnisse gefunden

Automated Termination Analysis: From Term Rewriting to Programming Languages

N/A
N/A
Protected

Academic year: 2021

Aktie "Automated Termination Analysis: From Term Rewriting to Programming Languages"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Automated Termination Analysis: From Term Rewriting to Programming Languages

J¨urgen Giesl LuFG Informatik 2

RWTH Aachen Ahornstr. 55 52074 Aachen, Germany giesl@informatik.rwth-aachen.de

Termination is a crucial property of programs. Therefore, techniques to analyze termi- nation automatically are highly important for program verification. Traditionally, tech- niques for automated termination analysis were mainly studied for declarative program- ming paradigms such as logic programming and term rewriting. However, in the last years, several powerful techniques and tools have been developed which analyze the termination of programs in many programming languages includingJava,C,Haskell, andProlog. In order to re-use the wealth of existing tools and techniques developed for termination analysis of term rewriting (see e.g., [GTSKF06, Zan03]), we developed atransforma- tionalmethodology to prove termination of programs in different languages. In afront end, the program is automatically transformed into a term rewrite system (TRS) such that termination of the TRS implies termination of the original program. To obtain TRSs which are suitable for automated termination proofs, the front end proceeds in two steps. In the first step, the program is executed symbolically to generate a so-calledtermination graph.

This graph represents all possible evaluations of the program in a finite way. In the second step, the edges of the graph are transformed to rewrite rules. Finally, existing rewriting techniques are used in theback endto prove termination of the resulting TRS.

Prolog Program

%%J

JJ J

Haskell

Program // Termination

Graph // TRS // Termination Tool (AProVE)

Java Program

99s

ss s

| {z }

front end

| {z }

back end

(2)

We developed such approaches to prove termination ofProlog[GSSK+12, SKGS+10], Haskell[GRSK+11], andJava[BMOG12, BOG11, BOvG10, BSOG12, OBvG10]), and integrated them into our termination toolAProVE[GST06]. As shown at the annualInter- national Termination Competition,1 AProVEis currently not only the most powerful tool for automated termination analysis of TRSs, but also forProlog,Haskell, andJava. This shows that the proposed methodology for rewrite-based automated termination analysis indeed leads to competitive results.

References

[BMOG12] M. Brockschmidt, R. Musiol, C. Otto, and J. Giesl. Automated Termination Proofs forJavaPrograms with Cyclic Data. InProc. CAV ’12, LNCS 7358, pages 105–122, 2012.

[BOG11] M. Brockschmidt, C. Otto, and J. Giesl. Modular Termination Proofs of Recursive Java BytecodePrograms by Term Rewriting. In Proc. RTA ’11, LIPIcs 10, pages 155–170, 2011.

[BOvG10] M. Brockschmidt, C. Otto, C. von Essen, and J. Giesl. Termination Graphs forJava Bytecode. InVerification, Induction, Termination Analysis, LNCS 6463, pages 17–37, 2010.

[BSOG12] M. Brockschmidt, T. Str¨oder, C. Otto, and J. Giesl. Automated Detection of Non-Termination andNullPointerExceptions for Java Bytecode. In Proc.

FoVeOOS ’11, LNCS 7421, pages 123–141, 2012.

[GRSK+11] J. Giesl, M. Raffelsieper, P. Schneider-Kamp, S. Swiderski, and R. Thiemann. Au- tomated Termination Proofs forHaskellby Term Rewriting. ACM TOPLAS, 33(2), 2011.

[GSSK+12] J. Giesl, T. Str¨oder, P. Schneider-Kamp, F. Emmes, and C. Fuhs. Symbolic Evaluation Graphs and Term Rewriting – A General Methodology for Analyzing Logic Programs.

InProc. PPDP ’12, pages 1–12. ACM Press, 2012.

[GST06] J. Giesl, P. Schneider-Kamp, and R. Thiemann.AProVE 1.2: Automatic Termination Proofs in the Dependency Pair Framework. InProc. IJCAR ’06, LNAI 4130, pages 281–286, 2006.

[GTSKF06] J. Giesl, R. Thiemann, P. Schneider-Kamp, and S. Falke. Mechanizing and Improving Dependency Pairs.Journal of Automated Reasoning, 37(3):155–203, 2006.

[OBvG10] C. Otto, M. Brockschmidt, C. von Essen, and J. Giesl. Automated Termination Anal- ysis ofJava Bytecodeby Term Rewriting. InProc. RTA ’10, LIPIcs 6, pages 259–276, 2010.

[SKGS+10] P. Schneider-Kamp, J. Giesl, T. Str¨oder, A. Serebrenik, and R. Thiemann. Automated Termination Analysis for Logic Programs with Cut. Theory and Practice of Logic Programming, 10(4-6):365–381, 2010.

[Zan03] H. Zantema. Termination. In Terese, editor,Term Rewriting Systems, pages 181–259.

Cambridge University Press, 2003.

1Seehttp://termination-portal.org/wiki/Termination_Competition

Referenzen

ÄHNLICHE DOKUMENTE

• code V e — (generates code that) computes the Value of e, stores it in the heap and returns a reference to it on top of the stack (the normal case);. • code B e — computes the

In the termination graph for the start term “nonterm b x”, we obtain a DP path from the node with the start term to a node with “nonterm (x True) x” labelled with the substi-

Suppose, moreover, that if the evaluation of the then and else branches leads to the same value, we want to immediately produce that value (“short-circuiting” the reduction of

In fact, we can create equivalence classes of terms that differ only in the names of bound variables. When working with the lambda calculus, it is convenient to think about

In other words, if we dropped subsumption completely (after refining the application rule), we would still be able to give types to exactly the same set of terms — we just would not

I Axiomatic semantics tries to give a meaning of a programming construct by giving proof rules. This means we have to put them into relation with each other, and show that

160) The list of reserved identifiers with external linkage includes errno, math_errhandling, setjmp, and va_end... the header, so if a library function is declared explicitly when

7 The declarator in a function definition specifies the name of the function being defined and the identifiers of its parameters. If the declarator includes a parameter type list,