<commit_before>##################
# Reserved words #
################################################################
# HybridHTNDomain                                              #
# MaxArgs                                                      #
# :operator                                                    #
# :method                                                      #
# Head                                                         #
# Pre                                                          #
# Add                                                          #
# Del                                                          #
# Sub                                                          #
# Constraint                                                   #
# Ordering                                                     #
# Type                                                         #
# Values                                                       #
# StateVariable                                                #
# FluentResourceUsage                                          #
# Param                                                        #
# ResourceUsage                                                #
# Usage                                                        #
# Resource                                                     #
# Fluent                                                       #
#                                                              #
##   All AllenIntervalConstraint types                         #
##   '[' and ']' should be used only for constraint bounds     #
##   '(' and ')' are used for parsing                          #
#                                                              #
################################################################

(HybridHTNDomain RACEDomain)

(MaxArgs 5)

(Resource objManCapacity 1)
(Resource armManCapacity 1)

(Resource navigationCapacity 1)
##
(Resource leftArm1 1)
(Resource rightArm1 1)
#(Resource leftArm1ManCapacity 1)
#(Resource rightArm1ManCapacity 1)

(StateVariable RobotAt 2 n)
(StateVariable HasArmPosture 1 leftArm1 rightArm1)
(StateVariable Holding 1 leftArm1 rightArm1)
##
(StateVariable On 1 mug1 mug2 mug3)


################################
####  OPERATORS ################

# MOVE_BASE
(:operator
 (Head !move_base(?toArea))
 (Pre p1 RobotAt(?fromArea))
 (Constraint OverlappedBy(task,p1))
# (Constraint Duration[5000,INF](task))
 (Add e1 RobotAt(?toArea))
 (Constraint Meets(task,e1)) # too restrictive for stefan's exmo
 (Del p1)
 (ResourceUsage 
  (Usage navigationCapacity 1))
)

# MOVE_BASE_BLIND   PreArea to ManArea
(:operator
 (Head !move_base_blind(?mArea))
 (Pre p1 RobotAt(?preArea))       # TODO use type restriction
 (Pre p2 Connected(?plArea ?mArea ?preArea))
# (Constraint OverlappedBy(task,p1))
 (Constraint Duration[4000,INF](task))
 (Add e1 RobotAt(?mArea))
 (Constraint Meets(task,e1))
 (Constraint Meets(p1,task))
 (Del p1)
 (ResourceUsage 
    (Usage navigationCapacity 1))
)

# MOVE_BASE_BLIND   ManArea to PreArea
(:operator
 (Head !move_base_blind(?preArea))
 (Pre p1 RobotAt(?mArea))       # TODO use type restriction
 (Pre p2 Connected(?plArea ?mArea ?preArea))
# (Constraint OverlappedBy(task,p1))
 (Constraint Duration[4000,INF](task))
 (Add e1 RobotAt(?preArea))
 (Constraint Meets(task,e1))
 (Constraint Meets(p1,task))
 (Del p1)
 (ResourceUsage 
    (Usage navigationCapacity 1))
)

# TUCK_ARMS

(:operator
 (Head !tuck_arms(?leftGoal ?rightGoal))
 (Pre p1 HasArmPosture(?leftArm ?oldLeft))
 (Pre p2 HasArmPosture(?rightArm ?oldRight))
 (Del p1)
 (Del p2)
 (Add e1 HasArmPosture(?leftArm ?leftGoal))
 (Add e2 HasArmPosture(?rightArm ?rightGoal))
# (Type ?oldLeft ArmPosture)
 (Values ?leftArm leftArm1)
 (Values ?rightArm rightArm1)
 (Values ?leftGoal ArmTuckedPosture ArmUnTuckedPosture)
 (Values ?rightGoal ArmTuckedPosture ArmUnTuckedPosture)

# (ResourceUsage 
#    (Usage leftArm1ManCapacity 1))
# (ResourceUsage 
#    (Usage rightArm1ManCapacity 1))

 (ResourceUsage 
    (Usage armManCapacity 1))

 (Constraint Duration[4000,INF](task))
# (Constraint Duration[1000,10000000](e1))
# (Constraint Duration[1000,10000000](e2))
)


# MOVE_TORSO
(:operator
 (Head !move_torso(?newPosture))
 (Pre p1 HasTorsoPosture(?oldPosture))
 (Constraint OverlappedBy(task,p1))
 (Del p1)
 (Add e1 HasTorsoPosture(?newPosture))
 (Constraint Duration[4000,INF](task))
)

