Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3a41e07
Forward Constraint System
michael-schwarz Aug 1, 2025
d455a55
Document
michael-schwarz Aug 1, 2025
91a5c26
Rm commented out code
michael-schwarz Aug 1, 2025
3885e1c
Doc
michael-schwarz Aug 1, 2025
da2d6a8
Add Helmut's solver
michael-schwarz Aug 2, 2025
b1b8f76
now with wrapper to enforce single contribution to unknown; also with…
hseidl Aug 4, 2025
da9f213
now with check and simple error messages
hseidl Aug 4, 2025
482c214
Typo
michael-schwarz Aug 4, 2025
2d7cc69
Move solver
michael-schwarz Aug 4, 2025
c2edc54
New type
michael-schwarz Aug 4, 2025
ddb8cf6
FwdSolver
michael-schwarz Aug 4, 2025
74fdc6c
fwdSolver now with initialization of locals and globals; checker take…
hseidl Aug 4, 2025
7f368f7
Merge branch 'fwd_constrsys' of github.com:goblint/analyzer into fwd_…
hseidl Aug 4, 2025
e1cf7a4
Make compile
michael-schwarz Aug 4, 2025
576bf98
RHS for entry
michael-schwarz Aug 4, 2025
9bd4d64
Fix context type
michael-schwarz Aug 5, 2025
5eb1e5b
Document FwdSolver & FwdControl
michael-schwarz Aug 5, 2025
db9c610
added second solver run; extended check to deal with list of initiall…
hseidl Aug 5, 2025
224ddf7
...
hseidl Aug 5, 2025
83c6b51
Progress
michael-schwarz Aug 5, 2025
1b01fa2
Indent
michael-schwarz Aug 5, 2025
f015623
Dead function warning
michael-schwarz Aug 5, 2025
fc27e21
...
hseidl Aug 5, 2025
5eb634a
Make compile
michael-schwarz Aug 5, 2025
7c59413
Warrowing / Verifyer State
michael-schwarz Aug 5, 2025
15e7f10
write-only unknowns
michael-schwarz Aug 5, 2025
e4b7000
... now with widening delay 10 and narrowing gas 3 in a global ref wh…
hseidl Aug 6, 2025
17558e1
Merge branch 'fwd_constrsys' of github.com:goblint/analyzer into fwd_…
hseidl Aug 6, 2025
0e83aa7
Make compile ;)
michael-schwarz Aug 6, 2025
1528b85
Warning off-by-one
michael-schwarz Aug 6, 2025
32438bf
Use tau out
michael-schwarz Aug 6, 2025
e4ad315
Add warn global
michael-schwarz Aug 6, 2025
62368e7
Set postsolving before `check`
michael-schwarz Aug 6, 2025
05defc1
now check for equality for avoiding unnecessary updates; and check fo…
hseidl Aug 7, 2025
5339296
Replace instead of `add`
michael-schwarz Aug 15, 2025
7ce0896
Enforce valid widening again
michael-schwarz Aug 15, 2025
c55131a
Enforce valid widening again
michael-schwarz Aug 15, 2025
e86b2e9
Include initial values in postsolve result
michael-schwarz Aug 15, 2025
d2b54f5
...
hseidl Aug 15, 2025
64fed8e
Merge branch 'fwd_constrsys' of github.com:goblint/analyzer into fwd_…
hseidl Aug 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/constraint/constrSys.ml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ sig
val postmortem: LVar.t -> LVar.t list
end

(** A side-effecting system with globals. *)
module type FwdGlobConstrSys =
sig
module LVar : VarType
module GVar : VarType

module D : Lattice.S
module G : Lattice.S
val system : LVar.t -> (D.t -> (LVar.t -> D.t) -> (LVar.t -> D.t -> unit) -> (GVar.t -> G.t) -> (GVar.t -> G.t -> unit) -> unit) option
end


(** A side-effecting system with globals that supports [demand] calls *)
module type DemandGlobConstrSys =
sig
Expand Down
38 changes: 38 additions & 0 deletions src/framework/analyses.ml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ struct
| `Right _ -> true
end

module GVarFCNW (V:SpecSysVar) (C:Printable.S) =
struct
include Printable.EitherConf (struct let expand1 = false let expand2 = true end) (V) (Printable.Prod (CilType.Fundec) (C))
let name () = "FromSpec"
let spec x = `Left x
let return (x, c) = `Right (x, c)

(* from Basetype.Variables *)
let var_id = show
let node _ = MyCFG.Function Cil.dummyFunDec
let pretty_trace = pretty
let is_write_only = function
| `Left x -> V.is_write_only x
| `Right _ -> false
end

module GVarG (G: Lattice.S) (C: Printable.S) =
struct
module CSet =
Expand Down Expand Up @@ -116,6 +132,28 @@ struct
| x -> BatPrintf.fprintf f "<analysis name=\"fromspec\">%a</analysis>" printXml x
end

module GVarL (G: Lattice.S) (L: Lattice.S) =
struct
include Lattice.Lift2 (G) (L)

let spec = function
| `Bot -> G.bot ()
| `Lifted1 x -> x
| _ -> failwith "GVarG.spec"
let return = function
| `Bot -> L.bot ()
| `Lifted2 x -> x
| _ -> failwith "GVarG.return"
let create_spec spec = `Lifted1 spec
let create_return return = `Lifted2 return

let printXml f = function
| `Lifted1 x -> G.printXml f x
| `Lifted2 x -> L.printXml f x
| x -> BatPrintf.fprintf f "<analysis name=\"fromspec\">%a</analysis>" printXml x
end



exception Deadcode

Expand Down
2 changes: 1 addition & 1 deletion src/framework/constraints.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(** Construction of a {{!Goblint_constraint} constraint system} from an {{!Analyses.Spec} analysis specification} and {{!MyCFG.CfgBackward} CFGs}.
Transformatons of analysis specifications as functors. *)
Transformations of analysis specifications as functors. *)

open Batteries
open GoblintCil
Expand Down
Loading
Loading