Modeler:15/ExpressionFile

From CaseTalk Wiki
Jump to: navigation, search

Expression File Window

Expression Files

Expression files are an alternative method to populate the repository. Expressions are entered using the CaseTalk Text Editor. This window is opened with the Text Edit... button.

Sections

Various sections are meant to group fact expression according to their fact type name. When qualifying the fact expressions, they will assume the fact type name from their group headers such as '[fact type name]' in between the brackets.

Lines that start with a ';' are comments.

Lines that start with a '; ---' are considered visual section seperators with an optional title such as '; --- SECTION A'.

Single Tag

Expression are qualified and classified in exactly the same way as when entering an expression in the CaseTalk Repository Window. The Quantify button opens the Expression Input Window.

Once an expression is qualified ', Tag' is added at the end of the expression (not visible in the Expression File Window, only in the Text Editor Window) and the 'Tag' button changes into an 'Untag' button for the qualified expression.

Additional buttons allow you to quickly insert, delete or edit a single line.

Double Tag

Newer versions of CaseTalk may support the double tagging. If expressions get qualified into the model, the expressions are not tagged using the "TAG" keyword but will contain the <expressioncode>.

The double tags are visible to indicate they are qualified into the model already.

The "recycle button" can be clicked to clean the double tags on expressions which are no longer in the model. Tags remain, but the <expressioncode> is simply replaced by the anonymous "TAG" keyword.

The Raw File

An expression file is an ordinary text file. Opening it with the Text Edit... button, or in any plain text editor, shows exactly what CaseTalk stores: one statement per line. Knowing the layout is useful when you write expressions outside CaseTalk, generate them from another tool, or compare two versions of a file.

File header

The first line marks the file as an expression file:

[EXPFILE]

The header is optional; a file without one still loads. Older files may carry a variant such as [EXPFILE,WIN], which CaseTalk reads and rewrites in the modern form when it saves.

When every expression in the file describes a situation that must not be possible, the whole file can be marked as counter-examples:

[EXPFILE, CE]

Fact type lines

A line between square brackets opens a group and names the fact type that the expressions below it belong to:

[Person]

Options may follow the name, separated by commas. Each has a long and a short spelling, and both are accepted:

Option Short Meaning
Subtype SU the expressions in this group define a subtype
Derivable DE the fact type is derivable rather than stored
Alias(...) AL one or more alternative names, separated by commas
Locale(...) LC the language of the names on this line

For example:

[Employee, Subtype, Alias(Staff, Personnel)]

If the fact type name itself contains a comma, it is placed between quotes. When the file is connected to a model, CaseTalk may also append the element's identifier between braces, as in [Person] {2A7C...} — this is written and maintained by CaseTalk, and you do not need to type it yourself.

CaseTalk accepts Locale when reading a file, but does not write it back.

Expression lines

An expression is written between quotes, optionally followed by comma-separated markers.

The quote character is not a matter of style: it says which kind of expression the line holds.

Quotes Kind Meaning
"..." Fact Expression states a fact, and populates the fact type of the group the line sits in
'...' Object Expression names an object type instance rather than a fact (a nominalisation)

Selecting a line in the Expression File Window tells you which of the two it is, so you can always check a line without counting quotes.

[EXPFILE]
; --- People
[Person]
"Person has PersonName", F0001
"Person has DateOfBirth", F0002, CE
"Person lives in City"

The first two expressions above are qualified into the model and carry their expression code; the third is not yet qualified.

Markers

Marker Meaning
F0001 (a code) the expression is qualified into the model, and this is its expression code — the double tag
Tag the expression is qualified into the model, but no code is recorded — the plain tag used by older versions, and what the recycle button restores
CE, +CE, CounterExample the expression is a counter-example: it must not be possible
-CE explicitly not a counter-example
CF, +CF, Confirmed the example has been confirmed
-CF, Unconfirmed the example has not been confirmed
+PC / -PC presentation: do or do not start the expression with a capital letter
+PD / -PD presentation: do or do not end the expression with a full stop
Locale(...) the language of the expression; accepted when reading, not written back

Markers may be combined, in any order:

"Person has PersonName", F0001, CounterExample, Unconfirmed

Comments and separators

Lines starting with a semicolon are comments and are ignored when the file is read:

; this line is a comment

A comment starting with ; --- is shown as a visual separator in the Expression File Window, and any text after it becomes the separator title:

; --- SECTION A

The options a file was generated with

A file made with Generate Expressions lists, near the top, the options it was generated with:

; ------------------------------
; Configuration used:
; Include OTEs: False
; ...
; ------------------------------

CaseTalk reads these lines when you regenerate the file, so it starts from the same options. They are there for CaseTalk, not for reading: the Expression File window does not show them, and they stay in the file when you save it.

Copying

Copy takes the selected lines, or all of them when none is selected, both as formatted text - type names as titles, comments, the kind of each expression, counter examples struck through - for documents and e-mail, and as plain text.

The same way of showing expressions is used in the Generate Expressions preview and on a diagram's Verbalizations tab.

Connected

The above paragraphs all assume, like older versions of CaseTalk, the expression file is disconnected from the model itself. It functions as a semi-offline source of fact expressions. In newer versions you are able to (dis)connect this window.

When it is connected, you might see in light-gray a set of fact expressions which are in your model, but not in your expression file. This helps you distinguish what you already modeled vs what is still in your expression file itself.


Other versions: v8 | v9 | v10 | v11 | v12 | v13 | v14 | v15


Expressions
Dialogs Expression Input · Expression Viewer · Expression File · Expression Tree · Generate Expressions
Reference Expression Unification · Special Keywords