Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
AceRules: Executing Rules in Controlled Natural Language
1. AceRules: Executing Rules in Controlled
Natural Language
Tobias Kuhn
(University of Zurich)
RR2007
Innsbruck
8 June 2007
2. Tobias Kuhn, RR2007, 8 June 2007 2
Introduction
Domain specialists that are supposed to create
and/or validate rules are often not familiar with
formal languages
Verbalization of the rules in natural language
becomes necessary
Translation of rules into NL (and backwards) is
complicated and a potential source of errors
3. Tobias Kuhn, RR2007, 8 June 2007 3
The AceRules Approach
Expressing rules in controlled natural language
Attempto Controlled English (ACE)
http://attempto.ifi.uzh.ch
formal and human readable
4. Tobias Kuhn, RR2007, 8 June 2007 4
Attempto Controlled English
(ACE)
Developed at the University of Zurich
Formal language with a restricted English grammar
ACE supports: quantification, negation, conditional
sentences, modality, active & passive voice,
singular & plural, relative clauses, conjunction &
disjunction, anaphoric references, pronouns,
variables, commands, queries, macros
ACE texts can be translated automatically and
unambiguously into first-order logic
5. Tobias Kuhn, RR2007, 8 June 2007 5
ACE as a Rule Language:
Some Examples
John is an important customer.
customer('John') <-
important('John') <-
No clerk is a customer.
-customer(A) <- clerk(A)
Everyone who is not provably a criminal is trustworthy.
trustworthy(A) <- ~criminal(A)
If a resource is public then every user can download the resource.
can(download(A,B)) <- user(A), resource(B), public(B)
If a user is authenticated and has a subscription and there is a resource
that is available for the subscription then the user can download the
resource.
can(download(A,B)) <- be_available_for(B,C), have(A,C),
resource(B), subscription(C), user(A), authenticated(A)
6. Tobias Kuhn, RR2007, 8 June 2007 6
AceRules
Input and output in controlled natural language
(ACE)
Forward chaining interpreters
John is a man.
Every man is a human.
Mary is a woman.
Every woman is a human.
No man is a woman and no woman is a man.
Everyone who is not provably a criminal is
trustworthy.
John is a criminal.
No criminal is trustworthy.
Every human who is trustworthy gets a credit-
card from BankX.
Mary is trustworthy.
BankX is trustworthy.
Mary is a woman.
Mary is a human.
John is a man.
John is a human.
John is a criminal.
Mary gets a credit-card from BankX.
It is false that John is trustworthy.
It is false that John is a woman.
It is false that Mary is a man.
Program: Answer:
7. Tobias Kuhn, RR2007, 8 June 2007 7
Semantics
Semantics are exchangeable
Currently supported semantics:
Courteous logic programs
Stable models
Stable models with strong negation
Other semantics (i.e. interpreters) could be
incorporated with little integration effort.
8. Tobias Kuhn, RR2007, 8 June 2007 8
Web Interface
http://attempto.ifi.uzh.ch/acerules
9. Tobias Kuhn, RR2007, 8 June 2007 9
The Missing Link:
Authoring Tool
Problem: How to learn writing in ACE?