Compare commits

...

20 Commits

Author SHA1 Message Date
Douglas Creager
f33ca3a622 minimize more 2025-10-17 16:23:47 -04:00
Douglas Creager
a79ba2036b propagate impossible deeply 2025-10-17 16:23:46 -04:00
Douglas Creager
d6f28b7428 keep all minimizations 2025-10-17 16:23:46 -04:00
Douglas Creager
9df9adae1e minimize before display 2025-10-17 16:23:46 -04:00
Douglas Creager
eec4e2ed11 add impossible terminal 2025-10-17 16:23:46 -04:00
Douglas Creager
a44fbd6658 debug display simplification 2025-10-17 16:23:46 -04:00
Douglas Creager
22075d5ed7 debug 2025-10-17 16:23:46 -04:00
Douglas Creager
5d451979c4 shannon 2025-10-17 16:23:46 -04:00
Douglas Creager
73773b4ea4 more intersection replacements 2025-10-17 16:23:46 -04:00
Douglas Creager
7cfdc4a550 replace with intersection 2025-10-17 16:23:46 -04:00
Douglas Creager
2f0e7d6af7 fix pos/neg implication 2025-10-17 16:23:46 -04:00
Douglas Creager
8d44f8b7b5 remove old simplify 2025-10-17 16:23:46 -04:00
Douglas Creager
c0faa2dc3d use simplify_new 2025-10-17 16:23:46 -04:00
Douglas Creager
f4fff7fb24 new simplification 2025-10-17 16:23:46 -04:00
Douglas Creager
a6bd68886f xor 2025-10-17 16:23:46 -04:00
Douglas Creager
5c2c3f00ff constraint implication check 2025-10-17 16:23:46 -04:00
Douglas Creager
5affc120b3 order typevars near each other 2025-10-17 16:23:46 -04:00
Douglas Creager
1e284933ec normalize bounds 2025-10-17 16:23:46 -04:00
Douglas Creager
c529ee4f80 simplify individual clauses for display 2025-10-17 16:23:46 -04:00
Douglas Creager
f88ff62da5 add BDD graph display 2025-10-17 16:23:46 -04:00
3 changed files with 542 additions and 412 deletions

View File

@@ -23,6 +23,7 @@ use crate::unpack::{Unpack, UnpackPosition};
/// before this `Definition`. However, the ID can be considered stable and it is okay to use
/// `Definition` in cross-module` salsa queries or as a field on other salsa tracked structs.
#[salsa::tracked(debug, heap_size=ruff_memory_usage::heap_size)]
#[derive(Ord, PartialOrd)]
pub struct Definition<'db> {
/// The file in which the definition occurs.
pub file: File,

View File

@@ -8390,7 +8390,9 @@ fn lazy_bound_cycle_initial<'db>(
}
/// Where a type variable is bound and usable.
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, salsa::Update, get_size2::GetSize)]
#[derive(
Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, salsa::Update, get_size2::GetSize,
)]
pub enum BindingContext<'db> {
/// The definition of the generic class, function, or type alias that binds this typevar.
Definition(Definition<'db>),
@@ -8424,7 +8426,9 @@ impl<'db> BindingContext<'db> {
/// independent of the typevar's bounds or constraints. Two bound typevars have the same identity
/// if they represent the same logical typevar bound in the same context, even if their bounds
/// have been materialized differently.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, get_size2::GetSize, salsa::Update)]
#[derive(
Debug, Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd, get_size2::GetSize, salsa::Update,
)]
pub struct BoundTypeVarIdentity<'db> {
pub(crate) identity: TypeVarIdentity<'db>,
pub(crate) binding_context: BindingContext<'db>,

File diff suppressed because it is too large Load Diff