Abstract
Rule-based languages are being used for ever more ambitious applications. As program size grows however, so does the overhead of team-based development, reusing components, and just keeping a large flat collection of rules from interfering. In this paper, we propose a module system for a small logically-motivated rule-based language. The resulting modules are nothing more than rewrite rules of a specific form, which are themselves just logic formulas. Yet, they provide some of the same features found in advanced module systems such as that of Standard ML, in particular name space separation, support for abstract data types, and parametrization (functors in ML). Our modules also offer essential features for concurrent programming such as facilities for sharing private names. This approach is directly applicable to other rule-based languages, including most forward-chaining logic programming languages and many process algebras.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Abdallah, M.N.: Procedures in horn-clause programming. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 433–447. Springer, Heidelberg (1986)
Ashley-Rollman, M.P., Lee, P., Goldstein, S.C., Pillai, P., Campbell, J.D.: A language for large ensembles of independently executing nodes. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 265–280. Springer, Heidelberg (2009)
Banâtre, J.-P., Le Métayer, D.: Programming by multiset transformation. Commun. ACM 36(1), 98–111 (1993)
Bugliesi, M., Lamma, E., Mello, P.: Modularity in logic programming. J. Logic Program. 19–20(1), 443–502 (1994)
Cervesato, I., Lam, E.S.: Modular multiset rewriting in focused linear logic. In: Technical ReportCMU-CS-15-117, Carnegie Mellon University, Pittsburgh, PA (2015)
Cervesato, I., Scedrov, A.: Relating state-based and process-based concurrency through linear logic. Inf. Comput. 207(10), 1044–1077 (2009)
Cruz, F., Ashley-Rollman, M., Goldstein, S., Rocha, R., Pfenning, F.: Bottom-up logic programming for multicores. In: DAMP 2012 (2012)
Cruz, F., Rocha, R., Goldstein, S., Pfenning, F.: A linear logic programming language for concurrent programming over graph structures. In: ICLP 2014, Vienna, Austria (2014)
Fournet, C.: The join-calculus: a calculus for distributed mobile programming. Ph.D thesis, École Polytechnique, Palaiseau (1998)
Frühwirth, T.: Constraint Handling Rules. Cambridge University Press, Cambridge (2009)
Gabbay, M.J., Mathijssen, A.: One-and-a-halfth-order Logic. J. Logic Comput. 18(4), 521–562 (2008)
Gallaire, H., Minker, J., Nicolas, J.M.: Logic and databases: a deductive approach. ACM Comput. Surv. 16(2), 153–185 (1984)
Girard, J.-Y.: Linear logic. Theor. Comput. Sci. 50, 1–102 (1987)
Grumbach, S., Wang, F.: Netlog, a rule-based language for distributed programming. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 88–103. Springer, Heidelberg (2010)
Lam, E.S.L., Cervesato, I., Fatima, N.: Comingle: distributed logic programming for decentralized mobile ensembles. In: Holvoet, T., Viroli, M. (eds.) Coordination Models and Languages. LNCS, vol. 9037, pp. 51–66. Springer, Heidelberg (2015)
Laurent, O., Quatrini, M., Tortora de Falco, L.: Polarized and focalized linear and classical proofs. Ann.Pure Appl. Logic 134(2–3), 217–264 (2005)
Meseguer, J., Braga, C.O.: Modular rewriting semantics of programming languages. In: Rattray, C., Maharaj, S., Shankland, C. (eds.) AMAST 2004. LNCS, vol. 3116, pp. 364–378. Springer, Heidelberg (2004)
Miller, D.: A proposal for modules in \(\lambda \)prolog. In: Dyckhoff, R. (ed.) ELP 1993. LNCS, vol. 798, pp. 206–221. Springer, Heidelberg (1994)
Milner, R., Harper, R., MacQueen, D., Tofte, M.: The Definition of Standard ML - Revised. MIT Press, Cambridge (1997)
Sangiorgi, D., Walker, D.: The Pi-Calculus - a Theory of Mobile Processes. Cambridge University Press, Cambridge (2001)
Simmons, R.J.: Structural focalization. ACM Trans. Comput. Logic 15(3), 1–33 (2014)
Watkins, K., Pfenning, F., Walker, D., Cervesato, I.: Specifying properties of concurrent computations in CLF. In: LFM 2004, pp. 67–87. ENTCS 199, Cork, Ireland (2007)
Acknowledgments
This paper was made possible by grants NPRP 09-667-1-100 (Effective Programming for Large Distributed Ensembles) and NPRP 4-341-1-059 (Usable automated data inference for end-users) from the Qatar National Research Fund (a member of the Qatar Foundation). The statements made herein are solely the responsibility of the authors.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cervesato, I., Lam, E.S.L. (2015). Modular Multiset Rewriting. In: Davis, M., Fehnker, A., McIver, A., Voronkov, A. (eds) Logic for Programming, Artificial Intelligence, and Reasoning. LPAR 2015. Lecture Notes in Computer Science(), vol 9450. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-48899-7_36
Download citation
DOI: https://doi.org/10.1007/978-3-662-48899-7_36
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-48898-0
Online ISBN: 978-3-662-48899-7
eBook Packages: Computer ScienceComputer Science (R0)