Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
default solver: add TODOS/FIXMES
Browse files Browse the repository at this point in the history
  • Loading branch information
NoR8quoh1r committed Nov 15, 2024
1 parent aeaac61 commit 5cd21a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/faebryk/core/defaultsolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def get_params_for_expr(expr: Expression) -> set[Parameter]:
return param_ops | {op for e in expr_ops for op in get_params_for_expr(e)}


# FIXME needs to handle logics also
def get_constrained_predicates_involved_in(
p: ParameterOperatable,
) -> set[Predicate]:
Expand Down Expand Up @@ -375,10 +376,12 @@ def subset_of_literal(
repr_map: dict[ParameterOperatable, ParameterOperatable] = {}

for param in params:
# TODO we can also propagate is subset from other param: x sub y sub range
is_subsets = [
e
for e in param.get_operations()
if isinstance(e, IsSubset)
# FIXME should just be constrained ones, then considere which ones can be removed

Check failure on line 384 in src/faebryk/core/defaultsolver.py

View workflow job for this annotation

GitHub Actions / pytest

Ruff (E501)

src/faebryk/core/defaultsolver.py:384:89: E501 Line too long (93 > 88)
and len(e.get_operations()) == 0
and not isinstance(e.get_other_operand(param), ParameterOperatable)
]
Expand Down Expand Up @@ -588,6 +591,12 @@ def flatten_sub(
return repr_map, dirty


def compress_logic_expressions(
G: Graph,
) -> tuple[dict[ParameterOperatable, ParameterOperatable], bool]:
pass


def compress_arithmetic_expressions(
G: Graph,
) -> tuple[dict[ParameterOperatable, ParameterOperatable], bool]:
Expand Down

0 comments on commit 5cd21a9

Please sign in to comment.