dbremner / cozy Goto Github PK
View Code? Open in Web Editor NEWThis project forked from cozysynthesizer/cozy
The collection synthesizer
Home Page: http://cozy.uwplse.org
This project forked from cozysynthesizer/cozy
The collection synthesizer
Home Page: http://cozy.uwplse.org
Cozy The Collection Synthesizer -------------------------------------------------------------------------------- Cozy is a tool that synthesizes collection data structure implementations from very high-level specifications. GETTING STARTED Dependencies: Python 2.7 - https://www.python.org/ Z3 Python bindings - https://github.com/Z3Prover/z3 To check for the necessary dependencies, you can run: $ ./check.sh To get help: $ python src/main.py --help To run the tool: $ python src/main.py [options] [input-file] The synthesizer may run for a very long time in some cases. To stop it, press Ctrl+C and the tool will stop and output the best implementation found so far. Alternatively, you can pass a timeout value to the tool. EXAMPLES Sample input files live in the "examples" folder. Some of the interesting examples are: graph - a multigraph data structure simple-sort - a data structure requiring sorting on its results neq - efficient lookup of elements NOT equal to a value INPUT FORMAT If you want to craft your own inputs for Cozy, the input format is very simple. Each input file consists of: - some fields with names and types - optional assumptions about those fields - a set of query method specifications - an optional autotuning program Fields are declared using fields name1:type1, name2:type2, ... The types are treated as opaque strings and Cozy will blindly write them into the generated source code. Assumptions are declared using assume expr Top-level assumptions can only talk about record fields. They state conditions about individual records---i.e. preconditions for the generated `add()` method. The resulting data structure does not check these preconditions at runtime, but the synthesizer may be able to exploit them to generate faster code. (See examples/myria-profiling-api.) Query methods are declared using query query_name (arg1:type1, arg2:type2, ...) assume expr1 assume expr2 condition-expr sort field_name Query assumptions are optional. They state preconditions for the generated method. The resulting data structure does not check these preconditions at runtime, but the synthesizer may be able to exploit them to generate faster code. (See examples/myria-profiling-api.) The condition-expr states what records should be returned by the query method. The sort declaration is optional and, if present, requires that the resulting data set be sorted by some particular field. (See examples/simple-sort.) Autotuning programs are declared using costmodel file.java See the inputs in the examples folder for inspiration. HACKING Source code lives in src. It is well-organized, but poorly commented. src/ main.py -- program entry point synthesis.py -- synthesis algorithm codegen.py -- code generation structures/ -- data structure library ... There are a few scripts useful for developers: Run pylint: ./lint.sh Run tests: ./test.sh Run fuzzer: ./fuzz.sh
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.