Source Code Cross Referenced for Configuration.java in  » Testing » KeY » de » uka » ilkd » key » counterexample » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » KeY » de.uka.ilkd.key.counterexample 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // This file is part of KeY - Integrated Deductive Software Design
002:        // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
003:        //                         Universitaet Koblenz-Landau, Germany
004:        //                         Chalmers University of Technology, Sweden
005:        //
006:        // The KeY system is protected by the GNU General Public License. 
007:        // See LICENSE.TXT for details.
008:        //
009:        //
010:        //
011:
012:        package de.uka.ilkd.key.counterexample;
013:
014:        import java.io.FileNotFoundException;
015:        import java.io.IOException;
016:        import java.io.RandomAccessFile;
017:        import java.util.StringTokenizer;
018:
019:        /**
020:         * This class is the storage for global configuration data 
021:         * of the counterexample subpackage. In the future it might
022:         * even have a nice editable window instead of a configuration file
023:         *
024:         * You can use these to optimize your tests during runtime.
025:         * These configurations are stored in a separate textfile with
026:         * the name supplied by 'configfilename'
027:         * -Size of Domain
028:         * -Arguments to call Mgtp with
029:         * -which Axioms to use
030:         * -etc.
031:         *
032:         * @author Sonja Pieper
033:         * @version 0.1, created 08/08/01 
034:         */
035:
036:        public class Configuration {
037:
038:            //the actual configuration data
039:
040:            /**
041:             * Flag for use of the optimized axiom transformation
042:             */
043:            boolean optimize;
044:
045:            /**
046:             * Flag which determines wether there is a lemma?
047:             */
048:            boolean test;
049:
050:            /**
051:             * Number of constructors allowed in constructorterms
052:             */
053:            int domainmax;
054:
055:            /**
056:             * Max number of parameters for which parameter rewriting 
057:             * will be generated
058:             */
059:            int maxargs;
060:
061:            /**
062:             * String of ones and zeroes indicating which axioms to use
063:             */
064:            String useaxioms;
065:
066:            /**
067:             * File in which to save the generated calculus for debugging f.e.
068:             */
069:            String filename;
070:
071:            /**
072:             * Runtime parameters for the call of Mgtp, possible params: ext, verbose ...
073:             */
074:            String[] args;
075:
076:            /**
077:             * Flag that determines wether to produce tex-output
078:             */
079:            boolean tex;
080:
081:            /**
082:             * Name of the file in which all the configurations are stored now.
083:             */
084:            private String configfilename;
085:
086:            /** 
087:             * creates a new configuration from the file specified by filename.
088:             * @param filename this should be the name of the file in which
089:             *                 your configuration is stored for example "max"
090:             */
091:            public Configuration(String filename) {
092:                configfilename = filename;
093:            }
094:
095:            /**
096:             * this method reads the configuration and stores it in the
097:             * respective fields. it is called by the constructor, so you
098:             * don't need to worry about it.
099:             */
100:            public void readConfig() {
101:                try {
102:
103:                    RandomAccessFile raf = new RandomAccessFile(configfilename,
104:                            "r");
105:
106:                    //die configzeilen auslesen, s.o.:
107:                    domainmax = (new Integer(raf.readLine())).intValue();
108:                    String conf = raf.readLine();
109:                    useaxioms = raf.readLine();
110:                    maxargs = (new Integer(raf.readLine())).intValue();
111:                    filename = raf.readLine();
112:                    test = (raf.readLine()).startsWith("test");
113:                    optimize = (raf.readLine()).startsWith("opt");
114:                    tex = (raf.readLine()).startsWith("tex");
115:                    raf.close();
116:
117:                    //Debug Output:
118:                    System.out.println("Size of Domain is " + domainmax);
119:                    System.out.println("Mgtp Args are " + conf);
120:                    System.out.println("Rewriting " + maxargs + " Arguments");
121:                    System.out.println("Output will be saved to " + filename
122:                            + ".mg");
123:
124:                    //Die Argumente muessen noch in einen Array 
125:                    //einsortiert werden:
126:                    StringTokenizer st = new StringTokenizer(conf, ",");
127:                    args = new String[st.countTokens() + 1];
128:                    args[0] = "ext"; //wichtig! Ist erforderlich fuer das Kalkuel
129:                    int i = 1;
130:                    while (st.hasMoreElements()) {
131:                        args[i] = st.nextToken();
132:                        i++;
133:                    }
134:
135:                    System.out.println("Arguments sorted.");
136:                } catch (FileNotFoundException e) {
137:                    System.out.println("Error getting max: Filenotfound");
138:                } catch (IOException e) {
139:                    System.out.println("Error reading max: Ausgabefehler");
140:                }
141:
142:            }
143:
144:            /**
145:             * with this method you can set all configuration data to default values.
146:             */
147:            public void setDefault() {
148:                domainmax = 2;
149:                args = new String[1];
150:                args[0] = "ext";
151:                useaxioms = "11111111111111111111111111";
152:                maxargs = 2;
153:                filename = "default";
154:                test = false;
155:                optimize = true;
156:                tex = false;
157:            }
158:
159:            public void changeConfiguration() {//@@@ maybe with window one day in the future
160:                //do nothing now
161:            }
162:
163:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.