~ubuntu-branches/debian/sid/frama-c/sid

« back to all changes in this revision

Viewing changes to cil/src/frontc/cabs2cil.mli

  • Committer: Bazaar Package Importer
  • Author(s): Mehdi Dogguy
  • Date: 2009-06-03 08:19:25 UTC
  • Revision ID: james.westby@ubuntu.com-20090603081925-kihvxvt0wy3zc4ar
Tags: upstream-20081201.dfsg
Import upstream version 20081201.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(**************************************************************************)
 
2
(*                                                                        *)
 
3
(*  Copyright (C) 2001-2003,                                              *)
 
4
(*   George C. Necula    <necula@cs.berkeley.edu>                         *)
 
5
(*   Scott McPeak        <smcpeak@cs.berkeley.edu>                        *)
 
6
(*   Wes Weimer          <weimer@cs.berkeley.edu>                         *)
 
7
(*   Ben Liblit          <liblit@cs.berkeley.edu>                         *)
 
8
(*  All rights reserved.                                                  *)
 
9
(*                                                                        *)
 
10
(*  Redistribution and use in source and binary forms, with or without    *)
 
11
(*  modification, are permitted provided that the following conditions    *)
 
12
(*  are met:                                                              *)
 
13
(*                                                                        *)
 
14
(*  1. Redistributions of source code must retain the above copyright     *)
 
15
(*  notice, this list of conditions and the following disclaimer.         *)
 
16
(*                                                                        *)
 
17
(*  2. Redistributions in binary form must reproduce the above copyright  *)
 
18
(*  notice, this list of conditions and the following disclaimer in the   *)
 
19
(*  documentation and/or other materials provided with the distribution.  *)
 
20
(*                                                                        *)
 
21
(*  3. The names of the contributors may not be used to endorse or        *)
 
22
(*  promote products derived from this software without specific prior    *)
 
23
(*  written permission.                                                   *)
 
24
(*                                                                        *)
 
25
(*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   *)
 
26
(*  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     *)
 
27
(*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS     *)
 
28
(*  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE        *)
 
29
(*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,   *)
 
30
(*  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,  *)
 
31
(*  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;      *)
 
32
(*  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      *)
 
33
(*  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT    *)
 
34
(*  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN     *)
 
35
(*  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE       *)
 
36
(*  POSSIBILITY OF SUCH DAMAGE.                                           *)
 
37
(*                                                                        *)
 
38
(*  File modified by CEA (Commissariat � l'�nergie Atomique).             *)
 
39
(**************************************************************************)
 
40
 
 
41
val convFile: Cabs.file -> Cil_types.file
 
42
 
 
43
(** NDC added command line parameter.
 
44
    Turn on tranformation that forces correct parameter evaluation order *)
 
45
val forceRLArgEval: bool ref
 
46
 
 
47
(** Set this integer to the index of the global to be left in CABS form. Use
 
48
    -1 to disable *)
 
49
val nocil: int ref
 
50
 
 
51
(** Indicates whether we're allowed to duplicate small chunks of code. *)
 
52
val allowDuplication: bool ref
 
53
 
 
54
(** A hook into the code that creates temporary local vars.  By default this
 
55
  is the identity function, but you can overwrite it if you need to change the
 
56
  types of cabs2cil-introduced temp variables. *)
 
57
val typeForInsertedVar: (Cil_types.typ -> Cil_types.typ) ref
 
58
 
 
59
(** Like [typeForInsertedVar], but for casts.
 
60
    [typeForInsertedCast expr original_type destination_type]
 
61
    returns the type into which [expr], which has type [original_type] and
 
62
    whose type must be converted into [destination_type], must be casted.
 
63
 
 
64
    By default, returns [destination_type].
 
65
 
 
66
    This applies only to implicit casts. Casts already present
 
67
    in the source code are exempt from this hook. *)
 
68
val typeForInsertedCast:
 
69
  (Cil_types.exp -> Cil_types.typ -> Cil_types.typ -> Cil_types.typ) ref
 
70
 
 
71
(** [fresh_global prefix] creates a variable name not clashing with any other
 
72
    globals and starting with [prefix] *)
 
73
val fresh_global : string -> string
 
74
 
 
75
(** CEA-LRI: exports for logic typing *)
 
76
 
 
77
(** Check that [s] starts with the prefix [p]. *)
 
78
val prefix : string -> string -> bool
 
79
 
 
80
val annonCompFieldName : string
 
81
val conditionalConversion : Cil_types.typ -> Cil_types.typ -> Cil_types.typ
 
82
val arithmeticConversion : Cil_types.typ -> Cil_types.typ -> Cil_types.typ
 
83
val integralPromotion : Cil_types.typ -> Cil_types.typ
 
84
 
 
85
val blockInitializer :
 
86
  Cilutil.LvalSet.t ->
 
87
  Cil_types.varinfo -> Cabs.init_expression ->
 
88
  Cil_types.block * Cil_types.init * Cil_types.typ
 
89
 
 
90
(** Returns a block of statements equivalent to the initialization [init]
 
91
    applied to lvalue [lval] of type [typ]. *)
 
92
val blockInit :
 
93
  Cil_types.lval -> Cil_types.init -> Cil_types.typ -> Cil_types.block
 
94
 
 
95
(** Applies [mkAddrOf] after marking variable whose address is taken. *)
 
96
val mkAddrOfAndMark : Cil_types.lval -> Cil_types.exp
 
97
 
 
98
(** If called, sets a flag so that [continue] in while loops get transformed
 
99
    into forward gotos, like it is already done in do-while and for loops. *)
 
100
val setDoTransformWhile : unit -> unit
 
101
 
 
102
(** If called, sets a flag so that translation of conditionals does not result
 
103
    in forward ingoing gotos (from the if-branch to the else-branch). *)
 
104
val setDoAlternateConditional : unit -> unit
 
105
 
 
106
(** If called, sets a flag so that translation of assignments as
 
107
    sub-expressions returns the right-hand-side rather than
 
108
    the left-hand-side. *)
 
109
val setDoAlternateAssign : unit -> unit
 
110
 
 
111
(*
 
112
Local Variables:
 
113
compile-command: "make -C ../../.."
 
114
End:
 
115
*)