# lawref.evaluator.evidence

*module*

Acceptance-фаза EvidencePolicy — SPEC [§78.1](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#781-epistemic-acceptance-phase)/[§78.2](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#782-исполнимый-профиль-evidencepolicy-lawcoreevidence-policy01), DECISION-0126.

Единица решения — ОПОРА (`support_edge` [§75](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#75-support-edges)), а не документ и не assertion:
один документ бывает подходящей опорой одного утверждения и неподходящей —
другого ([§78.2.2](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#7822-единица-решения--опора-а-не-документ-и-не-факт)). Фаза исполняет ОБЫЧНЫЕ строгие правила пакета [§103](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/16-part-xv-defeasible-semantics-and-conflict-resolution.ru.md#103-strict-closure) над
ОТДЕЛЬНЫМ хранилищем фактов, видящим только типизированную проекцию сырых
evidence/support/verification ([§78.2.3](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#7823-входы-политики-типизированная-проекция)). Общий `evaluate` рекурсивно не
вызывается, нормативные предикаты фазе не видны — запрет структурный и
проверяется компилятором (`LDC-E4701`).

Ни одного условия конкретной политики здесь нет: имена предметной области
учебного пакета (издатель, валюта, предел суммы, право на выплату) живут
его правилами. Здесь — проекция, порядок, временная арифметика профиля,
форма решения и его доказательство. Отсутствие таких имён в этом файле
проверяется воротами `check_evidence_policy`, а не договорённостью.

## lawref.evaluator.evidence.EXECUTABLE_RELATIONS

*attribute* · *module attribute*

```python
EXECUTABLE_RELATIONS = {'supports': 'positive', 'refutes': 'negative'}
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L42-L42)

## lawref.evaluator.evidence.INSTANT

*attribute* · *module attribute*

```python
INSTANT = 'urn:law:std#Instant'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L45-L45)

## lawref.evaluator.evidence.PROFILES

*attribute* · *module attribute*

```python
PROFILES = ('law.core.evidence-policy/0.1', 'law.core.evidence-policy/0.2')
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L33-L33)

## lawref.evaluator.evidence.PROFILE_0_1

*attribute* · *module attribute*

```python
PROFILE_0_1 = 'law.core.evidence-policy/0.1'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L34-L34)

## lawref.evaluator.evidence.SLOTS_0_2

*attribute* · *module attribute*

```python
SLOTS_0_2 = frozenset({'source'})
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L36-L36)

## lawref.evaluator.evidence.SUPPORTED_SEMANTICS

*attribute* · *module attribute*

```python
SUPPORTED_SEMANTICS = ('0.2', '0.3')
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L39-L39)

## lawref.evaluator.evidence.TEXT

*attribute* · *module attribute*

```python
TEXT = 'urn:law:std#Text'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L44-L44)

## lawref.evaluator.evidence.Acceptance

*class* · *dataclass*

```python
class Acceptance
```

Результат фазы: что принято, чем это доказано и что отвергнуто.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L61-L85)

### lawref.evaluator.evidence.Acceptance.admitted

*attribute* · *class attribute* · *instance attribute*

```python
admitted: list[tuple[dict, str]] = field(default_factory=list)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L67-L67)

### lawref.evaluator.evidence.Acceptance.fatal

*attribute* · *class attribute* · *instance attribute*

```python
fatal: list[dict] = field(default_factory=list)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L77-L77)

### lawref.evaluator.evidence.Acceptance.issues

*attribute* · *class attribute* · *instance attribute*

```python
issues: list[dict] = field(default_factory=list)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L73-L73)

### lawref.evaluator.evidence.Acceptance.policy

*attribute* · *instance attribute*

```python
policy: dict
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L65-L65)

### lawref.evaluator.evidence.Acceptance.proof_nodes

*attribute* · *class attribute* · *instance attribute*

```python
proof_nodes: list[dict] = field(default_factory=list)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L69-L69)

### lawref.evaluator.evidence.Acceptance.protected

*attribute* · *class attribute* · *instance attribute*

```python
protected: frozenset[str] = frozenset()
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L75-L75)

### lawref.evaluator.evidence.Acceptance.report

*attribute* · *class attribute* · *instance attribute*

```python
report: dict = field(default_factory=dict)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L72-L72)

### lawref.evaluator.evidence.Acceptance.support_ids

*attribute* · *class attribute* · *instance attribute*

```python
support_ids: list[str] = field(default_factory=list)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L71-L71)

### lawref.evaluator.evidence.Acceptance.pin

*method*

```python
def pin() -> dict
```

Три ключа манифеста [§170](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/24-part-xxiii-cases-snapshots-evaluation.ru.md#170-evaluation-input-manifest-и-execution-receipt) ([§78.2.8](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#7828-выбор-политики-идентичность-и-совместимость)).

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L79-L85)

## lawref.evaluator.evidence.EvidencePolicyRefusal

*class*

```python
class EvidencePolicyRefusal(Exception)
```

Bases: `Exception`

Отказ ДО вычисления: fallback-а у выбора политики нет ([§78.2.8](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#7828-выбор-политики-идентичность-и-совместимость)).

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L48-L58)

### lawref.evaluator.evidence.EvidencePolicyRefusal.issue

*attribute* · *instance attribute*

```python
issue = {'code': code, 'severity': 'fatal', 'message': message, 'relatedNodes': list(related or [])}
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L53-L58)

## lawref.evaluator.evidence.closure_hash

*function*

```python
def closure_hash(policy: dict, ir_nodes: list[dict]) -> str
```

Хэш ЗАМЫКАНИЯ политики [§78.2.8](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#7828-выбор-политики-идентичность-и-совместимость): сам узел, узлы её правил и узлы
связанных отношений. Отвечает на вопрос «что именно исполнялось» и не
пересчитывается от правки несвязанной части акта — этим он отличается от
`theoryHash`, покрывающего программу целиком.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L707-L722)

## lawref.evaluator.evidence.report_blocked

*function*

```python
def report_blocked(acceptance: Acceptance, blocked: list[dict]) -> None
```

[§78.2.4](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#7824-полнота-границы-доверия): утверждения защищённого предиката, не вошедшие в поддержку.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L725-L727)

## lawref.evaluator.evidence.run

*function*

```python
def run(policy: dict, ir_nodes: list[dict], case: dict, effective: dict, limits: dict | None, signatures: tuple) -> Acceptance
```

Исполнить фазу и вернуть решения, доказательство и отчёт ([§78.2](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#782-исполнимый-профиль-evidencepolicy-lawcoreevidence-policy01)).

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L339-L645)

## lawref.evaluator.evidence.select

*function*

```python
def select(ir_nodes: list[dict], effective: dict, options: dict, semantic_version: str) -> dict | None
```

Разрешить ось `context.evidencePolicy` в узел программы ([§78.2.8](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/11-part-xi-assertions-facts-evidence.ru.md#7828-выбор-политики-идентичность-и-совместимость)).

Неразрешимая ссылка, неподдержанный профиль, L0/L1 и semantics 0.1 —
отказ, а не молчаливое возвращение к тривиальной политике слоя.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/evaluator/evidence.py#L224-L277)
