Ampersand icon indicating copy to clipboard operation
Ampersand copied to clipboard

Fatal error in ENFORCE rule at compile time.

Open stefjoosten opened this issue 1 year ago • 2 comments

What happened

I was experimenting with enforcement rules in RAP4, when suddenly I got a fatal error. Since the script was without type errors, I expected it to pass fluently through the compiler.

The screenshot tells the entire story: afbeelding This is a fatal error, so this clearly is a bug.

Reproducing the error

  1. Log in to https://rap.tarski.nl
  2. Create a new script with the following contents:
     CONTEXT Issue1419
    
     CLASSIFY Ss ISA S
     CLASSIFY Uu ISA U
    
     RELATION r[S*T]
     RELATION s[T*U]
     RELATION t[Ss*Uu]
    
     ENFORCE t >: r;s
    
     ENDCONTEXT
    
  3. Compile this script Lo and behold, the fatal error appears.

Symptoms

In a first attempt to analyze this error, I noticed that the following script compiles without errors:

CONTEXT Issue1419

CLASSIFY Ss ISA S
CLASSIFY Uu ISA U

RELATION r[S*T]
RELATION s[T*U]
RELATION t[Ss*Uu]

ENFORCE t >: I[Ss];r;s;I[Uu]

ENDCONTEXT

stefjoosten avatar Jun 28 '23 19:06 stefjoosten