| name | tax-lawyer-ufo-types |
| description | UFO (Unified Foundational Ontology) stereotypes and the Satisfies<C> trait
pattern. Foundation for all Tax-Lawyer Platform domain objects. Every domain
struct MUST declare its UfoCategory and implement Satisfies<ConstraintType>.
|
| version | 1.0.0 |
| tags | ["ufo","ontology","satisfies","types","endurant","perdurant","moment","iso"] |
| tier | frontier |
| complexity | 7 |
| applies_to | ["UFO stereotype","Satisfies trait","ontology foundation","EndurantKind","PerdurantProcess","MomentRelator"] |
| output_types | [".rs",".json"] |
| depends_on | [] |
| unlocks | ["tax-lawyer-au-rd-tax-incentive","tax-lawyer-au-crypto","tax-lawyer-us-r-and-d-credit","tax-lawyer-us-crypto"] |
| metadata | {"ufo_stereotype":"Abstract","legislation":[],"iso_types":["ISO 4217","ISO 17442 (LEI)","IFRS 9"]} |
UFO — Unified Foundational Ontology
Reference: Guizzardi, G. (2005). Ontological Foundations for Structural Conceptual Models.
UFO is a formal top-level ontology for grounding domain models.
Top-level Categories
| Category | Rust Enum Variant | Meaning | Tax-Lawyer Example |
|---|
Endurant | UfoCategory::Endurant | Things that persist through time; wholly present at each moment | AuRdActivity, QreActivity, CryptoWallet |
Perdurant | UfoCategory::Perdurant | Processes/events that unfold over time; only partially present at each moment | AuRdExpenditure, CryptoTx |
Moment | UfoCategory::Moment | Qualities/relations that depend on their bearer for existence | AuRdOffset, CryptoGain |
Abstract | UfoCategory::Abstract | Mathematical/logical objects; no spatiotemporal location | AuRdEligibility, UsRdcFourPartTest |
Endurant Stereotypes
pub enum EndurantStereotype {
Kind,
SubKind,
Role,
Phase,
Category,
Mixin,
RoleMixin,
}
Perdurant Stereotypes
pub enum PerdurantStereotype {
Process,
State,
Event,
Scenario,
}
Moment Stereotypes
pub enum MomentStereotype {
Mode,
Relator,
}
The Satisfies Trait Pattern
pub trait Satisfies<C> {
type Evidence;
type Error;
fn satisfies(&self, constraint: &C) -> Result<Vec<Self::Evidence>, Self::Error>;
}
Constraint implementation pattern:
pub struct AuRdActivity {
pub ufo: UfoCategory,
pub ufo_kind: EndurantStereotype,
pub lei: String,
pub activity_id: Uuid,
pub activity_name: String,
pub start_year: u32,
pub end_year: u32,
pub domain: RdDomain,
}
pub struct AuRdEligibility;
impl Satisfies<AuRdEligibility> for AuRdActivity {
type Evidence = EvidenceNode;
type Error = anyhow::Error;
fn satisfies(&self, _c: &AuRdEligibility) -> Result<Vec<EvidenceNode>, anyhow::Error> {
}
}
ISO Standard Types Used
| Standard | Identifier | Use in Platform |
|---|
| ISO 17442 | LEI (Legal Entity Identifier) | Identifies the claimant legal entity (20-char alphanumeric) |
| ISO 4217 | Currency codes | AUD, USD in tax calculations |
| ISO 8601 | Date/time | Fiscal year boundaries, transaction timestamps |
| IFRS 9 | Financial instruments | CryptoTx classification (asset vs liability) |
LEI validation (Rust pattern)
fn validate_lei(lei: &str) -> bool {
lei.len() == 20 && lei.chars().all(|c| c.is_alphanumeric())
}
EvidenceNode Structure
pub struct EvidenceNode {
pub evidence_type: EvidenceType,
pub body: String,
pub citation: String,
pub hash: String,
}
Blake3 hashing ensures tamper-evidence: any change to body or citation
invalidates the audit trail entry.
b00t:map v1
summary: UFO stereotypes + Satisfies trait — ontological foundation for Tax-Lawyer Platform
tags: ufo, ontology, satisfies, endurant, perdurant, moment, lei, iso
tier: frontier
complexity: 7