  Using dedicated software to represent or enact legislation or regulation has
the advantage of solving the inherent ambiguity of legal texts and enabling the
automation of compliance with legal norms. On the other hand, the so-called
code-driven normativity is less flexible than the legal provisions it claims to
implement, and transforms the nature of legal protection, potentially reducing
the capability of individual human beings to invoke legal remedies.
  In this article we focus on software-based legal contracts; we illustrate the
design of a legal calculus whose primitives allow a direct formalisation of
contracts' normative elements (i.e., permissions, prohibitions, obligations,
asset transfer, judicial enforcement and openness to the external context). We
show that interpreting legal contracts as interaction protocols between
(untrusted) parties enables the generalisation of formal methods and tools for
concurrent systems to the legal setting

Programming Languages;Computers and Society;Logic in Computer Science