summaryrefslogtreecommitdiff
path: root/.mailmap
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2020-12-31 15:10:26 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2021-01-04 14:51:10 -0800
commit0ce08640e08de8f7313a4b3974131e2efa5249e0 (patch)
tree2794e0a9e66f170f8884608f999c688fbaab1032 /.mailmap
parent49ac3471cf97f5308c648a78a9fd7b0c3a083e90 (diff)
downloadspack-0ce08640e08de8f7313a4b3974131e2efa5249e0.tar.gz
spack-0ce08640e08de8f7313a4b3974131e2efa5249e0.tar.bz2
spack-0ce08640e08de8f7313a4b3974131e2efa5249e0.tar.xz
spack-0ce08640e08de8f7313a4b3974131e2efa5249e0.zip
concretizer: convert virtuals to facts; move all rules to `concretize.lp`
This converts the virtual handling in the new concretizer from already-ground rules to facts. This is the last thing that needs to be refactored, and it converts the entire concretizer to just use facts. The previous way of handling virtuals hinged on rules involving `single_provider_for` facts that were tied to the virtual and a version range. The new method uses the condition pattern we've been using for dependencies, externals, and conflicts. To handle virtuals as conditions, we impose constraints on "fake" virtual specs in the logic program. i.e., `version_satisfies("mpi", "2.0:", "2.0")` is legal whereas before we wouldn't have seen something like this. Currently, constriants are only handled on versions -- we don't handle variants or anything else yet, but they key change here is that we *could*. For a long time, virtual handling in Spack has only dealt with versions, and we'd like to be able to handle variants as well. We could easily add an integrity constraint to handle variants like the one we use for versions. One issue with the implementation here is that virtual packages don't actually declare possible versions like regular packages do. To get around that, we implement an integrity constraint like this: :- virtual_node(Virtual), version_satisfies(Virtual, V1), version_satisfies(Virtual, V2), not version_constraint_satisfies(Virtual, V1, V2). This requires us to compare every version constraint to every other, both in program generation and within the concretizer -- so there's a potentially quadratic evaluation time on virtual constraints because we don't have a real version to "anchor" things to. We just say that all the constraints need to agree for the virtual constraint to hold. We can investigate adding synthetic versions for virtuals in the future, to speed this up.
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions