Skip to content

Commit

Permalink
Rename property term to cterm in CTerm
Browse files Browse the repository at this point in the history
  • Loading branch information
tothtamas28 committed Mar 22, 2022
1 parent 2a0d10e commit 459c086
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions k-distribution/src/main/scripts/lib/pyk/pyk/cterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class CTerm:
config: KInner # TODO Optional?
constraints: Tuple[KInner, ...]

def __init__(self, term: KInner) -> None:
config, constraint = splitConfigAndConstraints(term)
def __init__(self, cterm: KInner) -> None:
config, constraint = splitConfigAndConstraints(cterm)
constraints = tuple(flattenLabel('#And', constraint))
object.__setattr__(self, 'config', config)
object.__setattr__(self, 'constraints', constraints)
Expand All @@ -43,12 +43,12 @@ def __iter__(self):
return chain([self.config], self.constraints)

@cached_property
def term(self) -> KInner:
def cterm(self) -> KInner:
return mlAnd(self)

@property
def hash(self) -> str:
return self.term.hash
return self.cterm.hash

@staticmethod
def from_rule(rule: KRuleLike) -> Tuple['CTerm', 'CTerm']:
Expand Down
2 changes: 1 addition & 1 deletion k-distribution/src/main/scripts/lib/pyk/pyk/kcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def id(self) -> str:
return self.term.hash

def to_dict(self) -> Dict[str, Any]:
return {'id': self.id, 'term': self.term.term.to_dict()}
return {'id': self.id, 'term': self.term.cterm.to_dict()}

class EdgeLike(ABC):
source: 'KCFG.Node'
Expand Down

0 comments on commit 459c086

Please sign in to comment.