Expression Unification

From CaseTalk Wiki
Revision as of 14:50, 23 March 2017 by Marcow (talk | contribs) (→‎How To)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Expression Unification

Expression unification is an experimental feature which allows users to substitute and re-use every expression (FTE or OTE) from the model. It only changes expression numbers where needed, and is a non destructive way or working. The feature can simply be turned on and off at will.

Background

During the years of modeling we discovered examples where users were required to duplicate fact expression as object expressions before substitution could take place. Hardcode users will see no issue in this, but it made us think. Consider the following model evolution. We start of with the Marriage fact type, only to later find out we have an additional fact type Marriage Date.

[Marriage] 
F1: "John is married to Mary"
[Marriage Date]
F2: "John is married to Mary on 1-1-1990"

This requires the user to add an Object Type Expression (O1) along the way, which is identical to F1.

[Marriage] 
O1: "John is married to Mary"

This seemed redundant, since CaseTalk could already distinguish if expressions were used in a subsitution or not. What would happen if we'd allow users to substitute everything they'd already entered into the model?

It would reduce a duplication of similar FTE's and OTE's, and probably speed up the modeling process when entering new facts.

Consequences

  • Since all expressions are of equal type, the numbering is required to me unique among both FTE and OTE.
  • Since both FTE and OTE can now be used in substitutions, the need for the 'F' or 'O' becomes obsolete. Wether an expression is substituted is now somehow leading.
  • Transformations during GLR tend to roll up the OTE's into the FTE's. This may not be desirable by the users. To support this in a intuïtive manner, the 'O' and 'F' are redefined as 'Optional' and 'Fixed'. Entering Fact Expressions by hand now automatically leads to 'Fixed' expressions, as would traditional FTE's. Partial expressions, traditionally OTE's, are now created as 'Optional'. During GLR the Fixed Expressions remain whole, whereas the Optional Expression may fuse.

Advantages

  • Users can alter FTE to OTE as 'Fixed' or 'Optional' without any problem.
  • Traditionally build FTE can be substituted just any other expression part.
  • The concept of expression is lingual, and users are creative, and being able to re-use all existing expression(parts) make the user more productive.

Note

Even when only turning the feature on, altering the OTE to FTE or vice versa, and toggling it back off, allows users to greatly improve the editable state of their model.

How To

Users need to activate the experimental feature through the Environment Options and the Advanced tab. Once this has been checked, the Repository Menu will contain the menu item to turn on (and off) the expression unification.