Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

HCF Server — Hivecore Framework

Ktor-based REST API server for the Hivecore Framework. Exposes the KerML and SysML v2 runtime (hcf-runtime) over HTTP with a SysML v2 API surface plus simulation, parametric analysis, and query endpoints.

Modules and packages

org.openmbee.hivecore.server/
├── Application.kt                     # Ktor application entry point
└── api/
    ├── SysmlApiRoutes.kt              # SysML v2 REST API routes
    ├── QueryRoutes.kt                 # Ad-hoc query endpoints
    ├── SimulationRoutes.kt            # Behavior simulation endpoints
    ├── SimulationSessionManager.kt    # Session lifecycle for simulations
    ├── ParametricAnalysisRoutes.kt    # Z3/SMT analysis endpoints
    ├── ProjectBackend.kt              # Project storage abstraction
    ├── FileProjectBackend.kt          #   filesystem-backed project store
    ├── GitProjectBackend.kt           #   JGit-backed project store
    ├── ProjectStore.kt                # Project registry
    └── DemoApi.kt                     # Demo / scratch routes

Composed builds (via includeBuild in settings.gradle.kts):

Capabilities

  • SysML v2 API — REST endpoints aligned with the SysML v2 API and Services shape (@id, @type, ElementRef references) for elements, namespaces, and projects.
  • Project storage — pluggable backends: filesystem (FileProjectBackend) and Git (GitProjectBackend, via JGit 7.1).
  • Behavior simulation — long-running session-based execution of KerML Behaviors via SimulationSessionManager, backed by the BehaviorExecutionEngine in hcf-runtime.
  • Parametric analysis — Z3/SMT solving exposed over HTTP: satisfiability checks, optimization, requirement-conflict detection.
  • Query routes — ad-hoc queries against loaded models.

Building and running

./gradlew build --no-configuration-cache
./gradlew test --no-configuration-cache

# Run the server
./gradlew run --no-configuration-cache

Requires JDK 21 and Gradle 9.x.

Technology stack

Dependency Version Purpose
Kotlin 2.1.10 Language
Ktor 2.3.7 HTTP server (Netty engine)
Jackson 2.16.1 JSON serialization (Ktor integration)
JGit 7.1.0 Git-backed project storage
kotlinx-coroutines 1.7.3 Async runtime
kotlin-logging 6.0.3 Logging facade
Logback 1.4.14 Logging implementation
Kotest 5.8.0 Testing framework

Related projects

  • hmf — base framework.
  • hcf-models — KerML / SysML metamodels.
  • hcf-runtime — parser, writer, evaluator, analysis.
  • hcf-intellij — IntelliJ plugin that uses the same runtime.

License

See LICENSE and NOTICE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages