• R/O
  • SSH
  • HTTPS

toy-open-ps: Commit


Commit MetaInfo

Revision23 (tree)
Time2011-05-16 20:36:43
Author(del#42492)

Log Message

リリースの準備をした。

Change Summary

Incremental Difference

--- trunk/sample/sample1.bat (nonexistent)
+++ trunk/sample/sample1.bat (revision 23)
@@ -0,0 +1,11 @@
1+@SETLOCAL
2+
3+@ECHO OFF
4+
5+SET PATH=%PATH%;..\bin
6+
7+tops sample1.ops
8+
9+PAUSE
10+
11+@ENDLOCAL
--- trunk/external/Archiver/copy-all.bat (nonexistent)
+++ trunk/external/Archiver/copy-all.bat (revision 23)
@@ -0,0 +1,30 @@
1+@REM 最初の著者:: トゥイー
2+@REM リポジトリ情報:: $Id: copy-all.bat 40 2011-05-12 11:10:31Z yutaka_at_home $
3+@REM 著作権:: Copyright (C) Ownway.info, 2011. All rights reserved.
4+@REM ライセンス:: CPL(Common Public Licence)
5+
6+@SETLOCAL
7+
8+@ECHO OFF
9+
10+SET OUT_DIR=Output
11+SET OUT_BIN_DIR=%OUT_DIR%\bin
12+SET OUT_INCLUDE_DIR=%OUT_DIR%\include
13+SET OUT_LIB_DIR=%OUT_DIR%\lib
14+SET OUT_SAMPLE_DIR=%OUT_DIR%\samples
15+
16+rmdir /S /Q %OUT_DIR%
17+mkdir %OUT_BIN_DIR%
18+mkdir %OUT_INCLUDE_DIR%
19+mkdir %OUT_LIB_DIR%
20+mkdir %OUT_SAMPLE_DIR%
21+
22+copy readme.txt %OUT_DIR%\
23+
24+copy ..\..\main\app\tops\Release\tops.exe %OUT_BIN_DIR%\
25+xcopy /E ..\..\main\core\include %OUT_INCLUDE_DIR%
26+copy ..\..\main\core\Debug\tops-coreD.lib %OUT_LIB_DIR%\
27+copy ..\..\main\core\Release\tops-core.lib %OUT_LIB_DIR%\
28+xcopy /E ..\..\sample %OUT_SAMPLE_DIR%
29+
30+@ENDLOCAL
--- trunk/external/Archiver/readme.txt (nonexistent)
+++ trunk/external/Archiver/readme.txt (revision 23)
@@ -0,0 +1,16 @@
1+===========================
2+Toy Open Production System
3+===========================
4+
5+最初の著者:: トゥイー
6+リポジトリ情報:: $Id$
7+著作権:: Copyright (C) Ownway.info, 2011. All rights reserved.
8+ライセンス:: CPL(Common Public Licence)
9+
10+前向き推論システムの実装です。
11+
12+詳細は以下を参照してください。
13+
14+http://sourceforge.jp/projects/toy-open-ps/wiki/FrontPage
15+
16+以上。
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
--- trunk/main/system_small/main.cpp (revision 22)
+++ trunk/main/system_small/main.cpp (nonexistent)
@@ -1,71 +0,0 @@
1-/**
2- * 最初の著者:: トゥイー
3- * リポジトリ情報:: $Id$
4- * 著作権:: Copyright (C) Ownway.info, 2011. All rights reserved.
5- * ライセンス:: CPL(Common Public Licence)
6- */
7-
8-#include <tops/PSListener.hpp>
9-#include <tops/listener/PrintPSListener.hpp>
10-#include <tops/parser/PSInterpreter.hpp>
11-#include <tops/system/small/SmallProductionSystem.hpp>
12-using namespace tops;
13-
14-#include <time.h>
15-
16-#include <fstream>
17-#include <iostream>
18-using namespace std;
19-
20-/**
21- * 使い方を出力します。
22- */
23-void usage(const char* const app) {
24- cerr << "Toy Open Production System [small model]" << endl;
25- cerr << "-----" << endl;
26- cerr << app << " filename1 [filename2 ...]" << endl;
27-}
28-
29-/**
30- * アプリケーションのエントリーポイントです。
31- */
32-int main(int argc, char** args) {
33- if (argc < 2) {
34- usage(args[0]);
35- return 1;
36- }
37-
38- SmallProductionSystem productionSystem;
39- PSListenerPtr listener(new PrintPSListener());
40- productionSystem.addListener(listener);
41-
42- time_t startTime = time(NULL);
43-
44- PSInterpreter interpreter(productionSystem);
45- for (int i = 1; i < argc; ++i) {
46- ifstream file(args[i]);
47- if (!file) {
48- cerr << "File not found." << endl;
49- return 1;
50- }
51- interpreter.interpret(file);
52- file.close();
53- }
54-
55- cout << "Rule Base - (size " << productionSystem.getRuleBase().size() << ")" << endl;
56- cout << productionSystem.getRuleBase() << endl;
57-
58- cout << "Working Memory [BEFORE] - (size " << productionSystem.getWorkingMemory().size() << ")" << endl;
59- cout << productionSystem.getWorkingMemory() << endl;
60-
61- cout << "Running ... " << endl;
62- productionSystem.fireAll();
63-
64- double elapsedTime = difftime(time(NULL), startTime);
65- cout << elapsedTime << " [sec]" << endl << endl;
66-
67- cout << "Working Memory [AFTER ] - (size " << productionSystem.getWorkingMemory().size() << ")" << endl;
68- cout << productionSystem.getWorkingMemory() << endl;
69-
70- return 0;
71-}
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
--- trunk/main/app/tops/main.cpp (nonexistent)
+++ trunk/main/app/tops/main.cpp (revision 23)
@@ -0,0 +1,71 @@
1+/**
2+ * 最初の著者:: トゥイー
3+ * リポジトリ情報:: $Id$
4+ * 著作権:: Copyright (C) Ownway.info, 2011. All rights reserved.
5+ * ライセンス:: CPL(Common Public Licence)
6+ */
7+
8+#include <tops/PSListener.hpp>
9+#include <tops/listener/PrintPSListener.hpp>
10+#include <tops/parser/PSInterpreter.hpp>
11+#include <tops/system/small/SmallProductionSystem.hpp>
12+using namespace tops;
13+
14+#include <time.h>
15+
16+#include <fstream>
17+#include <iostream>
18+using namespace std;
19+
20+/**
21+ * 使い方を出力します。
22+ */
23+void usage(const char* const app) {
24+ cerr << "Toy Open Production System [small model]" << endl;
25+ cerr << "-----" << endl;
26+ cerr << app << " filename1 [filename2 ...]" << endl;
27+}
28+
29+/**
30+ * アプリケーションのエントリーポイントです。
31+ */
32+int main(int argc, char** args) {
33+ if (argc < 2) {
34+ usage(args[0]);
35+ return 1;
36+ }
37+
38+ SmallProductionSystem productionSystem;
39+ PSListenerPtr listener(new PrintPSListener());
40+ productionSystem.addListener(listener);
41+
42+ time_t startTime = time(NULL);
43+
44+ PSInterpreter interpreter(productionSystem);
45+ for (int i = 1; i < argc; ++i) {
46+ ifstream file(args[i]);
47+ if (!file) {
48+ cerr << "File not found." << endl;
49+ return 1;
50+ }
51+ interpreter.interpret(file);
52+ file.close();
53+ }
54+
55+ cout << "Rule Base - (size " << productionSystem.getRuleBase().size() << ")" << endl;
56+ cout << productionSystem.getRuleBase() << endl;
57+
58+ cout << "Working Memory [BEFORE] - (size " << productionSystem.getWorkingMemory().size() << ")" << endl;
59+ cout << productionSystem.getWorkingMemory() << endl;
60+
61+ cout << "Running ... " << endl;
62+ productionSystem.fireAll();
63+
64+ double elapsedTime = difftime(time(NULL), startTime);
65+ cout << elapsedTime << " [sec]" << endl << endl;
66+
67+ cout << "Working Memory [AFTER ] - (size " << productionSystem.getWorkingMemory().size() << ")" << endl;
68+ cout << productionSystem.getWorkingMemory() << endl;
69+
70+ return 0;
71+}
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Show on old repository browser