From 696610967dc7e62f1a069b48d384ce1332168c22 Mon Sep 17 00:00:00 2001 From: Jonny007-MKD <1-23-4-5@web.de> Date: Tue, 12 Nov 2013 20:56:28 +0100 Subject: [PATCH] Added new project: Hazard Die Klassen PrimImplikant und PrimImplikantCollection sind weitestgehend fertig. --- .gitignore | 76 +----- Hazard/Hazard.sln | 20 ++ Hazard/Hazard/CParser.cpp | 319 ++++++++++++++++++++++ Hazard/Hazard/Cparser.h | 56 ++++ Hazard/Hazard/Hazard.cpp | 73 +++++ Hazard/Hazard/Hazard.vcxproj | 101 +++++++ Hazard/Hazard/Hazard.vcxproj.filters | 54 ++++ Hazard/Hazard/PrimImplikant.cpp | 43 +++ Hazard/Hazard/PrimImplikant.h | 35 +++ Hazard/Hazard/PrimImplikantCollection.cpp | 44 +++ Hazard/Hazard/PrimImplikantCollection.h | 25 ++ Hazard/Hazard/ReadMe.txt | 32 +++ Hazard/Hazard/error.txt | 0 Hazard/Hazard/input.txt | 6 + Hazard/Hazard/list.txt | 0 Hazard/Hazard/stdafx.cpp | 8 + Hazard/Hazard/stdafx.h | 15 + Hazard/Hazard/targetver.h | 8 + Hazard/input.txt | 6 + Hazard/res/input.txt | 6 + Roadmap.txt | 5 + 21 files changed, 862 insertions(+), 70 deletions(-) create mode 100644 Hazard/Hazard.sln create mode 100644 Hazard/Hazard/CParser.cpp create mode 100644 Hazard/Hazard/Cparser.h create mode 100644 Hazard/Hazard/Hazard.cpp create mode 100644 Hazard/Hazard/Hazard.vcxproj create mode 100644 Hazard/Hazard/Hazard.vcxproj.filters create mode 100644 Hazard/Hazard/PrimImplikant.cpp create mode 100644 Hazard/Hazard/PrimImplikant.h create mode 100644 Hazard/Hazard/PrimImplikantCollection.cpp create mode 100644 Hazard/Hazard/PrimImplikantCollection.h create mode 100644 Hazard/Hazard/ReadMe.txt create mode 100644 Hazard/Hazard/error.txt create mode 100644 Hazard/Hazard/input.txt create mode 100644 Hazard/Hazard/list.txt create mode 100644 Hazard/Hazard/stdafx.cpp create mode 100644 Hazard/Hazard/stdafx.h create mode 100644 Hazard/Hazard/targetver.h create mode 100644 Hazard/input.txt create mode 100644 Hazard/res/input.txt create mode 100644 Roadmap.txt diff --git a/.gitignore b/.gitignore index b9d6bd9..0881b8d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,38 +1,3 @@ -################# -## Eclipse -################# - -*.pydevproject -.project -.metadata -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.classpath -.settings/ -.loadpath - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# CDT-specific -.cproject - -# PDT-specific -.buildpath - - -################# -## Visual Studio -################# - ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. @@ -50,6 +15,9 @@ build/ [Bb]in/ [Oo]bj/ +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +!packages/*/build/ + # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* @@ -165,9 +133,9 @@ UpgradeLog*.htm App_Data/*.mdf App_Data/*.ldf -############# -## Windows detritus -############# +# ========================= +# Windows detritus +# ========================= # Windows image file caches Thumbs.db @@ -181,35 +149,3 @@ $RECYCLE.BIN/ # Mac crap .DS_Store - - -############# -## Python -############# - -*.py[co] - -# Packages -*.egg -*.egg-info -dist/ -build/ -eggs/ -parts/ -var/ -sdist/ -develop-eggs/ -.installed.cfg - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -.tox - -#Translations -*.mo - -#Mr Developer -.mr.developer.cfg diff --git a/Hazard/Hazard.sln b/Hazard/Hazard.sln new file mode 100644 index 0000000..007075f --- /dev/null +++ b/Hazard/Hazard.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hazard", "Hazard\Hazard.vcxproj", "{504179E7-6D11-4B2C-9172-3293E8739C3F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {504179E7-6D11-4B2C-9172-3293E8739C3F}.Debug|Win32.ActiveCfg = Debug|Win32 + {504179E7-6D11-4B2C-9172-3293E8739C3F}.Debug|Win32.Build.0 = Debug|Win32 + {504179E7-6D11-4B2C-9172-3293E8739C3F}.Release|Win32.ActiveCfg = Release|Win32 + {504179E7-6D11-4B2C-9172-3293E8739C3F}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Hazard/Hazard/CParser.cpp b/Hazard/Hazard/CParser.cpp new file mode 100644 index 0000000..b876f2f --- /dev/null +++ b/Hazard/Hazard/CParser.cpp @@ -0,0 +1,319 @@ +#include "stdafx.h" +#pragma warning(disable:4786) +#include +#include +#include "CParser.h" +using namespace std; + +#define Getc(s) getc(s) +#define Ungetc(c) {ungetc(c,IP_Input); ugetflag=1;} + + + +// Adds a character to the string value +void CParser::PushString(char c) +{ + yylval.s += c; +} +//------------------------------------------------------------------------ +void CParser::Load_tokenentry(string str,int index) +{ + IP_Token_table[str]=index; + IP_revToken_table[index]=str; +} +void CParser::IP_init_token_table() +{ + Load_tokenentry("STRING1",STRING1); + Load_tokenentry("IDENTIFIER",IDENTIFIER); + Load_tokenentry("INTEGER1",INTEGER1); + + Load_tokenentry("Variables",VARIABLES); + Load_tokenentry("Terms",TERMS); +} +//------------------------------------------------------------------------ + +void CParser::pr_tokentable() +{ + + typedef map::const_iterator CI; + const char* buf; + + printf( "Symbol Table ---------------------------------------------\n"); + + for(CI p=IP_Token_table.begin(); p!=IP_Token_table.end(); ++p){ + buf = p->first.c_str(); + printf(" key:%s", buf); + printf(" val:%d\n", p->second);; + } +} +//------------------------------------------------------------------------ + +int CParser::yyparse() +{ + int tok; + if(prflag)fprintf(IP_List,"%5d ",(int)IP_LineNumber); + /* + * Go parse things! + */ + parsestate pState = P_START; + while ((tok=yylex())!=0){ + switch (pState) + { + case P_START: + switch (tok) + { + case VARIABLES: + pState = P_VARIABLES; + break; + case TERMS: + pState = P_TERMS_KEY; + break; + } + break; + case P_VARIABLES: + switch(tok) + { + case IDENTIFIER: + printf("Variable %s",yylval.s.c_str()); + break; + case TERMS: + pState = P_TERMS_KEY; + break; + } + break; + case P_TERMS_KEY: + switch(tok) + { + case STRING1: + printf("Term Key %s",yylval.s.c_str()); + break; + case INTEGER1: + printf("Term Key %d",yylval.i); + break; + case (int)'>': + pState = P_TERMS_VALUE; + break; + case VARIABLES: + pState = P_VARIABLES; + break; + } + break; + case P_TERMS_VALUE: + if (tok == INTEGER1) + { + printf("Term Value %d",yylval.i); + pState = P_TERMS_KEY; + } + break; + } + printf("\n"); + } + return 0; + +} +//------------------------------------------------------------------------ + +/* + * Parse Initfile: + * + * This builds the context tree and then calls the real parser. + * It is passed two file streams, the first is where the input comes + * from; the second is where error messages get printed. + */ +void CParser::InitParse(FILE *inp,FILE *err,FILE *lst) + +{ + + /* + * Set up the file state to something useful. + */ + IP_Input = inp; + IP_Error = err; + IP_List = lst; + + IP_LineNumber = 1; + ugetflag=0; + /* + * Define both the enabled token and keyword strings. + */ + IP_init_token_table(); +} +//------------------------------------------------------------------------ + +/* + * yyerror: + * + * Standard error reporter, it prints out the passed string + * preceeded by the current filename and line number. + */ +void CParser::yyerror(char *ers) + +{ + fprintf(IP_Error,"line %d: %s\n",IP_LineNumber,ers); +} +//------------------------------------------------------------------------ + +int CParser::IP_MatchToken(string &tok) +{ + int retval; + if( IP_Token_table.find(tok) != IP_Token_table.end()){ + retval = (IP_Token_table[tok]); + }else{ + retval = (0); + } + return retval; +} + +//------------------------------------------------------------------------ + +/* + * yylex: + * + */ +int CParser::yylex() +{ + //Locals + int c; + lexstate s; + /* + * Keep on sucking up characters until we find something which + * explicitly forces us out of this function. + */ + yytext = ""; + yylval.s = ""; + yylval.i = 0; + for (s = L_START; 1;){ + c = Getc(IP_Input); + yytext = yytext + (char)c; + if(!ugetflag) { + if(c != EOF)if(prflag)fprintf(IP_List,"%c",c); + }else ugetflag = 0; + switch (s){ + //Starting state, look for something resembling a token. + case L_START: + yytext = (char)c; + if (isdigit(c)){ + s = L_INT; + }else if (isalpha(c) || c == '\\' ){ + s = L_IDENT; + }else if (isspace(c)){ + if (c == '\n'){ + IP_LineNumber += 1; + if(prflag) + fprintf(IP_List,"%5d ",(int)IP_LineNumber); + s = L_START; + yytext = ""; + } + }else if (c == '/'){ + yytext = ""; + s = L_COMMENT; + }else if (c == '"'){ + s = L_STRING; + }else if (c == EOF){ + return ('\0'); + }else{ + s = L_START; + yytext = ""; + return (c); + } + break; + + case L_COMMENT: + if (c == '/') + s = L_LINE_COMMENT; + else if(c == '*') + s = L_TEXT_COMMENT; + else{ + Ungetc(c); + return('/'); /* its the division operator not a comment */ + } + break; + case L_LINE_COMMENT: + if ( c == '\n'){ + s = L_START; + Ungetc(c); + } + yytext = ""; + break; + case L_TEXT_COMMENT: + if ( c == '\n'){ + IP_LineNumber += 1; + }else if (c == '*') + s = L_END_TEXT_COMMENT; + yytext = ""; + break; + case L_END_TEXT_COMMENT: + if (c == '/'){ + s = L_START; + }else{ + s = L_TEXT_COMMENT; + } + yytext = ""; + break; + + /* + * Suck up the integer digits. + */ + case L_INT: + if (isdigit(c)){ + break; + }else { + Ungetc(c); + yylval.s = yytext.substr(0,yytext.size()-1); + yylval.i = atoi(yylval.s.c_str()); + return (INTEGER1); + } + break; + + /* + * Grab an identifier, see if the current context enables + * it with a specific token value. + */ + + case L_IDENT: + if (isalpha(c) || isdigit(c) || c == '_') + break; + Ungetc(c); + yytext = yytext.substr(0,yytext.size()-1); + yylval.s = yytext; + if (c = IP_MatchToken(yytext)){ + return (c); + }else{ + return (IDENTIFIER); + } + + /* + * Suck up string characters but once resolved they should + * be deposited in the string bucket because they can be + * arbitrarily long. + */ + case L_STRING2: + s = L_STRING; + if(c == '"'){ + PushString((char)c); + }else{ + if(c == '\\'){ + PushString((char)c); + }else{ + PushString((char)'\\'); + PushString((char)c); + } + } + break; + case L_STRING: + if (c == '\n') + IP_LineNumber += 1; + else if (c == '\r') + ; + else if (c == '"' || c == EOF){ + return (STRING1); + } else if(c=='\\'){ + s = L_STRING2; + //PushString((char)c); + }else + PushString((char)c); + break; + default: printf("***Fatal Error*** Wrong case label in yylex\n"); + } + } +} \ No newline at end of file diff --git a/Hazard/Hazard/Cparser.h b/Hazard/Hazard/Cparser.h new file mode 100644 index 0000000..7c6e806 --- /dev/null +++ b/Hazard/Hazard/Cparser.h @@ -0,0 +1,56 @@ +// k7scan1.cpp : Definiert den Einsprungpunkt für die Konsolenanwendung. +// + +#include "stdafx.h" +#pragma warning(disable:4786) +#include +#include +using namespace std; + +#define Getc(s) getc(s) +#define Ungetc(c) {ungetc(c,IP_Input); ugetflag=1;} + + +/* + * Lexical analyzer states. + */ +enum lexstate{L_START,L_INT,L_IDENT,L_STRING,L_STRING2, + L_COMMENT,L_TEXT_COMMENT,L_LINE_COMMENT,L_END_TEXT_COMMENT}; +enum parsestate{P_START,P_VARIABLES,P_TERMS_KEY,P_TERMS_VALUE}; + +const int STRING1=3; +const int IDENTIFIER=4; +const int INTEGER1=5; +const int VARIABLES=300; +const int TERMS=301; + +class CParser +{ +public: + + string yytext; //input buffer + struct tyylval{ //value return + string s; //structure + int i; + }yylval; + FILE *IP_Input; //Input File + FILE *IP_Error; //Error Output + FILE *IP_List; //List Output + int IP_LineNumber; //Line counter + int ugetflag; //checks ungets + int prflag; //controls printing + map IP_Token_table; //Tokendefinitions + map IP_revToken_table; //reverse Tokendefinitions + + + int CParser::yylex(); //lexial analyser + void CParser::yyerror(char *ers); //error reporter + int CParser::IP_MatchToken(string &tok); //checks the token + void CParser::InitParse(FILE *inp,FILE *err,FILE *lst); + int CParser::yyparse(); //parser + void CParser::pr_tokentable(); //test output for tokens + void CParser::IP_init_token_table(); //loads the tokens + void CParser::Load_tokenentry(string str,int index);//load one token + void CParser::PushString(char c); //Used for dtring assembly + CParser(){IP_LineNumber = 1;ugetflag=0;prflag=0;}; //Constructor +}; \ No newline at end of file diff --git a/Hazard/Hazard/Hazard.cpp b/Hazard/Hazard/Hazard.cpp new file mode 100644 index 0000000..49de994 --- /dev/null +++ b/Hazard/Hazard/Hazard.cpp @@ -0,0 +1,73 @@ +// Hazard.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung. +// + +#include "stdafx.h" +#include +#include +#include +#include "CParser.h" +#include "PrimImplikant.h" +#include "PrimImplikantCollection.h" + +int _tmain(int argc, _TCHAR* argv[]) +{ + FILE * input; + FILE * error; + FILE * list; + fopen_s(&input, "input.txt", "r"); + if (input == 0) + { + cout << "Fehler Inputdatei"; + system("pause"); + return -1; + } + fopen_s(&error, "error.txt", "w"); + if (error == 0) + { + cout << "Fehler Fehlerdatei"; + system("pause"); + return -1; + } + fopen_s(&list, "list.txt", "w"); + if (list == 0) + { + cout << "Fehler Listdatei"; + system("pause"); + return -1; + } + + CParser parser; + parser.IP_init_token_table(); + parser.pr_tokentable(); + parser.InitParse(input, error, list); + parser.yyparse(); + system("pause"); + + PrimImplikantCollection pic; + pic.add(7); + pic.add("0x1"); + pic.add("100"); + pic.add("00x"); + pic.add(4); + + PrimImplikant prim7(7); + PrimImplikant prim13("0x1"); + PrimImplikant prim4("100"); + PrimImplikant prim4567("1xx"); + pic.add(prim4567); + + for (int p = 0; p < 8; p++) + { + //printf("Pos %d: prim7=%d, prim13=%d, prim4=%d, prim4567=%d, pic=%d\n", p, prim7.valueAt(p), prim13.valueAt(p), prim4.valueAt(p), prim4567.valueAt(p), pic.valueAt(p)); + printf("Pos %d: Matching collections: ", p); + vector matchingPIs = pic.primImplikantenAt(p); + for (vector::iterator i = matchingPIs.begin(); i < matchingPIs.end(); i++) + //cout << i->name < ", "; + printf("%s, ", i->name.c_str()); + cout << endl; + } + + + system("pause"); + return 0; +} \ No newline at end of file diff --git a/Hazard/Hazard/Hazard.vcxproj b/Hazard/Hazard/Hazard.vcxproj new file mode 100644 index 0000000..ab44f0a --- /dev/null +++ b/Hazard/Hazard/Hazard.vcxproj @@ -0,0 +1,101 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {504179E7-6D11-4B2C-9172-3293E8739C3F} + Win32Proj + Hazard + + + + Application + true + v100 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Hazard/Hazard/Hazard.vcxproj.filters b/Hazard/Hazard/Hazard.vcxproj.filters new file mode 100644 index 0000000..19d8c5e --- /dev/null +++ b/Hazard/Hazard/Hazard.vcxproj.filters @@ -0,0 +1,54 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Headerdateien + + + Headerdateien + + + Headerdateien + + + Headerdateien + + + Headerdateien + + + + + Quelldateien + + + Quelldateien + + + Quelldateien + + + Quelldateien + + + Quelldateien + + + \ No newline at end of file diff --git a/Hazard/Hazard/PrimImplikant.cpp b/Hazard/Hazard/PrimImplikant.cpp new file mode 100644 index 0000000..aab6d48 --- /dev/null +++ b/Hazard/Hazard/PrimImplikant.cpp @@ -0,0 +1,43 @@ +#include +#include +#include "stdafx.h" +#include "PrimImplikant.h" + +using namespace std; + +bool PrimImplikant::valueAt(int pos) { + for (vector::iterator i = implikanten.begin(); i < implikanten.end(); ++i) + { + if (*i == pos) + return true; + } + return false; +} + +void PrimImplikant::parser(string input) { // Analyser + int implikant = 0; + string text0 = ""; + string text1 = ""; + for (int i = 0; i < input.size(); i++) + { + char c = input[i]; + if (c == 'x' || c == 'X') + { + text0 = input; + text1 = input; + text0[i] = '0'; + text1[i] = '1'; + parser(text0); + parser(text1); + return; + } + if (c != '0' && c != '1') + { + printf("**** FATAL ERROR **** %s is not binary\n", input); + return; + } + implikant <<= 1; // *2 + implikant += (int)c - (int)'0'; + } + implikanten.push_back(implikant); +} \ No newline at end of file diff --git a/Hazard/Hazard/PrimImplikant.h b/Hazard/Hazard/PrimImplikant.h new file mode 100644 index 0000000..61a8ac7 --- /dev/null +++ b/Hazard/Hazard/PrimImplikant.h @@ -0,0 +1,35 @@ +#ifndef PRIMIMPLIKANT +#define PRIMIMPLIKANT + +#include +#include + +using namespace std; + +class PrimImplikant +{ +public: + string name; + + PrimImplikant(string input) + { + name = input; + parser(input); + } + PrimImplikant(int input) + { + char nameC[sizeof(int)*8+1]; + _itoa_s(input, nameC, sizeof(int)*8+1, 10); + name = nameC; + + implikanten.push_back(input); + } + + bool PrimImplikant::valueAt(int position); + void PrimImplikant::parser(string input); + + +private: + vector implikanten; +}; +#endif \ No newline at end of file diff --git a/Hazard/Hazard/PrimImplikantCollection.cpp b/Hazard/Hazard/PrimImplikantCollection.cpp new file mode 100644 index 0000000..53329b2 --- /dev/null +++ b/Hazard/Hazard/PrimImplikantCollection.cpp @@ -0,0 +1,44 @@ +#include "stdafx.h" +#include +#include +#include "PrimImplikantCollection.h" + +using namespace std; + +void PrimImplikantCollection::add(PrimImplikant &PI) +{ + PIVector.push_back(PI); +} +void PrimImplikantCollection::add(string input) +{ + PrimImplikant PI(input); + PIVector.push_back(PI); +} +void PrimImplikantCollection::add(int input) +{ + PrimImplikant PI(input); + PIVector.push_back(PI); +} + +bool PrimImplikantCollection::valueAt(int position) +{ + for (vector::iterator i = PIVector.begin(); i < PIVector.end(); i++) + if (i->valueAt(position)) + return true; + return false; +} + +vector PrimImplikantCollection::primImplikantenAt(int position) +{ + vector pic; + for (vector::iterator i = PIVector.begin(); i < PIVector.end(); i++) + if (i->valueAt(position)) + pic.push_back(*i); + return pic; +} + +PrimImplikant PrimImplikantCollection::solveNextHazard() +{ + PrimImplikant PI(0); + return PI; +} \ No newline at end of file diff --git a/Hazard/Hazard/PrimImplikantCollection.h b/Hazard/Hazard/PrimImplikantCollection.h new file mode 100644 index 0000000..5131888 --- /dev/null +++ b/Hazard/Hazard/PrimImplikantCollection.h @@ -0,0 +1,25 @@ +#ifndef PRIMIMPLIKANTCOLLEC +#define PRIMIMPLIKANTCOLLEC + +#include +#include +#include "PrimImplikant.h" + +using namespace std; + +class PrimImplikantCollection{ +public: + void add(PrimImplikant &PI); + void add(string input); + void add(int input); + + bool valueAt(int position); + vector primImplikantenAt(int position); + + PrimImplikant solveNextHazard(); + +private: + vector PIVector; +}; + +#endif \ No newline at end of file diff --git a/Hazard/Hazard/ReadMe.txt b/Hazard/Hazard/ReadMe.txt new file mode 100644 index 0000000..9303d00 --- /dev/null +++ b/Hazard/Hazard/ReadMe.txt @@ -0,0 +1,32 @@ +======================================================================== + KONSOLENANWENDUNG: Hazard-Projektübersicht +======================================================================== + +Diese Hazard-Anwendung wurde vom Anwendungs-Assistenten für Sie erstellt. + +Diese Datei bietet eine Ãœbersicht über den Inhalt der einzelnen Dateien, aus +denen Ihre Hazard-Anwendung besteht. + + +Hazard.vcxproj + Dies ist die Hauptprojektdatei für VC++-Projekte, die mit dem Anwendungs-Assistenten generiert werden. Sie enthält Informationen über die Version von Visual C++, mit der die Datei generiert wurde, sowie über die Plattformen, Konfigurationen und Projektfunktionen, die im Anwendungs-Assistenten ausgewählt wurden. + +Hazard.vcxproj.filters + Dies ist die Filterdatei für VC++-Projekte, die mithilfe eines Anwendungs-Assistenten erstellt werden. Sie enthält Informationen über die Zuordnung zwischen den Dateien im Projekt und den Filtern. Diese Zuordnung wird in der IDE zur Darstellung der Gruppierung von Dateien mit ähnlichen Erweiterungen unter einem bestimmten Knoten verwendet (z. B. sind CPP-Dateien dem Filter "Quelldateien" zugeordnet). + +Hazard.cpp + Dies ist die Hauptquelldatei der Anwendung. + +///////////////////////////////////////////////////////////////////////////// +Andere Standarddateien: + +StdAfx.h, StdAfx.cpp + Mit diesen Dateien werden eine vorkompilierte Headerdatei (PCH) mit dem Namen Hazard.pch und eine vorkompilierte Typendatei mit dem Namen StdAfx.obj erstellt. + +///////////////////////////////////////////////////////////////////////////// +Weitere Hinweise: + +Der Anwendungs-Assistent weist Sie mit "TODO:"-Kommentaren auf Teile des +Quellcodes hin, die Sie ergänzen oder anpassen sollten. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Hazard/Hazard/error.txt b/Hazard/Hazard/error.txt new file mode 100644 index 0000000..e69de29 diff --git a/Hazard/Hazard/input.txt b/Hazard/Hazard/input.txt new file mode 100644 index 0000000..574db0a --- /dev/null +++ b/Hazard/Hazard/input.txt @@ -0,0 +1,6 @@ +Variables: a, b, c, d +Terms: +"0010">1 +7>1 +1234>1 +"0123">1 \ No newline at end of file diff --git a/Hazard/Hazard/list.txt b/Hazard/Hazard/list.txt new file mode 100644 index 0000000..e69de29 diff --git a/Hazard/Hazard/stdafx.cpp b/Hazard/Hazard/stdafx.cpp new file mode 100644 index 0000000..513c7bf --- /dev/null +++ b/Hazard/Hazard/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : Quelldatei, die nur die Standard-Includes einbindet. +// Hazard.pch ist der vorkompilierte Header. +// stdafx.obj enthält die vorkompilierten Typinformationen. + +#include "stdafx.h" + +// TODO: Auf zusätzliche Header verweisen, die in STDAFX.H +// und nicht in dieser Datei erforderlich sind. \ No newline at end of file diff --git a/Hazard/Hazard/stdafx.h b/Hazard/Hazard/stdafx.h new file mode 100644 index 0000000..5f7e996 --- /dev/null +++ b/Hazard/Hazard/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : Includedatei für Standardsystem-Includedateien +// oder häufig verwendete projektspezifische Includedateien, +// die nur in unregelmäßigen Abständen geändert werden. +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: Hier auf zusätzliche Header, die das Programm erfordert, verweisen. \ No newline at end of file diff --git a/Hazard/Hazard/targetver.h b/Hazard/Hazard/targetver.h new file mode 100644 index 0000000..a765413 --- /dev/null +++ b/Hazard/Hazard/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Durch Einbeziehen von"SDKDDKVer.h" wird die höchste verfügbare Windows-Plattform definiert. + +// Wenn Sie die Anwendung für eine frühere Windows-Plattform erstellen möchten, schließen Sie "WinSDKVer.h" ein, und +// legen Sie das _WIN32_WINNT-Makro auf die zu unterstützende Plattform fest, bevor Sie "SDKDDKVer.h" einschließen. + +#include diff --git a/Hazard/input.txt b/Hazard/input.txt new file mode 100644 index 0000000..574db0a --- /dev/null +++ b/Hazard/input.txt @@ -0,0 +1,6 @@ +Variables: a, b, c, d +Terms: +"0010">1 +7>1 +1234>1 +"0123">1 \ No newline at end of file diff --git a/Hazard/res/input.txt b/Hazard/res/input.txt new file mode 100644 index 0000000..574db0a --- /dev/null +++ b/Hazard/res/input.txt @@ -0,0 +1,6 @@ +Variables: a, b, c, d +Terms: +"0010">1 +7>1 +1234>1 +"0123">1 \ No newline at end of file diff --git a/Roadmap.txt b/Roadmap.txt new file mode 100644 index 0000000..d3b2e10 --- /dev/null +++ b/Roadmap.txt @@ -0,0 +1,5 @@ +Programmfunktionen klären: Wieviele Eingänge (variabel?), wieviele Zwischenvariablen +Klassendefinition +Ausgabe KV-Diagramm +Einlesen der Daten +Algorithmus implementieren \ No newline at end of file