lawref.std_registry
Реестр стандартной библиотеки 0.1 (WP-31; SPEC §257–§266).
С фазы 1 DECISION-0166 состав LAW_STD ПОРОЖДАЕТСЯ из каталога packs/std/
(catalogue.json пакетов → std_generated.py, генератор
packs/std/tools/gen_std.py); этот модуль — стабильный адрес для читателей
(exports(), LAW_STD) и больше ничего не объявляет. Совпадение каталога с
prose §35, §257–§266, §58, §59 держат ворота
verify/ci/gates/repo/check_std_catalogue.py, а не эта строка.
Кто читает реестр (проверено, не предположено): engines/lawref/selftest.py,
ворота выше и check_std_shadowing.py. engines/lawref/lawref/resolver.py его
НЕ читает — резолюция std-имён у оракула не идёт через эту таблицу. У
компилятора та же роль — порождённый law-hir/src/std_generated.rs.
История до каталога: E-0005/E-0015/E-0028/E-0029/E-0036/E-0037/E-0039 и 0.2-11 — каждая правила эту таблицу руками, и трижды реализации оказывались согласны между собой при prose, не называющем имя (E-0037, 0.2-11, E-0039): differential такого не видит по построению. Каталог закрывает класс.
Attributes
| Name | Description |
|---|---|
LAW_STD | No description. |
STD_PACKAGES | No description. |
STD_VERSIONS | No description. |
Functions
| Name | Description |
|---|---|
exports | No description. |
is_std_package | §23 (DECISION-0166 §4.3): имя из пространства прелюдии law.std. |
std_version | Версия std, которую подтверждает явный import law.std.<pkg> version. |
LAW_STDattributemodule attribute#
lawref.std_generatedView sourceLAW_STD: dict[str, tuple[str, ...]] = {
'law.std.data': (
'Option',
'Result',
'List',
'Set',
'Map',
'Boolean',
'Decimal',
'Rational',
'Integer',
'Natural',
'Text',
'LanguageTag',
'Uri',
'Digest',
'CountryCode',
'CardinalityError',
'Jurisdiction',
'text_length',
'text_matches'
),
'law.std.time': (
'Date',
'LocalTime',
'Instant',
'OffsetDateTime',
'Interval',
'Duration',
'CalendarPeriod',
'BusinessPeriod',
'Calendar',
'Timezone',
'DeadlinePolicy',
'before',
'after',
'during',
'overlaps',
'contains',
'add_duration',
'add_business_days',
'add_calendar_period',
'add_legal_term',
'days_between',
'hours_between',
'minutes_between',
'month_start_of',
'month_end_of',
'weekday_of'
),
'law.std.units': (
'Quantity',
'Dimension',
'Unit',
'Magnitude',
'Bounds',
'Mass',
'Length',
'Area',
'Volume',
'Time',
'Velocity',
'Current',
'Temperature',
'Amount',
'Luminosity',
'percent',
'convert',
'with_unit',
'magnitude',
'unit_convert',
'scalar_of',
'quantity_of',
'unit_exponent',
'ln_bounds',
'exp_bounds',
'bounds_add',
'bounds_sub',
'bounds_scale',
'bounds_const',
'round_bounds',
'sqrt_bounds',
'pi_bounds',
'sin_bounds',
'cos_bounds',
'bounds_mul',
'bounds_div'
),
'law.std.money': ('Currency', 'Money', 'round', 'div_round', 'currency_convert'),
'law.std.actors': (
'Actor',
'NaturalPerson',
'LegalPerson',
'Organization',
'PublicAuthority',
'Official',
'Court',
'Collective',
'LegalContext',
'LegalRole',
'has_role'
),
'law.std.documents': (
'Document',
'SourceWork',
'SourceEdition',
'Publication',
'Fragment',
'DocumentIdentifier',
'Signature',
'Digest'
),
'law.std.events': ('Event', 'Action', 'occurs_at', 'actor', 'participant', 'place'),
'law.std.norms': (
'Duty',
'Liberty',
'Power',
'Immunity',
'AchievementGoal',
'MaintenanceGoal',
'ForbearanceGoal',
'PositionInstance',
'NormativeStatus'
),
'law.std.evidence': (
'EvidenceItem',
'EvidenceStatus',
'SupportEdge',
'EvidencePolicy',
'CompletenessCertificate'
),
'law.std.results': (
'TruthStatus',
'ApplicabilityStatus',
'EvaluationStatus',
'EvaluationResult',
'ComplianceResult',
'ConflictReport',
'ProofRef',
'ManifestRef'
)
}STD_PACKAGESattributemodule attribute#
lawref.std_generatedView sourceSTD_PACKAGES: tuple[str, ...] = (
'law.std.data',
'law.std.time',
'law.std.units',
'law.std.money',
'law.std.actors',
'law.std.documents',
'law.std.events',
'law.std.norms',
'law.std.evidence',
'law.std.results'
)STD_VERSIONSattributemodule attribute#
lawref.std_generatedView sourceSTD_VERSIONS: dict[str, str] = {'0.1': '0.1.0', '0.2': '0.2.0'}exportsfunction#
def exports(package: str) -> tuple[str, ...]is_std_packagefunction#
def is_std_package(name: str) -> boolstd_versionfunction#
def std_version(language: str) -> str | NoneВерсия std, которую подтверждает явный import law.std.<pkg> version.
Ключ — две первые компоненты версии языка (0.1, 0.2); неизвестная
версия языка — None, и это отказ вызывающего, не умолчание.
Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.