Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

HCF Models — Hivecore Framework

KerML and SysML v2 metamodel definitions for the Hivecore Framework, plus the generators that produce typed Kotlin APIs from them. Built on HMF (Hivecore Model Framework).

Modules

This repository is a multi-module Gradle build:

hcf-models/
├── kerml-model/       # KerML metamodel — MetaClass + MetaAssociation
│                      #   definitions for ~85 classes and ~127 associations
│                      #   across the Root, Core, and Kernel packages.
├── kerml-codegen/     # Dev-only runner that drives HMF's
│                      #   MetamodelCodeGenerator / TypeScriptCodeGenerator
│                      #   over the KerML registry. Not on consumer classpath.
├── kerml-generated/   # Module whose sources are produced by kerml-codegen
│                      #   into build/generated-src. Nothing is checked in;
│                      #   the compileKotlin task triggers regeneration.
│
├── sysml-model/       # SysML v2 metamodel — built on top of kerml-model,
│                      #   adding SysML-specific MetaClasses and associations.
├── sysml-codegen/     # Dev-only runner for the SysML metamodel registry.
└── sysml-generated/   # Build-only output module for SysML typed code.

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

  • hmf — hmf-schema, hmf-runtime
  • hmf-codegen — Kotlin / TypeScript generators

Metamodel layout

KerML (kerml-model)

Implements the KerML v1.0 specification:

  • Root package — Element, Relationship, Namespace, Membership, OwningMembership, Import, Annotation, Comment, Documentation, Dependency, …
  • Core package — Type, Classifier, Feature, Structure, Specialization and its kinds (Subclassification, Conjugation, Disjoining, Differencing, Intersecting, Unioning), FeatureMembership, FeatureTyping, Featuring, TypeFeaturing, Subsetting, Redefinition, ReferenceSubsetting, CrossSubsetting, Multiplicity, …
  • Kernel package — Classifiers (DataType, Class, Association, Behavior, Function, Predicate, Metaclass, Interaction), features (Step, Connector, BindingConnector, Succession, FeatureValue), expressions (Expression, OperatorExpression, InvocationExpression, FeatureChainExpression, LiteralExpression and its subtypes, CollectExpression, SelectExpression, IndexExpression), flows, and containers (Package, LibraryPackage).

Includes semantic bindings (implied relationships to library types) and ownership bindings (Membership / FeatureMembership intermediaries).

SysML v2 (sysml-model)

Builds on kerml-model with the SysML v2 metaclasses and associations. Refer to SPEC-ISSUES.md and sysmlv2-rtf-issues.md for spec typos and corrections encountered during implementation.

Generated code

Both kerml-generated and sysml-generated contain output produced by the corresponding *-codegen module. The output includes:

  • Typed Kotlin interfaces over ModelElement — one per concrete metaclass with stored, derived, and association-based properties typed correctly and derived properties exposed as read-only.
  • HMFObject-wrapping implementations — *Impl classes that delegate to an HMFEngine for property access, so derivations and constraints remain centrally evaluated.
  • Factory classes for constructing typed instances by metaclass name.

Optional TypeScript output (interfaces + discriminated-union metaclass type) is also available via hmf-codegen for downstream REST clients.

Building

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

The kerml-generated and sysml-generated modules have no checked-in source; their compileKotlin tasks depend on the corresponding *-codegen:generateMetamodelCode task, which writes to build/generated-src/main/kotlin. Regeneration happens automatically; you only need to invoke the codegen tasks explicitly if you want output without compiling:

./gradlew :kerml-codegen:generateMetamodelCode --no-configuration-cache
./gradlew :sysml-codegen:generateMetamodelCode --no-configuration-cache
./gradlew :kerml-codegen:generateTypeScriptTypes --no-configuration-cache

Requires JDK 21 and Gradle 9.x.

Related projects

  • hmf — schema and runtime that this metamodel targets.
  • hmf-codegen — code generators invoked by the *-codegen modules.
  • hcf-runtime — parser, writer, expression evaluator, and analysis services for the metamodels defined here.
  • hcf-server — REST API server exposing these metamodels.
  • hcf-intellij — IntelliJ plugin built on these metamodels.

License

See LICENSE and NOTICE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages