gds-framework 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gds_framework-0.2.0/.claude/settings.local.json +49 -0
- gds_framework-0.2.0/.github/workflows/ci.yml +38 -0
- gds_framework-0.2.0/.gitignore +30 -0
- gds_framework-0.2.0/.pre-commit-config.yaml +16 -0
- gds_framework-0.2.0/CITATION.cff +20 -0
- gds_framework-0.2.0/CLAUDE.md +93 -0
- gds_framework-0.2.0/LICENSE +190 -0
- gds_framework-0.2.0/PKG-INFO +377 -0
- gds_framework-0.2.0/README.md +352 -0
- gds_framework-0.2.0/docs/architecture/gds-v0.2-design.md +866 -0
- gds_framework-0.2.0/docs/gds_deepdive.md +1313 -0
- gds_framework-0.2.0/docs/gds_improvement_plan_completed.md +535 -0
- gds_framework-0.2.0/docs/proposals/entity-redesign-and-expression-language.md +1146 -0
- gds_framework-0.2.0/gds/__init__.py +175 -0
- gds_framework-0.2.0/gds/blocks/__init__.py +29 -0
- gds_framework-0.2.0/gds/blocks/base.py +91 -0
- gds_framework-0.2.0/gds/blocks/composition.py +141 -0
- gds_framework-0.2.0/gds/blocks/errors.py +17 -0
- gds_framework-0.2.0/gds/blocks/roles.py +129 -0
- gds_framework-0.2.0/gds/canonical.py +136 -0
- gds_framework-0.2.0/gds/compiler/__init__.py +5 -0
- gds_framework-0.2.0/gds/compiler/compile.py +274 -0
- gds_framework-0.2.0/gds/helpers.py +151 -0
- gds_framework-0.2.0/gds/ir/__init__.py +19 -0
- gds_framework-0.2.0/gds/ir/models.py +105 -0
- gds_framework-0.2.0/gds/ir/serialization.py +34 -0
- gds_framework-0.2.0/gds/parameters.py +88 -0
- gds_framework-0.2.0/gds/py.typed +0 -0
- gds_framework-0.2.0/gds/query.py +121 -0
- gds_framework-0.2.0/gds/serialize.py +107 -0
- gds_framework-0.2.0/gds/spaces.py +61 -0
- gds_framework-0.2.0/gds/spec.py +230 -0
- gds_framework-0.2.0/gds/state.py +63 -0
- gds_framework-0.2.0/gds/tagged.py +49 -0
- gds_framework-0.2.0/gds/types/__init__.py +29 -0
- gds_framework-0.2.0/gds/types/interface.py +42 -0
- gds_framework-0.2.0/gds/types/tokens.py +48 -0
- gds_framework-0.2.0/gds/types/typedef.py +73 -0
- gds_framework-0.2.0/gds/verification/__init__.py +21 -0
- gds_framework-0.2.0/gds/verification/engine.py +40 -0
- gds_framework-0.2.0/gds/verification/findings.py +51 -0
- gds_framework-0.2.0/gds/verification/generic_checks.py +259 -0
- gds_framework-0.2.0/gds/verification/spec_checks.py +276 -0
- gds_framework-0.2.0/gds/visualization.py +10 -0
- gds_framework-0.2.0/pyproject.toml +107 -0
- gds_framework-0.2.0/pyrightconfig.json +4 -0
- gds_framework-0.2.0/tests/__init__.py +0 -0
- gds_framework-0.2.0/tests/conftest.py +221 -0
- gds_framework-0.2.0/tests/test_blocks.py +344 -0
- gds_framework-0.2.0/tests/test_compiler.py +223 -0
- gds_framework-0.2.0/tests/test_helpers.py +311 -0
- gds_framework-0.2.0/tests/test_ir.py +188 -0
- gds_framework-0.2.0/tests/test_query.py +188 -0
- gds_framework-0.2.0/tests/test_serialize.py +136 -0
- gds_framework-0.2.0/tests/test_spaces.py +97 -0
- gds_framework-0.2.0/tests/test_spec.py +213 -0
- gds_framework-0.2.0/tests/test_spec_checks.py +227 -0
- gds_framework-0.2.0/tests/test_state.py +109 -0
- gds_framework-0.2.0/tests/test_types.py +221 -0
- gds_framework-0.2.0/tests/test_v02_features.py +710 -0
- gds_framework-0.2.0/tests/test_verification.py +248 -0
- gds_framework-0.2.0/tests/test_visualization.py +8 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(uv sync:*)",
|
|
5
|
+
"Bash(uv run pytest:*)",
|
|
6
|
+
"Bash(git ls-tree:*)",
|
|
7
|
+
"Bash(git checkout:*)",
|
|
8
|
+
"Bash(git reset:*)",
|
|
9
|
+
"Bash(git add:*)",
|
|
10
|
+
"Bash(git commit:*)",
|
|
11
|
+
"Bash(git branch:*)",
|
|
12
|
+
"Bash(git push:*)",
|
|
13
|
+
"Bash(uv run ruff check:*)",
|
|
14
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework status)",
|
|
15
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework diff)",
|
|
16
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework log --oneline -5)",
|
|
17
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework add:*)",
|
|
18
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework commit -m \"$\\(cat <<''EOF''\nfix: resolve all 32 ruff lint errors\n\nMigrate \\(str, Enum\\) to StrEnum, use Field\\(default_factory=list\\) for\nmutable defaults, sort __all__ lists, move imports into TYPE_CHECKING\nblocks where safe, combine nested if statements, inline return\nconditions, replace pytest.raises\\(Exception\\) with ValidationError,\nand break long lines under 100 chars.\nEOF\n\\)\")",
|
|
19
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework push)",
|
|
20
|
+
"Bash(gh -R BlockScience/gds-framework run list --limit 5)",
|
|
21
|
+
"Bash(gh -R BlockScience/gds-framework run view 21997230766 --log-failed)",
|
|
22
|
+
"Bash(uv run ruff format:*)",
|
|
23
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework commit -m \"$\\(cat <<''EOF''\nstyle: apply ruff format to all source and test files\nEOF\n\\)\")",
|
|
24
|
+
"Bash(uv run mypy:*)",
|
|
25
|
+
"Bash(gh repo view:*)",
|
|
26
|
+
"Bash(gh repo edit:*)",
|
|
27
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework commit -m \"$\\(cat <<''EOF''\nfix: resolve all mypy strict errors\n\nRename validate methods to avoid shadowing Pydantic BaseModel.validate:\nTypeDef.validate → check_value, StateVariable.validate → check_value,\nSpace.validate → validate_data, GDSSpec.validate → validate_spec.\nConsolidate frozen=True into ConfigDict where model_config already\nexists. Add type params to bare dict annotations.\nEOF\n\\)\")",
|
|
28
|
+
"Bash(uv run python:*)",
|
|
29
|
+
"Bash(ls:*)",
|
|
30
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework status -u)",
|
|
31
|
+
"Bash(git -C /home/rohan/Documents/Github/gds-framework diff --stat)",
|
|
32
|
+
"mcp__plugin_context7-plugin_context7__resolve-library-id",
|
|
33
|
+
"mcp__plugin_context7-plugin_context7__query-docs",
|
|
34
|
+
"mcp__playwright__browser_navigate",
|
|
35
|
+
"mcp__playwright__browser_snapshot",
|
|
36
|
+
"mcp__playwright__browser_click",
|
|
37
|
+
"mcp__playwright__browser_run_code",
|
|
38
|
+
"mcp__playwright__browser_take_screenshot",
|
|
39
|
+
"Bash(fdfind:*)",
|
|
40
|
+
"Bash(git -C:*)",
|
|
41
|
+
"Bash(for f in examples/*/generate_views.py)",
|
|
42
|
+
"Bash(do sed -i 's/^def main\\(\\):/def main\\(\\) -> None:/' \"$f\")",
|
|
43
|
+
"Bash(done)",
|
|
44
|
+
"Bash(for d in sir_epidemic thermostat lotka_volterra prisoners_dilemma insurance)",
|
|
45
|
+
"Bash(do uv run python examples/$d/generate_views.py --save)",
|
|
46
|
+
"Bash(git init:*)"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.12", "3.13"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
run: uv python install ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: uv sync
|
|
27
|
+
|
|
28
|
+
- name: Lint
|
|
29
|
+
run: uv run ruff check gds/ tests/
|
|
30
|
+
|
|
31
|
+
- name: Format check
|
|
32
|
+
run: uv run ruff format --check gds/ tests/
|
|
33
|
+
|
|
34
|
+
- name: Type check
|
|
35
|
+
run: uv run mypy gds/
|
|
36
|
+
|
|
37
|
+
- name: Test
|
|
38
|
+
run: uv run pytest tests/ -v --cov=gds --cov-report=term-missing
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.egg
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
|
|
14
|
+
# uv
|
|
15
|
+
uv.lock
|
|
16
|
+
|
|
17
|
+
# IDE
|
|
18
|
+
.idea/
|
|
19
|
+
.vscode/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
|
|
23
|
+
# OS
|
|
24
|
+
.DS_Store
|
|
25
|
+
Thumbs.db
|
|
26
|
+
|
|
27
|
+
# Testing
|
|
28
|
+
.pytest_cache/
|
|
29
|
+
.coverage
|
|
30
|
+
htmlcov/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.8.6
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
10
|
+
rev: v1.14.1
|
|
11
|
+
hooks:
|
|
12
|
+
- id: mypy
|
|
13
|
+
additional_dependencies: [pydantic>=2.10]
|
|
14
|
+
args: [--config-file=pyproject.toml]
|
|
15
|
+
pass_filenames: false
|
|
16
|
+
entry: mypy gds/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
authors:
|
|
4
|
+
- family-names: "Mehta"
|
|
5
|
+
given-names: "Rohan"
|
|
6
|
+
email: "rohan@block.science"
|
|
7
|
+
affiliation: "BlockScience"
|
|
8
|
+
title: "gds-framework"
|
|
9
|
+
version: 0.2.0
|
|
10
|
+
date-released: 2026-02-21
|
|
11
|
+
references:
|
|
12
|
+
- type: article
|
|
13
|
+
authors:
|
|
14
|
+
- family-names: "Shorish"
|
|
15
|
+
given-names: "Jamsheed"
|
|
16
|
+
- family-names: "Zargham"
|
|
17
|
+
given-names: "Michael"
|
|
18
|
+
title: "Generalized Dynamical Systems, Part I: Foundations"
|
|
19
|
+
url: "https://blog.block.science/generalized-dynamical-systems-part-i-foundations-2/"
|
|
20
|
+
year: 2021
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project
|
|
6
|
+
|
|
7
|
+
`gds-framework` — typed compositional specifications for complex systems, grounded in Generalized Dynamical Systems theory. Published on PyPI as `gds-framework`, imported as `gds`.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv sync # Install dependencies
|
|
13
|
+
uv run pytest tests/ -v # Run all 336 tests
|
|
14
|
+
uv run pytest tests/test_blocks.py -v # Single test file
|
|
15
|
+
uv run pytest tests/test_blocks.py::TestStackComposition::test_rshift_operator -v # Single test
|
|
16
|
+
uv build # Build wheel (gds_framework-*.whl)
|
|
17
|
+
uv run python -c "import gds; print(gds.__version__)" # Verify install
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Architecture
|
|
21
|
+
|
|
22
|
+
### Two-Layer Design
|
|
23
|
+
|
|
24
|
+
**Layer 1 — Composition Algebra** (the engine):
|
|
25
|
+
Blocks with bidirectional typed interfaces, composed via four operators (`>>`, `|`, `.feedback()`, `.loop()`). A 3-stage compiler flattens composition trees into flat IR (blocks + wirings + hierarchy). Six generic verification checks (G-001..G-006) validate structural properties on the IR.
|
|
26
|
+
|
|
27
|
+
**Layer 2 — Specification Layer** (the framework):
|
|
28
|
+
TypeDef with runtime constraints, typed Spaces, Entities with StateVariables, Block roles (BoundaryAction/Policy/Mechanism/ControlAction), GDSSpec registry, ParameterSchema (Θ), canonical projection (CanonicalGDS), Tagged mixin, semantic verification (SC-001..SC-007), SpecQuery for dependency analysis, and JSON serialization.
|
|
29
|
+
|
|
30
|
+
### Two Type Systems
|
|
31
|
+
|
|
32
|
+
These coexist at different levels and serve different purposes:
|
|
33
|
+
|
|
34
|
+
1. **Token-based** (`types/tokens.py`) — lightweight structural matching at composition/wiring time. Port names auto-tokenize; `tokens_subset()` and `tokens_overlap()` check set containment. Used by composition validators, auto-wiring, and G-001/G-005 checks.
|
|
35
|
+
|
|
36
|
+
2. **TypeDef-based** (`types/typedef.py`) — rich runtime validation at the data level. TypeDef wraps a Python type + optional constraint predicate. Used by Spaces and Entities to validate actual data values.
|
|
37
|
+
|
|
38
|
+
### Compilation Pipeline
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Block tree → flatten() → list[AtomicBlock] → block_compiler() → list[BlockIR]
|
|
42
|
+
→ _walk_wirings() → list[WiringIR] (explicit + auto-wired)
|
|
43
|
+
→ _extract_hierarchy() → HierarchyNodeIR tree → _flatten_sequential_chains()
|
|
44
|
+
= SystemIR(blocks, wirings, hierarchy)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Auto-wiring for `>>` matches `forward_out` ports to `forward_in` ports by token overlap. Feedback marks `is_feedback=True`; temporal marks `is_temporal=True`.
|
|
48
|
+
|
|
49
|
+
### Block Hierarchy
|
|
50
|
+
|
|
51
|
+
The composition algebra is **sealed** — only 5 concrete Block types exist:
|
|
52
|
+
- `AtomicBlock` — leaf node (domain packages subclass this, never the composition operators)
|
|
53
|
+
- `StackComposition` (`>>`) — sequential, validates token overlap
|
|
54
|
+
- `ParallelComposition` (`|`) — independent, no type validation
|
|
55
|
+
- `FeedbackLoop` (`.feedback()`) — backward within timestep
|
|
56
|
+
- `TemporalLoop` (`.loop()`) — forward across timesteps, enforces COVARIANT only
|
|
57
|
+
|
|
58
|
+
Block roles (`BoundaryAction`, `Policy`, `Mechanism`, `ControlAction`) subclass `AtomicBlock` and add constraints: BoundaryAction enforces `forward_in=()`, Mechanism enforces `backward_in=()` and `backward_out=()`.
|
|
59
|
+
|
|
60
|
+
### Verification
|
|
61
|
+
|
|
62
|
+
Pluggable: `verify(system, checks=None)` runs check functions against SystemIR. Each check is `Callable[[SystemIR], list[Finding]]`. Generic checks (G-001..G-006) validate IR topology. Semantic checks (SC-001..SC-007) validate GDSSpec properties (completeness, determinism, reachability, type safety, parameter references, canonical wellformedness).
|
|
63
|
+
|
|
64
|
+
### Parameter System
|
|
65
|
+
|
|
66
|
+
`ParameterDef` + `ParameterSchema` define the configuration space Θ at the specification level. Parameters are structural metadata — GDS does not assign values or bind them. `GDSSpec.parameter_schema` holds the registry; blocks reference parameters via `params_used: list[str]`.
|
|
67
|
+
|
|
68
|
+
### Canonical Projection
|
|
69
|
+
|
|
70
|
+
`project_canonical(spec: GDSSpec) → CanonicalGDS` is a pure function that derives the formal GDS decomposition: X (state), U (input), D (decision), Θ (parameters), g (policy), f (mechanism). Operates on GDSSpec (not SystemIR) because SystemIR is flat and lacks role/entity info.
|
|
71
|
+
|
|
72
|
+
### Tagged Mixin
|
|
73
|
+
|
|
74
|
+
`Tagged` is a BaseModel mixin providing `tags: dict[str, str]` with `with_tag()`, `with_tags()`, `has_tag()`, `get_tag()`. Applied to Block, Entity, GDSSpec. Tags are inert — stripped at compile time (BlockIR/SystemIR have no tags field), never affect verification or composition.
|
|
75
|
+
|
|
76
|
+
## Key Conventions
|
|
77
|
+
|
|
78
|
+
- **All data models are Pydantic v2 `BaseModel`** — not dataclasses, not plain classes
|
|
79
|
+
- **Frozen models** for value objects: Port, Interface, Wiring, Space, TypeDef, StateVariable, Wire, SpecWiring
|
|
80
|
+
- **`@model_validator(mode="after")` returning `Self`** for construction-time validation (composition operators, role constraints)
|
|
81
|
+
- **`ConfigDict(arbitrary_types_allowed=True)`** on models storing `type` or `Callable` fields (TypeDef, Space, StateVariable, GDSSpec)
|
|
82
|
+
- **Absolute imports only** — always `from gds.blocks.base import ...`, never relative
|
|
83
|
+
- **`TYPE_CHECKING` guard** in `blocks/base.py` to break circular dependency with `blocks/composition.py`
|
|
84
|
+
- **`Field(default_factory=list)`** for mutable defaults, never bare `[]`
|
|
85
|
+
- **`@property`** for computed attributes on models, not `computed_field()`
|
|
86
|
+
- **String enums** (`str, Enum`) for JSON-friendly serialization (FlowDirection, CompositionType, Severity)
|
|
87
|
+
- **Custom exceptions** inherit from `GDSError` base: `GDSTypeError` for port mismatches, `GDSCompositionError` for structural constraint violations
|
|
88
|
+
- All public symbols re-exported through `gds/__init__.py` with explicit `__all__`
|
|
89
|
+
- Package name on PyPI is `gds-framework`, import name is `gds` (mapped via `[tool.hatch.build.targets.wheel] packages = ["gds"]`)
|
|
90
|
+
|
|
91
|
+
## Intellectual Lineage
|
|
92
|
+
|
|
93
|
+
The design synthesizes: GDS theory (Roxin; Zargham & Shorish), MSML (BlockScience), BDP-lib, and categorical cybernetics (Ghani, Hedges). See `docs/gds_deepdive.md` for the full analysis and `docs/gds_improvement_plan.md` for the roadmap.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2024 BlockScience
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|