Commit Graph

11 Commits

Author SHA1 Message Date
Slava Pestov
273c4b2b1a RequirementMachine: Convert to new assertions 2024-06-22 08:53:22 -04:00
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Slava Pestov
a631d8aa3a RequirementMachine: Write some comments 2022-03-28 22:16:09 -04:00
Slava Pestov
b6a641bc07 RequirementMachine: New way of introducing concrete conformance rules
Define the relation as

    [concrete: C].[P] =>> [concrete: C].[concrete: C : P]

instead of

    [concrete: C].[P] =>> [concrete: C : P]

This changes the rewrite loop recorded for a rule T.[concrete: C : P]
to have (T.[concrete: C] => T) appearing twice in context instead of
just once.

We don't ever want a concrete conformance rule to be able to imply a
concrete type rule. This became possible with loop normalization
because the single occurrence of (T.[concrete: C] => T).[P] could
cancel with a subsequent step (T => T.[concrete: C]).[P] in another
rewrite loop after substitution.
2022-03-08 23:21:58 -05:00
Slava Pestov
0d0bcb2ff1 RequirementMachine: Simplify the Symbol API for removal of merged associated types 2022-02-07 18:57:45 -05:00
Slava Pestov
da30258f49 RequirementMachine: Remove RewriteSystem::TypeWitness 2022-01-13 19:14:52 -05:00
Slava Pestov
bdbf50e1e3 RequirementMachine: Replace RewriteStep::SameTypeWitness with a relation 2022-01-13 19:14:52 -05:00
Slava Pestov
6064671abd RequirementMachine: Replace RewriteStep::ConcreteTypeWitness with relations 2022-01-13 18:01:15 -05:00
Slava Pestov
abb85fb3ca RequirementMachine: Replace RewriteStep::{Superclass,Concrete}Conformance with relations 2022-01-13 00:02:31 -05:00
Slava Pestov
f06f59a18a RequirementMachine: Generalize relations so they look more like rules 2022-01-13 00:02:31 -05:00
Slava Pestov
220d4882fd RequirementMachine: Move some code to a new PropertyRelations.cpp file 2022-01-13 00:02:31 -05:00