pyk.kast.att module

class AnyType[source]

Bases: AttType[Any]

from_dict(obj: Any) Any[source]
parse(text: str) Any[source]
to_dict(value: Any) Any[source]
unparse(value: Any) str[source]
final class AttEntry(key: 'AttKey[T]', value: 'T')[source]

Bases: Generic[T]

key: AttKey[T]
value: T
final class AttKey(name: 'str', *, type: 'AttType[T]')[source]

Bases: Generic[T]

name: str
type: AttType[T]
class AttType[source]

Bases: Generic[T], ABC

abstract from_dict(obj: Any) T[source]
abstract parse(text: str) T[source]
abstract to_dict(value: T) Any[source]
abstract unparse(value: T) str | None[source]
class Atts[source]

Bases: object

ALIAS: Final = AttKey(name='alias')
ALIAS_REC: Final = AttKey(name='alias-rec')
ANYWHERE: Final = AttKey(name='anywhere')
ASSOC: Final = AttKey(name='assoc')
AVOID: Final = AttKey(name='avoid')
BRACKET: Final = AttKey(name='bracket')
BRACKET_LABEL: Final = AttKey(name='bracketLabel')
CELL: Final = AttKey(name='cell')
CELL_COLLECTION: Final = AttKey(name='cellCollection')
CELL_FRAGMENT: Final = AttKey(name='cellFragment')
CELL_NAME: Final = AttKey(name='cellName')
CELL_OPT_ABSENT: Final = AttKey(name='cellOptAbsent')
CIRCULARITY: Final = AttKey(name='circularity')
COLOR: Final = AttKey(name='color')
COLORS: Final = AttKey(name='colors')
COMM: Final = AttKey(name='comm')
CONCAT: Final = AttKey(name='concat')
CONCRETE: Final = AttKey(name='concrete')
CONSTRUCTOR: Final = AttKey(name='constructor')
DEPENDS: Final = AttKey(name='depends')
DIGEST: Final = AttKey(name='digest')
ELEMENT: Final = AttKey(name='element')
EXIT: Final = AttKey(name='exit')
FORMAT: Final = AttKey(name='format')
FRESH_GENERATOR: Final = AttKey(name='freshGenerator')
FUNCTION: Final = AttKey(name='function')
FUNCTIONAL: Final = AttKey(name='functional')
GROUP: Final = AttKey(name='group')
HAS_DOMAIN_VALUES: Final = AttKey(name='hasDomainValues')
HOOK: Final = AttKey(name='hook')
IDEM: Final = AttKey(name='idem')
IMPURE: Final = AttKey(name='impure')
INDEX: Final = AttKey(name='index')
INITIALIZER: Final = AttKey(name='initializer')
INJECTIVE: Final = AttKey(name='injective')
LABEL: Final = AttKey(name='label')
LEFT: Final = AttKey(name='left')
LOCATION: Final = AttKey(name='org.kframework.attributes.Location')
MACRO: Final = AttKey(name='macro')
MACRO_REC: Final = AttKey(name='macro-rec')
MAINCELL: Final = AttKey(name='maincell')
MULTIPLICITY: Final = AttKey(name='multiplicity')
NO_EVALUATORS: Final = AttKey(name='no-evaluators')
OVERLOAD: Final = AttKey(name='overload')
OWISE: Final = AttKey(name='owise')
PREDICATE: Final = AttKey(name='predicate')
PREFER: Final = AttKey(name='prefer')
PRIORITIES: Final = AttKey(name='priorities')
PRIORITY: Final = AttKey(name='priority')
PRIVATE: Final = AttKey(name='private')
PRODUCTION: Final = AttKey(name='org.kframework.definition.Production')
PROJECTION: Final = AttKey(name='projection')
RETURNS_UNIT: Final = AttKey(name='returnsUnit')
RIGHT: Final = AttKey(name='right')
SEQSTRICT: Final = AttKey(name='seqstrict')
SIMPLIFICATION: Final = AttKey(name='simplification')
SMTLEMMA: Final = AttKey(name='smt-lemma')
SORT: Final = AttKey(name='org.kframework.kore.Sort')
SOURCE: Final = AttKey(name='org.kframework.attributes.Source')
STRICT: Final = AttKey(name='strict')
SYMBOL: Final = AttKey(name='symbol')
SYMBOLIC: Final = AttKey(name='symbolic')
SYNTAX_MODULE: Final = AttKey(name='syntaxModule')
TERMINALS: Final = AttKey(name='terminals')
TERMINATOR_SYMBOL: Final = AttKey(name='terminator-symbol')
TOKEN: Final = AttKey(name='token')
TOTAL: Final = AttKey(name='total')
TRUSTED: Final = AttKey(name='trusted')
TYPE: Final = AttKey(name='type')
UNIQUE_ID: Final = AttKey(name='UNIQUE_ID')
UNIT: Final = AttKey(name='unit')
UNPARSE_AVOID: Final = AttKey(name='unparseAvoid')
UPDATE: Final = AttKey(name='update')
USER_LIST: Final = AttKey(name='userList')
WRAP_ELEMENT: Final = AttKey(name='wrapElement')
classmethod keys() FrozenDict[str, AttKey][source]
class ColorType[source]

Bases: AttType[Color]

from_dict(obj: Any) Color[source]
parse(text: str) Color[source]
to_dict(value: Color) str[source]
unparse(value: Color) str[source]
class ColorsType[source]

Bases: AttType[tuple[Color, …]]

from_dict(obj: Any) tuple[Color, ...][source]
parse(text: str) tuple[Color, ...][source]
to_dict(value: tuple[Color, ...]) str[source]
unparse(value: tuple[Color, ...]) str[source]
final class Format(tokens: 'Iterable[str]' = ())[source]

Bases: object

classmethod parse(s: str) Format[source]
tokens: tuple[str, ...]
unparse() str[source]
class FormatType[source]

Bases: AttType[Format]

from_dict(obj: Any) Format[source]
parse(text: str) Format[source]
to_dict(value: Format) Any[source]
unparse(value: Format) str[source]
class IntType[source]

Bases: AttType[int]

from_dict(obj: Any) int[source]
parse(text: str) int[source]
to_dict(value: int) str[source]
unparse(value: int) str[source]
final class KAtt(entries: 'Iterable[AttEntry]' = ())[source]

Bases: KAst, Mapping[AttKey, Any]

atts: FrozenDict[AttKey, Any]
discard(keys: Container[AttKey]) KAtt[source]
drop_source() KAtt[source]
entries() Iterator[AttEntry][source]
classmethod from_dict(d: Mapping[str, Any]) KAtt[source]
get(key: AttKey[T], /) T | None[source]
get(key: AttKey[T], /, default: U) T | U
classmethod parse(d: Mapping[str, str]) KAtt[source]
property pretty: str
to_dict() dict[str, Any][source]
update(entries: Iterable[AttEntry]) KAtt[source]
class LocationType[source]

Bases: AttType[tuple[int, int, int, int]]

from_dict(obj: Any) tuple[int, int, int, int][source]
parse(text: str) tuple[int, int, int, int][source]
to_dict(value: tuple[int, int, int, int]) Any[source]
unparse(value: tuple[int, int, int, int]) str[source]
class NoneType[source]

Bases: AttType[None]

from_dict(obj: Any) None[source]
parse(text: str) None[source]
to_dict(value: None) Any[source]
unparse(value: None) None[source]
class OptionalType(value_type: AttType[T])[source]

Bases: Generic[T], AttType[T | None]

from_dict(obj: Any) T | None[source]
parse(text: str) T | None[source]
to_dict(value: T | None) Any[source]
unparse(value: T | None) str | None[source]
class PathType[source]

Bases: AttType[Path]

from_dict(obj: Any) Path[source]
parse(text: str) Path[source]
to_dict(value: Path) Any[source]
unparse(value: Path) str[source]
class StrType[source]

Bases: AttType[str]

from_dict(obj: Any) str[source]
parse(text: str) str[source]
to_dict(value: str) Any[source]
unparse(value: str) str[source]
class WithKAtt[source]

Bases: ABC

att: KAtt
abstract let_att(att: KAtt) W[source]
map_att(f: Callable[[KAtt], KAtt]) W[source]
update_atts(entries: Iterable[AttEntry]) W[source]