Aspen SCM‎ > ‎

SYN pretty printer

What is SYN for Aspen SCM Expert System?

SYN is  a pretty printer which reformats rules so that their logical structure is displayed. It also checks the syntax for common errors and highlights structural keywords. SYN consists of sets and tables which you add to your case. Once you have done this, you can run it on any rule set by executing a command such as SYN MYRULE. It generates the reformatted rule in two forms:
  • as a panel table, in this case MYRULE.L;

  • as a .HTM file for viewing in a web browser and printing to a colour printer.

For the rule set MAXOF1.R

MAXOF1  Returns ?A as greatest of ?X ?Y ?Z

IF      ?A = ?X + 0
AND     ?A GE ?Y OR ?A = ?Y + 0
AND     ?A GE ?Z OR ?A = ?Z + 0
THEN    MAXOF1 ?X ?Y ?Z ?A

SYN generates the panel table:

It uses the following colour-coding conventions:

  • blue is used for structural keywords and brackets;

  • green is used for comments;

  • red is used for warnings, messages and unrecognised tokens;

  • black is used for other parts of the rule.

As well as formatting the code and colouring it, the .HTM file also hyperlinks the predicates to the rules which prove them. They are shown by a pale blue background which turns orange when the mouse hovers over it and violet when the link has been followed. The rule name at the start of the rule has a light grey background:

MAXOF1.R checked. 0 errors and 0 warnings.

1 MAXOF1   Returns ?A as greatest of ?X ?Y ?Z
3 IF       ?A = ?X + 0
4     AND  ?A GE ?Y
            OR ?A = ?Y + 0
5     AND  ?A GE ?Z
            OR ?A = ?Z + 0
6 THEN     MAXOF1 ?X ?Y ?Z ?A

Additional Checks on the Entire Case

When it runs, SYN also reports the following:
  • duplicate predicates;
  • predicates with the same predicate verb but different numbers of arguments;
  • duplicate rules.
These are valid in Aspen SCM Expert System; indeed, they can be very useful. But when they occur accidentally they often cause run-time errors which are hard to debug.

How can I try it out?

Contact Eudoxus Systems and send us a case file which you want analysed. We will run SYN on it and send it back to you with the panel tables added and with the .HTM files which SYN has generated. There is no charge for this service, but we only do it once free of charge for each client.

You can then license SYN for use on your own machines or send cases to us when you want SYN run on them.