Commit e325684b authored by SPARSA ROYCHOWDHURY's avatar SPARSA ROYCHOWDHURY

30/7/2017:

1. Changed to c++14
2. Changed default to tpda zone from tpdagcpp 
3. Bugs are there, have to debug
parent e006f43d
rm tree drawsystem main.o obj/*.o src/*.cpp~ include/*.h~
No preview for this file type
...@@ -84,7 +84,7 @@ int main(int argc, char *argv[]) { ...@@ -84,7 +84,7 @@ int main(int argc, char *argv[]) {
////**********//// ////**********////
setGlobal(argv[1]); // set all the global variables setGlobal(argv[1]); // set all the global variables
bool b; bool b,b1;
if(argc >= 3) { // If there is any arguments for special kind of TPDA if(argc >= 3) { // If there is any arguments for special kind of TPDA
...@@ -103,8 +103,16 @@ int main(int argc, char *argv[]) { ...@@ -103,8 +103,16 @@ int main(int argc, char *argv[]) {
} }
else // general TPDA with one or more clocks else // general TPDA with one or more clocks
b = isEmptyGCPP(); { //b = isEmptyGCPP();
b=isEmptyZone();
//b1=isEmptyGCPP();
}
// if(b==b1)
// cout <<"Correct!" << endl;
//else
// cout<< "Wrong!" << endl;
// the returned value b will be true iff the language is empty // the returned value b will be true iff the language is empty
if(b) if(b)
...@@ -134,6 +142,8 @@ int main(int argc, char *argv[]) { ...@@ -134,6 +142,8 @@ int main(int argc, char *argv[]) {
cout << "Execution time : " << (elapsed/1000) << " seconds." << endl << endl; cout << "Execution time : " << (elapsed/1000) << " seconds." << endl << endl;
//uncomment from here
/* /*
short **w; short **w;
bool **open; bool **open;
...@@ -167,6 +177,6 @@ int main(int argc, char *argv[]) { ...@@ -167,6 +177,6 @@ int main(int argc, char *argv[]) {
cout << endl; cout << endl;
} }
*/ */
//getchar();
return 0; return 0;
} }
CC := g++ CC := g++
CFLAG := -lm -std=c++11 CFLAG := -lm -std=c++14
SRC := ./src SRC := ./src
OBJ := ./obj OBJ := ./obj
INC := ./include INC := ./include
...@@ -39,3 +39,8 @@ $(OBJ)/timePushDown.o : $(SRC)/timePushDown.cpp ...@@ -39,3 +39,8 @@ $(OBJ)/timePushDown.o : $(SRC)/timePushDown.cpp
$(OBJ)/treeBitOperations.o : $(SRC)/treeBitOperations.cpp $(OBJ)/treeBitOperations.o : $(SRC)/treeBitOperations.cpp
g++ $(GDB) -I $(INC) -c $(SRC)/treeBitOperations.cpp -o $(OBJ)/treeBitOperations.o $(CFLAG) g++ $(GDB) -I $(INC) -c $(SRC)/treeBitOperations.cpp -o $(OBJ)/treeBitOperations.o $(CFLAG)
clean:
rm $(OBJ)/*.o tree drawsystem main.o
\ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<rebuildPropChanged>false</rebuildPropChanged> <rebuildPropChanged>false</rebuildPropChanged>
</toolsSet> </toolsSet>
<flagsDictionary> <flagsDictionary>
<element flagsID="0" commonFlags="-mtune=generic -march=x86-64 -std=c++11"/> <element flagsID="0" commonFlags="-std=c++11"/>
</flagsDictionary> </flagsDictionary>
<codeAssistance> <codeAssistance>
</codeAssistance> </codeAssistance>
...@@ -44,7 +44,12 @@ ...@@ -44,7 +44,12 @@
<buildCommandWorkingDir>.</buildCommandWorkingDir> <buildCommandWorkingDir>.</buildCommandWorkingDir>
<buildCommand>${MAKE} -f makefile</buildCommand> <buildCommand>${MAKE} -f makefile</buildCommand>
<cleanCommand>${MAKE} -f makefile clean</cleanCommand> <cleanCommand>${MAKE} -f makefile clean</cleanCommand>
<executablePath></executablePath> <executablePath>tree</executablePath>
<ccTool>
<incDir>
<pElem>include</pElem>
</incDir>
</ccTool>
</makeTool> </makeTool>
<preBuild> <preBuild>
<preBuildCommandWorkingDir>.</preBuildCommandWorkingDir> <preBuildCommandWorkingDir>.</preBuildCommandWorkingDir>
...@@ -54,18 +59,12 @@ ...@@ -54,18 +59,12 @@
<folder path="0/src"> <folder path="0/src">
<ccTool> <ccTool>
<incDir> <incDir>
<pElem>src</pElem>
<pElem>include</pElem>
<pElem>.</pElem> <pElem>.</pElem>
</incDir> </incDir>
</ccTool> </ccTool>
</folder> </folder>
<item path="main.cpp" ex="false" tool="1" flavor2="8"> <item path="main.cpp" ex="false" tool="1" flavor2="8">
<ccTool flags="0"> <ccTool flags="0">
<incDir>
<pElem>include</pElem>
<pElem>.</pElem>
</incDir>
</ccTool> </ccTool>
</item> </item>
<item path="src/continuoustpda.cpp" ex="false" tool="1" flavor2="8"> <item path="src/continuoustpda.cpp" ex="false" tool="1" flavor2="8">
......
# Automatic path mapper. CRC = 468718686 # Automatic path mapper. CRC = 1
/home/sparsa/NetBeansProjects=/home/sparsa/Programming
/home/sparsa/Programming/mtp/src/tpdaCGPP.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c ./src/tpdaCGPP.cpp -o ./obj/tpdaCGPP.o -lm -std=c++11
/home/sparsa/Programming/mtp/src/timePushDown.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c ./src/timePushDown.cpp -o ./obj/timePushDown.o -lm -std=c++11
/home/sparsa/Programming/mtp/src/tpda2.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c ./src/tpda2.cpp -o ./obj/tpda2.o -lm -std=c++11
/home/sparsa/Programming/mtp/src/drawsystem.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c ./src/drawsystem.cpp -o ./obj/drawsystem.o -lm -std=c++11
/home/sparsa/Programming/mtp/src/continuoustpda.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c ./src/continuoustpda.cpp -o ./obj/continuoustpda.o -lm -std=c++11
/home/sparsa/Programming/mtp/src/tpdaZone.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c ./src/tpdaZone.cpp -o ./obj/tpdaZone.o -lm -std=c++11
/home/sparsa/Programming/mtp/src/treeBitOperations.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c ./src/treeBitOperations.cpp -o ./obj/treeBitOperations.o -lm -std=c++11
/home/sparsa/Programming/mtp/src/pds.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c ./src/pds.cpp -o ./obj/pds.o -lm -std=c++11
/home/sparsa/Programming/mtp/main.cpp=/home/sparsa/Programming/mtp#-g -I ./include -c main.cpp -o main.o -lm -std=c++11
...@@ -54,6 +54,8 @@ ...@@ -54,6 +54,8 @@
<gdb_interceptlist> <gdb_interceptlist>
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
</gdb_interceptlist> </gdb_interceptlist>
<gdb_signals>
</gdb_signals>
<gdb_options> <gdb_options>
<DebugOptions> <DebugOptions>
</DebugOptions> </DebugOptions>
...@@ -66,8 +68,11 @@ ...@@ -66,8 +68,11 @@
<runprofile version="9"> <runprofile version="9">
<runcommandpicklist> <runcommandpicklist>
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
<runcommandpicklistitem>"${OUTPUT_PATH}" </runcommandpicklistitem>
<runcommandpicklistitem>"${OUTPUT_PATH}" /home/sparsa/Programming/mtp/input/</runcommandpicklistitem>
<runcommandpicklistitem>"${OUTPUT_PATH}" /home/sparsa/Programming/mtp/input/tp38</runcommandpicklistitem>
</runcommandpicklist> </runcommandpicklist>
<runcommand>"${OUTPUT_PATH}"</runcommand> <runcommand>"${OUTPUT_PATH}" /home/sparsa/Programming/mtp/input/tp38</runcommand>
<rundir>.</rundir> <rundir>.</rundir>
<buildfirst>false</buildfirst> <buildfirst>false</buildfirst>
<terminal-type>0</terminal-type> <terminal-type>0</terminal-type>
......
#!/bin/bash
FILES=/home/sparsa/Programming/mtp/input/*
for f in $FILES
do
echo "Processing $f File.. "
./tree $f
done
...@@ -897,14 +897,14 @@ bool isEmptyGCPP() { ...@@ -897,14 +897,14 @@ bool isEmptyGCPP() {
// iterate through all the generated states and process them to generate new state // iterate through all the generated states and process them to generate new state
for(count = 0; count < N; count++) { for(count = 0; count < N; count++) {
/*
if( count %5000 == 0 ) // Below of this string, #states will be shown if( count %5000 == 0 ) // Below of this string, #states will be shown
cout << "#States" << endl; cout << "#States" << endl;
if( (count % 100) == 0 || count <= 200) // print state number currently being processed(note : all numbers will not be printed) if( (count % 100) == 0 || count <= 200) // print state number currently being processed(note : all numbers will not be printed)
cout << count << endl; cout << count << endl;
*/
rs = allStates[count].first; // get the state at index count, process this state now rs = allStates[count].first; // get the state at index count, process this state now
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment