Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error in ENFORCE rule at compile time. #1419

Open
stefjoosten opened this issue Jun 28, 2023 · 2 comments
Open

Fatal error in ENFORCE rule at compile time. #1419

stefjoosten opened this issue Jun 28, 2023 · 2 comments
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior component: compiler priority:normal

Comments

@stefjoosten
Copy link
Contributor

stefjoosten commented Jun 28, 2023

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 stefjoosten changed the title Fatal error at compile time. Fatal error in ENFORCE rule at compile time. Jun 28, 2023
@stefjoosten stefjoosten added priority:normal bug Indicates an unexpected problem or unintended behavior component: compiler labels Jun 28, 2023
@hanjoosten
Copy link
Member

This obviously is a typecheck error, similar to the one @sjcjoosten fixed with #1392. As he commented in that PR, he said that there were probably fewer errors than before.
@sjcjoosten , could you please have a look at this new bug?

@stefjoosten
Copy link
Contributor Author

I ran into the same mistake today, when using Ampersand-v4.6.2, which was called FROM ampersandtarski/prototype-framework:v1.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: compiler priority:normal
Projects
None yet
Development

No branches or pull requests

3 participants