Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Overview  





2 Syntax  





3 Tool support  





4 References  





5 External links  














ANSI/ISO C Specification Language







Add links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


ANSI/ISO C Specification Language
Paradigmdeclarative with few imperative features.
Designed byCommissariat à l'Énergie Atomique and INRIA
DeveloperCommissariat à l'Énergie Atomique and INRIA
First appeared2008
Stable release

v1.16 / 19 November 2020

Typing disciplinestatic
Major implementations
Frama-C
Influenced by
JML

The ANSI/ISO C Specification Language (ACSL) is a specification language for C programs, using Hoare style pre- and postconditions and invariants, that follows the design by contract paradigm. Specifications are written as C annotation comments to the C program, which hence can be compiled with any C compiler.

The current verification tool for ACSL is Frama-C. It also implements a sister language, ANSI/ISO C++ Specification Language (ACSL++), defined for C++.

Overview[edit]

In 1983, the American National Standards Institute (ANSI) commissioned a committee, X3J11, to standardize the C language. The first standard for C was published by ANSI. Although this document was subsequently adopted by International Organization for Standardization (ISO) and subsequent revisions published by ISO have been adopted by ANSI, the name ANSI C continues to be used.

ACSL is a behavioral interface specification language (BISL). It aims at specifying behavioral properties of C source code. The main inspiration for this language comes from the specification language of the Caduceus tool for deductive verification of behavioral properties of C programs. The specification language of Caduceus is itself inspired from JML which aims at similar goals for Java source code.

One difference with JML is that ACSL is intended for static verification and deductive verification whereas JML is designed both for runtime assertion checking and static verification using for instance the ESC/Java tool.

Syntax[edit]

Consider the following example for the prototype of a function named incrstar:

/*@ requires \valid(p);
  @ assigns *p;
  @ ensures *p == \old(*p) + 1;
  @*/
void incrstar (int *p);

The contract is given by the comment which starts with /*@. Its meaning is as follows:

A valid implementation of the above function would be:

void incrstar (int *p) {
    (*p)++;
}

Tool support[edit]

Most of the features of ACSL are supported by Frama-C.

The TrustInSoft static analyzer is a commercial derivative of Frama-C. It verifies program behavior and (with builtin rules based on the language specification) catch instances of undefined behavior.[1]

References[edit]

  1. ^ "ACSL Properties". TrustInSoft Documentation 1.42-dev documentation.

External links[edit]


Retrieved from "https://en.wikipedia.org/w/index.php?title=ANSI/ISO_C_Specification_Language&oldid=1215475446"

Categories: 
Specification languages
C (programming language)
Hidden categories: 
Articles needing additional references from February 2015
All articles needing additional references
Articles lacking in-text citations from February 2015
All articles lacking in-text citations
Articles with multiple maintenance issues
 



This page was last edited on 25 March 2024, at 10:53 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki