IIIM-IS / AERA

Other
12 stars 4 forks source link

In is_drive, also check for Ent #284

Closed jefft0 closed 8 months ago

jefft0 commented 8 months ago

Background: A drive is a fact where the object is a simple token like run. For example, (fact run 1s:400ms:0us 2s:0ms:0us 1 1). Currently, the method is_drive checks that a goal is drive if it is not a simulation, and that the actor is self. But it doesn't make sure that the object is a token like run.

This pull request adds this check to is_drive. (The way to check is because the object is defined as an Ent. This same check is made elsewhere too.)

Details on why this hasn't been an issue before now: Most goal objects are simulated goals during simulated backward chaining. Non-simulated goals are usually drives that are handled in TopLevelMDLController::reduce. But now we are working with non-simulated goals which are not drives in order to automate the "experimentation" phase. For example, (fact (goal (|fact (mk.val h position 10)))) to not be at a position. This is handled in PrimaryMDLController::reduce which makes sure that the goal is not a drive. Without the fix in this pull request, the definition of is_drive is overly broad and so this goal is incorrectly ignored.