feat: new AST representation
File names will be changed eventually. ref: N25B-376
This commit is contained in:
@@ -64,10 +64,13 @@ class InferredBelief(ProgramElement):
|
||||
right: Belief
|
||||
|
||||
|
||||
type Norm = BasicNorm | ConditionalNorm
|
||||
class Norm(ProgramElement):
|
||||
name: str = ""
|
||||
norm: str
|
||||
critical: bool = False
|
||||
|
||||
|
||||
class BasicNorm(ProgramElement):
|
||||
class BasicNorm(Norm):
|
||||
"""
|
||||
Represents a behavioral norm.
|
||||
|
||||
@@ -75,12 +78,10 @@ class BasicNorm(ProgramElement):
|
||||
:ivar critical: When true, this norm should absolutely not be violated (checked separately).
|
||||
"""
|
||||
|
||||
name: str = ""
|
||||
norm: str
|
||||
critical: bool = False
|
||||
pass
|
||||
|
||||
|
||||
class ConditionalNorm(BasicNorm):
|
||||
class ConditionalNorm(Norm):
|
||||
"""
|
||||
Represents a norm that is only active when a condition is met (i.e., a certain belief holds).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user