Towards Automatization of Framed Bisimilarity in Coq M. Miculan I. - - PowerPoint PPT Presentation

towards automatization of framed bisimilarity in coq
SMART_READER_LITE
LIVE PREVIEW

Towards Automatization of Framed Bisimilarity in Coq M. Miculan I. - - PowerPoint PPT Presentation

Motivation The encoding Future work Details about the encoding Towards Automatization of Framed Bisimilarity in Coq M. Miculan I. Scagnetto Dipartimento di Matematica e Informatica Universit di Udine TYPES Annual Workshop, April 2006 M.


slide-1
SLIDE 1

Motivation The encoding Future work Details about the encoding

Towards Automatization of Framed Bisimilarity in Coq

  • M. Miculan
  • I. Scagnetto

Dipartimento di Matematica e Informatica Università di Udine

TYPES Annual Workshop, April 2006

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-2
SLIDE 2

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Processes algebras and cryptographic protocols: the spi-calculus.

The study of reactive systems requires to consider both the steps taken by the system and those taken by its environment. The spi-calculus is an extension of the π-calculus designed for reasoning about cryptographic protocols. In particular terms exchanged during communications can be encrypted with a shared-key scheme: c.(x)P | c.{M}KQ

τ

→ P[{M}K/x] | Q The environment may be hostile and little can be assumed about its behaviour. As a consequence, representing the environment as a nondeterministic process is hard, so bisimulation techniques are often used.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-3
SLIDE 3

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Processes algebras and cryptographic protocols: the spi-calculus.

The study of reactive systems requires to consider both the steps taken by the system and those taken by its environment. The spi-calculus is an extension of the π-calculus designed for reasoning about cryptographic protocols. In particular terms exchanged during communications can be encrypted with a shared-key scheme: c.(x)P | c.{M}KQ

τ

→ P[{M}K/x] | Q The environment may be hostile and little can be assumed about its behaviour. As a consequence, representing the environment as a nondeterministic process is hard, so bisimulation techniques are often used.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-4
SLIDE 4

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Processes algebras and cryptographic protocols: the spi-calculus.

The study of reactive systems requires to consider both the steps taken by the system and those taken by its environment. The spi-calculus is an extension of the π-calculus designed for reasoning about cryptographic protocols. In particular terms exchanged during communications can be encrypted with a shared-key scheme: c.(x)P | c.{M}KQ

τ

→ P[{M}K/x] | Q The environment may be hostile and little can be assumed about its behaviour. As a consequence, representing the environment as a nondeterministic process is hard, so bisimulation techniques are often used.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-5
SLIDE 5

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Processes algebras and cryptographic protocols: the spi-calculus.

The study of reactive systems requires to consider both the steps taken by the system and those taken by its environment. The spi-calculus is an extension of the π-calculus designed for reasoning about cryptographic protocols. In particular terms exchanged during communications can be encrypted with a shared-key scheme: c.(x)P | c.{M}KQ

τ

→ P[{M}K/x] | Q The environment may be hostile and little can be assumed about its behaviour. As a consequence, representing the environment as a nondeterministic process is hard, so bisimulation techniques are often used.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-6
SLIDE 6

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Testing equivalence

Usually, testing equivalence (∼) is used in order to reason about processes. Intended meaning of P ∼ Q:

P is the implementation of a protocol, Q is the specification of the protocol.

If the equivalence holds, the implementation of the protocol meets the corresponding specification. This approach is applied for verifying many protocols. Another interesting application: PCA (PCC for security purposes):

P is the mobile code received from the producer, Q is the security policy specified by the consumer, “d : P ∼ Q” (proof that P complies to Q): provided by the producer and checked by the consumer.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-7
SLIDE 7

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Testing equivalence

Usually, testing equivalence (∼) is used in order to reason about processes. Intended meaning of P ∼ Q:

P is the implementation of a protocol, Q is the specification of the protocol.

If the equivalence holds, the implementation of the protocol meets the corresponding specification. This approach is applied for verifying many protocols. Another interesting application: PCA (PCC for security purposes):

P is the mobile code received from the producer, Q is the security policy specified by the consumer, “d : P ∼ Q” (proof that P complies to Q): provided by the producer and checked by the consumer.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-8
SLIDE 8

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Testing equivalence

Usually, testing equivalence (∼) is used in order to reason about processes. Intended meaning of P ∼ Q:

P is the implementation of a protocol, Q is the specification of the protocol.

If the equivalence holds, the implementation of the protocol meets the corresponding specification. This approach is applied for verifying many protocols. Another interesting application: PCA (PCC for security purposes):

P is the mobile code received from the producer, Q is the security policy specified by the consumer, “d : P ∼ Q” (proof that P complies to Q): provided by the producer and checked by the consumer.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-9
SLIDE 9

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Testing equivalence

Usually, testing equivalence (∼) is used in order to reason about processes. Intended meaning of P ∼ Q:

P is the implementation of a protocol, Q is the specification of the protocol.

If the equivalence holds, the implementation of the protocol meets the corresponding specification. This approach is applied for verifying many protocols. Another interesting application: PCA (PCC for security purposes):

P is the mobile code received from the producer, Q is the security policy specified by the consumer, “d : P ∼ Q” (proof that P complies to Q): provided by the producer and checked by the consumer.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-10
SLIDE 10

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Testing equivalence

Usually, testing equivalence (∼) is used in order to reason about processes. Intended meaning of P ∼ Q:

P is the implementation of a protocol, Q is the specification of the protocol.

If the equivalence holds, the implementation of the protocol meets the corresponding specification. This approach is applied for verifying many protocols. Another interesting application: PCA (PCC for security purposes):

P is the mobile code received from the producer, Q is the security policy specified by the consumer, “d : P ∼ Q” (proof that P complies to Q): provided by the producer and checked by the consumer.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-11
SLIDE 11

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Testing equivalence

Usually, testing equivalence (∼) is used in order to reason about processes. Intended meaning of P ∼ Q:

P is the implementation of a protocol, Q is the specification of the protocol.

If the equivalence holds, the implementation of the protocol meets the corresponding specification. This approach is applied for verifying many protocols. Another interesting application: PCA (PCC for security purposes):

P is the mobile code received from the producer, Q is the security policy specified by the consumer, “d : P ∼ Q” (proof that P complies to Q): provided by the producer and checked by the consumer.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-12
SLIDE 12

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Testing equivalence

Usually, testing equivalence (∼) is used in order to reason about processes. Intended meaning of P ∼ Q:

P is the implementation of a protocol, Q is the specification of the protocol.

If the equivalence holds, the implementation of the protocol meets the corresponding specification. This approach is applied for verifying many protocols. Another interesting application: PCA (PCC for security purposes):

P is the mobile code received from the producer, Q is the security policy specified by the consumer, “d : P ∼ Q” (proof that P complies to Q): provided by the producer and checked by the consumer.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-13
SLIDE 13

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Indistinguishable terms and Framed Bisimilarity.

Verifying testing equivalences is difficult. Moreover, when reasoning about cryptographic protocols new challenges arise:

two cleartexts M and N are encrypted under a session key, yielding two cyphertexts P(M) and P(N), in order to express preservation of secrecy, an attacker should not be able to distinguish between P(M) and P(N), standard notions of bisimulations do not allow that; hence it is necessary to relax the usual definition in order to introduce indistinguishable messages.

Framed Bisimulation address both problems and is more tractable; moreover, we have: P ∼f Q ⇒ P ∼ Q Framed Bisimulation is decidable is we consider a suitable finite fragment of the spi-calculus and there exists a decision algorithm provided by Hüttel in [2].

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-14
SLIDE 14

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Indistinguishable terms and Framed Bisimilarity.

Verifying testing equivalences is difficult. Moreover, when reasoning about cryptographic protocols new challenges arise:

two cleartexts M and N are encrypted under a session key, yielding two cyphertexts P(M) and P(N), in order to express preservation of secrecy, an attacker should not be able to distinguish between P(M) and P(N), standard notions of bisimulations do not allow that; hence it is necessary to relax the usual definition in order to introduce indistinguishable messages.

Framed Bisimulation address both problems and is more tractable; moreover, we have: P ∼f Q ⇒ P ∼ Q Framed Bisimulation is decidable is we consider a suitable finite fragment of the spi-calculus and there exists a decision algorithm provided by Hüttel in [2].

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-15
SLIDE 15

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Indistinguishable terms and Framed Bisimilarity.

Verifying testing equivalences is difficult. Moreover, when reasoning about cryptographic protocols new challenges arise:

two cleartexts M and N are encrypted under a session key, yielding two cyphertexts P(M) and P(N), in order to express preservation of secrecy, an attacker should not be able to distinguish between P(M) and P(N), standard notions of bisimulations do not allow that; hence it is necessary to relax the usual definition in order to introduce indistinguishable messages.

Framed Bisimulation address both problems and is more tractable; moreover, we have: P ∼f Q ⇒ P ∼ Q Framed Bisimulation is decidable is we consider a suitable finite fragment of the spi-calculus and there exists a decision algorithm provided by Hüttel in [2].

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-16
SLIDE 16

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Indistinguishable terms and Framed Bisimilarity.

Verifying testing equivalences is difficult. Moreover, when reasoning about cryptographic protocols new challenges arise:

two cleartexts M and N are encrypted under a session key, yielding two cyphertexts P(M) and P(N), in order to express preservation of secrecy, an attacker should not be able to distinguish between P(M) and P(N), standard notions of bisimulations do not allow that; hence it is necessary to relax the usual definition in order to introduce indistinguishable messages.

Framed Bisimulation address both problems and is more tractable; moreover, we have: P ∼f Q ⇒ P ∼ Q Framed Bisimulation is decidable is we consider a suitable finite fragment of the spi-calculus and there exists a decision algorithm provided by Hüttel in [2].

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-17
SLIDE 17

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Indistinguishable terms and Framed Bisimilarity.

Verifying testing equivalences is difficult. Moreover, when reasoning about cryptographic protocols new challenges arise:

two cleartexts M and N are encrypted under a session key, yielding two cyphertexts P(M) and P(N), in order to express preservation of secrecy, an attacker should not be able to distinguish between P(M) and P(N), standard notions of bisimulations do not allow that; hence it is necessary to relax the usual definition in order to introduce indistinguishable messages.

Framed Bisimulation address both problems and is more tractable; moreover, we have: P ∼f Q ⇒ P ∼ Q Framed Bisimulation is decidable is we consider a suitable finite fragment of the spi-calculus and there exists a decision algorithm provided by Hüttel in [2].

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-18
SLIDE 18

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Indistinguishable terms and Framed Bisimilarity.

Verifying testing equivalences is difficult. Moreover, when reasoning about cryptographic protocols new challenges arise:

two cleartexts M and N are encrypted under a session key, yielding two cyphertexts P(M) and P(N), in order to express preservation of secrecy, an attacker should not be able to distinguish between P(M) and P(N), standard notions of bisimulations do not allow that; hence it is necessary to relax the usual definition in order to introduce indistinguishable messages.

Framed Bisimulation address both problems and is more tractable; moreover, we have: P ∼f Q ⇒ P ∼ Q Framed Bisimulation is decidable is we consider a suitable finite fragment of the spi-calculus and there exists a decision algorithm provided by Hüttel in [2].

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-19
SLIDE 19

Motivation The encoding Future work Details about the encoding The Starting Scenario

Background.

Indistinguishable terms and Framed Bisimilarity.

Verifying testing equivalences is difficult. Moreover, when reasoning about cryptographic protocols new challenges arise:

two cleartexts M and N are encrypted under a session key, yielding two cyphertexts P(M) and P(N), in order to express preservation of secrecy, an attacker should not be able to distinguish between P(M) and P(N), standard notions of bisimulations do not allow that; hence it is necessary to relax the usual definition in order to introduce indistinguishable messages.

Framed Bisimulation address both problems and is more tractable; moreover, we have: P ∼f Q ⇒ P ∼ Q Framed Bisimulation is decidable is we consider a suitable finite fragment of the spi-calculus and there exists a decision algorithm provided by Hüttel in [2].

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-20
SLIDE 20

Motivation The encoding Future work Details about the encoding

Our idea.

Our work in progress focus on the integration of proof-assistants and automatic decision procedures. We aim to provide a Coq-signature such that the user can specify its protocol and the goal-equivalence P ∼ Q. The proof can then proceed interactively, as usual, but with the possibility of invoking an ad-hoc tactic to automatically verify finite subgoals. Eventually, the tactic could not terminate or fail if a depth limit is imposed.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-21
SLIDE 21

Motivation The encoding Future work Details about the encoding

Our idea.

Our work in progress focus on the integration of proof-assistants and automatic decision procedures. We aim to provide a Coq-signature such that the user can specify its protocol and the goal-equivalence P ∼ Q. The proof can then proceed interactively, as usual, but with the possibility of invoking an ad-hoc tactic to automatically verify finite subgoals. Eventually, the tactic could not terminate or fail if a depth limit is imposed.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-22
SLIDE 22

Motivation The encoding Future work Details about the encoding

Our idea.

Our work in progress focus on the integration of proof-assistants and automatic decision procedures. We aim to provide a Coq-signature such that the user can specify its protocol and the goal-equivalence P ∼ Q. The proof can then proceed interactively, as usual, but with the possibility of invoking an ad-hoc tactic to automatically verify finite subgoals. Eventually, the tactic could not terminate or fail if a depth limit is imposed.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-23
SLIDE 23

Motivation The encoding Future work Details about the encoding

Our idea.

Our work in progress focus on the integration of proof-assistants and automatic decision procedures. We aim to provide a Coq-signature such that the user can specify its protocol and the goal-equivalence P ∼ Q. The proof can then proceed interactively, as usual, but with the possibility of invoking an ad-hoc tactic to automatically verify finite subgoals. Eventually, the tactic could not terminate or fail if a depth limit is imposed.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-24
SLIDE 24

Motivation The encoding Future work Details about the encoding

Problems.

In general it is not sufficient to have an “oracle” able to say “yes/no” (which amounts to introduce a new axiom for the related case) when invoked on a goal P ∼f Q, since it can be bugged. Moreover, this approach is not acceptable in PCA. Hence, we need a tactic which can provide an effective witness. Thus, eventual bugs in the algorithm/implementation can be easily spotted (and the size of TCB decreases).

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-25
SLIDE 25

Motivation The encoding Future work Details about the encoding

Problems.

In general it is not sufficient to have an “oracle” able to say “yes/no” (which amounts to introduce a new axiom for the related case) when invoked on a goal P ∼f Q, since it can be bugged. Moreover, this approach is not acceptable in PCA. Hence, we need a tactic which can provide an effective witness. Thus, eventual bugs in the algorithm/implementation can be easily spotted (and the size of TCB decreases).

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-26
SLIDE 26

Motivation The encoding Future work Details about the encoding

Problems.

In general it is not sufficient to have an “oracle” able to say “yes/no” (which amounts to introduce a new axiom for the related case) when invoked on a goal P ∼f Q, since it can be bugged. Moreover, this approach is not acceptable in PCA. Hence, we need a tactic which can provide an effective witness. Thus, eventual bugs in the algorithm/implementation can be easily spotted (and the size of TCB decreases).

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-27
SLIDE 27

Motivation The encoding Future work Details about the encoding

Problems.

In general it is not sufficient to have an “oracle” able to say “yes/no” (which amounts to introduce a new axiom for the related case) when invoked on a goal P ∼f Q, since it can be bugged. Moreover, this approach is not acceptable in PCA. Hence, we need a tactic which can provide an effective witness. Thus, eventual bugs in the algorithm/implementation can be easily spotted (and the size of TCB decreases).

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-28
SLIDE 28

Motivation The encoding Future work Details about the encoding

Status of the work.

Implementation in Coq: done (using weak-HOAS, coinductive types, multiple judgments, capitalizing on similar experience with π-calculus, ambients, . . . ). Testing of the implementation, by manual verification of some example equivalence: done. Implementation of the tactic for finite processes: to do

modification of existing algorithms to produce witnesses of equivalences, implementation as Ltac.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-29
SLIDE 29

Motivation The encoding Future work Details about the encoding

Status of the work.

Implementation in Coq: done (using weak-HOAS, coinductive types, multiple judgments, capitalizing on similar experience with π-calculus, ambients, . . . ). Testing of the implementation, by manual verification of some example equivalence: done. Implementation of the tactic for finite processes: to do

modification of existing algorithms to produce witnesses of equivalences, implementation as Ltac.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-30
SLIDE 30

Motivation The encoding Future work Details about the encoding

Status of the work.

Implementation in Coq: done (using weak-HOAS, coinductive types, multiple judgments, capitalizing on similar experience with π-calculus, ambients, . . . ). Testing of the implementation, by manual verification of some example equivalence: done. Implementation of the tactic for finite processes: to do

modification of existing algorithms to produce witnesses of equivalences, implementation as Ltac.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-31
SLIDE 31

Motivation The encoding Future work Details about the encoding

Status of the work.

Implementation in Coq: done (using weak-HOAS, coinductive types, multiple judgments, capitalizing on similar experience with π-calculus, ambients, . . . ). Testing of the implementation, by manual verification of some example equivalence: done. Implementation of the tactic for finite processes: to do

modification of existing algorithms to produce witnesses of equivalences, implementation as Ltac.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-32
SLIDE 32

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Names, Variables and Terms.

(Names) N

  • Parameter Name :

Set. forall m n:Name, m = n + m <> n. (Variables) V

  • Parameter Var :

Set. Terms are encoded by means of an inductive type: Inductive Term : Set := name : Name -> Term (name) | var : Var -> Term (variable) | zero : Term (zero) | suc : Term -> Term (successor) | pair : Term -> Term -> Term (pair) | sk_enc : Term -> Term -> Term. (shared-key encryption)

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-33
SLIDE 33

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Names, Variables and Terms.

(Names) N

  • Parameter Name :

Set. forall m n:Name, m = n + m <> n. (Variables) V

  • Parameter Var :

Set. Terms are encoded by means of an inductive type: Inductive Term : Set := name : Name -> Term (name) | var : Var -> Term (variable) | zero : Term (zero) | suc : Term -> Term (successor) | pair : Term -> Term -> Term (pair) | sk_enc : Term -> Term -> Term. (shared-key encryption)

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-34
SLIDE 34

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Names, Variables and Terms.

(Names) N

  • Parameter Name :

Set. forall m n:Name, m = n + m <> n. (Variables) V

  • Parameter Var :

Set. Terms are encoded by means of an inductive type: Inductive Term : Set := name : Name -> Term (name) | var : Var -> Term (variable) | zero : Term (zero) | suc : Term -> Term (successor) | pair : Term -> Term -> Term (pair) | sk_enc : Term -> Term -> Term. (shared-key encryption)

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-35
SLIDE 35

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Names, Variables and Terms.

(Names) N

  • Parameter Name :

Set. forall m n:Name, m = n + m <> n. (Variables) V

  • Parameter Var :

Set. Terms are encoded by means of an inductive type: Inductive Term : Set := name : Name -> Term (name) | var : Var -> Term (variable) | zero : Term (zero) | suc : Term -> Term (successor) | pair : Term -> Term -> Term (pair) | sk_enc : Term -> Term -> Term. (shared-key encryption)

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-36
SLIDE 36

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Names, Variables and Terms.

(Names) N

  • Parameter Name :

Set. forall m n:Name, m = n + m <> n. (Variables) V

  • Parameter Var :

Set. Terms are encoded by means of an inductive type: Inductive Term : Set := name : Name -> Term (name) | var : Var -> Term (variable) | zero : Term (zero) | suc : Term -> Term (successor) | pair : Term -> Term -> Term (pair) | sk_enc : Term -> Term -> Term. (shared-key encryption)

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-37
SLIDE 37

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Processes.

Processes are also encoded by means of an inductive type:

Inductive Proc : Set :=

plain, i.e., first order constructors:

  • ut_barb : Term -> Term -> Proc -> Proc (output)

| par : Proc -> Proc -> Proc (parallel composition) ... | nil : Proc (null process)

binders, i.e., higher order constructors:

| in_barb : Term -> (Var-> Proc) -> Proc (input) ... | nu : (Name -> Proc) -> Proc. (restriction)

As usual, the weak-HOAS encoding approach allows to delegate α-conversion and fresh renaming to the metalanguage.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-38
SLIDE 38

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Processes.

Processes are also encoded by means of an inductive type:

Inductive Proc : Set :=

plain, i.e., first order constructors:

  • ut_barb : Term -> Term -> Proc -> Proc (output)

| par : Proc -> Proc -> Proc (parallel composition) ... | nil : Proc (null process)

binders, i.e., higher order constructors:

| in_barb : Term -> (Var-> Proc) -> Proc (input) ... | nu : (Name -> Proc) -> Proc. (restriction)

As usual, the weak-HOAS encoding approach allows to delegate α-conversion and fresh renaming to the metalanguage.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-39
SLIDE 39

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Processes.

Processes are also encoded by means of an inductive type:

Inductive Proc : Set :=

plain, i.e., first order constructors:

  • ut_barb : Term -> Term -> Proc -> Proc (output)

| par : Proc -> Proc -> Proc (parallel composition) ... | nil : Proc (null process)

binders, i.e., higher order constructors:

| in_barb : Term -> (Var-> Proc) -> Proc (input) ... | nu : (Name -> Proc) -> Proc. (restriction)

