ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 01 Jan 2021 17:48:20 +0100To call sagemath program (jupyter notebook) from c programhttps://ask.sagemath.org/question/54161/to-call-sagemath-program-jupyter-notebook-from-c-program/Hi, Actually I am implementing an attack on cipher. For that I need some SAT computation. Since SAT computation can be done easily in SAGEMATH. So my program looks something like:
----------
1. I write some code in C
2. Then I will pass some input to SAT i.e. to SAGEMATH (jupyter notebook)
3. Take the output in C , verify
4. Again run 1,2,3 for finite number of times.
----------
I check SAGE documentation for a piece of Cython code but that worked for small example but the program gets complicated it returns some error.
Can you guide me in this way or provide me some references? Which is faster calling sage from c OR calling c from sage jupyter notebook?
Thanks for your help.Sun, 08 Nov 2020 13:57:25 +0100https://ask.sagemath.org/question/54161/to-call-sagemath-program-jupyter-notebook-from-c-program/Comment by slelievre for <p>Hi, Actually I am implementing an attack on cipher. For that I need some SAT computation. Since SAT computation can be done easily in SAGEMATH. So my program looks something like:</p>
<hr>
<ol>
<li>I write some code in C</li>
<li>Then I will pass some input to SAT i.e. to SAGEMATH (jupyter notebook)</li>
<li>Take the output in C , verify </li>
<li>Again run 1,2,3 for finite number of times. </li>
</ol>
<hr>
<p>I check SAGE documentation for a piece of Cython code but that worked for small example but the program gets complicated it returns some error.
Can you guide me in this way or provide me some references? Which is faster calling sage from c OR calling c from sage jupyter notebook?
Thanks for your help.</p>
https://ask.sagemath.org/question/54161/to-call-sagemath-program-jupyter-notebook-from-c-program/?comment=55056#post-id-55056Welcome to Ask Sage!
Thank you for your question!Fri, 01 Jan 2021 17:48:17 +0100https://ask.sagemath.org/question/54161/to-call-sagemath-program-jupyter-notebook-from-c-program/?comment=55056#post-id-55056Comment by slelievre for <p>Hi, Actually I am implementing an attack on cipher. For that I need some SAT computation. Since SAT computation can be done easily in SAGEMATH. So my program looks something like:</p>
<hr>
<ol>
<li>I write some code in C</li>
<li>Then I will pass some input to SAT i.e. to SAGEMATH (jupyter notebook)</li>
<li>Take the output in C , verify </li>
<li>Again run 1,2,3 for finite number of times. </li>
</ol>
<hr>
<p>I check SAGE documentation for a piece of Cython code but that worked for small example but the program gets complicated it returns some error.
Can you guide me in this way or provide me some references? Which is faster calling sage from c OR calling c from sage jupyter notebook?
Thanks for your help.</p>
https://ask.sagemath.org/question/54161/to-call-sagemath-program-jupyter-notebook-from-c-program/?comment=55057#post-id-55057Do you really need Sage or could you call a SAT solver directly, such as CryptoMiniSat?
Can you provide a baby example with actual code that people can try?
That could help others in trying to answer your question.Fri, 01 Jan 2021 17:48:20 +0100https://ask.sagemath.org/question/54161/to-call-sagemath-program-jupyter-notebook-from-c-program/?comment=55057#post-id-55057