Questions tagged [acsl]

Ask Question

ACSL (ANSI/ISO C Specification Language) is a specification language for C programs, used by tools such as Frama-C.

40 questions
1 vote 1 answer 138 views

How to assert that a point is unreachable?

For Frama-C and the WP plugin, how can a user assert that a point in a program is unreachable? Looking for something like: //@ assert \unreachable; Costava's user avatar Costava
  • 195
3 votes 1 answer 80 views

How to know which parts of an ACSL predicate are failing?

I have an ACSL predicate that is ~37 lines long (the predicate returns whether the passed struct is in a valid state). It is a series of conditions &&'d together. When I assert the predicate: /... Costava's user avatar Costava
  • 195
1 vote 1 answer 94 views

Frama-C/E-ACSL Error including header files with wrapper script

I am trying to analyze my code using the E-ACSL wrapper script but am facing issues when trying to include header files. For demonstration, I am using the following code and an include directory with ... sgjl's user avatar sgjl
  • 27
0 votes 0 answers 110 views

FRAMA-C/WP Goals not being proved

I am trying to prove a simplified version of an example from the WP manual but I keep getting an error for one of the ensures clauses. Here is my code: /*@ requires \valid(a) && \valid(b); @ ... sgjl's user avatar sgjl
  • 27
0 votes 1 answer 30 views

E-ACSL wrapper script not creating files

I am new to Frama-C and wanted to ask what could be causing this issue: When I run the E-ACSL wrapper script on annotated code with no header files, the a.out.e-acsl file is properly created. However, ... sgjl's user avatar sgjl
  • 27
1 vote 1 answer 80 views

How to include header files with E-ACSL wrapper script?

I am new to Frama-C and wanted to ask how I could add header files when using the E-ACSL wrapper script. Normally, I've been adding header files the following way with WP and RTE: frama-c -rte main.c -... sgjl's user avatar sgjl
  • 27
1 vote 1 answer 50 views

Why is my ACSL contract failing on my copy function?

I'm new to ACSL and I tried to replicate the function contract of this copy function provided by "ACSL by Example" from the Fraunhofer Society. The Code below works perfectly and every goal ... Robin 's user avatar Robin
  • 13
2 votes 1 answer 100 views

Frama-C: Creating a ghost field in a non-ghost structure

My goal is to create a ghost field in a non-ghost structure. What I understand from the ACSL manual (v.1.17) is, that this is possible in ACSL: If a structure has ghost fields, the sizeof of the ... jobnz's user avatar jobnz
  • 398
2 votes 1 answer 290 views

Frama-C Prove While Loop with "/*@ ensures"

I am a newbie at Frama-C and I am trying to validate a C code. The code is very basic but somehow I can not validate it. In summary, I am trying to prove If that function or loop has ever run. For ... Uğur B's user avatar Uğur B
  • 31
1 vote 1 answer 47 views

Why WP can't deduce "else" close?

I'm trying to write the specification for a function which takes 2 pointers to int and put the smaller value to the first pointer and the other to the second. Here is the code and the specification: /*... Dorian's user avatar Dorian
  • 502
1 vote 1 answer 208 views

Frama-C does not recognize valid memory access from bitwise-ANDed index

I am right-shifting an unsigned integer then &ing it with 0b111, so the resulting value must be in the range [0, 7]. When I use that value as an index into an array of length 8, Frama-C is not ... Costava's user avatar Costava
  • 195
1 vote 1 answer 138 views

Frama-C with Eva plugin - Unsupported ACSL construct

I am currently trying to evaluate a test suite with Frama-C and it's plugin Eva. To do this I run Frama-C with the following flags: frama-c -eva -cpp-extra-args="-DINCLUDEMAIN -I .../<... Gerry's user avatar Gerry
  • 13
1 vote 1 answer 80 views

Why is the guard invalid in this loop invariant

I'm trying to create a loop invariant to check if all the elements of an array with an even index have the number 2on them (program to find prime numbers, in this step it's generating the SPF). ... João Teixeira's user avatar João Teixeira
  • 89
1 vote 0 answers 147 views

How can I prove this C is_power_of_2 function using Frama-C?

In a previous question I was asking for help writing a predicate to find if a number is a power of 2. This was a prelude to trying to prove the following C function: static inline bool is_power_of_2 (... Rich's user avatar Rich
  • 926
2 votes 1 answer 234 views

How do I write an "is power of 2" predicate in ACSL?

My attempt to write an ACSL predicate to see if an integer is a power of 2 goes like this: /*@ predicate positive_power_of_2 (integer i) = i > 0 && (i == 1 || ((i & 1) == 0 &... Rich's user avatar Rich
  • 926

15 30 50 per page123

You Might Also Like