Skip to main content

Core utilities for the FhY compiler infrastructure.

Project description

FhY Core

FhY Core is a collection of utilities for FhY and other parts of the compiler.

Utility Description
Identifier Unique naming class with a non-unique name hint and a unique ID.
Error Custom error registration and core errors for the compiler.
Expression General expression represented as an AST with a parser and printer.
Constraint General logical constraint.
Parameter Real, integer, ordinal, categorical, and permutation parameters.
Types Core type system for the compiler.
Symbol Table Nested symbol table.
Serializable Trait Serializable/WrappedFamilySerializable with dict, JSON, and binary formats plus registered type IDs.
Compiler Traits - Identity HasIdentifier for stable object identity.
Compiler Traits - Provenance HasProvenance for source/origin tracking.
Compiler Traits - Type Carrier HasType for objects carrying an explicit type.
Compiler Traits - Operands HasOperands for operand-bearing operation/expression nodes.
Compiler Traits - Results HasResults for multi-result operation-like nodes.
Compiler Traits - Freezing Frozen/FrozenMixin for runtime and dataclass immutability.
Compiler Traits - Equality PartialEqual/Equal for dataclass-aware equality semantics.
Compiler Traits - Ordering PartialOrderable/Orderable for dataclass-aware ordering semantics.
Compiler Traits - Verification Verifiable + VerificationError for structural invariant checks.
Compiler Traits - Folding Foldable for constant-fold-like evaluation hooks.
Compiler Traits - Canonicalization Canonicalizable for local canonical form rewrites.
Compiler Traits - Structural Equivalence StructuralEquivalence for shape/value-level IR comparisons.
General Utility - Logging Core logging utilities for all compiler components.
General Utility - Python 3.11 Enums String and integer enum types only introduced in Python 3.11
General Utility - Stack General stack utility that wraps deque.
General Utility - POSET General partially ordered set utility represented as a directed graph.
General Utility - Lattice General lattice (order theory) utility represented with a POSET.
General Utility - Dictionary Utilities Additional dictionary helper functions.

Table of Contents

Install FhY Core from PyPi

Coming Soon

Build FhY Core from Source Code

  1. Clone the repository from GitHub.

    git clone https://github.com/actlab-fhy/FhY-core.git
    
  2. Create and prepare a Python virtual environment.

    cd FhY-core
    python -m venv .venv
    source .venv/bin/activate
    python -m pip install -U pip
    pip install setuptools wheel
    
  3. Install FhY.

    # Standard Installation
    pip install .
    
    # For contributors
    pip install ".[dev]"
    

Contributing - For Developers

Want to start contributing the FhY Core? Please take a look at our contribution guide

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fhy_core-0.0.5.tar.gz (98.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fhy_core-0.0.5-py3-none-any.whl (78.5 kB view details)

Uploaded Python 3

File details

Details for the file fhy_core-0.0.5.tar.gz.

File metadata

  • Download URL: fhy_core-0.0.5.tar.gz
  • Upload date:
  • Size: 98.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for fhy_core-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5d9840264f45202ed61eeaca6a8a763eb90d2549ce4025b9fd53ca8398d4d4f7
MD5 6312825c59718aa7857e48e08d7bd688
BLAKE2b-256 1c4873b016e91622ccf3504271e2fe5ea5defabf42a5eb95d59e058bf0f7b138

See more details on using hashes here.

File details

Details for the file fhy_core-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: fhy_core-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 78.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for fhy_core-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fc75ad734200566a77639991f2eaa7c825555c1378a0bfe3fe5755855b3b464e
MD5 7149f8707825db2352accfc15a3723b9
BLAKE2b-256 936149cc5b2ed4e3f3e0154636e9f4ca9a8e0880f80b200477b878d8ca87b3f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page