Kernel SNAPSHOT
Released under the LGPL v3
Collaborative real-time feature modeling kernel for variED. Exposes a simple API that may be consumed by client and server to generate and propagate feature modeling operations. 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 'api)` to access the kernel API, e.g. `(api/client-initialize! ...)`. Run `lein test` to run the integration tests. Run `lein codox` to generate this documentation. As an introduction, refer to the `kernel.api` namespace.
Installation
To install, add the following dependency to your project or build file:
[kernel "SNAPSHOT"]
Namespaces
kernel.api
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
- operationSetConstraint
- operationSetFeatureGroupType
- operationSetFeatureOptional
- operationSetFeatureProperty
- serverForwardMessage
- serverGC
- serverGenerateHeartbeat
- serverInitialize
- serverResolveConflict
- serverSiteJoined
- serverSiteLeft
- setContext
- setGenerateIDFunction
- setLoggerFunction
- setSemanticRulesFunction
- stats-accumulator
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
- 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
- get-constraint-formula
- get-constraint-graveyarded?
- 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-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: