Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Verifpal
Verifpal
Commits
e79571fc
Commit
e79571fc
authored
Aug 25, 2021
by
Nadim Kobeissi
💾
Browse files
Merge branch 'equivalence-patch' into 'master'
Equivalence patch See merge request
!12
parents
8ff9e8ee
aa1fa9d7
Pipeline
#913
passed with stages
in 2 minutes and 41 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cmd/vplogic/query.go
View file @
e79571fc
...
...
@@ -355,7 +355,7 @@ func queryEquivalence(
}
values
:=
[]
*
Value
{}
for
i
:=
0
;
i
<
len
(
query
.
Constants
);
i
++
{
a
,
_
:=
valueResolveConstant
(
query
.
Constants
[
i
],
valPrincipalState
)
a
,
_
:=
valueResolveConstant
Eqv
(
query
.
Constants
[
i
],
valPrincipalState
)
values
=
append
(
values
,
a
)
}
brokenEquivalence
:=
false
...
...
cmd/vplogic/value.go
View file @
e79571fc
...
...
@@ -474,6 +474,14 @@ func valueResolveConstant(c *Constant, valPrincipalState *PrincipalState) (*Valu
return
valPrincipalState
.
Assigned
[
i
],
i
}
func
valueResolveConstantEqv
(
c
*
Constant
,
valPrincipalState
*
PrincipalState
)
(
*
Value
,
int
)
{
i
:=
valueGetPrincipalStateIndexFromConstant
(
valPrincipalState
,
c
)
if
i
<
0
{
return
&
Value
{
Kind
:
typesEnumConstant
,
Data
:
c
},
i
}
return
valPrincipalState
.
Assigned
[
i
],
i
}
func
valueResolveValueInternalValuesFromKnowledgeMap
(
a
*
Value
,
valKnowledgeMap
*
KnowledgeMap
,
)
(
*
Value
,
[]
*
Value
)
{
...
...
examples/problematic.vp
0 → 100644
View file @
e79571fc
attacker[passive]
principal Server[
generates x
generates y
gx = G^x
gy = G^y
gxy = gx^y
gyx = gy^x
]
queries[
equivalence? gxy, gyx
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment