Hostname: page-component-7479d7b7d-68ccn Total loading time: 0 Render date: 2024-07-12T05:40:20.483Z Has data issue: false hasContentIssue false

Experience report: Functional programming in C-Rules

Published online by Cambridge University Press:  02 March 2010

JEREMY WAZNY*
Affiliation:
Constraint Technologies International, Level 7, 224 Queen Street, Melbourne VIC 3000, Australia (e-mail: jeremy.wazny@constrainttechnologies.com)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

C-Rules is a business rules management system developed by Constraint Technologies International (www.constrainttechnologies.com) that is designed for use in transport, travel and logistics problems. Individual businesses within these industries often need to solve the same kinds of problems related to scheduling of operations, resource allocation, staff rostering and so on, but each organisation has its own rules and procedures. Furthermore, these problems tend to be combinatorially challenging: before a final solution is chosen, many potential choices need to be generated, evaluated and compared. In C-Rules, users define rules that describe various aspects of a problem. These rules can be invoked from an application, which is typically either an optimising solver or an interactive planning tool. Rules can be used to encode evaluation criteria, such as the legality or cost of a proposed solution, or values like configuration parameters that may be used by the host application to tune or direct its progress. At its core, C-Rules provides a functional expression language that affords users power and flexibility when formulating rules. In this paper we will describe our experiences of using functional programming both at the end-user level and at the implementation level. We highlight some of the benefits of basing our rule system on features such as higher-order functions, referential transparency and static, polymorphic typing. We also outline some of our experiences in using Haskell to build an efficient compiler for the core language.

Type
Articles
Copyright
Copyright © Cambridge University Press 2010

References

Augustsson, L. (1997) Partial evaluation in aircraft crew planning. In Partial Evaluation and Semantics-Based Program Manipulation, Amsterdam, The Netherlands, June 1997. New York: ACM, pp. 127136.Google Scholar
GHC. (2007) Glasgow Haskell Compiler [online]. Available at: http://www.haskell.org/ghc/ Accessed July 2007.Google Scholar
Hughes, J. (1995) The Design of a pretty-printing library. In Advanced Functional Programming, Jeuring, J. & Meijer, E. (eds), LNCS vol. 925, Heidelberg, Germany: Springer, pp. 5396.CrossRefGoogle Scholar
Marriott, K. & Stuckey, P. J. (1998) Programming with Constraints: An Introduction. MIT Press. Cambridge, Mass.CrossRefGoogle Scholar
Mercury. (2007) Melbourne Mercury Compiler [online]. Available at: http://www.cs.mu.oz.au/research/mercury/ Accessed July 2007.Google Scholar
Sulzmann, M., Odersky, M. & Wehr, M. (1997) Type inference with constrained types. Fourth International Workshop on Foundations of Object-Oriented Programming (FOOL 4), Paris, France.Google Scholar
TPAC Pairing. (2007) TPAC Pairing Optimizer [online]. Available at: http://www.constrainttechnologies.com/components/XBO_Pairing_Optimiser.html Accessed July 2007.Google Scholar
TPAC Rostering. (2007) TPAC Rostering Optimizer [online]. Available at: http://www.constrainttechnologies.com/components/CAM_sharp_Rostering_Optimiser.html Accessed July 2007.Google Scholar
Wazny, J. (2006) Type Inference and Type Error Diagnosis for Hindley Milner with Extensions. PhD thesis, University of Melbourne, Victoria, Australia.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.