Copyright (c) 2013 by Rosalba Giugno

GRAPES is provided under the terms of The MIT License (MIT):

Permission is hereby granted, free of charge, to any person 
obtaining a copy of this software and associated documentation 
files (the "Software"), to deal in the Software without restriction, 
including without limitation the rights to use, copy, modify, merge, 
publish, distribute, sublicense, and/or sell copies of the Software, 
and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:

The above copyright notice and this permission notice shall be 
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



BUILD SOFTWARE SOURCES
make -B



USAGE

Build the database index file named "db_file.index.grapes" into the same directory of "db_file"
./grapes NTHREADS -b -[gfu|gfd] db_file query_file [-lp lp]
	NTHREADS 	number of parallel threads

	-gfu 		for undirected graphs
	-gfd 		for directed graphs

	db_file		the textual graphs database file
	query_file 	the textual query's graph file
	-lp lp		optional, specifies the max depth of the indexing phase
			default value is 4
			NOTE: it must be the same of the one chossen for the build of the database index


Find matches between database graphs and query graph.
!!! The database index must be previously built by ./grapes -b ... !!!
./grapes NTHREADS -f -[gfu|gfd] db_file query_file -[no|console|file] [-lp lp]
	NTHREADS 	number of parallel threads

	-gfu 		for undirected graphs
	-gfd 		for directed graphs

	db_file		the textual graphs database file
			NOTE "db_file.index.grapes" must be in the same directory of "db_file"
	query_file 	the textual query's graph file

	-no		do not print found matches
	-console	print found matche on screen
	-file		print fund matches on file
			NOTE: each thread writes its found matches into the file "threadX.matches" of the current directory
			if "threadX.matches" already exists, it wiil be overwritten

	-lp lp		optional, specifies the max depth of the indexing phase
			default value is 4
			NOTE: it must be the same of the one chossen for the build of the database index


!!!NOTICE!!!
If the database index is built with a lp different from the default value, 
than each query must be called with specifying same lp

