Permalink
Browse files

Make local includes directory-qualified.

This reduces ambiguity and lets other projects include libsnark without
having it pollute the project's include path.
  • Loading branch information...
popoffka committed Jun 21, 2017
1 parent 1168f90 commit a9f107761766f4324343936d9cde3c760abd62f5
Showing 331 changed files with 1,437 additions and 1,439 deletions.
View
@@ -6,46 +6,46 @@ depinst/
depsrc/
README.html
doxygen/
src/gadgetlib2/examples/tutorial
src/gadgetlib2/tests/gadgetlib2_test
libsnark/gadgetlib2/examples/tutorial
libsnark/gadgetlib2/tests/gadgetlib2_test
src/algebra/curves/tests/test_bilinearity
src/algebra/curves/tests/test_groups
src/algebra/fields/tests/test_fields
src/common/routing_algorithms/profiling/profile_routing_algorithms
src/common/routing_algorithms/tests/test_routing_algorithms
src/gadgetlib1/gadgets/cpu_checkers/fooram/examples/test_fooram
src/gadgetlib1/gadgets/hashes/knapsack/tests/test_knapsack_gadget
src/gadgetlib1/gadgets/hashes/sha256/tests/test_sha256_gadget
src/gadgetlib1/gadgets/merkle_tree/tests/test_merkle_tree_gadgets
src/gadgetlib1/gadgets/routing/profiling/profile_routing_gadgets
src/gadgetlib1/gadgets/set_commitment/tests/test_set_commitment_gadget
src/gadgetlib1/gadgets/verifiers/tests/test_r1cs_ppzksnark_verifier_gadget
src/reductions/ram_to_r1cs/examples/demo_arithmetization
src/relations/arithmetic_programs/qap/tests/test_qap
src/relations/arithmetic_programs/ssp/tests/test_ssp
src/zk_proof_systems/pcd/r1cs_pcd/r1cs_mp_ppzkpcd/profiling/profile_r1cs_mp_ppzkpcd
src/zk_proof_systems/pcd/r1cs_pcd/r1cs_mp_ppzkpcd/tests/test_r1cs_mp_ppzkpcd
src/zk_proof_systems/pcd/r1cs_pcd/r1cs_sp_ppzkpcd/profiling/profile_r1cs_sp_ppzkpcd
src/zk_proof_systems/pcd/r1cs_pcd/r1cs_sp_ppzkpcd/tests/test_r1cs_sp_ppzkpcd
src/zk_proof_systems/ppzkadsnark/r1cs_ppzkadsnark/examples/demo_r1cs_ppzkadsnark
src/zk_proof_systems/ppzksnark/bacs_ppzksnark/profiling/profile_bacs_ppzksnark
src/zk_proof_systems/ppzksnark/bacs_ppzksnark/tests/test_bacs_ppzksnark
src/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/profiling/profile_r1cs_gg_ppzksnark
src/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/tests/test_r1cs_gg_ppzksnark
src/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark
src/zk_proof_systems/ppzksnark/r1cs_ppzksnark/tests/test_r1cs_ppzksnark
src/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark
src/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark_generator
src/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark_prover
src/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark_verifier
src/zk_proof_systems/ppzksnark/ram_ppzksnark/profiling/profile_ram_ppzksnark
src/zk_proof_systems/ppzksnark/ram_ppzksnark/tests/test_ram_ppzksnark
src/zk_proof_systems/ppzksnark/tbcs_ppzksnark/profiling/profile_tbcs_ppzksnark
src/zk_proof_systems/ppzksnark/tbcs_ppzksnark/tests/test_tbcs_ppzksnark
src/zk_proof_systems/ppzksnark/uscs_ppzksnark/profiling/profile_uscs_ppzksnark
src/zk_proof_systems/ppzksnark/uscs_ppzksnark/tests/test_uscs_ppzksnark
src/zk_proof_systems/zksnark/ram_zksnark/profiling/profile_ram_zksnark
src/zk_proof_systems/zksnark/ram_zksnark/tests/test_ram_zksnark
libsnark/algebra/curves/tests/test_bilinearity
libsnark/algebra/curves/tests/test_groups
libsnark/algebra/fields/tests/test_fields
libsnark/common/routing_algorithms/profiling/profile_routing_algorithms
libsnark/common/routing_algorithms/tests/test_routing_algorithms
libsnark/gadgetlib1/gadgets/cpu_checkers/fooram/examples/test_fooram
libsnark/gadgetlib1/gadgets/hashes/knapsack/tests/test_knapsack_gadget
libsnark/gadgetlib1/gadgets/hashes/sha256/tests/test_sha256_gadget
libsnark/gadgetlib1/gadgets/merkle_tree/tests/test_merkle_tree_gadgets
libsnark/gadgetlib1/gadgets/routing/profiling/profile_routing_gadgets
libsnark/gadgetlib1/gadgets/set_commitment/tests/test_set_commitment_gadget
libsnark/gadgetlib1/gadgets/verifiers/tests/test_r1cs_ppzksnark_verifier_gadget
libsnark/reductions/ram_to_r1cs/examples/demo_arithmetization
libsnark/relations/arithmetic_programs/qap/tests/test_qap
libsnark/relations/arithmetic_programs/ssp/tests/test_ssp
libsnark/zk_proof_systems/pcd/r1cs_pcd/r1cs_mp_ppzkpcd/profiling/profile_r1cs_mp_ppzkpcd
libsnark/zk_proof_systems/pcd/r1cs_pcd/r1cs_mp_ppzkpcd/tests/test_r1cs_mp_ppzkpcd
libsnark/zk_proof_systems/pcd/r1cs_pcd/r1cs_sp_ppzkpcd/profiling/profile_r1cs_sp_ppzkpcd
libsnark/zk_proof_systems/pcd/r1cs_pcd/r1cs_sp_ppzkpcd/tests/test_r1cs_sp_ppzkpcd
libsnark/zk_proof_systems/ppzkadsnark/r1cs_ppzkadsnark/examples/demo_r1cs_ppzkadsnark
libsnark/zk_proof_systems/ppzksnark/bacs_ppzksnark/profiling/profile_bacs_ppzksnark
libsnark/zk_proof_systems/ppzksnark/bacs_ppzksnark/tests/test_bacs_ppzksnark
libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/profiling/profile_r1cs_gg_ppzksnark
libsnark/zk_proof_systems/ppzksnark/r1cs_gg_ppzksnark/tests/test_r1cs_gg_ppzksnark
libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark
libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/tests/test_r1cs_ppzksnark
libsnark/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark
libsnark/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark_generator
libsnark/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark_prover
libsnark/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark_verifier
libsnark/zk_proof_systems/ppzksnark/ram_ppzksnark/profiling/profile_ram_ppzksnark
libsnark/zk_proof_systems/ppzksnark/ram_ppzksnark/tests/test_ram_ppzksnark
libsnark/zk_proof_systems/ppzksnark/tbcs_ppzksnark/profiling/profile_tbcs_ppzksnark
libsnark/zk_proof_systems/ppzksnark/tbcs_ppzksnark/tests/test_tbcs_ppzksnark
libsnark/zk_proof_systems/ppzksnark/uscs_ppzksnark/profiling/profile_uscs_ppzksnark
libsnark/zk_proof_systems/ppzksnark/uscs_ppzksnark/tests/test_uscs_ppzksnark
libsnark/zk_proof_systems/zksnark/ram_zksnark/profiling/profile_ram_zksnark
libsnark/zk_proof_systems/zksnark/ram_zksnark/tests/test_ram_zksnark
build
View
@@ -243,4 +243,4 @@ endif(CCACHE_FOUND)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
add_subdirectory(third_party)
add_subdirectory(src)
add_subdirectory(libsnark)
View
@@ -232,7 +232,7 @@ The libsnark library relies on the following:
So far we have tested these only on Linux, though we have been able to make the
libsnark work, with some features disabled (such as memory profiling or GTest tests),
on Windows via Cygwin and on Mac OS X. See also the notes on [portability](#portability)
below. (If you port libsnark to additional platforms, please let us know!)
below. (If you port libsnark to additional platforms, please let us know!)
Concretely, here are the requisite packages in some Linux distributions:
@@ -263,7 +263,7 @@ Fetch dependencies from their GitHub repos:
Create the Makefile:
$ mkdir build && cd build && cmake ..
$ mkdir build && cd build && cmake ..
Then, to compile the library, tests, and profiling harness, run this within the `build directory:
@@ -287,7 +287,7 @@ This will install `libsnark.a` into `/install/path/lib`; so your application sho
In addition, unless you use `WITH_SUPERCOP=OFF`, `libsnark_adsnark.a` will be installed and should be linked in using `-lsnark_adsnark`.
When you use compile you application against `libsnark`, you must have the same conditional defines (`#define FOO` or `g++ -DFOO`) as when you compiled `libsnark`, due to the use of templates. One way to figure out the correct conditional defines is to look at `build/src/CMakeFiles/snark.dir/flags.make` after running `cmake`. ([Issue #21](https://github.com/scipr-lab/libsnark/issues/21))
When you use compile you application against `libsnark`, you must have the same conditional defines (`#define FOO` or `g++ -DFOO`) as when you compiled `libsnark`, due to the use of templates. One way to figure out the correct conditional defines is to look at `build/libsnark/CMakeFiles/snark.dir/flags.make` after running `cmake`. ([Issue #21](https://github.com/scipr-lab/libsnark/issues/21))
### Building on Windows using Cygwin
@@ -315,16 +315,16 @@ Tutorials
libsnark includes a tutorial, and some usage examples, for the high-level API.
* `src/gadgetlib1/examples1` contains a simple example for constructing a
* `libsnark/gadgetlib1/examples1` contains a simple example for constructing a
constraint system using gadgetlib1.
* `src/gadgetlib2/examples` contains a tutorial for using gadgetlib2 to express
* `libsnark/gadgetlib2/examples` contains a tutorial for using gadgetlib2 to express
NP statements as constraint systems. It introduces basic terminology, design
overview, and recommended programming style. It also shows how to invoke
ppzkSNARKs on such constraint systems. The main file, `tutorial.cpp`, builds
into a standalone executable.
* `src/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark.cpp`
* `libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark.cpp`
constructs a simple constraint system and runs the ppzksnark. See below for how to
run it.
@@ -335,7 +335,7 @@ Executing profiling example
The command
$ src/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark 1000 10 Fr
$ libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark 1000 10 Fr
exercises the ppzkSNARK (first generator, then prover, then verifier) on an
R1CS instance with 1000 equations and an input consisting of 10 field elements.
@@ -345,7 +345,7 @@ R1CS instance with 1000 equations and an input consisting of 10 field elements.
The command
$ src/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark 1000 10 bytes
$ libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/profiling/profile_r1cs_ppzksnark 1000 10 bytes
does the same but now the input consists of 10 bytes.
@@ -487,7 +487,7 @@ Directory structure
The directory structure of the libsnark library is as follows:
* src/ --- main C++ source code, containing the following modules:
* libsnark/ --- main C++ source code, containing the following modules:
* common/ --- miscellaneous utilities
* gadgetlib1/ --- gadgetlib1, a library to construct R1CS instances
* gadgets/ --- basic gadgets for gadgetlib1
@@ -505,7 +505,7 @@ The directory structure of the libsnark library is as follows:
* examples/ --- example code and tutorials for this module
* tests/ --- unit tests for this module
In particular, the top-level API examples are at `src/r1cs_ppzksnark/examples/` and `src/gadgetlib2/examples/`.
In particular, the top-level API examples are at `libsnark/r1cs_ppzksnark/examples/` and `libsnark/gadgetlib2/examples/`.
--------------------------------------------------------------------------------
Oops, something went wrong.

0 comments on commit a9f1077

Please sign in to comment.