Skip to content

Commit cadc449

Browse files
Bump goblint-cil to universal character names
1 parent a0bb640 commit cadc449

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

goblint.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ dev-repo: "git+https://github.com/goblint/analyzer.git"
6363
# on `dune build` goblint.opam will be generated from goblint.opam.template and dune-project
6464
# also remember to generate/adjust goblint.opam.locked!
6565
pin-depends: [
66-
[ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#4356eb39fd9ea5192fc96f7b8e135586c65c3a19" ]
66+
[ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#0f2cd44f5473716f8025c870155a25bf0360dbe9" ]
6767
# TODO: add back after release, only pinned for optimization (https://github.com/ocaml-ppx/ppx_deriving/pull/252)
6868
[ "ppx_deriving.5.2.1" "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6" ]
6969
# quoter workaround reverted for release, so no pin needed

goblint.opam.locked

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ version: "dev"
110110
pin-depends: [
111111
[
112112
"goblint-cil.1.8.2"
113-
"git+https://github.com/goblint/cil.git#4356eb39fd9ea5192fc96f7b8e135586c65c3a19"
113+
"git+https://github.com/goblint/cil.git#0f2cd44f5473716f8025c870155a25bf0360dbe9"
114114
]
115115
[
116116
"apron.v0.9.13"

goblint.opam.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# on `dune build` goblint.opam will be generated from goblint.opam.template and dune-project
22
# also remember to generate/adjust goblint.opam.locked!
33
pin-depends: [
4-
[ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#4356eb39fd9ea5192fc96f7b8e135586c65c3a19" ]
4+
[ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#0f2cd44f5473716f8025c870155a25bf0360dbe9" ]
55
# TODO: add back after release, only pinned for optimization (https://github.com/ocaml-ppx/ppx_deriving/pull/252)
66
[ "ppx_deriving.5.2.1" "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6" ]
77
# quoter workaround reverted for release, so no pin needed

src/analyses/base.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ struct
499499
let toInt i =
500500
match IdxDom.to_int @@ ID.cast_to ik i with
501501
| Some x -> Const (CInt (x,ik, None))
502-
| _ -> mkCast ~e:(Const (CStr "unknown")) ~newt:intType
502+
| _ -> mkCast ~e:(Const (CStr ("unknown",No_encoding))) ~newt:intType
503503

504504
in
505505
match o with
@@ -681,8 +681,8 @@ struct
681681
(match str with Some x -> M.tracel "casto" "CInt (%s, %a, %s)\n" (Cilint.string_of_cilint num) d_ikind ikind x | None -> ());
682682
`Int (ID.cast_to ikind (IntDomain.of_const (num,ikind,str)))
683683
(* String literals *)
684-
| Const (CStr x) -> `Address (AD.from_string x) (* normal 8-bit strings, type: char* *)
685-
| Const (CWStr xs as c) -> (* wide character strings, type: wchar_t* *)
684+
| Const (CStr (x,_)) -> `Address (AD.from_string x) (* normal 8-bit strings, type: char* *)
685+
| Const (CWStr (xs,_) as c) -> (* wide character strings, type: wchar_t* *)
686686
let x = Pretty.sprint ~width:80 (d_const () c) in (* escapes, see impl. of d_const in cil.ml *)
687687
let x = String.sub x 2 (String.length x - 3) in (* remove surrounding quotes: L"foo" -> foo *)
688688
`Address (AD.from_string x) (* `Address (AD.str_ptr ()) *)
@@ -773,7 +773,7 @@ struct
773773
| None -> ad
774774
in
775775
`Address (AD.map array_start (eval_lv a gs st lval))
776-
| CastE (t, Const (CStr x)) -> (* VD.top () *) eval_rv a gs st (Const (CStr x)) (* TODO safe? *)
776+
| CastE (t, Const (CStr (x,e))) -> (* VD.top () *) eval_rv a gs st (Const (CStr (x,e))) (* TODO safe? *)
777777
| CastE (t, exp) ->
778778
let v = eval_rv a gs st exp in
779779
VD.cast ~torg:(Cilfacade.typeOf exp) t v
@@ -2172,7 +2172,7 @@ struct
21722172
end
21732173
| `Unknown "__builtin" ->
21742174
begin match args with
2175-
| Const (CStr "invariant") :: ((_ :: _) as args) ->
2175+
| Const (CStr ("invariant",_)) :: ((_ :: _) as args) ->
21762176
List.fold_left (fun d e -> invariant ctx (Analyses.ask_of_ctx ctx) ctx.global d e true) ctx.local args
21772177
| _ -> failwith "Unknown __builtin."
21782178
end

src/analyses/fileUse.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ struct
247247
let f k m w =
248248
let m = check_overwrite_open k m in
249249
(match arglist with
250-
| Const(CStr(filename))::Const(CStr(mode))::[] ->
250+
| Const(CStr(filename,_))::Const(CStr(mode,_))::[] ->
251251
(* M.debug @@ "fopen(\""^filename^"\", \""^mode^"\")"; *)
252252
D.fopen k loc filename mode m |> split_err_branch lval (* TODO k instead of lval? *)
253-
| e::Const(CStr(mode))::[] ->
253+
| e::Const(CStr(mode,_))::[] ->
254254
(* ignore(printf "CIL: %a\n" d_plainexp e); *)
255255
(match ctx.ask (Queries.EvalStr e) with
256256
| `Lifted filename -> D.fopen k loc filename mode m

src/analyses/spec.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct
6262

6363
let equal_exp ctx spec_exp cil_exp = match spec_exp, cil_exp with
6464
(* TODO match constants right away to avoid queries? *)
65-
| `String a, Const(CStr b) -> M.debug "EQUAL String Const: %s = %s" a b; a=b
65+
| `String a, Const(CStr (b,_)) -> M.debug "EQUAL String Const: %s = %s" a b; a=b
6666
(* | `String a, Const(CWStr xs as c) -> failwith "not implemented" *)
6767
(* CWStr is done in base.ml, query only returns `Str if it's safe *)
6868
| `String a, e -> (match ctx.ask (Queries.EvalStr e) with

src/analyses/varEq.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ struct
4949

5050
let const_equal c1 c2 =
5151
match c1, c2 with
52-
| CStr s1 , CStr s2 -> s1 = s2
53-
| CWStr is1, CWStr is2 -> is1 = is2
52+
| CStr (s1,_) , CStr (s2,_) -> s1 = s2
53+
| CWStr (is1,_), CWStr (is2,_) -> is1 = is2
5454
| CChr c1 , CChr c2 -> c1 = c2
5555
| CInt (v1,k1,_), CInt (v2,k2,_) -> Cilint.compare_cilint v1 v2 = 0 && k1 = k2
5656
| CReal (f1,k1,_) , CReal (f2,k2,_) -> f1 = f2 && k1 = k2

src/cdomains/exp.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ struct
110110
let eq_const c1 c2 =
111111
match c1, c2 with
112112
| CInt (i1,_,_), CInt (i2,_,_) -> Cilint.compare_cilint i1 i2 = 0
113-
| CStr s1 , CStr s2 -> s1=s2
114-
| CWStr s1 , CWStr s2 -> s1=s2
113+
| CStr (s1,_) , CStr (s2,_) -> s1=s2
114+
| CWStr (s1,_) , CWStr (s2,_) -> s1=s2
115115
| CChr c1 , CChr c2 -> c1=c2
116116
| CReal (f1,_,_) , CReal (f2,_,_) -> f1=f2
117117
| CEnum (_,n1,_) , CEnum (_,n2,_) -> n1=n2

src/util/cilfacade.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ let rec typeOf (e: exp) : typ =
277277
(* The type of a string is a pointer to characters ! The only case when
278278
* you would want it to be an array is as an argument to sizeof, but we
279279
* have SizeOfStr for that *)
280-
| Const(CStr s) -> !stringLiteralType
280+
| Const(CStr (s,_)) -> !stringLiteralType
281281

282-
| Const(CWStr s) -> TPtr(!wcharType,[])
282+
| Const(CWStr (s,_)) -> TPtr(!wcharType,[])
283283

284284
| Const(CReal (_, fk, _)) -> TFloat(fk, [])
285285

0 commit comments

Comments
 (0)