Skip to content

Commit

Permalink
Fix scripts/goblint-lib-modules.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Oct 12, 2023
1 parent 75b3883 commit 7ebf97e
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions scripts/goblint-lib-modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@

src_root_path = Path("./src")

goblint_lib_path = src_root_path / "goblint_lib.ml"
goblint_lib_paths = [
src_root_path / "goblint_lib.ml",
src_root_path / "util" / "std" / "goblint_std.ml",
]
goblint_lib_modules = set()

with goblint_lib_path.open() as goblint_lib_file:
for line in goblint_lib_file:
line = line.strip()
m = re.match(r"module (.*) = .*", line)
if m is not None:
module_name = m.group(1)
goblint_lib_modules.add(module_name)
for goblint_lib_path in goblint_lib_paths:
with goblint_lib_path.open() as goblint_lib_file:
for line in goblint_lib_file:
line = line.strip()
m = re.match(r"module (.*) = .*", line)
if m is not None:
module_name = m.group(1)
goblint_lib_modules.add(module_name)

src_vendor_path = src_root_path / "vendor"
exclude_module_names = set([
Expand All @@ -29,15 +33,21 @@
"Mainspec",

# libraries
"Goblint_std",
"Goblint_timing",
"Goblint_backtrace",
"Goblint_sites",
"Goblint_build_info",
"Dune_build_info",

"MessageCategory", # included in Messages
"PreValueDomain", # included in ValueDomain
"SpecCore", # spec stuff
"SpecUtil", # spec stuff

"ConfigVersion",
"ConfigProfile",
"ConfigOcaml",
])

src_modules = set()
Expand Down

0 comments on commit 7ebf97e

Please sign in to comment.