Logic Models MD3

Edit Logic Model MD3

Following the example KB. anchors??

If the logic model properties are not yet visible in Inspector, click its name in Navigator section Logic Models.

  1. You can change the name. It starts with a lower case letter, followed by alphabetics, digits and underscores., eg. textLength, text_len2. Spaces are not allowed. In Comments free text can be entered.
  2. To add an argument in section Arguments do one of the next:
    • Right-click and select Add argument.
    • Click the button with the plus-sign.
  3. An edit window appears. Type an argument name complying to the syntax rules described at the parent page. They will be Prolog variables, not constants, so start with a capital eg. Stext, Number_chars.
  4. Click button Ok.
  5. Under section Arguments is section Logic Model for the body, the Prolog code. Double-click it.
  6. An edit window appears. Type Prolog code, or copy and paste it from a Prolog file, eg.
    • textLength(Stext, Number_chars) :- atom_codes(Stext, L), length(L, Number_chars).
  7. Click button Ok.

Special attention is needed to the arguments. The last of them must serve as output, the result of the execution. Right-click it and select Set output. It will be marked by a special icon. The Match variable using the logic model will have this argument set to DEDUCE.

To delete an argument do one of the next:

  • Right-click the argument and select Delete argument.
  • Select the argument and click the button with the minus-sign.