Skip to content

Implicit coercion decorator for Python values #828

Open
@leonardt

Description

@leonardt

See #815 for discussion

Summary: Provide a decorator that handles the implicit coercion of Python values (bool, int, Bit, BV, tuple) to the magma equivalent values using the conversion operators (m.bit, m.bits, m.tuple_). This should standardize the implicit coercion logic for all user facing functions such as primitives and operators. It should also simplify type inference since the primitives can then simply operator on magma types (since all python values will first be coerced to magma values).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions