Skip to content
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

Purge input relations if pruneImdtRels is set #2394

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

adamjseitz
Copy link
Contributor

This PR undoes part of a previous PR that I implemented, #2286. With this PR, when pruneImdtRels is set, .input relations will be purged when they are no longer needed.

In the previous PR, I changed behavior to preserve both input and output relations when the pruneImdtRels option was enabled. However, I think that it was the wrong decision to preserve input relations.

By preserving only output relations, this maximizes the opportunity for memory savings, allowing any relation no longer needed by souffle to be purged. If a C++ program needs to access an input relation again after running the souffle program via the C++ interface, I now realize that the program should have apply both the.input and .output directives, rather than relying on an .input to be preserved. This is more consistent with other Souffle behavior; if an input relation is never used by a Souffle program, Souffle is more than happy to optimize that relation out of the program entirely.

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Merging #2394 (fa18123) into master (0334b07) will increase coverage by 0.10%.
The diff coverage is 85.57%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2394      +/-   ##
==========================================
+ Coverage   77.56%   77.66%   +0.10%     
==========================================
  Files         467      472       +5     
  Lines       30785    31041     +256     
==========================================
+ Hits        23877    24107     +230     
- Misses       6908     6934      +26     
Impacted Files Coverage Δ
src/parser/ParserDriver.h 100.00% <ø> (ø)
src/synthesiser/Synthesiser.h 100.00% <ø> (ø)
.../ast/transform/SimplifyConstantBinaryConstraints.h 50.00% <50.00%> (ø)
src/MainDriver.cpp 70.39% <70.27%> (+0.15%) ⬆️
src/parser/scanner.ll 78.01% <76.92%> (+5.49%) ⬆️
tests/libsouffle_interface/vfs_overlay_test.cpp 85.93% <85.93%> (ø)
src/parser/SrcLocation.cpp 91.86% <87.50%> (+7.24%) ⬆️
src/parser/ParserDriver.cpp 89.44% <88.33%> (-0.39%) ⬇️
src/parser/VirtualFileSystem.cpp 88.37% <88.37%> (ø)
...st/transform/SimplifyConstantBinaryConstraints.cpp 100.00% <100.00%> (ø)
... and 12 more

@adamjseitz adamjseitz marked this pull request as ready for review February 8, 2023 22:01
@quentin quentin merged commit 5fe57c0 into souffle-lang:master Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants