-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private prover input on float numbers #4
Comments
Unfortunately, constructs such as I don't have much time to look at this myself, but if you or someone else are interested in taking it on, my recommendation would be to port floats to C in the pequin repository. To do this, you'll need to modify the frontend part of the compiler in If you're interested in this and want more info or run in to problems, feel free to open more issues! |
Thank you very much for your advice.
- Fattaneh
…On Wed, Dec 26, 2018 at 1:10 PM Max Howald ***@***.***> wrote:
Unfortunately, constructs such as hashget and exo_compute which enable
private prover input are only supported by the C compiler right now. If you
need both, you'll need to port floats to C or these functions to SFDL.
I don't have much time to look at this myself, but if you or someone else
are interested in taking it on, my recommendation would be to port floats
to C in the pequin repository.
To do this, you'll need to modify the frontend part of the compiler in
compiler/frontend, to parse float specifiers in .c files and generate the
appropriate .circuit file. Probably, you'll want to write a simple
floating-point program in both C and SFDL, compile the SFDL version with
pepper, and then hack on the compiler in pequin until it can produce a
matching .circuit file from the C version.
If you're interested in this and want more info or run in to problems,
feel free to open more issues!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHfWZYsDTnasCai_zmuFCNNK4DbrMOdyks5u8-XbgaJpZM4ZdPCL>
.
--
F.B
|
Hi Max,
Thanks again for all your suggestion till know. I decided to add floating
point implementation to C in the pequin repository. Based on my
exploration, I think this is the place that I need to start adding my
updates:
https://github.com/pepper-project/pequin/blob/master/compiler/frontend/src/ccomp/parser_hw/CCompiler.java
I appreciate if I can get your comment on that.
Regards,
Fattaneh
On Thu, Dec 27, 2018 at 6:50 PM Fattaneh Bayat <[email protected]>
wrote:
… Thank you very much for your advice.
- Fattaneh
On Wed, Dec 26, 2018 at 1:10 PM Max Howald ***@***.***>
wrote:
> Unfortunately, constructs such as hashget and exo_compute which enable
> private prover input are only supported by the C compiler right now. If you
> need both, you'll need to port floats to C or these functions to SFDL.
>
> I don't have much time to look at this myself, but if you or someone else
> are interested in taking it on, my recommendation would be to port floats
> to C in the pequin repository.
>
> To do this, you'll need to modify the frontend part of the compiler in
> compiler/frontend, to parse float specifiers in .c files and generate
> the appropriate .circuit file. Probably, you'll want to write a simple
> floating-point program in both C and SFDL, compile the SFDL version with
> pepper, and then hack on the compiler in pequin until it can produce a
> matching .circuit file from the C version.
>
> If you're interested in this and want more info or run in to problems,
> feel free to open more issues!
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#4 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AHfWZYsDTnasCai_zmuFCNNK4DbrMOdyks5u8-XbgaJpZM4ZdPCL>
> .
>
--
F.B
--
F.B
|
Yes, that should be the right place to start. The float type specifier and float constant specifications should already by part of the grammar. You'll probably want to compare *.circuit files generated by the existing Pepper release from SFDL files with your implementation. |
Hi,
I understand that to work with float numbers I need to write a code on SFDL. I also know pepper has a feature for private prover input like what we have in "apps_sfdl/genome_snp_freq.c". My question is how can I used the private prover input feature, and at the same type work with float numbers. I wrote a simple code:
program LR {
//Constants
//Dimention of inputs
const SIZE = 3;
//An upper bound for number of multiplication in exponentiation operations defined by a FOR LOOP
const UPPER_B = 10000;
//Precision
const L = 3;
//These two are defined based on L
const TEN_P_L = 1000;
const E_P_TEN_P_ML = 1.0010005;
}
but I got the following error:
LOG: Building executables
metric_num_lines_in_sfdl LR_S 38
metric_num_lines_in_source LR_S 38
make[1]: Entering directory `/home/fara/pepper/compiler/frontend'
ant compile
Buildfile: /home/fara/pepper/compiler/frontend/build.xml
compile:
BUILD SUCCESSFUL
Total time: 0 seconds
make[1]: Leaving directory `/home/fara/pepper/compiler/frontend'
WARNING: --cstdarithtruncate is disabled, so type errors will warn and arithmetic is not ANSI C compliant
Compiling ../pepper/apps_sfdl/LR_S.sfdl
java.text.ParseException: Unknown type hash_t
at SFE.Compiler.SFECompiler.compileDataType(SFECompiler.java:670)
at SFE.Compiler.SFECompiler.compileStructFields(SFECompiler.java:1041)
at SFE.Compiler.SFECompiler.compileKnownType(SFECompiler.java:776)
at SFE.Compiler.SFECompiler.compileDataType(SFECompiler.java:662)
at SFE.Compiler.SFECompiler.compileType(SFECompiler.java:618)
at SFE.Compiler.SFECompiler.compileTypeDeclarations(SFECompiler.java:575)
at SFE.Compiler.SFECompiler.compileProgram(SFECompiler.java:334)
at zcc.ZCC.compile(ZCC.java:207)
at zcc.ZCC.main(ZCC.java:127)
Error in line 15: Unknown type hash_t
make: *** [apps_sfdl_gen/LR_S.cpp] Error 1
I appreciate if you can advise me on that.
Thanks,
Fattaneh
The text was updated successfully, but these errors were encountered: