alpha-asp / Alpha

A lazy-grounding Answer-Set Programming system
BSD 2-Clause "Simplified" License
58 stars 10 forks source link

Get rid of String-encoding of Substitutions in RuleAtoms #353

Closed AntoniusW closed 1 year ago

AntoniusW commented 1 year ago

Removes the encoding of Substitutions as a String inside body-representing atoms, i.e., RuleAtoms. Switches over to using ConstantTerm<RuleAtomData> where the Substitution is directly contained in the RuleAtomData. Fixes #352.

codecov[bot] commented 1 year ago

Codecov Report

Base: 70.78% // Head: 70.58% // Decreases project coverage by -0.20% :warning:

Coverage data is based on head (e41c0d8) compared to base (2f8927c). Patch coverage: 42.85% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #353 +/- ## ============================================ - Coverage 70.78% 70.58% -0.21% + Complexity 2150 2147 -3 ============================================ Files 182 181 -1 Lines 8026 8049 +23 Branches 1424 1432 +8 ============================================ Hits 5681 5681 - Misses 1971 1994 +23 Partials 374 374 ``` | [Impacted Files](https://codecov.io/gh/alpha-asp/Alpha/pull/353?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp) | Coverage Δ | | |---|---|---| | [...alpha/commons/substitutions/BasicSubstitution.java](https://codecov.io/gh/alpha-asp/Alpha/pull/353/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp#diff-YWxwaGEtY29tbW9ucy9zcmMvbWFpbi9qYXZhL2F0L2FjL3R1d2llbi9rci9hbHBoYS9jb21tb25zL3N1YnN0aXR1dGlvbnMvQmFzaWNTdWJzdGl0dXRpb24uamF2YQ==) | `12.50% <0.00%> (ø)` | | | [.../ac/tuwien/kr/alpha/core/solver/DefaultSolver.java](https://codecov.io/gh/alpha-asp/Alpha/pull/353/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp#diff-YWxwaGEtY29yZS9zcmMvbWFpbi9qYXZhL2F0L2FjL3R1d2llbi9rci9hbHBoYS9jb3JlL3NvbHZlci9EZWZhdWx0U29sdmVyLmphdmE=) | `71.37% <0.00%> (+0.25%)` | :arrow_up: | | [...ava/at/ac/tuwien/kr/alpha/core/atoms/RuleAtom.java](https://codecov.io/gh/alpha-asp/Alpha/pull/353/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp#diff-YWxwaGEtY29yZS9zcmMvbWFpbi9qYXZhL2F0L2FjL3R1d2llbi9rci9hbHBoYS9jb3JlL2F0b21zL1J1bGVBdG9tLmphdmE=) | `43.63% <42.10%> (-17.91%)` | :arrow_down: | | [...at/ac/tuwien/kr/alpha/core/rules/InternalRule.java](https://codecov.io/gh/alpha-asp/Alpha/pull/353/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp#diff-YWxwaGEtY29yZS9zcmMvbWFpbi9qYXZhL2F0L2FjL3R1d2llbi9rci9hbHBoYS9jb3JlL3J1bGVzL0ludGVybmFsUnVsZS5qYXZh) | `85.10% <71.42%> (-2.40%)` | :arrow_down: | | [...tuwien/kr/alpha/core/parser/ProgramPartParser.java](https://codecov.io/gh/alpha-asp/Alpha/pull/353/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp#diff-YWxwaGEtY29yZS9zcmMvbWFpbi9qYXZhL2F0L2FjL3R1d2llbi9rci9hbHBoYS9jb3JlL3BhcnNlci9Qcm9ncmFtUGFydFBhcnNlci5qYXZh) | `66.66% <0.00%> (-16.67%)` | :arrow_down: | | [...a/at/ac/tuwien/kr/alpha/core/atoms/ChoiceAtom.java](https://codecov.io/gh/alpha-asp/Alpha/pull/353/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp#diff-YWxwaGEtY29yZS9zcmMvbWFpbi9qYXZhL2F0L2FjL3R1d2llbi9rci9hbHBoYS9jb3JlL2F0b21zL0Nob2ljZUF0b20uamF2YQ==) | `40.47% <0.00%> (-2.39%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alpha-asp)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.