As usual, the weak-HOAS encoding approach allows to delegate α-conversion and fresh renaming to the metalanguage.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-40
SLIDE 40

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Processes.

Processes are also encoded by means of an inductive type:

Inductive Proc : Set :=

plain, i.e., first order constructors:

  • ut_barb : Term -> Term -> Proc -> Proc (output)

| par : Proc -> Proc -> Proc (parallel composition) ... | nil : Proc (null process)

binders, i.e., higher order constructors:

| in_barb : Term -> (Var-> Proc) -> Proc (input) ... | nu : (Name -> Proc) -> Proc. (restriction)

As usual, the weak-HOAS encoding approach allows to delegate α-conversion and fresh renaming to the metalanguage.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-41
SLIDE 41

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Processes.

Processes are also encoded by means of an inductive type:

Inductive Proc : Set :=

plain, i.e., first order constructors:

  • ut_barb : Term -> Term -> Proc -> Proc (output)

| par : Proc -> Proc -> Proc (parallel composition) ... | nil : Proc (null process)

binders, i.e., higher order constructors:

| in_barb : Term -> (Var-> Proc) -> Proc (input) ... | nu : (Name -> Proc) -> Proc. (restriction)

As usual, the weak-HOAS encoding approach allows to delegate α-conversion and fresh renaming to the metalanguage.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-42
SLIDE 42

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Processes.

Processes are also encoded by means of an inductive type:

Inductive Proc : Set :=

plain, i.e., first order constructors:

  • ut_barb : Term -> Term -> Proc -> Proc (output)

| par : Proc -> Proc -> Proc (parallel composition) ... | nil : Proc (null process)

binders, i.e., higher order constructors:

| in_barb : Term -> (Var-> Proc) -> Proc (input) ... | nu : (Name -> Proc) -> Proc. (restriction)

As usual, the weak-HOAS encoding approach allows to delegate α-conversion and fresh renaming to the metalanguage.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-43
SLIDE 43

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Judgments

Commitment relation P

a

→ A (modeling the dynamic behaviour of processes): Inductive commit : Proc -> Barb -> Agent -> Prop := ... Equivalence between “undistinguishable” terms (fr, th) ⊢ M ↔ N: Inductive eqTerm (fr:Frame) (th:Theory) : Term -> Term -> Prop := ... Framed Bisimilarity (fr, th) ⊢ P ∼f Q: CoInductive fBisim : Frame -> Theory -> Proc -> Proc -> Prop := ...

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-44
SLIDE 44

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Abstractions and concretions.

Abstractions are monadic, so they can be representend in a straightforward way by functional terms over Var: Definition Abs := Var -> Proc. Concretions instead can exhibit a prefix of restrictions of arbitrary length: (ν n)MQ In order to correctly render the notion of pseudo-application (x)P@(ν n)MQ = (ν n)(P[M/x] | Q), we need to “decompose” the prefix before carrying out the communication:

Inductive interactl : Abs -> Agent -> Proc -> Prop := interactl_base : forall A:Abs, forall M:Term, forall P Q:Proc, (substProc M A P) -> (interactl A (conc_base M Q) (par P Q)) | interactl_bind : forall A:Abs, forall C:Name->Agent, forall P:Name->Proc, (forall n:Name, interactl A (C n) (P n)) -> interactl A (nu_ag C) (nu P).

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-45
SLIDE 45

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Abstractions and concretions.

Abstractions are monadic, so they can be representend in a straightforward way by functional terms over Var: Definition Abs := Var -> Proc. Concretions instead can exhibit a prefix of restrictions of arbitrary length: (ν n)MQ In order to correctly render the notion of pseudo-application (x)P@(ν n)MQ = (ν n)(P[M/x] | Q), we need to “decompose” the prefix before carrying out the communication:

Inductive interactl : Abs -> Agent -> Proc -> Prop := interactl_base : forall A:Abs, forall M:Term, forall P Q:Proc, (substProc M A P) -> (interactl A (conc_base M Q) (par P Q)) | interactl_bind : forall A:Abs, forall C:Name->Agent, forall P:Name->Proc, (forall n:Name, interactl A (C n) (P n)) -> interactl A (nu_ag C) (nu P).

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-46
SLIDE 46

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Abstractions and concretions.

