Kernel SNAPSHOT
Released under the LGPL v3
Interchangeable feature-modeling kernels for variED. `kernel.api` is the stable facade consumed by both the JVM server and the ClojureScript browser client. It exposes the same editing and synchronization API for two implementations: * `kernel.api.locking` applies operations immediately. The server serializes access with its traditional lock; this is the default mode. * `kernel.api.collaborative` retains variED's original optimistic, real-time collaboration and conflict-resolution algorithm. The server selects `:locking` or `:collaborative` before initialization and includes that mode in the initialization context, so every client transparently selects the matching implementation. Written in Clojure to allow for a functional core, imperative shell architecture. Can be run in the JVM (on the server) or transpiled to JavaScript (on the client). Run `lein repl` and `(require '[kernel.api :as api])` to access the facade. Call `(api/setKernelMode :collaborative)` before `serverInitialize` to select the collaborative implementation; otherwise the locking implementation is used. Run `lein test` to run the integration tests. Run `lein codox` to generate this documentation. Start with the `kernel.api` namespace, then consult `kernel.api.locking` or `kernel.api.collaborative` for implementation details.
Installation
To install, add the following dependency to your project or build file:
[kernel "SNAPSHOT"]
Namespaces
kernel.api
Stable facade shared by the collaborative and traditional-locking kernels.
Public variables and functions:
- clientGC
- clientGenerateHeartbeat
- clientGenerateInverseOperation
- clientGenerateOperation
- clientInitialize
- clientReceiveMessage
- clientResolveConflict
- collaborative-api
- getContext
- locking-api
- logProfile
- operationCompose
- operationCreateConstraint
- operationCreateFeatureAbove
- operationCreateFeatureBelow
- operationMoveFeatureSubtree
- operationRemoveConstraint
- operationRemoveFeature
- operationRemoveFeatureSubtree
- operationReorderConstraint
- operationReorderFeature
- operationSetConstraint
- operationSetFeatureGroupType
- operationSetFeatureOptional
- operationSetFeatureProperty
- requested-mode
- serverForwardMessage
- serverGC
- serverGenerateHeartbeat
- serverInitialize
- serverResolveConflict
- serverSiteJoined
- serverSiteLeft
- setContext
- setGenerateIDFunction
- setKernelMode
- setLoggerFunction
- setSemanticRulesFunction
kernel.api.collaborative
API of the kernel.
Public variables and functions:
- clientGC
- clientGenerateHeartbeat
- clientGenerateInverseOperation
- clientGenerateOperation
- clientInitialize
- clientReceiveMessage
- clientResolveConflict
- getContext
- logProfile
- operationCompose
- operationCreateConstraint
- operationCreateFeatureAbove
- operationCreateFeatureBelow
- operationMoveFeatureSubtree
- operationRemoveConstraint
- operationRemoveFeature
- operationRemoveFeatureSubtree
- operationReorderConstraint
- operationReorderFeature
- operationSetConstraint
- operationSetFeatureGroupType
- operationSetFeatureOptional
- operationSetFeatureProperty
- serverForwardMessage
- serverGC
- serverGenerateHeartbeat
- serverInitialize
- serverResolveConflict
- serverSiteJoined
- serverSiteLeft
- setContext
- setGenerateIDFunction
- setLoggerFunction
- setSemanticRulesFunction
- stats-accumulator
kernel.api.locking
A traditional, server-serialized kernel implementation.
Public variables and functions:
- clientGC
- clientGenerateHeartbeat
- clientGenerateInverseOperation
- clientGenerateOperation
- clientInitialize
- clientReceiveMessage
- clientResolveConflict
- operationCompose
- operationCreateConstraint
- operationCreateFeatureAbove
- operationCreateFeatureBelow
- operationMoveFeatureSubtree
- operationRemoveConstraint
- operationRemoveFeature
- operationRemoveFeatureSubtree
- operationReorderConstraint
- operationReorderFeature
- operationSetConstraint
- operationSetFeatureGroupType
- operationSetFeatureOptional
- operationSetFeatureProperty
- serverForwardMessage
- serverGC
- serverGenerateHeartbeat
- serverInitialize
- serverResolveConflict
- serverSiteJoined
- serverSiteLeft
kernel.api.locking-server
Internal server startup adapter for the traditional locking kernel.
kernel.core.causal-dag
Causal Directed Acyclic Graph, CDAG for short. The CDAG captures compound operations’ dependencies.
Public variables and functions:
kernel.core.compound-operation
Compound Operation, CO for short. Compound operations are sequences of primitive operations (kernel.core.primitive-operation). They correspond to feature modeling operations.
Public variables and functions:
- _apply
- apply*
- compose-PO-sequences
- concurrent?
- create-constraint
- create-feature-above
- create-feature-below
- get-description
- get-icon
- get-ID
- get-PO-sequence
- get-site-ID
- get-timestamp
- get-VC
- invert-PO-sequence
- make
- make-PO-sequence
- move-feature-subtree
- preceding?
- remove-constraint
- remove-feature
- remove-feature-subtree
- reorder-constraint
- reorder-feature
- set-constraint
- set-feature-group-type
- set-feature-optional?
- set-feature-property
- update-VC
kernel.core.conflict-cache
Conflict Cache, CC for short. Caches all conflicts a site detected.
Public variables and functions:
kernel.core.conflict-relation
Conflict relation used by the MOVIC algorithm (kernel.core.movic to detect conflicts between competing operations.
Public variables and functions:
kernel.core.conflict-resolution
Utilities for assisting in conflict resolution.
Public variables and functions:
kernel.core.feature-model
Feature Model, FM for short. Implements a feature model representation and mutation operators.
Public variables and functions:
- _=
- attribute=
- create-constraint
- create-feature
- default-constraint-formula
- default-constraint-graveyarded?
- default-feature-group-type
- default-feature-name
- default-feature-optional?
- default-feature-parent
- feature-name-taken?
- get-constraint-formula
- get-constraint-graveyarded?
- get-constraint-property
- get-constraint-referenced-feature-IDs
- get-feature-children-IDs
- get-feature-group-type
- get-feature-optional?
- get-feature-parent-ID
- get-feature-property
- get-path-to-root
- graveyarded-constraint?
- graveyarded-feature?
- initialize
- part-of-and-group?
- referenced-feature-ID-set
- root?
- semantic-rules
- set-constraint-formula
- set-constraint-graveyarded?
- set-constraint-property
- set-feature-group-type
- set-feature-optional?
- set-feature-parent-ID
- set-feature-property
kernel.core.garbage-collector
Garbage Collector, GC for short. Periodically prunes a site’s data structures to keep them as small as possible.
Public variables and functions:
kernel.core.history-buffer
History Buffer, HB for short. Serves as a central storage for operation metadata. Only a performance optimization and not essential.
Public variables and functions:
kernel.core.message
Defines what kinds of messages are exchanged among sites.
Public variables and functions:
kernel.core.movic
The MOVIC algorithm introduced by Sun and Chen, 2002 for handling conflicting operations.
Public variables and functions:
kernel.core.primitive-operation
Primitive operation, PO for short. Primitive operations create or update only one object in a feature model at a time. They are building blocks for more complex compound operations (kernel.core.compound-operation).
Public variables and functions:
kernel.core.topological-sort
Sorts a set of compatible operations topologically according to kernel.core.compound-operation/preceding?.
Public variables and functions:
kernel.core.vector-clock
Vector Clock, VC for short. Vector clocks are used to track causality of operations in the system.
Public variables and functions:
kernel.shell.client
Client site control.
kernel.shell.context
Global site context. Contains all state managed by a particular site.
Public variables and functions:
kernel.shell.site
Site control shared both by clients and the server.
Public variables and functions: