Skip to content

CALM exception - wrestler and opponent #33

@anuradha252

Description

@anuradha252

Having an issue with the structure of the wrestler and opponent program. all the modules until then work.

structure wrestler_and_opponent
    instances	
      wrestler, opponent in living_entity
      r in restrain
         agent(wrestler) = true
         object(opponent) = true
         ...

Error I receive is
Exception in thread "main" edu.ttu.krlab.alm.ALMCompilerPermanentFailure: PROGRAM FAILURE: [Translate Rule] Boolean Function cannot be in a Term Relation at head of rule

I have tried using

               r(O,A) in restrain 
		  	object(O,true)
		  	agent(A,true)

and

		  r(O,A) in restrain 
		  	object(O) = true
		  	agent(A) = true

and

                r in restrain  
		  	object(opponent,true) 
		  	agent(wrestler,true) 

Error:Sort Instance [object(opponent,true) at (wrestler_test.p:670:5)] cannot have the same name as element [object:entity->booleans at (wrestler_test.p:23:5)].

none of them work. Could it be because object is a keyword?

I have attached the full program here
wrestler_test.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions