Skip to content

Lab Course SoSe2025 - Pentagon Domain #1740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 121 commits into
base: master
Choose a base branch
from
Draft

Conversation

feniup
Copy link
Contributor

@feniup feniup commented May 7, 2025

Lab Course: Static Analysis with Goblint

In this lab course we try to actively contribute to the Goblint codebase by integrating new abstract domain.

In the current iteration, the focus is on the development of the pentagon domain (Pntg), which combines interval analysis with symbolic relational constraints of the form $x < y$. This hybrid approach offers greater precision than traditional interval analysis while maintaining lower complexity compared to more expressive domains like the octagon domain.

@michael-schwarz michael-schwarz added student-job relational Relational analyses (Apron, affeq, lin2var) feature labels May 7, 2025
@@ -170,7 +170,9 @@
res

let dim_add (ch: Apron.Dim.change) m =
modify_variables_in_domain m ch.dim (+)
let new_m = modify_variables_in_domain m ch.dim (+) in
Printf.printf "add %i dims: %i -> %i\n" ch.intdim (fst m) (fst new_m);

Check warning

Code scanning / Semgrep OSS

Semgrep Finding: semgrep.print-not-logging Warning

printing should be replaced with logging
@@ -179,7 +181,10 @@
m
else (
let m' = Array.fold_lefti (fun y i x -> forget_variable y (x)) m ch.dim in (* clear m' from relations concerning ch.dim *)
modify_variables_in_domain m' ch.dim (-))
let new_m = modify_variables_in_domain m' ch.dim (-) in
Printf.printf "remove %i dims: %i -> %i\n" ch.intdim (fst m) (fst new_m);

Check warning

Code scanning / Semgrep OSS

Semgrep Finding: semgrep.print-not-logging Warning

printing should be replaced with logging
@@ -720,6 +747,7 @@
match t.d with
| None -> t
| Some d ->
Printf.printf "%s\n" (string_of_texpr_tcons1 (Texpr1.to_expr @@ Tcons1.get_texpr1 tcons) tcons);

Check warning

Code scanning / Semgrep OSS

Semgrep Finding: semgrep.print-not-logging Warning

printing should be replaced with logging
@@ -780,7 +808,7 @@
let assert_constraint ask d e negate (no_ov: bool Lazy.t) =
match Convert.tcons1_of_cil_exp ask d d.env e negate no_ov with
| tcons1 -> meet_tcons ask d tcons1 e no_ov
| exception Convert.Unsupported_CilExp _ -> d
| exception Convert.Unsupported_CilExp _ -> Printf.printf "failed to convert cil expression\n"; d

Check warning

Code scanning / Semgrep OSS

Semgrep Finding: semgrep.print-not-logging Warning

printing should be replaced with logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature in progress relational Relational analyses (Apron, affeq, lin2var) student-job
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants