Giter VIP home page Giter VIP logo

pandapigrounder's People

Contributors

galvusdamor avatar panda-planner-dev avatar profdrchaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pandapigrounder's Issues

Empty grounding when using recursive task while should be a solution

Hello and thanks for your work on PandaPI.
I am defining a HDDL domain that use recursive tasks, the problem is that the grounder find that the domain is empty.
Basically, I am modeling a list of items, each item can be done or undone, I want to filter the list ro remove items that are done.
Using these files, the grounder (and thus the engine), cannot find a solution:
domainRec.hddl.txt
problemRec.pddl.txt

What surprise me is that if I uncomment line 57 and comment the line 58 in the domain file then The grounder is able to ground the problem and the engine ro produce a solution.
I do not understand why the grounder does seems to simplify the domain to impossible. Could you provide me with some hints ? Is it a limitation of Panda? a problem of HDDL modeling? Or maybe a bug on you side ?

Thanks for your help.

Grounder fatal error: terminate called after throwing an instance of 'BadInputException' ...

Trying to ground a rovers domain problem translated from PDDL (i.e., not from IPC2023), I get that error:

terminate called after throwing an instance of 'BadInputException'
  what():  Constraint type must be "=" (equal) or "!=" (not equal); "0" given

This is quite likely an error in the input I have provided, but I have no idea how to track this down. The input resulting in this error is on Dropbox.

If it's not too hard, it would be great if you could track the input lines and give a line number for bad input errors. It does seem like there are cases where pandaPIparser can give output that the grounder cannot read.

(added: could you use tellg to get position in the input stream for this purpose?)

Help with use of grounder/pipeline

I'm sure that this is a foolish question, but I don't understand how the panda pipeline works.

I coded up as HDDL the toll problem from the plan repair paper as toll-domain.hddl and toll-problem.hddl. Then I did the following:

pandaPIparser --hpdl toll-domain.hddl toll-problem.hddl toll-domain.hpdl toll-problem.hpdl

That seemed to work (output at the bottom).

Then I tried using the grounder on both output files:

pandaPIgrounder/pandaPIgrounder /input/toll-domain.hpdl /input/toll-problem.sas

pandaPIgrounder/pandaPIgrounder /input/toll-problem.hpdl /input/toll-problem.sas

But now I get errors, when I give it the domain file and when I give it the problem file.

Obviously I'm missing something, since I didn't expect there to be two output files from the parser, but only one output file from the grounder. Would you mind adding an example of the full pipeline to the PANDA doc? Thank you

Processing domain file:

General Options
  Print timings: false
  Quiet mode: false
Inference Options
  H2 mutexes: false
  FAM groups: false
Transformation Options
  Add zero-cost no-op to empty methods: true
  Remove duplicate actions: true
  Remove useless literals: true
  Expand abstract tasks with one method: true
  Remove empty method preconditions: true
  Two regularisation: false
  Compile negative SAS variables: false
Runtime Optimisations
  Hierarchy Typing: true
  Future Caching: false
  Static Precondition Checking: false
Output Options
  Panda planner format: true
  HDDL: false
  SAS for Fast Downward (without hierarchy): false
Output Formatting Options
  Output only SAS+ variables: false
  SAS+ delete mode: as input
