DomainLang

Begin with one rebooking rule

The first example will test the method, the CoreLang common base, editor feedback and the optional CREXX execution path together.

The business question

A service cancels an appointment. It must offer the person another date within five working days, unless the person has already asked to close the case.

The first example needs to express at least four distinctions:

  • who cancelled the appointment;
  • when the five-day period begins;
  • what counts as making an offer; and
  • why the close-case exception applies.

Illustrative wording

The following structure is a discussion aid, not agreed CoreLang syntax:

when    the service cancels an appointment
then    offer the person a new date within 5 working days
unless  the person has asked to close the case
record  the rule version and the offer date

The example is useful because a domain specialist can challenge its words before a parser exists. Does “offer” mean sending a message, receiving it or accepting a date? Which calendar defines a working day? Those questions belong in the language’s meaning, not in hidden application code.

What the first implementation must show

  1. CoreLang can provide enough common structure without dictating the domain vocabulary.
  2. The parser can distinguish a complete rule from a missing or contradictory statement.
  3. DSLSH and THE can return an error in words the author understands.
  4. Valid and invalid examples remain stable as the language changes.
  5. If execution is useful, the checked rule can produce RXAS and run through the existing CREXX tools.

The example should publish its failed attempts and unresolved questions as well as the final result. That record will show how the method and common base need to change.

Related work

What the other projects contribute

  • Public Purpose Lab can supply a synthetic service scenario for the example.
  • The example will test the proposed CoreLang common structure and toolchain.