Abstractions are monadic, so they can be representend in a straightforward way by functional terms over Var: Definition Abs := Var -> Proc. Concretions instead can exhibit a prefix of restrictions of arbitrary length: (ν n)MQ In order to correctly render the notion of pseudo-application (x)P@(ν n)MQ = (ν n)(P[M/x] | Q), we need to “decompose” the prefix before carrying out the communication:

Inductive interactl : Abs -> Agent -> Proc -> Prop := interactl_base : forall A:Abs, forall M:Term, forall P Q:Proc, (substProc M A P) -> (interactl A (conc_base M Q) (par P Q)) | interactl_bind : forall A:Abs, forall C:Name->Agent, forall P:Name->Proc, (forall n:Name, interactl A (C n) (P n)) -> interactl A (nu_ag C) (nu P).

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-47
SLIDE 47

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Example.

The processes (νK)c{M}K and (νK)c{M′}K are in a framed bisimulation according to Example 1 of [1]. Intuitively, this means that the abovementioned processes do not reveal M and M′, respectively. This can be rendered in Coq as follows:

Lemma Example1: forall M M’:Term, forall c:Name, (closedTerm M) -> (closedTerm M’) -> exists th:Theory, (ok (frame_add c (empty_set Name)) th) /\ (fBisim (frame_add c (empty_set Name)) th (nu (fun K:Name => (out_barb (name c) (sk_enc M (name K)) nil))) (nu (fun K’:Name => (out_barb (name c) (sk_enc M’ (name K’)) nil))) ).

The previous lemma can be proved mimicking the proof made with “pencil and paper”.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-48
SLIDE 48

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Example.

The processes (νK)c{M}K and (νK)c{M′}K are in a framed bisimulation according to Example 1 of [1]. Intuitively, this means that the abovementioned processes do not reveal M and M′, respectively. This can be rendered in Coq as follows:

Lemma Example1: forall M M’:Term, forall c:Name, (closedTerm M) -> (closedTerm M’) -> exists th:Theory, (ok (frame_add c (empty_set Name)) th) /\ (fBisim (frame_add c (empty_set Name)) th (nu (fun K:Name => (out_barb (name c) (sk_enc M (name K)) nil))) (nu (fun K’:Name => (out_barb (name c) (sk_enc M’ (name K’)) nil))) ).

The previous lemma can be proved mimicking the proof made with “pencil and paper”.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-49
SLIDE 49

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Example.

The processes (νK)c{M}K and (νK)c{M′}K are in a framed bisimulation according to Example 1 of [1]. Intuitively, this means that the abovementioned processes do not reveal M and M′, respectively. This can be rendered in Coq as follows:

Lemma Example1: forall M M’:Term, forall c:Name, (closedTerm M) -> (closedTerm M’) -> exists th:Theory, (ok (frame_add c (empty_set Name)) th) /\ (fBisim (frame_add c (empty_set Name)) th (nu (fun K:Name => (out_barb (name c) (sk_enc M (name K)) nil))) (nu (fun K’:Name => (out_barb (name c) (sk_enc M’ (name K’)) nil))) ).

The previous lemma can be proved mimicking the proof made with “pencil and paper”.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-50
SLIDE 50

Motivation The encoding Future work Details about the encoding The encoding of the object language Basic Ideas for Proofs/Implementation

Example.

The processes (νK)c{M}K and (νK)c{M′}K are in a framed bisimulation according to Example 1 of [1]. Intuitively, this means that the abovementioned processes do not reveal M and M′, respectively. This can be rendered in Coq as follows:

Lemma Example1: forall M M’:Term, forall c:Name, (closedTerm M) -> (closedTerm M’) -> exists th:Theory, (ok (frame_add c (empty_set Name)) th) /\ (fBisim (frame_add c (empty_set Name)) th (nu (fun K:Name => (out_barb (name c) (sk_enc M (name K)) nil))) (nu (fun K’:Name => (out_barb (name c) (sk_enc M’ (name K’)) nil))) ).

The previous lemma can be proved mimicking the proof made with “pencil and paper”.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq

slide-51
SLIDE 51

Appendix References

References I

  • M. Abadi and A.D. Gordon

A Bisimulation Method for Cryptographic Protocols. Nordic Journal of Computing, 1998.

  • H. Hüttel.

Deciding Framed Bisimilarity. Pre-Proceedings of Infinity’02, June 2002.

  • M. Miculan, I. Scagnetto

Framed Bisimilarity in Coq