Reading input from /input/toll-problem.hpdl.
Input parse error: basic_ios::clear: iostream error
The error is at: (define (domain dom)
Writing output to /input/toll-problem.sas.
Writing output to standard output.
Failed to read input data!

Processing problem file

# ./pandaPIgrounder /input/toll-problem.hpdl
General Options
  Print timings: false
  Quiet mode: false
Inference Options
  H2 mutexes: false
  FAM groups: false
Transformation Options
  Add zero-cost no-op to empty methods: true
  Remove duplicate actions: true
  Remove useless literals: true
  Expand abstract tasks with one method: true
  Remove empty method preconditions: true
  Two regularisation: false
  Compile negative SAS variables: false
Runtime Optimisations
  Hierarchy Typing: true
  Future Caching: false
  Static Precondition Checking: false
Output Options
  Panda planner format: true
  HDDL: false
  SAS for Fast Downward (without hierarchy): false
Output Formatting Options
  Output only SAS+ variables: false
  SAS+ delete mode: as input
Reading input from /input/toll-problem.hpdl.
Input parse error: basic_ios::clear: iostream error
The error is at: (define (problem prob) (:domain dom)
Writing output to standard output.
Writing output to standard output.
Failed to read input data!


Output of pandaPIparser

pandaPIparser is configured as follows
  Colors in output: true
  Mode: parsing mode
  Parameter splitting: true
  Conditional effects: exponential encoding
  Disjunctive preconditions as HTN: false
  Replace goal with action: false
  Output: HPDL
(define (problem prob) (:domain dom)
  (:objects
    B C D E F G I - location
  )

  (:init
    (at A)
    (capacity_predecessor capacity_0 capacity_1)
    (capacity_predecessor capacity_1 capacity_2)
    (capacity_predecessor capacity_2 capacity_3)
    (road A C)
    (road B C)
    (road C G)
    (road C D)
    (road C E)
    (road D E)
    (road D F)
    (road E G)
    (road E G)
    (road G I)
    (road F H)
    (pay-location A)
    (pay-location B)
    (pay-location I)
    (pay-location H)
    (type_member_location A)
    (type_member_location B)
    (type_member_location C)
    (type_member_location D)
    (type_member_location E)
    (type_member_location F)
    (type_member_location G)
    (type_member_location H)
    (type_member_location I)
    (type_member_object__compiled A)
    (type_member_object__compiled B)
    (type_member_object__compiled C)
    (type_member_object__compiled D)
    (type_member_object__compiled E)
    (type_member_object__compiled F)
    (type_member_object__compiled G)
    (type_member_object__compiled H)
    (type_member_object__compiled I)
  )

  (:tasks-goal
      :tasks (
        (move A H)
      )
  )
)

Building Error On MacOS

Hello,

I am trying to build pandaPIgrounder on my macOS machine and it fails when building boruvka, I have followed the building steps as mentioned yet I got this error:

/Applications/Xcode.app/Contents/Developer/usr/bin/make CC="cc" DEBUG=no -C third-party/boruvka all
cc -O3 -Wall -pedantic -std=gnu99 -ffast-math -I. -c -o .objs/fifo-sem.o src/fifo-sem.c
src/fifo-sem.c:30:9: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
    if (sem_init(&fifo->full, 0, 0) != 0){
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:55:42: note: 'sem_init' has been explicitly marked deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:196:40: note: expanded from macro '__deprecated'
#define __deprecated    __attribute__((__deprecated__))
                                       ^
src/fifo-sem.c:35:9: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
    if (sem_init(&fifo->empty, 0, SEM_VALUE_MAX) != 0){
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:55:42: note: 'sem_init' has been explicitly marked deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:196:40: note: expanded from macro '__deprecated'
#define __deprecated    __attribute__((__deprecated__))
                                       ^
src/fifo-sem.c:86:5: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations]
    sem_destroy(&fifo->full);
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:53:26: note: 'sem_destroy' has been explicitly marked deprecated here
int sem_destroy(sem_t *) __deprecated;
                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:196:40: note: expanded from macro '__deprecated'
#define __deprecated    __attribute__((__deprecated__))
                                       ^
src/fifo-sem.c:87:5: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations]
    sem_destroy(&fifo->empty);
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:53:26: note: 'sem_destroy' has been explicitly marked deprecated here
int sem_destroy(sem_t *) __deprecated;
                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:196:40: note: expanded from macro '__deprecated'
#define __deprecated    __attribute__((__deprecated__))
                                       ^
src/fifo-sem.c:164:9: error: implicit declaration of function 'sem_timedwait' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (sem_timedwait(&fifo->full, &tm) != 0)
        ^
src/fifo-sem.c:164:9: note: did you mean 'sem_trywait'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:58:5: note: 'sem_trywait' declared here
int sem_trywait(sem_t *);
    ^
4 warnings and 1 error generated.
make[1]: *** [.objs/fifo-sem.o] Error 1
make: *** [boruvka] Error 2

Please help me if possible.

Feature request: set exit status when goal unreachable

If one is going to chain together the parser, grounder, engine, and then parser again, it would be very helpful to know when an intermediate stage has failed.

So it would be very helpful if the grounder was modified so that its exit status is non-zero when it proves that the goal is unreachable.

Otherwise, to handle the pipeline one must parse the output of the grounder.

If you would prefer not to do this in general, maybe you could add a command line argument like --error-on-fail that we could add when we want the exit status to be set.

Thanks!

New parsing error

pandaPIgrounder gives me an error as follows:

Reading input from /io/escape-p1.htn.
General Options
  Print timings: false
  Quiet mode: false
Inference Options
  H2 mutexes: false
  FAM groups: false
Transformation Options
  Add zero-cost no-op to empty methods: true
  Remove duplicate actions: true
  Remove useless literals: true
  Expand abstract tasks with one method: true
  Remove empty method preconditions: true
  Two regularisation: false
  Compile negative SAS variables: false
Runtime Optimisations
  Hierarchy Typing: true
  Future Caching: false
  Static Precondition Checking: false
Output Options
  Panda planner format: true
  HDDL: false
  SAS for Fast Downward (without hierarchy): false
Output Formatting Options
  Output only SAS+ variables: false
  SAS+ delete mode: as input
Input parse error: basic_ios::clear: iostream error
The error is at: __method_precondition_move-to-no-obstacle 7 7
Writing output to /io/output.sas.
Writing output to standard output.
Failed to read input data!

(the funny file names are because the grounder is running in a container)

the input item corresponding to this complaint seems to be:

#begin_task_name_number_of_original_variables_and_number_of_variables
__method_precondition_move-to-no-obstacle 7 7
#sorts_of_variables
2 5 5 5 5 1 6
#end_variables
#number_of_cost_statements
1
#begin_cost_statements
const 0
#end_cost_statements
#preconditions_each_predicate_and_argument_variables
4
5 0 1 2
27 1 2 3 4 5
2 5 3 4
3 0 6
#add_each_predicate_and_argument_variables
0
#conditional_add_each_with_conditions_and_effect
0
#del_each_predicate_and_argument_variables
0
#conditional_del_each_with_conditions_and_effect
0
#variable_constraints_first_number_then_individual_constraints
0
#end_of_task

Full input file is in this gist

problem in : make boruvka opts bliss lpsolve

C:\pandaPIgrounder\cpddl>make boruvka opts bliss lpsolve
-f was unexpected at this time.
-f was unexpected at this time.
-f was unexpected at this time.
-f was unexpected at this time.
make CC="cc" DEBUG=no -C third-party/boruvka all
process_begin: CreateProcess(NULL, uname, ...) failed.
-f was unexpected at this time.
-f was unexpected at this time.
--exists was unexpected at this time.
-f was unexpected at this time.
-f was unexpected at this time.
-f was unexpected at this time.
--exists was unexpected at this time.
make[1]: Entering directory C:/pandaPIgrounder/cpddl/third-party/boruvka' echo 'int main(int argc, char *arvg[]) { int x = 1; return *(char *)&x; }' >__end.c 'int main(int argc, char *arvg[]) { int x = 1; return *(char *) 'x' is not recognized as an internal or external command, operable program or batch file. make[1]: *** [boruvka/config_endian.h] Error 1 make[1]: Leaving directory C:/pandaPIgrounder/cpddl/third-party/boruvka'
make: *** [boruvka] Error 2

make fatal error

Hi,

when trying to compile pandaPIgrounder it fails when running the make command.

See error message:

jvdheuvel@jvdheuvel-Lenovo:~/Documents/planning/hddl planners/panda/pandaPIgrounder/cpddl$ make
/bin/sh: 1: test: /home/jvdheuvel/Documents/planning/: unexpected operator
/bin/sh: 1: test: /home/jvdheuvel/Documents/planning/: unexpected operator
/bin/sh: 1: test: /home/jvdheuvel/Documents/planning/: unexpected operator
/bin/sh: 1: test: /home/jvdheuvel/Documents/planning/: unexpected operator
cc -O3 -Wall -pedantic --std=gnu99 -Wno-missing-braces -I.   -c -o .objs/lisp.o src/lisp.c
src/lisp.c:27:10: fatal error: boruvka/alloc.h: No such file or directory
   27 | #include <boruvka/alloc.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:70: .objs/lisp.o] Error 1

I did run all the previous steps, and also tried using build.sh

pandaPIgrounder fails on output from pandaPIparser

Here is the output from a run of the pandaPIgrounder:

# /pandaPIgrounder/pandaPIgrounder debug.panda
General Options
  Print timings: false
  Quiet mode: false
Inference Options
  H2 mutexes: false
  FAM groups: false
Transformation Options
  Add zero-cost no-op to empty methods: true
  Remove duplicate actions: true
  Remove useless literals: true
  Expand abstract tasks with one method: true
  Remove empty method preconditions: true
  Two regularisation: false
  Compile negative SAS variables: false
Runtime Optimisations
  Hierarchy Typing: true
  Future Caching: false
  Static Precondition Checking: false
Output Options
  Panda planner format: true
  HDDL: false
  SAS for Fast Downward (without hierarchy): false
Output Formatting Options
  Output only SAS+ variables: false
  SAS+ delete mode: as input
Reading input from debug.panda.
Input parse error: basic_ios::clear: iostream error
Reached EOF while reading input.
Writing output to standard output.
Writing output to standard output.
Failed to read input data!

I'm not sure how to diagnose the parse error from the file debug.panda. It's a file that was generated by parsing HDDL that I machine generated from an implementation of the plan-repair by rewriting algorithm of Höller, et al.

The debug.panda file is posted in this github gist: https://gist.github.com/rpgoldman/a68d2bdc2cdd0b9371d2c65d39579c76

Thank you for any assistance!

Dockerfile

I wasn't having any luck getting the grounder to build on my M1 Mac, so I gave up and made a docker image. In the hopes this is helpful to you, I will attach it here.

Build error for Boruvka on Mac -- endian.h

Trying to build pandaPIgrounder on the Mac, I am unable to because of this error building boruvka:

CC=/opt/homebrew/opt/gcc/bin/gcc-13 make

Here's the specific error:

/opt/homebrew/opt/gcc/bin/gcc-13 -O3 -Wall -pedantic -std=gnu99 -ffast-math -I. -c -o .objs/msg-schema.o src/msg-schema.c
src/msg-schema.c:17:10: fatal error: endian.h: No such file or directory
   17 | #include <endian.h>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [.objs/msg-schema.o] Error 1

Note that I had to do this with Homebrew's gcc because the C compiler Apple ships can't handle implicitly defined functions, as discussed in issue #2

I know I should be posting this to Boruvka, but gitlab.com is down, and I wanted to write this up here while waiting for it to come back up.

New Mac build error: bliss fails to build

I have filed an issue upstream but it's disturbing that the version of bliss in cpddl is quite old compared to upstream.

For now, I have been running the grounder inside a docker container, but this is unsatisfactory, because it is prone to losing error messages, etc. when I run it inside a shell script. So any suggestions would be very welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.