Skip to content
forked from feldob/InPUT

A descriptive and programming language independent format and API for a customizable configuration of software and design of computer experiments.

Notifications You must be signed in to change notification settings

martinssonj/InPUT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is InPUT?

InPUT offers a descriptive and programming language independent format and API for a customizable configuration of software and design of computer experiments. It allows for the definition of well defined, complex, input and output parameter ranges. The code mapping concept allows you to repeat experiments from third parties by importing descriptors into your algorithm implementation of choice, thus increases reproducibility and simplifies documentation, as well as the collaboration between researchers, because of descriptor reuse. Descriptors are written in XML. We offer adapters for different programming languages to further simplify the software development aspects of experimental and algorithm design all together. In that sense, InPUT realizes the distinction between the specification (design spaces, design), implementation (code mappings), and use (InPUT API) of experimental or software configurations, similar to how the web service architecture differentiates between specification (WSDL), implementation (programming language of choice), and consumption (REST, SOAP) of services. For more info, see wiki.

Example (Java):

InPUT induces clean code. Lets assume you want to run an algorithm and collect some data about its performance. Instead of

int var = 5;
Property foo = new FooProperty(var);
Option bar = new BarOption(foo,20);
double d = .33;
Algorithm a = new SomeAlgorithm(d,bar);
a.run();
... // record some statistics

with InPUT you write

IDesign design = new Design("design1.xml"); // validate and import a configuration
Algorithm a = design.getValue("Algorithm"); // retrieve the fully initialized object
a.run(); // run the algorithm
... // record some statistics

, with the advantage being that all configuration is externalized, and can entirely be handled descriptively without code changes. You could write changes back to the design, run the experiment again, and export the configuration:

design.setValue("Algorithm.Option.Property.Var", 6); // deep parameter change (using reflection)
a.run(); // run with new setup
... // record some statistics
design.export(new XMLFileExporter("design2.xml")); // export the new configuration

The content of the resulting, importable, design file could look as follows:

<Design ...>
	<SValue id="Algorithm" value="SomeAlgorithm">
		<NValue id="D" value=".33"/>
		<SValue id="Option" value="BarOption">
			<SValue id="Property" value="FooProperty">
				<NValue id="Var" value="6"/>
			</SValue>
			<NValue id="FooBarVar" value="20"/>
		</SValue>
	</SValue>
</Design>

This configuration is programming language independent and a so called code mapping realizes the translation to the used Java implementation. Once it is finalized, this code snippet can be imported to C++ using InPUT4cpp.

You can also treat output, and entire experimental investigations, randomly instantiate designs and use cascaded array parameters. This was just a very basic example. There are plenty of code examples for Java available (see Java folder).

How to use InPUT?

Each programming language offers a language specific Readme in the respective folder. Currently, only Java is supported. C++ is coming soon.

Good to know...

When working offline, the schemaLocation attribute for each InPUT XML descriptor file has to be set to a local version of the respective XSD schema (DesignSpace, Design, or CodeMappings). The schemata for the latest version can always be downloaded from here:

For instance, for those descriptors you want to use offline, change schemaLocation="http://TheInPUT.org/Design http://TheInPUT.org/Design.xsd in the root node to schemaLocation="http://TheInPUT.org/Design SCHEMA_PATH/Design.xsd", if Design.xsd resides in SCHEMA_PATH of your computer or local network. The schemaPath parameter of the InPUT4j*.jar in file src/se/miun/itm/input/config.xml should then be set to SCHEMA_PATH too, so that all descriptors comply by default. Now, you can fully work offline, which further should boost the InPUT parsing performance.

#License

Copyright (C) 2012 Felix Dobslaw

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.

About

A descriptive and programming language independent format and API for a customizable configuration of software and design of computer experiments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%