From 03116e645e5682f0e58d5a67e28238fba9c9aa1d Mon Sep 17 00:00:00 2001 From: Mau Magnaguagno Date: Sun, 12 May 2024 06:53:35 -0300 Subject: [PATCH] Fix equality operator precondition in Cyber_Compiler --- compilers/Cyber_Compiler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compilers/Cyber_Compiler.rb b/compilers/Cyber_Compiler.rb index 428edc2..f1435e4 100644 --- a/compilers/Cyber_Compiler.rb +++ b/compilers/Cyber_Compiler.rb @@ -105,7 +105,7 @@ def compile_domain(domain_name, problem_name, operators, methods, predicates, st elsif predicates[pre] or state.include?(pre) then define_operators << "\n if(#{applicable(pre, terms, predicates, arity)}) return false;" end } - define_operators << "\n return if #{equality.join(' || ')}" unless equality.empty? + define_operators << "\n if(#{equality.join(' || ')}) return false;" unless equality.empty? unless effect_add.empty? and effect_del.empty? define_operators << "\n new_state();" apply('erase', effect_del, define_operators, duplicated = {}, arity)