LISp-Miner Control Language Reference, version: 27.18.15 of 2 Mar 2022

LISp-Miner Control Language Basics

For a graphical overview see LMCL Diagrams. For script examples see LMCL Demo Examples.

Syntax and naming conventions

For a general overview of the scripting language syntax see Lua pages and the reference manual especially.

LMCL follows Lua naming conventions as far as they were identified in Lua examples. Names of variables, namespaces, functions, methods and named-function-parameters start with lower letters. Only the names of classes, theirs properties and predefined global constants start with capital letters. Names compounded from two or more words follow the "camel" convention of starting capital letters for the second and next words.

Set and Get Functions

There are unified name prefixes of set- and get- for functions reading and setting properties of objects. The setter function has the only one unnamed parameter of the same type as the property it is modifying, so is the return type of the corresponding getter function.
dataColumn.getName() -- returns column name as string
attribute.setName( "age") -- changes name of the attribute

Functions and methods parameteres

Unnamed parameters for function calls are used only for setter functions and few other simple functions (mainly the logging functions from the lm namespace). In all other cases the named parameters are used for enhancing readability and clarity of the script codes.

A simplified Hungarian notation is used to identify four basic types of named parameters.

nTaskSubTypeCode -- an integer number expected
dParamP -- a floating-point number (double precision) is expected
bForceRunFinished -- a boolean value is expected
pParentGroup -- a reference to an LMObject is expected

Prepare-

A special function name prefix prepare- is used to identify functions or methods returning an array of objects as a Lua table data-type. Some prepare- functions allow to pass an optional parameter to filter only some objects from the internal array (eg. only tasks of a given type).
dataColumnArray= dbtable.prepareDataColumnArray()
taskArray= lm.tasks.prepareTaskArray( nTaskSubTypeCode= lm.codes.TaskSubType.CFMiner)

Find-

Another prefix of find- is used to identify functions looking-up an object in an internal array by one of its unique properties (usually by the ID or Name object properties). The identifier is passed as a named parameter -- see reference to available find- functions.
dataColumn= dataTable.findDataColumn( name= "District")
task= lm.tasks.findTask( nID= 7)

Properties

In some cases a direct manipulation of property value is possible using the property name -- see class references. Properties of type boolean are distinguished by suffix -Flag appended to theirs names.
nCount= dbtable.RecordCount -- Reads value of the RecordCount property (using the getRecordCount method internally)
attribute.Note= "A text description" -- Sets value of the Note property (using the setNote method internally)

LISp-Miner subsystems identification

To better understand the names of classes, you should become familiar with the LISp-Miner subsystems two-letter identifiers.

Two-letter identifier Meaning
FT 4ft-Miner related classes, or classes for 4ft-cedents and literals used in all other modules too
CF CF-Miner related classes
KL KL-Miner related classes
DF SD4ft-Miner related classes
DC SDCF-Miner related classes
DK SDKL-Miner related classes
ET ETree-Miner related classes
MC MCluster-Miner related classes

Member-access through dot

The important syntax feature to remember is that members of namespaces or properties and methods of objects are accessed by the the dot '.'.
lm.log( ... )
lm.sleep()
lm.metabase.open( ... )
lm.explore.DataColumn
lm.explore.prepareDataTableArray()
dataTable.getID()
task.Name
task.getName()
dataTable.RecordCount

Namespaces

The basic namespace for all the LISp-Miner related functions and classes is the lm namespace. It is moreover subdivided into additional namespaces, a complete list of them could be seen in the navigation bar in the left part of this page.

Classes

LISp-Miner objects are available as instances of lua_userdata objects with meta-tables to keep necessary information about properties and methods of each class. A complete list of all classes is also on the left of this page.

Codes

Pre-defined constans were created for LISp-Miner internal types. They are grouped in the lm.codes namespace and there is also a complete list with descriptions available.