Expand description
Legalis-Verifier: Formal verification for Legalis-RS legal statutes.
This crate provides static analysis and verification tools for detecting logical inconsistencies, circular references, and constitutional conflicts in legal statutes.
Modules§
- certification_
framework - Certification Framework Module
- distributed_
verification - Distributed Verification Module
- formal_
methods - Formal Methods Integration for Legalis-Verifier
- ml_
verification - Machine Learning Verification for Legalis-Verifier
Structs§
- Ambiguity
- Represents a detected ambiguity in a statute.
- Ambiguous
Term - Represents an ambiguous term found in statutes.
- Batch
Verification Result - Result of batch verification across multiple statutes.
- Cached
Proof - Cached proof for a statute
- Centrality
Metrics - Centrality metrics for a single statute
- Change
Impact - Impact of a statute change on the system.
- CiConfig
- CI/CD configuration generator.
- Clock
- A clock variable used in timed automata.
- Coalition
- Represents a coalition of stakeholders
- Complexity
Metrics - Complexity metrics for a statute.
- Compliance
Certification - Compliance certification document
- Compliance
Item - A compliance checklist item.
- Composite
Principle - A composite principle combining multiple principles.
- Conflict
Cascade - Represents a conflict cascade - how conflicts propagate through statute dependencies
- Conflict
Explanation - Conflict explanation for laypersons
- Conflict
Summary - Conflict summary
- Constitutional
Principle - A constitutional principle to check against.
- Coverage
Gap - Gap in statute coverage - a scenario not handled by any statute.
- Coverage
Info - Code coverage information for condition analysis.
- Cross
Reference Error - Represents a cross-reference validation error.
- Deadline
- Deadline constraint for temporal verification.
- Deadline
Verification Result - Result of deadline verification.
- Deadline
Violation - A deadline violation.
- Dependency
Graph - Fine-grained dependency graph
- Dependency
Node - Fine-grained dependency tracking for statutes
- Diagnostic
Location - Diagnostic location for IDE integration.
- Duplicate
Candidate - Represents a potential duplicate statute.
- Encrypted
Statute - Encrypted statute representation for homomorphic computation
- Encrypted
Verification Result - Encrypted verification result
- Enhanced
Coverage Gap - Enhanced coverage gap with more detailed analysis
- Evolution
Metrics - Evolution metrics for a statute
- Evolution
Summary - Evolution summary
- Evolution
Tracker - Tracks evolution for multiple statutes
- Executive
Summary - Executive summary of verification results
- Game
Outcome - Represents an outcome in the game
- Game
Theoretic Model - Represents a game-theoretic model
- Graph
Metrics - Graph metrics for statute dependency network
- IdeDiagnostic
- LSP-compatible diagnostic for IDE integration.
- Impact
Assessment - Impact assessment for a statute or set of statutes.
- Incremental
State - Incremental verification state for tracking statute changes.
- Interactive
Proof - Interactive proof explorer data structure
- Jurisdictional
Rule Set - A jurisdictional rule set containing principles for a specific jurisdiction.
- Lazy
Verification Config - Lazy verification configuration
- Markov
Chain - Discrete-Time Markov Chain (DTMC)
- Markov
State - Represents a state in a Markov chain
- Markov
Transition - Represents a transition between states with probability
- Mechanism
Analysis - Mechanism design analysis result
- Mechanism
Issue - Represents a mechanism design issue
- Metrics
Dashboard - Comprehensive dashboard containing all metrics
- Multi
Party Verification Result - Multi-party computation result Allows multiple parties to jointly verify statutes without sharing their private inputs
- Natural
Language Explanation - Natural language explanation for a verification error
- Notification
Config - Notification configuration.
- Notification
Message - Notification message.
- Optimization
Suggestion - Optimization suggestion for statute conditions.
- PreCommit
Hook - Git pre-commit hook configuration.
- Precedent
- Represents a legal precedent that may be relevant to a statute.
- Precedent
Registry - Registry for managing precedents.
- Principle
Check Result - Result of a constitutional principle check.
- Principle
Definition - A principle definition in the DSL.
- Principle
Registry - Principle registry managing multiple jurisdictions.
- Privacy
Budget - Differential privacy parameters
- Private
Aggregation - Differentially private aggregation result
- Proof
Cache - Incremental proof maintenance
- Proof
Cache Stats - Proof cache statistics
- Proof
Certificate - Proof certificate for formal verification
- Proof
Step - Represents a step in a verification proof
- Quality
Metrics - Overall quality score for a statute.
- Quality
Summary - Quality metrics summary
- Quick
Fix - Quick fix suggestion for IDE code actions.
- Redundancy
Instance - Represents a redundancy in the statute set
- Regulatory
Filing - Regulatory filing report for submitting to regulatory bodies
- Regulatory
Impact - Regulatory impact assessment for a statute.
- Regulatory
Overlap - Represents a regulatory overlap between statutes
- Report
Schedule - Schedule configuration for automated report generation
- Report
Scheduler - Manages multiple report schedules
- Report
Template - Report template for customizable report generation
- Risk
Factor - Risk factor for statute analysis
- Risk
Quantification - Risk quantification analysis result
- Scheduled
Report Result - Result of a scheduled report execution
- Sequence
Constraint - Sequence constraint specifying required event ordering.
- Sequence
Verification Result - Result of sequence constraint verification.
- Sequence
Violation - A sequence constraint violation.
- Similarity
Score - Semantic similarity score between two items (0.0 = completely different, 1.0 = identical).
- Stakeholder
- Represents a stakeholder in the legal system
- Stakeholder
Conflict - Represents a conflict between multiple stakeholders
- Statistical
Check Result - Statistical model checking result
- Statute
Cluster - Cluster/community in the statute graph
- Statute
Conflict - Represents a conflict between two or more statutes.
- Statute
Evolution - Evolution history for a statute
- Statute
Filing Info - Information about a statute in a regulatory filing
- Statute
Interaction - Represents an interaction between two statutes
- Statute
Pattern - Common pattern found in statutes
- Statute
Statistics - Statistical summary of a statute collection.
- Statute
Verifier - Verifier for legal statutes.
- Statute
Version - Version entry in statute evolution history
- Strategy
- Represents a strategy in a game-theoretic model
- Summary
Statistics - Statistics for executive summary
- TeeConfig
- Trusted Execution Environment (TEE) configuration
- TeeVerification
Result - TEE-based verification result
- Temporal
State - A state in a temporal model.
- Terminology
Inconsistency - Represents a terminology inconsistency.
- Text
Edit - Text edit for applying quick fixes.
- Timed
Automaton - A timed automaton.
- Timed
Location - A location (state) in a timed automaton.
- Timed
Transition - A transition in a timed automaton.
- Transition
System - A transition system for temporal logic verification.
- Verification
Budget - Budget for verification operations.
- Verification
Diff - Difference between two verification results
- Verification
Path Node - Verification path node for visualization
- Verification
Proof - A complete verification proof
- Verification
Request - API request for statute verification.
- Verification
Response - API response for statute verification.
- Verification
Result - Result of a verification check.
- Verification
Summary - Summary of verification results for certification
- What
IfScenario - What-if scenario for testing statute changes
- Zero
Knowledge Proof - Zero-knowledge proof for statute verification Allows proving that a statute satisfies certain properties without revealing the statute details
Enums§
- Ambiguity
Type - Types of ambiguities that can be detected in statutes.
- CiPlatform
- CI/CD platform type.
- Clock
Constraint - Clock constraint in timed automata.
- Combination
Mode - How to combine principle results.
- Complexity
Level - Complexity levels for statutes.
- Complexity
Trend - Trend in statute complexity over time
- Conflict
Nature - Nature of stakeholder conflicts
- Conflict
Type - Types of conflicts that can occur between statutes.
- Cross
Reference Error Type - Types of cross-reference errors.
- CtlFormula
- Computation Tree Logic (CTL) formula.
- CtlStar
Formula - CTL* formula combining LTL and CTL path quantifiers. CTL* is a superset of both LTL and CTL, allowing arbitrary mixing of path quantifiers (E, A) with linear temporal operators (X, F, G, U, R).
- CtlStar
Path Formula - CTL* path formula (used after path quantifiers).
- Dependency
Type - Type of dependency between statutes
- GapType
- Types of coverage gaps
- Impact
Level - Impact level classification.
- Interaction
Type - Types of interactions between statutes
- LtlFormula
- Linear Temporal Logic (LTL) formula.
- Mechanism
Property - Represents a mechanism design property
- Notification
Channel - Notification channel.
- Notification
Type - Notification type.
- Overlap
Area - Areas where statutes can overlap
- Pattern
Type - Type of statute pattern
- Principle
Check - Types of constitutional checks.
- Proof
Step Type - Types of proof steps
- Redundancy
Type - Types of redundancy
- Report
Output Format - Output format for scheduled reports
- Report
Section - Section in a report template
- Risk
Level - Risk level classification.
- Severity
- Severity level for verification errors.
- Statute
Change - Represents a change between two statute versions.
- Verification
Error - Errors from verification process.
Functions§
- ambiguity_
report - Generates an ambiguity detection report for a statute.
- analyze_
centrality - Computes centrality metrics for each statute
- analyze_
change_ impact - Analyzes the impact of changing a statute in a collection.
- analyze_
coalitions - Analyzes potential coalitions among stakeholders
- analyze_
complexity - Analyzes the complexity of a statute.
- analyze_
coverage - Analyzes code coverage for conditions in statutes.
- analyze_
coverage_ gaps - Analyzes statute coverage and identifies potential gaps.
- analyze_
enhanced_ coverage_ gaps - Analyzes coverage gaps in statutes with enhanced detection
- analyze_
graph_ metrics - Computes overall graph metrics for statute dependencies
- analyze_
quality - Analyzes statute quality and returns comprehensive metrics.
- analyze_
regulatory_ impact - Analyzes the regulatory impact of a statute.
- analyze_
stakeholder_ conflicts - Analyzes conflicts between multiple stakeholders
- analyze_
statute_ interactions - Analyzes interactions between statutes
- analyze_
statute_ risk - Analyzes statute risk using multiple factors
- analyze_
statute_ statistics - Analyzes a collection of statutes and returns comprehensive statistics.
- assess_
impact - Performs an impact assessment on a statute.
- assess_
multiple_ impacts - Performs impact assessment on multiple statutes and generates a comprehensive report.
- batch_
ambiguity_ report - Generates an ambiguity detection report for multiple statutes.
- batch_
verification_ report - Generates a batch verification report.
- batch_
verify - Performs batch verification on multiple statutes and returns aggregate results.
- build_
verification_ path - Builds a verification path from a statute and result
- change_
impact_ report - Generates a change impact report.
- check_
accessibility - Performs accessibility verification on a statute.
- check_
due_ process - Performs due process verification on a statute.
- check_
equal_ protection - Checks equal protection principles (comprehensive).
- check_
equality - Performs a comprehensive equality check on a statute.
- check_
freedom_ of_ expression - Checks freedom of expression principles.
- check_
privacy_ impact - Performs privacy impact assessment on a statute.
- check_
procedural_ due_ process - Checks procedural due process principles (detailed).
- check_
property_ rights - Checks property rights principles.
- check_
proportionality - Performs proportionality checking on a statute.
- check_
retroactivity - Checks if the statute violates the principle of non-retroactivity (ex post facto).
- check_
terminology_ consistency - Checks for terminology consistency across statutes.
- coalition_
analysis_ report - Generates a coalition analysis report
- compare_
statutes - Compares two versions of a statute and identifies changes.
- complexity_
report - Generates a complexity report for multiple statutes.
- compliance_
certification_ report - Exports compliance certification as a formatted report
- compliance_
checklist_ report - Generates a compliance checklist report for a statute.
- compliance_
report_ template - Creates a compliance-focused report template
- compress_
proof - Compresses a proof by removing redundant steps
- conflict_
cascade_ report - Report on conflict cascades
- conflict_
detection_ report - Generates a conflict detection report.
- consolidated_
compliance_ checklist - Generates a consolidated compliance checklist for multiple statutes.
- cross_
reference_ report - Generates a cross-reference validation report.
- daily_
compliance_ schedule - Creates a daily compliance report schedule
- dashboard_
markdown_ summary - Generates a markdown summary of the dashboard
- detect_
ambiguities - Detects ambiguities in a statute.
- detect_
clusters - Detects clusters/communities in the statute graph using simple heuristic
- detect_
duplicates - Detects potential duplicate or near-duplicate statutes.
- detect_
nash_ equilibria - Detects Nash equilibria in statute interactions
- detect_
regulatory_ overlaps - Detects regulatory overlaps between statutes
- detect_
statute_ conflicts - Detects conflicts between statutes.
- differential_
private_ analysis - Performs differentially private aggregation analysis
- duplicate_
detection_ report - Generates a duplicate detection report.
- enhanced_
coverage_ gap_ report - Report on enhanced coverage gaps
- evolution_
report - Generates an evolution report for tracked statutes
- execute_
scheduled_ report - Executes a scheduled report generation
- executive_
summary_ report - Exports executive summary as a formatted report
- explain_
conflict - Explains statute conflicts in layperson terms
- explain_
error - Generates natural language explanation for a verification error
- export_
dashboard_ html - Exports dashboard to HTML
- export_
dashboard_ json - Exports dashboard to JSON
- export_
dependency_ graph - Exports statute dependencies as a GraphViz DOT format graph.
- export_
dependency_ graph_ with_ conflicts - Exports statute dependencies with conflict highlighting.
- export_
proof_ dot - Exports proof in DOT format for visualization
- find_
ambiguous_ terms - Finds ambiguous terms in a set of statutes.
- find_
similar_ statutes - Finds pairs of statutes with high semantic similarity (potential duplicates).
- game_
theoretic_ report - Generates a game-theoretic analysis report
- generate_
circular_ reference_ proof - Generates a proof for circular reference detection
- generate_
compliance_ certification - Generates a compliance certification document
- generate_
compliance_ checklist - Generates a compliance checklist from a statute.
- generate_
custom_ report - Generates a custom report based on a template
- generate_
executive_ summary - Generates an executive summary from verification results
- generate_
html_ report - Generates an HTML report for verification results.
- generate_
interactive_ html_ report - Generates an interactive HTML report with filtering, search, and sorting capabilities.
- generate_
lsp_ diagnostics - Generates LSP-compatible diagnostic JSON output.
- generate_
metrics_ dashboard - Generates a comprehensive metrics dashboard
- generate_
quick_ fixes - Generates quick fixes for common verification errors.
- generate_
regulatory_ filing - Generates a regulatory filing report
- generate_
sarif_ report - Generates a SARIF (Static Analysis Results Interchange Format) report.
- graph_
analysis_ report - Generates a comprehensive graph analysis report
- lazy_
verify - Performs lazy verification on demand
- mechanism_
design_ report - Generates a mechanism design analysis report
- mine_
patterns - Mines common patterns from a collection of statutes
- monte_
carlo_ verification - Monte Carlo simulation for statute verification
- monthly_
comprehensive_ schedule - Creates a monthly comprehensive report schedule
- optimization_
and_ gaps_ report - Generates a report of coverage gaps and optimization suggestions.
- pattern_
mining_ report - Generates a pattern mining report
- predict_
conflict_ cascades - Predicts conflict cascades based on statute dependencies
- predict_
game_ outcomes - Predicts game-theoretic outcomes from statute interactions
- proof_
comparison_ report - Generates a proof comparison report
- quality_
report - Generates a quality report for multiple statutes.
- quality_
report_ template - Creates a quality-focused report template
- redundancy_
elimination_ report - Report on redundancy elimination suggestions
- regulatory_
filing_ report - Exports regulatory filing as a formatted report
- regulatory_
impact_ report - Generates a regulatory impact report for multiple statutes.
- regulatory_
overlap_ report - Report on regulatory overlaps
- risk_
quantification_ report - Generates a risk quantification report
- secure_
multiparty_ verification - Performs secure multi-party verification
- semantic_
similarity - Calculates semantic similarity between two statutes.
- send_
notification - Sends a notification based on configuration.
- stakeholder_
conflict_ report - Generates a stakeholder conflict analysis report
- standard_
report_ template - Creates a standard comprehensive report template
- statistical_
model_ checking_ report - Generates a statistical model checking report
- statistics_
report - Generates a statistical report for a statute collection.
- statute_
interaction_ report - Report on statute interactions
- suggest_
redundancy_ elimination - Detects redundancies and suggests elimination strategies
- synthesize_
ctl_ property - Synthesizes a CTL property from a transition system and examples.
- synthesize_
ltl_ property - Synthesizes a temporal property from positive and negative examples.
- tee_
verification - Performs verification in a trusted execution environment
- term_
disambiguation_ report - Generates a term disambiguation report for a set of statutes.
- terminology_
consistency_ report - Generates a terminology consistency report.
- to_
ide_ diagnostics - Converts verification results to IDE diagnostics.
- validate_
cross_ references - Validates cross-references between statutes.
- verify_
ctl - Checks if a CTL formula holds in a transition system.
- verify_
ctl_ star - Verifies a CTL* formula on a transition system.
- verify_
deadlines - Verifies deadlines in a transition system.
- verify_
integrity - Verifies the integrity of a set of laws.
- verify_
ltl - Checks if an LTL formula holds in a transition system.
- verify_
mechanism_ design - Verifies mechanism design properties of statutes
- verify_
sequences - Verifies sequence constraints in a transition system.
- verify_
timed_ reachability - Verifies reachability in a timed automaton.
- weekly_
quality_ schedule - Creates a weekly quality report schedule
- what_
if_ analysis - Performs what-if analysis on a statute modification