# PICK_UP_OBJECT
(:operator
 (Head !pick_up_object(?obj ?arm))
 (Pre p1 On(?obj ?fromArea))
 (Pre p2 RobotAt(?mArea))
 (Pre p3 Connected(?fromArea ?mArea ?preArea))
 (Pre p4 Holding(?arm ?nothing))
 (Values ?nothing nothing)
 (Del p1)
 (Del p4)
 (Add e1 Holding(?arm ?obj))

 (Constraint OverlappedBy(task,p1))
 (Constraint During(task,p2)) # robot has to be at the table the wohle time
 (Constraint During(task,p3))
 (Constraint OverlappedBy(task,p4))
 (Constraint Meets(p4,e1))
 # TODO Which constraint for effect? 
 (Constraint Duration[4000,INF](task))
 
# (ResourceUsage 
#    (Usage leftArm1ManCapacity 1)
#    (Param 2 leftArm1))
# (ResourceUsage 
#    (Usage rightArm1ManCapacity 1)
#    (Param 2 rightArm1))

 (ResourceUsage 
    (Usage armManCapacity 1))
    
 (ResourceUsage 
    (Usage objManCapacity 1))
)

# PLACE_OBJECT
(:operator
 (Head !place_object(?obj ?arm ?plArea))

 (Pre p1 Holding(?arm ?obj))
 (Pre p2 RobotAt(?mArea))
 (Pre p3 Connected(?plArea ?mArea ?preArea))
 (Pre p4 HasArmPosture(?arm ?armPosture)) # TODO maybe not necessary
 (Values ?armPosture ArmToSidePosture)
# (Pre p5 HasTorsoPosture(?torsoPosture)) # not necessary
# (Values ?torsoPosture TorsoUpPosture)
 (Del p1)
(Add e1 Holding(?arm ?nothing))
(Values ?nothing nothing)
 (Add e2 On(?obj ?plArea))

 (Constraint OverlappedBy(task,p1))
 (Constraint During(task,p2)) # robot has to be at the table the wohle time
 (Constraint During(task,p3))
 (Constraint Meets(p1,e1))
 # TODO Which constraint for effect? 
 (Constraint Duration[4000,INF](task))
 
 (ResourceUsage 
    (Usage leftArm1ManCapacity 1)
    (Param 2 leftArm1))
 (ResourceUsage 
    (Usage rightArm1ManCapacity 1)
    (Param 2 rightArm1))

 (ResourceUsage 
    (Usage objManCapacity 1))
 )

# MOVE_ARM_TO_SIDE
(:operator
 (Head !move_arm_to_side(?arm))
 (Pre p1 HasArmPosture(?arm ?oldPosture))
 (Del p1)
 (Add e1 HasArmPosture(?arm ?newPosture))

 (Values ?oldPosture ArmUnTuckedPosture ArmCarryPosture ArmUnnamedPosture)
 (Values ?newPosture ArmToSidePosture)

 (ResourceUsage 
    (Usage armManCapacity 1))
 
 (Constraint Duration[4000,INF](task))
 (Constraint OverlappedBy(task,p1))
 (Constraint Overlaps(task,e1))
 )

# MOVE_ARM_TO_SIDE # Arm is already there
(:operator
 (Head !move_arm_to_side(?arm))
 (Pre p1 HasArmPosture(?arm ?oldPosture))

 (Values ?oldPosture ArmToSidePosture)
 
 (Constraint Duration[10,INF](task))
 (Constraint During(task,p1))
 )

(:operator # if arm is tucked the other must not be tucked
 (Head !move_arm_to_side(?arm))
 (Pre p1 HasArmPosture(?arm ?oldPosture))
 (Pre p2 HasArmPosture(?otherArm ?otherPosture))
 (Del p1)
 (Add e1 HasArmPosture(?arm ?newPosture))

 (Values ?arm leftArm1)
 (Values ?otherArm rightArm1)
 (Values ?oldPosture ArmTuckedPosture)
 (Values ?otherPosture ArmUnTuckedPosture ArmCarryPosture ArmUnnamedPosture ArmToSidePosture)
 (Values ?newPosture ArmToSidePosture)


 (ResourceUsage 
    (Usage armManCapacity 1))
 
 (Constraint Duration[4000,INF](task))
 (Constraint OverlappedBy(task,p1))
 (Constraint OverlappedBy(task,p2))
 (Constraint Overlaps(task,e1))
)

(:operator # if arm is tucked the other must not be tucked
 (Head !move_arm_to_side(?arm))
 (Pre p1 HasArmPosture(?arm ?oldPosture))
 (Pre p2 HasArmPosture(?otherArm ?otherPosture))
 (Del p1)
 (Add e1 HasArmPosture(?arm ?newPosture))
<commit_msg>Domain: Removed operator doing nothing.<commit_after>##################
# Reserved words #
################################################################
# HybridHTNDomain                                              #
# MaxArgs                                                      #
# :operator                                                    #
# :method                                                      #
# Head                                                         #
# Pre                                                          #
# Add                                                          #
# Del                                                          #
# Sub                                                          #
# Constraint                                                   #
# Ordering                                                     #
# Type                                                         #
# Values                                                       #
# StateVariable                                                #
# FluentResourceUsage                                          #
# Param                                                        #
# ResourceUsage                                                #
# Usage                                                        #
# Resource                                                     #
# Fluent                                                       #
#                                                              #
##   All AllenIntervalConstraint types                         #
##   '[' and ']' should be used only for constraint bounds     #
##   '(' and ')' are used for parsing                          #
#                                                              #
################################################################

(HybridHTNDomain RACEDomain)

(MaxArgs 5)

(Resource objManCapacity 1)
(Resource armManCapacity 1)

(Resource navigationCapacity 1)
##
(Resource leftArm1 1)
(Resource rightArm1 1)
#(Resource leftArm1ManCapacity 1)
#(Resource rightArm1ManCapacity 1)

(StateVariable RobotAt 2 n)
(StateVariable HasArmPosture 1 leftArm1 rightArm1)
(StateVariable Holding 1 leftArm1 rightArm1)
##
(StateVariable On 1 mug1 mug2 mug3)


################################
####  OPERATORS ################

# MOVE_BASE
(:operator
 (Head !move_base(?toArea))
 (Pre p1 RobotAt(?fromArea))
 (Constraint OverlappedBy(task,p1))
# (Constraint Duration[5000,INF](task))
 (Add e1 RobotAt(?toArea))
 (Constraint Meets(task,e1)) # too restrictive for stefan's exmo
 (Del p1)
 (ResourceUsage 
  (Usage navigationCapacity 1))
)

# MOVE_BASE_BLIND   PreArea to ManArea
(:operator
 (Head !move_base_blind(?mArea))
 (Pre p1 RobotAt(?preArea))       # TODO use type restriction
 (Pre p2 Connected(?plArea ?mArea ?preArea))
# (Constraint OverlappedBy(task,p1))
 (Constraint Duration[4000,INF](task))
 (Add e1 RobotAt(?mArea))
 (Constraint Meets(task,e1))
 (Constraint Meets(p1,task))
 (Del p1)
 (ResourceUsage 
    (Usage navigationCapacity 1))
)

# MOVE_BASE_BLIND   ManArea to PreArea
(:operator
 (Head !move_base_blind(?preArea))
 (Pre p1 RobotAt(?mArea))       # TODO use type restriction
 (Pre p2 Connected(?plArea ?mArea ?preArea))
# (Constraint OverlappedBy(task,p1))
 (Constraint Duration[4000,INF](task))
 (Add e1 RobotAt(?preArea))
 (Constraint Meets(task,e1))
 (Constraint Meets(p1,task))
 (Del p1)
 (ResourceUsage 
    (Usage navigationCapacity 1))
)

# TUCK_ARMS

(:operator
 (Head !tuck_arms(?leftGoal ?rightGoal))
 (Pre p1 HasArmPosture(?leftArm ?oldLeft))
 (Pre p2 HasArmPosture(?rightArm ?oldRight))
 (Del p1)
 (Del p2)
 (Add e1 HasArmPosture(?leftArm ?leftGoal))
 (Add e2 HasArmPosture(?rightArm ?rightGoal))
# (Type ?oldLeft ArmPosture)
 (Values ?leftArm leftArm1)
 (Values ?rightArm rightArm1)
 (Values ?leftGoal ArmTuckedPosture ArmUnTuckedPosture)
 (Values ?rightGoal ArmTuckedPosture ArmUnTuckedPosture)

# (ResourceUsage 
#    (Usage leftArm1ManCapacity 1))
# (ResourceUsage 
#    (Usage rightArm1ManCapacity 1))

 (ResourceUsage 
    (Usage armManCapacity 1))

 (Constraint Duration[4000,INF](task))
# (Constraint Duration[1000,10000000](e1))
# (Constraint Duration[1000,10000000](e2))
)


# MOVE_TORSO
(:operator
 (Head !move_torso(?newPosture))
 (Pre p1 HasTorsoPosture(?oldPosture))
 (Constraint OverlappedBy(task,p1))
 (Del p1)
 (Add e1 HasTorsoPosture(?newPosture))
 (Constraint Duration[4000,INF](task))
)

# PICK_UP_OBJECT
(:operator
 (Head !pick_up_object(?obj ?arm))
 (Pre p1 On(?obj ?fromArea))
 (Pre p2 RobotAt(?mArea))
 (Pre p3 Connected(?fromArea ?mArea ?preArea))
 (Pre p4 Holding(?arm ?nothing))
 (Values ?nothing nothing)
 (Del p1)
 (Del p4)
 (Add e1 Holding(?arm ?obj))

 (Constraint OverlappedBy(task,p1))
 (Constraint During(task,p2)) # robot has to be at the table the wohle time
 (Constraint During(task,p3))
 (Constraint OverlappedBy(task,p4))
 (Constraint Meets(p4,e1))
 # TODO Which constraint for effect? 
 (Constraint Duration[4000,INF](task))
 
# (ResourceUsage 
#    (Usage leftArm1ManCapacity 1)
#    (Param 2 leftArm1))
# (ResourceUsage 
#    (Usage rightArm1ManCapacity 1)
#    (Param 2 rightArm1))

 (ResourceUsage 
    (Usage armManCapacity 1))
    
 (ResourceUsage 
    (Usage objManCapacity 1))
)

# PLACE_OBJECT
(:operator
 (Head !place_object(?obj ?arm ?plArea))

 (Pre p1 Holding(?arm ?obj))
 (Pre p2 RobotAt(?mArea))
 (Pre p3 Connected(?plArea ?mArea ?preArea))
 (Pre p4 HasArmPosture(?arm ?armPosture)) # TODO maybe not necessary
 (Values ?armPosture ArmToSidePosture)
# (Pre p5 HasTorsoPosture(?torsoPosture)) # not necessary
# (Values ?torsoPosture TorsoUpPosture)
 (Del p1)
(Add e1 Holding(?arm ?nothing))
(Values ?nothing nothing)
 (Add e2 On(?obj ?plArea))

 (Constraint OverlappedBy(task,p1))
 (Constraint During(task,p2)) # robot has to be at the table the wohle time
 (Constraint During(task,p3))
 (Constraint Meets(p1,e1))
 # TODO Which constraint for effect? 
 (Constraint Duration[4000,INF](task))
 
 (ResourceUsage 
    (Usage leftArm1ManCapacity 1)
    (Param 2 leftArm1))
 (ResourceUsage 
    (Usage rightArm1ManCapacity 1)
    (Param 2 rightArm1))

 (ResourceUsage 
    (Usage objManCapacity 1))
 )

# MOVE_ARM_TO_SIDE
(:operator
 (Head !move_arm_to_side(?arm))
 (Pre p1 HasArmPosture(?arm ?oldPosture))
 (Del p1)
 (Add e1 HasArmPosture(?arm ?newPosture))

 (Values ?oldPosture ArmUnTuckedPosture ArmCarryPosture ArmUnnamedPosture)
 (Values ?newPosture ArmToSidePosture)

 (ResourceUsage 
    (Usage armManCapacity 1))
 
 (Constraint Duration[4000,INF](task))
 (Constraint OverlappedBy(task,p1))
 (Constraint Overlaps(task,e1))
 )

(:operator # if arm is tucked the other must not be tucked
 (Head !move_arm_to_side(?arm))
 (Pre p1 HasArmPosture(?arm ?oldPosture))
 (Pre p2 HasArmPosture(?otherArm ?otherPosture))
 (Del p1)
 (Add e1 HasArmPosture(?arm ?newPosture))

 (Values ?arm leftArm1)
 (Values ?otherArm rightArm1)
 (Values ?oldPosture ArmTuckedPosture)
 (Values ?otherPosture ArmUnTuckedPosture ArmCarryPosture ArmUnnamedPosture ArmToSidePosture)
 (Values ?newPosture ArmToSidePosture)

 (ResourceUsage 
    (Usage armManCapacity 1))
 
 (Constraint Duration[4000,INF](task))
 (Constraint OverlappedBy(task,p1))
 (Constraint OverlappedBy(task,p2))
 (Constraint Overlaps(task,e1))
)

(:operator # if arm is tucked the other must not be tucked
 (Head !move_arm_to_side(?arm))
 (Pre p1 HasArmPosture(?arm ?oldPosture))
 (Pre p2 HasArmPosture(?otherArm ?otherPosture))
 (Del p1)
 (Add e1 HasArmPosture(?arm ?newPosture))

{'fraction_non_alphanumeric': 0.12881623005712034, 'fraction_numerical': 0.025080428074322106, 'mean_word_length': 2.5169706765181252, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 86, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1848728', 'n_tokens_mistral': 4772, 'n_tokens_neox': 4356, 'n_words': 1123}