K  n  o  w  L  a  n  g
Framework for Knowledge Representation and Reasoning for Self-Adaptive Systems


U s e r    G u i d e

Home
Running KnowLang
Knowledge Model
Concepts
Objects
States
Metrics
Self-Adaptive Behavior
Goals
Situations
Policies
Reasoner
Contact Info
Description

In general, a self-adaptive system has sensors that connect it to the world and eventually help it listen to its internal components. These sensors generate raw data that represent the physical characteristics of the world. In KnowLang, by specifying a METRIC concept we introduce a class of sensors to the KB and by specifying objects, instances of that class, we represent the real sensor. KnowLang allows the specification of four different types of metrics:

  • RESOURCE - measure resources like capacity;
  • QUALITY - measure qualities like performance, response time, etc.;
  • ENVIRONMENT - measure environment qualities and resources;
  • ENSEMBLE - measure complex qualities and resources where the metric might be a function of multiple metrics both of RESOURCE and QUALITY type.

The following example presents a specification of metrics mainly used to assist the specification of states in the specification of the SCP concept shown in the STATES Section.

Example
//SCP Metrics
CONCEPT_METRIC CPU_Usage {
  CHILDREN {}
  PARENTS {ScCl.ScCloud.CONCEPT_TREES.Metric}
  SPEC {
    METRIC_TYPE { ENVIRONMENT }
    METRIC_SOURCE { "SCPClass.GetCPUUsage" }
    DATA_TYPE { NUMBER }
  }
}
CONCEPT_METRIC Memory_Usage {
  CHILDREN {}
  PARENTS {ScCl.ScCloud.CONCEPT_TREES.Metric}
  SPEC {
    METRIC_TYPE { ENVIRONMENT }
    METRIC_SOURCE { "SCPClass.GetMemoryUsage" }
    DATA_TYPE { NUMBER }
  }
}
CONCEPT_METRIC Hard_Disk_Usage {
  CHILDREN {}
  PARENTS {ScCl.ScCloud.CONCEPT_TREES.Metric}
  SPEC {
    METRIC_TYPE { ENVIRONMENT }
    METRIC_SOURCE { "SCPClass.GetHardDiskUsage" }
    DATA_TYPE { NUMBER }
  }
}

top
User Guide Curator - Emil Vassev
Last modified on January 28, 2014