Questions tagged [abstract-interpretation]

A formal method to statically infer program properties.

A formal method to statically infer program properties. Almost all static analysis methods can be viewed as abstract interpretation, such as data flow analysis, model checking, static type checking etc. It differs from testing and other dynamic program analysis framework which infer or verify program properties a posteriori. The abstract interpretation theory is initially proposed by R.Cousot and P.Cousot in their 1977 POPL paper.

11 questions
14
votes
3 answers

What is the difference between Data Flow Analysis and Abstract Interpretation

What is the difference between Data Flow Analysis and Abstract Interpretation and are they used for the same purpose? What are the pros and cons of these two relative to each other.
10
votes
1 answer

Truthful abstract measure for run time cost of a Prolog goal

In the following, I am only considering pure Prolog programs. This means that I am not talking about side-effects and OS calls that leave the realm of logic to do something that cannot be observed from within Prolog. There is a well-known abstract…
mat
  • 39,707
  • 3
  • 42
  • 68
10
votes
4 answers

Short implementation examples of abstract interpretation

I am taking a course on abstract interpretation, but I haven't seen any examples of how the theory maps down to actual code. I am looking for short code examples, where I preferably won't have to work with a whole compiler. The analysis doesn't have…
Jørgen Fogh
  • 7,212
  • 2
  • 34
  • 46
6
votes
1 answer

Calculate reachability to a function using frama-c's value analysis

Here is my example: int in; int sum(int n){ int log_input = n; int log_global = in; return 0; } int main(){ int n = Frama_C_interval(-10, 10); in = n; if (n > 0){ sum(n + 4); } return 0; } What I'd like to…
Maor Veitsman
  • 1,424
  • 8
  • 18
5
votes
1 answer

How does one prove simple equalities of non-deterministic values in Frama-C + EVA?

I'm a bit confused by the behavior of Frama-C version 18.0 (Argon). Given the following program: #include #include /*@ requires order: min <= max; assigns \result \from min, max; ensures result_bounded: min <= \result…
cody
  • 220
  • 1
  • 7
5
votes
3 answers

Abstract Interpretation in LLVM

I need to use abstract interpretation to do some analysis using LLVM. Is this possible? or I need to use analysis tools easier. If I could do that by LLVM , which classes would help me to formulate the statements from the original source code to…
R.Omar
  • 585
  • 1
  • 5
  • 14
3
votes
2 answers

What does "loops must be folded to ensure termination" mean?

I came across "loops must be folded to enusre termination" in a paper on formal methods (abstract interpretation to be precise). I am clear on what termination means, but I do not know what a folded loop is, nor how to perform folding on a…
Tom
  • 5,773
  • 9
  • 33
  • 45
2
votes
0 answers

Calculating function summary using Frama-C's value analysis

Let's say we have the following code sample: int a(int x){ if (x < 0){ return -50; } if (x >= 0 && x <= 3600){ return x - 100; } return x + 100; } int main(){ int q = Frama_C_interval(50, 5000); return…
0
votes
0 answers

Inferring invariants with abstract interpretation - examples

I've been reading on inferring invariants through abstract interpretation, especially the article "Automatic synthesis of optimal invariant assertions: Mathematical foundations", by Patrick Cousot and Radhia Cousot. However, I'm not able to find a…
0
votes
1 answer

Unable to use JBMC (Bounded Model Checker) Commands for Java

Am new to the JBMC(Bounded Model Checker). We have a requirement to find out the possibilities of RunTime Exception which may occur in java program without running it. We searched some abstract interpretation framework and found JBMC would help in…
0
votes
1 answer

Automatic widening in frama-c value analysis

I am looking for a method to perform widening on loops with no user hints. I'll explain using an example: int z; void main(void) { int r = Frama_C_interval(0, MAX_INT); z = 0; for (int y=0; y
Maor Veitsman
  • 1,424
  • 8
  • 18