-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
All 4 non-OGS DSLs provide Model.compile() → GDSSpec and Model.compile_system() → SystemIR convenience methods. OGS Pattern has neither — users must call standalone functions:
# Other DSLs (consistent)
spec = model.compile()
system = model.compile_system()
# OGS (different)
from ogs import compile_to_ir, compile_pattern_to_spec
ir = compile_to_ir(pattern)
spec = compile_pattern_to_spec(pattern)
system = ir.to_system_ir()OGS also has a different error hierarchy (DSLTypeError/DSLCompositionError vs ValidationError/CompilationError).
Proposal
Add convenience methods to Pattern:
Pattern.compile() → GDSSpec(delegates tocompile_pattern_to_spec)Pattern.compile_system() → SystemIR(delegates tocompile_to_ir+to_system_ir)
This preserves the existing standalone functions while giving users a consistent entry point.
Context
The architectural difference (Pattern-centric vs Model-centric) is intentional. This is about API ergonomics, not changing the underlying design.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request