Member | Task |
---|---|
Wenfeng Feng | SAT2006, HSP |
Enle Liu | LAMA |
Ruipeng Li | HTN(C++ version) |
Xin Luo | JSHOP2 |
Erhu Rong | FF |
Yuncong Li | CSP |
Min Tang | TLplan |
Hao Fu | Randward |
Han Tian | SGPlan |
Easy to use and configure environment, assuming apt as package manager
Required by makefile
sudo apt-get install bison flex
Required by wrapping
sudo apt-get install swig
sudo apt install make gcc python-dev
Since errors are unavoidable, please add problems to the problems section below. Welcome to edit this document, add your thoughts on how we build and your vision on plantool (future section).
SWIG and Python the solution provided here is simple, but problems could occur when files grow bigger SWIG basis A general idea of swig
touch PLANNER.i
Here PLANER.i is an interface file for swig to parse. Write what you want to wrap in this file. An example for wrapping main() is given below
Adding functions for wrapping
At present, only main() wrapped
// PLANNER.i %module PLANNER %include <argcargv.i> %{ #include "PLANNER.h" // The header where functions are declared %} %apply (int ARGC, char **ARGV) { (int argc, char *argv[]) } int oldmain( int argc, char *argv[] ); // The function we want to wrap
// Somewhere in PLANNER.h
/**********************************************************/
/* SWIG Wrapping*/
int oldmain( int argc, char * argv[] );
// PLANNER.c (Generally where main is located)
int oldmain( int argc, char * argv[] ) {
// original main()
// ...
}
int main(int argc, char *argv[]) {
return oldmain(argc, argv);
}
First edit makefile(slightly complicated)
-fPIC
INC_PYTHON = -I/usr/include/python2.7
this directory may vary bewteen machines, so find yours and add -I/the/path/to/python2.x
_PLANNER.so: $(OBJECTS) $(PDDL_PARSER_OBJ) PLANNER_wrap.o
gcc -shared -o $@ $^
PLANNER_wrap.o: PLANNER_wrap.c
$(CC) -c $(INC_PYTHON) -fPIC $^
PLANNER.py PLANNER_wrap.c: PLANNER.i
swig -python PLANNER.i
This is rather easy part
import PLANNER
# Using planner functions
Note: this may be an easy one, you can try to call most of the functions defined in ff.h , if you want to call more functions in main.c , the easy one is by adding its declaration to ff.h, add function to ff.i(swig interface file), recompile with makefile just change replace string: PLANNER => ff
Note:(It is better to include a screenshot of bug reporting in directory called BUG_PIC in the same directory)
When the scanner receives an end-of-file indication from YY_INPUT, it then checks the yywrap() function. If yywrap() returns false (zero), then it is assumed that the function has gone ahead and set up yyin to point to another input file, and scanning continues. If it returns true (non-zero), then the scanner terminates, returning 0 to its caller. Note that in either case, the start condition remains unchanged; it does not revert to INITIAL. If you do not supply your own version of yywrap(), then you must either use %option noyywrap (in which case the scanner behaves as though yywrap() returned 1), or you must link with -lfl to obtain the default version of the routine, which always returns 1.
Add a -lfl flag while linking the dynamic library like this:
gcc -shared ... -o ... -lfl
# '...' means objects you need for this instruction
Please spill out your ideas
STAPLAN: http://www.cs.rochester.edu/users/faculty/kautz/satplan/index.htm
Blackbox: https://www.cs.rochester.edu/u/kautz/satplan/blackbox/
IPP: https://user.enterpriselab.ch/~takoehle/publications/ipp/ipp.html
HSP: http://planet.hud.ac.uk/repository/heuristic.html
FF: http://fai.cs.uni-saarland.de/hoffmann/ff.html
MIPS-XXL: http://sjabbar.com/mips-xxl-planner
MIPS-BDD: http://www.tzi.de/~edelkamp/mips/mips-bdd.html
AltAlt: http://rakaposhi.eas.asu.edu/altweb/altalt.html
SHOP: https://www.cs.umd.edu/projects/shop/
PYHOP: https://bitbucket.org/dananau/pyhop
TLPLAN: http://www.cs.toronto.edu/tlplan/ http://planiart.usherbrooke.ca/tlplan/
CPT: http://www.cril.univ-artois.fr/~vidal/cpt.html
LAMA: https://github.com/rock-planning/planning-lama
SGPLAN: http://wah.cse.cuhk.edu.hk/wah/programs/SGPlan/
Graphplan: https://www.cs.cmu.edu/~avrim/graphplan.html
UCPOP: http://aiweb.cs.washington.edu/ai/ucpop.html
GP-CSP: http://rakaposhi.eas.asu.edu/gp-csp.html
NOLIN: http://www.aiai.ed.ac.uk/project/nonlin/