Hostname: page-component-8448b6f56d-wq2xx Total loading time: 0 Render date: 2024-04-19T10:59:54.169Z Has data issue: false hasContentIssue false

A concurrent constraint programming interpretation of access permissions

Published online by Cambridge University Press:  10 April 2018

CARLOS OLARTE
Affiliation:
ECT, Universidade Federal do Rio Grande do Norte, Natal-RN, Brazil (e-mail: carlos.olarte@gmail.com)
ELAINE PIMENTEL
Affiliation:
DMAT, Universidade Federal do Rio Grande do Norte, Natal-RN, Brazil (e-mail: elaine.pimentel@gmail.com)
CAMILO RUEDA
Affiliation:
DECC, Pontificia Universidad Javeriana Cali, Valle del Cauca, Colombia (e-mail: camilo.rueda@gmail.com)

Abstract

A recent trend in object-oriented programming languages is the use of access permissions (APs) as an abstraction for controlling concurrent executions of programs. The use of AP source code annotations defines a protocol specifying how object references can access the mutable state of objects. Although the use of APs simplifies the task of writing concurrent code, an unsystematic use of them can lead to subtle problems. This paper presents a declarative interpretation of APs as linear concurrent constraint programs (lcc). We represent APs as constraints (i.e., formulas in logic) in an underlying constraint system whose entailment relation models the transformation rules of APs. Moreover, we use processes in lcc to model the dependencies imposed by APs, thus allowing the faithful representation of their flow in the program. We verify relevant properties about AP programs by taking advantage of the interpretation of lcc processes as formulas in Girard's intuitionistic linear logic (ILL). Properties include deadlock detection, program correctness (whether programs adhere to their AP specifications or not), and the ability of methods to run concurrently. By relying on a focusing discipline for ILL, we provide a complexity measure for proofs of the above-mentioned properties. The effectiveness of our verification techniques is demonstrated by implementing the Alcove tool that includes an animator and a verifier. The former executes the lcc model, observing the flow of APs, and quickly finding inconsistencies of the APs vis-à-vis the implementation. The latter is an automatic theorem prover based on ILL.

Type
Original Article
Copyright
Copyright © Cambridge University Press 2018 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Abrial, J.-R., Butler, M. J., Hallerstede, S., Hoang, T. S., Mehta, F. and Voisin, L. 2010. Rodin: An open toolset for modelling and reasoning in event-b. International Journal on Software Tools for Technology Transfer 12, 6, 447466.Google Scholar
Andreoli, J.-M. 1992. Logic programming with focusing proofs in linear logic. Journal of Logic and Computation 2, 3, 297347.Google Scholar
Beckman, N. E., Bierhoff, K. and Aldrich, J. 2008. Verifying correct usage of atomic blocks and typestate. In OOPSLA, Harris, G. E., Ed. ACM, 227–244.Google Scholar
Bierhoff, K. and Aldrich, J. 2007. Modular typestate checking of aliased objects. In OOPSLA, Gabriel, R. P., Bacon, D. F., Lopes, C. V. and G. L. S. Jr., Eds. ACM, 301–320.Google Scholar
Boyland, J. 2003. Checking interference with fractional permissions. In SAS, Cousot, R., Ed. Lecture Notes in Computer Science, vol. 2694. Springer, 55–72.Google Scholar
Boyland, J., Noble, J. and Retert, W. 2001. Capabilities for sharing: A generalisation of uniqueness and read-only. In ECOOP, Knudsen, J. L., Ed. Lecture Notes in Computer Science, vol. 2072. Springer, 227.Google Scholar
de Boer, F. S., Gabbrielli, M., Marchiori, E. and Palamidessi, C. 1997. Proving concurrent constraint programs correct. ACM Transactions on Programming Languages and Systems 19, 5, 685725.CrossRefGoogle Scholar
Fages, F., Ruet, P. and Soliman, S. 2001. Linear concurrent constraint programming: Operational and phase semantics. Information and Computation 165, 1, 1441.CrossRefGoogle Scholar
Girard, J.-Y. 1987. Linear logic. Theoretical Computer Science 50, 1102.Google Scholar
Haemmerlé, R. 2011. Observational equivalences for linear logic concurrent constraint languages. Theory and Practice of Logic Programming 11, 45, 469485.CrossRefGoogle Scholar
Igarashi, A., Pierce, B. C. and Wadler, P. 2001. Featherweight java: A minimal core calculus for java and GJ. ACM Transactions on Programming Languages and Systems 23, 3, 396450.Google Scholar
Jagadeesan, R., Marrero, W., Pitcher, C. and Saraswat, V. A. 2005. Timed constraint programming: A declarative approach to usage control. In PPDP, Barahona, P. and Felty, A. P., Eds. ACM, 164175.Google Scholar
Leino, K. R. M. 1998. Data groups: Specifying the modification of extended state. In OOPSLA, Freeman-Benson, B. N. and Chambers, C., Eds. ACM, 144153.Google Scholar
Leino, K. R. M. 2010. Verifying concurrent programs with Chalice. In VMCAI, Barthe, G. and Hermenegildo, M. V., Eds. Lecture Notes in Computer Science, Vol. 5944. Springer, 2.Google Scholar
Lincoln, P., Mitchell, J. C., Scedrov, A. and Shankar, N. 1992. Decision problems for propositional linear logic. Annals of Pure and Applied Logic 56, 1–3, 239311.CrossRefGoogle Scholar
Martinez, T. 2010. Semantics-preserving translations between linear concurrent constraint programming and constraint handling rules. In PPDP, Kutsia, T., Schreiner, W. and Fernández, M., Eds. ACM, 5766.Google Scholar
Miller, D. and Nadathur, G. 2012. Programming with Higher-Order Logic. Cambridge University Press.CrossRefGoogle Scholar
Nadathur, G. and Miller, D. 1988. An overview of lambda-prolog. In Logic Programming, Proc. of the 5th International Conference and Symposium, Kowalski, R. A. and Bowen, K. A., Eds. MIT Press, Seattle, Washington, August 15–19, 1988 (2 Volumes), 810827.Google Scholar
Naden, K., Bocchino, R., Aldrich, J. and Bierhoff, K. 2012. A type system for borrowing permissions. In POPL, Field, J. and Hicks, M., Eds. ACM, 557570.Google Scholar
Nielsen, M., Palamidessi, C. and Valencia, F. D. 2002. Temporal concurrent constraint programming: Denotation, logic and applications. Nordic Journal of Computing 9, 1, 145188.Google Scholar
Nigam, V. 2012. On the complexity of linear authorization logics. In LICS. IEEE, 511–520.Google Scholar
Olarte, C. and Pimentel, E. 2017. On concurrent behaviors and focusing in linear logic. Theoretical Computer Science 685, 4664.Google Scholar
Olarte, C., Pimentel, E., Rueda, C. and Cataño, N. 2012. A linear concurrent constraint approach for the automatic verification of access permissions. In PPDP, Schreye, D. D., Janssens, G. and King, A., Eds. ACM, 207216.Google Scholar
Olarte, C., Rueda, C. and Valencia, F. D. 2013. Models and emerging trends of concurrent constraint programming. Constraints 18, 535578.Google Scholar
Pottier, F. and Protzenko, J. 2013. Programming with permissions in mezzo. Special Interest Group on Programming Languages Notices 48, 9, 173184.Google Scholar
Saraswat, V. A. 1993. Concurrent Constraint Programming. MIT Press.Google Scholar
Saraswat, V. A. and Rinard, M. C. 1990. Concurrent constraint programming. In POPL, Allen, F. E., Ed. ACM Press, 232245.Google Scholar
Saraswat, V. A., Rinard, M. C. and Panangaden, P. 1991. Semantic foundations of concurrent constraint programming. In POPL, Wise, D. S., Ed. ACM Press, 333352.Google Scholar
Stork, S., Marques, P. and Aldrich, J. 2009. Concurrency by default: Using permissions to express dataflow in stateful programs. In OOPSLA Companion, Arora, S. and Leavens, G. T., Eds. ACM, 933940.Google Scholar
Stork, S., Naden, K., Sunshine, J., Mohr, M., Fonseca, A., Marques, P. and Aldrich, J. 2014. Æminium: A permission-based concurrent-by-default programming language approach. ACM Transactions on Programming Languages and Systems 36, 1, 2.Google Scholar
Sunshine, J., Naden, K., Stork, S., Aldrich, J. and Tanter, É. 2011. First-class state change in plaid. In OOPSLA, Lopes, C. V. and Fisher, K., Eds. ACM, 713732.Google Scholar
Ullrich, S. A. 2016. Simple Verification of Rust Programs via Functional Purification. Master's Thesis, Karlsruher Institut für Technologie (KIT).Google Scholar