Formal Languages and Knowledge Representation
14 chapters
1. 1 What They Are
[Verse 1]
In the world of rules and data flow
Where logic meets the web we know
There's XML that speaks in tongues
Called RuleML where structure's sung
It marks up rules for minds to read
Semantic webs fulfill the need
[Chorus]
Rule M L, Rule M L
XML for rules that tell
S W R L takes it higher
Horn clauses set the web on fire
When systems store and data calls
These languages will build the walls
[Verse 2]
Now SWRL takes a bigger stand
Combines the best from different lands
OWL ontologies hold the truth
While RuleML provides the proof
Horn clause rules that reason well
With logic engines they compel
[Chorus]
Rule M L, Rule M L
XML for rules that tell
S W R L takes it higher
Horn clauses set the web on fire
When systems store and data calls
These languages will build the walls
[Bridge]
System stores some data there
If confidential, then beware
Arrow points to what must be
A-E-S encryption, two-five-six the key
Variables flow with question marks
Logic reasoning leaves its marks
[Verse 3]
Management controls need structure tight
Rules that fire when conditions bite
If system holds confidential gold
Then encryption must take hold
Description logic reasoners see
What requirements need to be
[Chorus]
Rule M L, Rule M L
XML for rules that tell
S W R L takes it higher
Horn clauses set the web on fire
When systems store and data calls
These languages will build the walls
[Outro]
From markup tags to reasoning chains
Semantic rules in web domains
RuleML and SWRL combined
Control the future, rule by design
2. 2 What None of Them Fully Achieve
[Verse 1]
We've got natural language that humans can read
Business folks can write policies they need
But machines can't parse what the words really mean
Ambiguity hiding in every scene
SBVR tries to bridge this divide
Structured English with logic inside
But when deadlines and frequencies come into play
The temporal reasoning starts to fray
[Chorus]
Six properties we're reaching for
But no single language gives us more
Human readable, formal and clean
Deontic logic, temporal machine
Executable code that can verify
Generated documents that satisfy
We're combining tools but the gap remains
No one language holds all the reins
[Verse 2]
Deontic logic speaks of what must be
Obligations, permissions flowing free
But try to read it without a degree
The symbols and syntax aren't user-friendly
ACE makes controlled English shine
Every sentence maps to logic fine
Yet when audit time comes around
Document generation can't be found
[Chorus]
Six properties we're reaching for
But no single language gives us more
Human readable, formal and clean
Deontic logic, temporal machine
Executable code that can verify
Generated documents that satisfy
We're combining tools but the gap remains
No one language holds all the reins
[Bridge]
OSCAL handles interchange with grace
Rego and Cedar enforce in their space
But chain these tools and complexity grows
Each handoff point is where error flows
We need one language that does it all
But perfect solutions haven't made the call
[Chorus]
Six properties we're reaching for
But no single language gives us more
Human readable, formal and clean
Deontic logic, temporal machine
Executable code that can verify
Generated documents that satisfy
We're combining tools but the gap remains
No one language holds all the reins
[Outro]
The quest continues for that perfect tongue
Where business and logic are perfectly strung
Until that day we'll combine what we've got
Six properties achieved, but unified not
3. 1 What Each Language Gets Right
[Verse 1]
Deontic Logic sets the stage with ought and must and may
Formal semantics for the norms that guide us every day
SBVR bridges worlds apart, business minds can read
Rules that humans understand with formal guarantees
[Chorus]
Every language gets one thing exactly right
From reasoning to rules that shine so bright
Deontic dreams and business schemes
Cedar's speed and Rego's might
Every language gets one thing exactly right
[Verse 2]
ACE speaks English crystal clear, no ambiguity
Automatic formalization, clarity you see
Catala writes the law in code, side by side they stand
Literate programming style with logic hand in hand
[Chorus]
Every language gets one thing exactly right
From reasoning to rules that shine so bright
English clear and law sincere
Formal proofs in black and white
Every language gets one thing exactly right
[Verse 3]
Rego runs in production now, policies deployed
Scalable enforcement where compliance is enjoyed
Cedar brings verification, high performance too
Authorization engine that's mathematically true
[Bridge]
OSCAL maps the lifecycle from start to finish line
Compliance data modeled in a framework so refined
LegalRuleML handles when exceptions override
Sophisticated reasoning when rules must step aside
[Verse 4]
XACML's the standard that the industry has blessed
Access control architecture that's battle-tested best
OpenControl speaks developer, documentation flows
Native to the coder's world where understanding grows
[Chorus]
Every language gets one thing exactly right
From reasoning to rules that shine so bright
Standards strong and dev-native song
Ontologies take flight
Every language gets one thing exactly right
[Outro]
SWRL grounds it all in meaning, automated thought
Ontological reasoning, connections can be caught
Eleven different languages, each masters its domain
Together they're the symphony of formal control's refrain
4. 3 The Ideal Language Would Look Like
[Verse 1]
Picture a language that speaks like we do
But compiles to logic that computers can chew
From SBVR it borrows controlled vocabulary
Definitions so clear, no ambiguity
From Catala it takes the literate way
Natural language and logic in perfect display
Side by side they coexist in harmony
Policy text meets formal clarity
[Chorus]
Seven sources make it whole
Obligation, permission, prohibition's role
Parse it clean, enforce it fast
Management controls built to last
SBVR, Catala, Deontic too
ACE and Rego, OSCAL through
LegalRuleML completes the view
The ideal language, tried and true
[Verse 2]
Deontic logic brings the ought and may
First-class operators for the rules we obey
Obligatory, permitted, or forbidden states
Defeasibility when exception creates
ACE provides automatic parsing power
Detects ambiguity in the crucial hour
Paraphrase verification checks what we mean
The clearest interpretation you've ever seen
[Chorus]
Seven sources make it whole
Obligation, permission, prohibition's role
Parse it clean, enforce it fast
Management controls built to last
SBVR, Catala, Deontic too
ACE and Rego, OSCAL through
LegalRuleML completes the view
The ideal language, tried and true
[Bridge]
Rego gives us practical enforcement might
Cloud-native integration burning bright
OSCAL maps the frameworks we need to meet
Lifecycle data model, assessment complete
LegalRuleML adds the temporal scope
Jurisdictional boundaries help us cope
Valid when and where the rule applies
No more regulatory surprise
[Verse 3]
It is obligatory that each access request
For restricted resources must pass the test
Approved by the owner before provision starts
Unless emergency access plays its part
Severity-one incident breaks the chain
Access logged and reviewed again
Within twenty-four hours the review must be
Formal semantics set us free
[Chorus]
Seven sources make it whole
Obligation, permission, prohibition's role
Parse it clean, enforce it fast
Management controls built to last
SBVR, Catala, Deontic too
ACE and Rego, OSCAL through
LegalRuleML completes the view
The ideal language, tried and true
[Outro]
From natural language to enforcement code
The ideal language lights the road
Management controls that sing and compile
Making compliance worth your while
5. 4 Practical Recommendations
[Verse 1]
When chaos rules your compliance game
And policies lack structure or a name
Start building from the ground up, layer by layer
With formal languages as your prayer
First comes vocabulary, terms defined so clear
SBVR principles will make meanings appear
Every word controlled, precision is the key
This foundation sets your organization free
[Chorus]
Five layers strong, we build it right
Vocabulary, authoring in sight
Data models, enforcement too
Verification sees us through
V-A-D-E-V, remember the way
Formal controls will save the day
[Verse 2]
Layer two is where we author with care
ACE-like patterns floating in the air
Actor, action, object in a line
Frequency and condition by design
Semi-formal statements, humans can read
Machine processing plants the seed
Five elements structured, clear and bright
Management controls done right
[Chorus]
Five layers strong, we build it right
Vocabulary, authoring in sight
Data models, enforcement too
Verification sees us through
V-A-D-E-V, remember the way
Formal controls will save the day
[Verse 3]
OSCAL brings the data model home
Machine-readable, no need to roam
Control catalogs and frameworks map
Assessment results bridge the gap
Interoperability is the goal
Regulatory compliance for the whole
Layer three connects the enterprise
Data flowing before your eyes
[Bridge]
Technical controls in Rego shine
Cedar policies form the line
Traceability links them back
Keep your enforcement on track
For critical controls, verify
Deontic logic reaches high
Consistency checked, risks contained
Formal methods have remained
[Chorus]
Five layers strong, we build it right
Vocabulary, authoring in sight
Data models, enforcement too
Verification sees us through
V-A-D-E-V, remember the way
Formal controls will save the day
[Outro]
Build it layered, build it smart
Formal languages, that's the art
From vocabulary to verification's end
Management controls you can defend
6. Struggling to Find Its Track
[Verse 1]
Back in oh-eight they released the spec
SBVR promised rules we could respect
But adoption stayed low, the uptake was poor
Business rules only, not the compliance we're looking for
Security domains just passed it by
While the standard sat there wondering why
[Chorus]
Three big weaknesses holding it back
Adoption is poor, that's the first crack
Tooling is sparse, the second attack
Vocabulary burden, the final lack
SBVR's struggling to find its track
Three weaknesses keeping it off the map
[Verse 2]
Where are the editors for compliance use?
RuleXpress focuses on business, not security rules
No SBVR to OSCAL pipeline exists
Academic prototypes that barely persist
The tooling landscape is thin and weak
For the compliance features that we seek
[Chorus]
Three big weaknesses holding it back
Adoption is poor, that's the first crack
Tooling is sparse, the second attack
Vocabulary burden, the final lack
SBVR's struggling to find its track
Three weaknesses keeping it off the map
[Bridge]
Before you write a single rule
You need a vocabulary tool
Access control, authentication
Authorization, documentation
Audit logs and incident response
Risk and vulnerability of course
Control owners, hundreds more
Building terms before you explore
[Verse 3]
Temporal logic gets left behind
Sequential steps are hard to find
Contain the threat in four hours flat
Then eradicate, then recover after that
State transitions don't flow well
In SBVR's static rule shell
[Verse 4]
Bold and italic, underline too
Font conventions that looked so new
But plain text breaks the typing scheme
Version control kills the formatting dream
Code repos can't handle the style
Making collaboration hard for a while
[Chorus]
Three big weaknesses holding it back
Adoption is poor, that's the first crack
Tooling is sparse, the second attack
Vocabulary burden, the final lack
SBVR's struggling to find its track
Three weaknesses keeping it off the map
[Outro]
Five hundred rules in one document
Compositionality gets bent
No hierarchy to organize the whole
Individual rules lose overall control
SBVR's weaknesses now you know
Why formal languages struggle to grow
7. Parse With Confidence All Along
[Verse 1]
Thirty years of parsing power built into the core
ACE handles English like no system done before
When your sentence makes it through the parsing gate
You know exactly what formal meaning you create
[Chorus]
Mature parser, crystal clear
Ambiguity flags appear
ACE translates what you mean
To logic forms precise and clean
Two strengths that make controls so strong
Parse with confidence all along
[Verse 2]
When multiple meanings could arise from what you write
The parser stops and flags the issue, brings it to light
Resolution rules are documented, plain to see
No hidden guessing games, just transparency
[Chorus]
Mature parser, crystal clear
Ambiguity flags appear
ACE translates what you mean
To logic forms precise and clean
Two strengths that make controls so strong
Parse with confidence all along
[Bridge]
In audit findings, ambiguity's the enemy
Policy statements need clarity and certainty
ACE gives you both with rules that never bend
Parse success means logic you can comprehend
[Final Chorus]
Mature parser, crystal clear
Ambiguity flags appear
Thirty years of proven might
Resolution rules so bright
Two strengths that make controls so strong
Parse with confidence all along
[Outro]
When ACE accepts your control statement today
You know the formal meaning won't drift away
8. Making the Complex Fall in Line
[Verse 1]
In biomedical worlds where knowledge grows
ACE builds ontologies that everyone knows
Requirements engineering finds its voice
Patent claims get clarity through structured choice
Swiss government tested legal text translation
Formal language meets real application
[Chorus]
Where is it useful, where does it shine
ACE makes the complex fall in line
Access control and data classification
Conditional logic brings clarification
First-order statements without the time
ACE makes your management rules align
[Verse 2]
Semantic Web community authors with ease
OWL ontologies in natural language keys
No temporal extensions needed here
No deontic logic to interfere
Just pure conditions that you can express
In controlled English that removes the mess
[Chorus]
Where is it useful, where does it shine
ACE makes the complex fall in line
Access control and data classification
Conditional logic brings clarification
First-order statements without the time
ACE makes your management rules align
[Bridge]
From medical knowledge to patent law
Government texts without a flaw
Web semantics to business rules
ACE provides the formal tools
If then conditions you can state
In natural words that communicate
[Verse 3]
Management controls find their perfect match
When rules need structure that humans can catch
Access permissions and data types
Written in language without the hypes
First-order logic dressed up neat
Makes complex systems feel complete
[Chorus]
Where is it useful, where does it shine
ACE makes the complex fall in line
Access control and data classification
Conditional logic brings clarification
First-order statements without the time
ACE makes your management rules align
[Outro]
Proven domains where ACE succeeds
Meeting all your formal language needs
Where logic meets the human way
ACE transforms how rules convey
9. Beyond True and False
[Verse 1]
Beyond the world of true and false we know
There's logic for the rules that guide our way
When policies need structure they can show
Deontic logic frames what we obey
It reasons through obligation's binding call
Permission, prohibition, exemption's grace
Four operators help us capture all
The normative commands we need to place
[Chorus]
O for obligatory, shall we say
P for permitted, may is the way
F for forbidden, shall not today
E for exempt when rules bend and sway
Modal operators make the rules clear
Deontic logic structures what we hear
From shall to may to shall not appear
The formal language management holds dear
[Verse 2]
When security teams must review each quarter
The obligation operator shows the rule
O wraps around the action like it oughta
Review access privileges is the tool
A policy statement becomes crystal clear
In formal notation we can trust
The logic captures what we hold most dear
Compliance frameworks built on what we must
[Chorus]
O for obligatory, shall we say
P for permitted, may is the way
F for forbidden, shall not today
E for exempt when rules bend and sway
Modal operators make the rules clear
Deontic logic structures what we hear
From shall to may to shall not appear
The formal language management holds dear
[Bridge]
When MFA cannot be deployed at all
Enhanced logging steps into the frame
Arrow points from premise to the call
Compensating controls play the game
Not possible implies obligation new
The logic flows from cannot to must do
[Verse 3]
Classical logic deals in black and white
But deontic adds the colors of command
Normative character brought to light
Through operators we can understand
From policy language to formal thought
The bridge between what's written and what's taught
[Chorus]
O for obligatory, shall we say
P for permitted, may is the way
F for forbidden, shall not today
E for exempt when rules bend and sway
Modal operators make the rules clear
Deontic logic structures what we hear
From shall to may to shall not appear
The formal language management holds dear
[Outro]
Four operators dancing in formation
Building bridges for our regulation
Deontic logic, management's foundation
Formal languages for our organization
10. No More Places to Hide
[Verse 1]
When policies live in documents apart
From code that runs the show
The gap grows wide, compliance falls behind
And auditors don't know
But literate programming breaks the chain
Places logic right beside
The natural language that explains the rule
No more places to hide
[Chorus]
Two strengths that shine so bright
Literate code makes traceability right
Exceptions handled with native grace
Catala puts controls in their place
Read the policy, see the logic flow
Perfect mapping, now auditors know
Two strengths that make compliance strong
Been waiting for this solution so long
[Verse 2]
Defeasible rules are compliance reality
General statements have their breaks
Exceptions nest in exceptions deep
Overrides for special cases' sake
Other languages stumble and fall
When hierarchies get complex
But Catala's scope and exception design
Handle what comes up next
[Chorus]
Two strengths that shine so bright
Literate code makes traceability right
Exceptions handled with native grace
Catala puts controls in their place
Read the policy, see the logic flow
Perfect mapping, now auditors know
Two strengths that make compliance strong
Been waiting for this solution so long
[Bridge]
From OCaml to Python code
JavaScript runs it too
Executable compliance checks
Tell you what systems do
Type safety catches category mistakes
Temporal rules track time
Risk levels and classifications
Everything stays in line
[Verse 3]
No more spreadsheets trying to maintain
The mapping from rule to control
The document itself becomes the bridge
Playing that connecting role
Date conditions and retention periods
Response times that must be met
Catala speaks in time and logic
The best compliance tool yet
[Final Chorus]
Two strengths that shine so bright
Literate code makes traceability right
Exceptions handled with native grace
Catala puts controls in their place
Executable and type-safe too
Temporal reasoning coming through
Two strengths that make compliance strong
The future's here, let's sing along
11. When Time Derails the Rules
[Verse 1]
When incidents strike and time is short
SBVR won't give the right support
Step by step procedures need to flow
Not vocabulary that's moving slow
Emergency response demands quick action
Not semantic rules and their abstraction
[Chorus]
Five places where SBVR fails
Too procedural when time derails
Too sequential for recovery tales
State machines make it lose its trails
Quick iterations break its scales
Know where business rules set sail
[Verse 2]
Disaster recovery needs a playbook guide
With ordered steps you can't divide
First restore power, then check the servers
SBVR's structure poorly preserves
The temporal flow of what comes when
It maps concepts but not the sequence chain
[Chorus]
Five places where SBVR fails
Too procedural when time derails
Too sequential for recovery tales
State machines make it lose its trails
Quick iterations break its scales
Know where business rules set sail
[Bridge]
Temporal logic needs time's progression
State machines track each state's succession
Complex branching with nested conditions
SBVR lacks these key provisions
When vocabulary changes cascade down
All dependent rules come crashing down
[Verse 3]
If your organization moves real fast
Policy changes that need to last
But vocabulary shifts break everything
Connected rules start unraveling
Choose your tool for the right domain
SBVR's power has its reins
[Chorus]
Five places where SBVR fails
Too procedural when time derails
Too sequential for recovery tales
State machines make it lose its trails
Quick iterations break its scales
Know where business rules set sail
[Outro]
Match your method to your need
Not every tool will help you succeed
SBVR shines in its own space
But know the limits that you face
12. Born in Zurich, Logic Alive
[Verse 1]
Born in Zurich back in ninety-five
A controlled language came alive
English words but structured tight
ACE translates to logic bright
Not like SBVR's business rules
ACE is formal, grammar's tools
First-order logic is the goal
Through DRS it finds its soul
[Chorus]
ACE is what it is, what it is
Controlled English that makes sense
Every sentence has its place
In the formal logic space
ACE is what it is, what it is
Natural language with a twist
Parse it through the APE machine
Make your management controls clean
[Verse 2]
If a system stores sensitive data then
It must use encryption, say it again
AES two-fifty-six is the way
Every sentence follows formal display
Every user who requests access now
Must be authenticated, here's how
Identity management takes the lead
Structured language meets the need
[Chorus]
ACE is what it is, what it is
Controlled English that makes sense
Every sentence has its place
In the formal logic space
ACE is what it is, what it is
Natural language with a twist
Parse it through the APE machine
Make your management controls clean
[Bridge]
Discourse Representation Structures bridge the gap
From English text to logic map
APE parsing engine reads each line
Converts to OWL or SWRL design
It is not the case that code deploys
If approval is what it destroys
Change advisory board must say yes
Before production, nothing less
[Verse 3]
Attempto Parsing Engine takes the wheel
Makes the formal structure real
From DRS to logic forms
Following all the grammar norms
Management controls get crystal clear
When ACE syntax draws them near
University of Zurich's gift
Natural and formal language shift
[Chorus]
ACE is what it is, what it is
Controlled English that makes sense
Every sentence has its place
In the formal logic space
ACE is what it is, what it is
Natural language with a twist
Parse it through the APE machine
Make your management controls clean
[Outro]
ACE is what it is
Making logic from English words
ACE is what it is
Formal language that's clearly heard
13. When ACE Breaks Down
[Verse 1]
When deadlines matter and time runs short
Recovery time objectives need support
Real-time requirements with SLA demands
ACE can't capture what timing commands
Sequential steps in incident response
Need procedural flow with clear pronouns
[Chorus]
Know when not to use it, save yourself the pain
Temporal and procedural, deontic domain
Must and may and shall not, obligations clear
ACE breaks down completely when these needs appear
Know your limitations, choose the right design
Some problems need solutions of a different kind
[Verse 2]
Deontic logic separates the three
Permission, obligation, what's prohibited, you see
When reasoning depends on modal distinction
ACE provides no helpful jurisdiction
Must versus may versus cannot do
These subtle differences ACE can't pursue
[Chorus]
Know when not to use it, save yourself the pain
Temporal and procedural, deontic domain
Must and may and shall not, obligations clear
ACE breaks down completely when these needs appear
Know your limitations, choose the right design
Some problems need solutions of a different kind
[Bridge]
Non-technical stakeholders need to read
Plain language policies fulfill their need
Training overhead becomes too high
When executives just want to understand why
Business readability trumps formal precision
Choose your tool to match your mission
[Verse 3]
Step-by-step procedures can't be expressed
In ACE notation, you'll be stressed
Workflow sequences need different grammar
Time-based controls require planning's hammer
Recognition saves you wasted hours
Know your formal language's powers
[Chorus]
Know when not to use it, save yourself the pain
Temporal and procedural, deontic domain
Must and may and shall not, obligations clear
ACE breaks down completely when these needs appear
Know your limitations, choose the right design
Some problems need solutions of a different kind
[Outro]
Match the tool to problem space
Wrong choice puts you out of place
ACE has limits, understand
Choose wisely for the task at hand
14. Beyond the Coded Sails
[Verse 1]
When governance needs a human touch
Risk appetite statements and such
Committee charters, board control
Catala can't fulfill that role
Cultural training, awareness campaigns
These human elements break the chains
[Chorus]
Not every control fits the code
Some need judgment on the road
Governance, culture, human choice
Catala can't be their voice
Know where formal language fails
Before you set those coded sails
[Verse 2]
Security training for your staff
Awareness programs, nothing to graph
Procedural controls with discretion wide
Human decision makers must decide
When context matters, nuance counts
Formal logic just amounts to doubt
[Chorus]
Not every control fits the code
Some need judgment on the road
Governance, culture, human choice
Catala can't be their voice
Know where formal language fails
Before you set those coded sails
[Bridge]
And if your team lacks coding skills
Functional programming gives them chills
Without developers who understand
Your formal language can't take command
[Verse 3]
Organizational culture shifts
Policy language never lifts
The spirit of what people do
Beyond the rules they're guided through
Some controls live in hearts and minds
Not in the code that logic binds
[Chorus]
Not every control fits the code
Some need judgment on the road
Governance, culture, human choice
Catala can't be their voice
Know where formal language fails
Before you set those coded sails
[Outro]
Choose your tools with wisdom's eye
Not every problem needs to digitize
Human elements have their place
In management's controlling space
Back to Home