-
Notifications
You must be signed in to change notification settings - Fork 5
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
Performance problems? #9
Comments
Hi Thomas, Thank you for reporting :). I'm giving an eye on this. Could you please let me know which version of xclingo are you using? |
Dear Brais,
Thank you for answering.
My version of xclingo is: xclingo 2.0b12
My version of clingo is: 5.4.0
We are giving a try to clingo/xclingo to teach crypto protocols and
their verification. We are currently experimenting a bit with other
solvers such as z3/cvc4 but we are not pleased with the "explanation"
features of them.
xclingo would be a nice alternative, even if dealing with finite models.
But as I mention there is a very big overhead for the moment. Maybe it
is totally due to the complexity of the problem itself but if there are
simple solutions to overcome this, I would be very happy!
Best regards,
Thomas
|
Hi Thomas, apologies for the delay. I found some bugs thanks to your issue thank you 😃
Is this what you expected? This version (2.0b17) is still under testing but I expect to publish it this week. I'll notify you when it's ready. Best wishes, |
Dear Brais, This is a very good news! Yes, the trace is exactly what I expected. I am eager to use this new version! Thank you very much for the debugging! My plan is to use this for teaching, so you are likely to have 100 more new users next year ;-). Best regards, Thomas |
Dear Brais,
Any news? I am so eager to try it! ;-)
Best regards,
Thomas
Le 08/02/2023 à 12:44, Brais Muñiz Castro a écrit :
… Hi Thomas,
apologies for the delay.
I found some bugs thanks to your issue thank you 😃
Now I'm obtaining the following output for explaining |attack| (right
now is taking 2 seconds):
`
Answer: 1
##Explanation: 1.1
*
|*"kis and pair(na,na) -> enc(kis,pair(na,na))"
| |*"na and na -> pair(na,na)"
| | |*"pair(na,ni) -> na"
| | | |*"enc(kab,pair(na,ni)) and kab -> pair(na,ni)"
##Total Explanations: 1
Models: 1
`
Is this what you expected?
This version (2.0b17) is still under testing but I expect to publish it
this week.
I'll notify you when it's ready.
Best wishes,
Brais
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMQ2V33EV6JL5YFWLKDVKJTWWOBJ3ANCNFSM6AAAAAASPXDXSE>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Thomas Genet
ISTIC/IRISA
Campus de Beaulieu, 35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 73 44 E-mail: ***@***.***
http://people.irisa.fr/Thomas.Genet
|
Hi Thomas, yes! you can update with pip 😄
You can come back to previous versions by just changing the version there. Keep in mind it's still a beta so you may find more bugs. Best regards, |
And please, let me know if you find more performance problems. It helps us improve the tool. |
Dear Brais, Thank you for making it available with pip. bilbao Crypto 17 % xclingo xclingo_example.lp :28:1-7: error: syntax error, unexpected , expecting . or :- :30:1-7: error: syntax error, unexpected , expecting . or :- :34:1-7: error: syntax error, unexpected , expecting . or :- :38:1-7: error: syntax error, unexpected , expecting . or :- :43:13-19: error: syntax error, unexpected , expecting . or :- *** ERROR: (xclingo, explainer program) syntax errorDid you change something about the input syntax? Thomas |
Ups. Yes. Last versions changed slightly the syntax for the annotations.
All annotations now end with a dot This is the adaptation for the code you previously sent 😄 .
|
OK, it parses but still fails... later :-) bilbao Crypto 20 % xclingo xclingo_example.lp |
Interesting. The code I sent you is working fine for me with version 2.0b17. Are you running the same code? If not, could you send it to me? Thank you Thomas |
Yes it is the same code. I even tried with the smaller example that you provided above and I get the same failure: bilbao Crypto 4 % xclingo xclingo_example2.lp |
Can it be related to a different clingo version or a bad connection to python. The version of clingo that I have in my path is: bilbao Crypto 6 % clingo --version libclingo version 5.4.0 libclasp version 3.3.5 (libpotassco version 1.1.0) License: The MIT License https://opensource.org/licenses/MIT |
clingo 5.5 is needed. Please install it. You can install clingo from pip or conda without affecting your current installation. |
Dear Brais, This is fixed using a correct version of clingo. I used: Thomas |
Nice. Still, there will probably be more bugs. We are still facing some of them. Please if you find more, tell us. Thank you very much! |
Hi,
I am trying to use clingo to verify cryptographic protocols and xclingo to produce the trace of the attack (when there is one). However, even if clingo is fast in finding an attack (seconds) xclingo can take a lot of time (hours) to build the trace.
Do you have any hints/ways to accelerate the trace reconstruction step?
I added a typical lp file on which reconstruction is very slow!
Thanks in advance,
Thomas
#const sizeMax=7.
key(kab).
key(kis).
nonce(ni).
nonce(na).
element(X):- key(X).
element(X):- nonce(X).
size(X,1) :- element(X).
size(pair(X,Y),1+Sx+Sy):- element(X), size(X,Sx), size(Y,Sy), Sx+Sy+1<sizeMax.
size(enc(X,Y),1+Sx+Sy):- element(X), size(X,Sx), size(Y,Sy), Sx+Sy+1<sizeMax.
%Initial knowledge
iknows(kis).
iknows(ni).
iknows(enc(kab,pair(na,ni))).
iknows(kab).
% Pairing
%!trace_rule {"% and % -> pair(%,%)",X,Y,X,Y}
iknows(pair(X,Y)) :- element(X), iknows(X), iknows(Y), size(pair(X,Y),S), S<sizeMax.
% Unpairing
%!trace_rule {"pair(%,%) -> %",X,Y,X}
iknows(X) :- iknows(pair(X,Y)).
%!trace_rule {"pair(%,%) -> %",X,Y,Y}
iknows(Y) :- iknows(pair(X,Y)).
% Decyphering
%!trace_rule {"enc(%,%) and % -> %",K,M,K,M}
iknows(M) :- iknows(K), iknows(enc(K,M)).
% Cyphering
%!trace_rule {"% and % -> enc(%,%)",K,M,K,M}
iknows(enc(K,M)) :- iknows(K), key(K), iknows(M), size(enc(K,M),S), S<sizeMax.
attack:- iknows(enc(kis,pair(na,na))).
#show attack/0. %Fast with clingo
%!show_trace attack.
The text was updated successfully, but these errors were encountered: