Product
Support
Everything Else
R7321: The Abacus Expression Language (AEL)
Overview

The Abacus Expression Language (abbreviated: AEL) is a textual language that you can use to read, write, and modify an abacus. AEL is pure text, providing a radically new method of working with an abacus. AEL shows you, for the first time ever, the contents of any abacus — including the underlying abacus that is built for a form query or power query — using plain text.

The Abacus Expression Language can be used in AppleScript to create the contents of an abacus ‘all at once’ and it can also be used to read (decipher) the contents of an existing abacus, form query, or power query.

This document defines the syntactical rules governing the Abacus Expression Language.

Syntax Rules
#1: Tiles

Tiles are the basic building block of an abacus expression in the Helix GUI.

Each tile is demarcated by a pair of square brackets [ ]

Tiles can contain four types of objects:
    { Keywords, Icons, Constants, Tiles }

Multi-hole tiles follow the same order as Classic tiles.
    In some cases, a hole may be left undefined.
    An undefined hole (aka: black hole) is represented by a capital X.

When defining a tile, Keywords and Icons are interspersed between holes,
    mimicking the visual of a Classic tile.
#2: Keywords

Keywords are textual representation of tiles seen in the Helix GUI

Keywords are defined in the scripting implementation and mimic the
    nomenclature seen in Classic tiles as closely as possible.

See the 'abacus operators' section of the dictionary for the format of each tile.
	 
Keywords that are outside the standard ASCII range may have textual equivalents
    (e.g: delta for the ∆ tile)
#3: Icons

Icons are the icons seen in the Helix GUI (fields, abaci, etc.)

An icon is written as a composition of two entities: Type & Value (plus an optional divider)

Type: The icon type about to be declared. Current legal icon types are:
    { F, Field, A, Abacus, T, Template, R, Relation }

Value: The icon identifier. Can be either ID or name:
    ID: the icon's internal ID (in AppleScript integer form)
         Requires no demarcation
    Name: a demarcated string equal to the name as seen in the GUI
         Demarcation is by enclosing the name with single quotes (')
         Use of the quote character within an icon name is handled by escaping
            it with a duplicate quote mark (Example: "it's" -> "it''s")

Divider: An optional divider can be used to demarcate the Type & Value.
    Legal divider characters are colon (:) or whitespace {space, tab, linefeed} 

Examples: Relation:'Customers'
          Relation 'Customers'
          Relation'Customers'
          R:'Customers'
          R 'Customers'
          R'Customers'
          Relation:8
          Relation 8
          Relation8
          R:8
          R 8

Reply (output) format: Relation:'Customers'
#4: Constants

Constants are values typed directly into holes in a tile in the Helix GUI.

A constant is comprised of three parts: Signal, Type, & Quoted Value

Signal: The letter C

Type: A single letter representing the data type about to be declared.
   Current legal data types are:
    T: Text
    S: Styled Text
    N: Number
    I: Fixed Point (Integer)
    D: Date
    F: Flag

Quoted Value: Text string to be cast into the designated Type.
    The rules for quoted text are the same as for designating an icon by name.

Examples: CN'3.14159'
          CT'These are quotes that try men''s patience.'
          CF'True'

Reply (output) format: CF'True'

Notes: There are no expanded forms for the Signal and Type, and there is no divider.

#5: Miscellaneous Rules

The following general rules should be observed:

  • Whitespace is required around hole contents.
  • Whitespace {space, tab, linefeed} outside of keywords and quoted values is ignored.
  • All text is case insensitive.
  • A form query with no defined criteria appears as "[ CF'1' ]" (Constant Flag of text '1') because that is the content of the underlying query abacus.
  • A power query with no defined criteria appears as "[ CF'Yes' ]" (Constant Flag of text 'Yes') because that is the content of the underlying query abacus.
#6: Exceptions

The following are exceptions to the general rules:

  • When creating a Use/From tile that references a template, you must specify the template by Object ID, as it is impossible to know which relation to search to find the named template. See R7392 in techdb for discussion on this issue.
  • It is not possible to create an invalid abacus construction via AEL. Classic Helix RADE allows you to close in invalidly constructed abacus, on the assumption that you will return and complete it at some point. That is not possible via AEL. See R7393 in techdb for discussion on this issue.
#7: Examples

These are examples of abaci as seen in AEL:

[ If Abacus:'Undefined Color' Then CT'unknown' Else Field:'Color' ]

[ If A:324 Then X Else F:721 ]

[ Lookup A'Full Name' for F'CustNum' = F'Cust#' in R'Customers' ]

[ Lookup  Field:'Age'
	for   A'Full Name'
	 =  [ F'First Name' followed by [ CT' ' followed by F'Last Name' ] ]
	in    R'Customers'
]