Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
klpanagi committed Dec 14, 2024
1 parent ab2f8a4 commit 91d433f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions goal_dsl/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,21 @@ def get_scope_providers():


def build_model(model_path):
mm = get_metamodel(debug=False)
model = mm.model_from_file(model_path)
conds = get_top_level_condition(model)
"""
This function builds a model from a given goal-driven CPS Behavior Verification language file.
Parameters:
model_path (str): The path to the goal-driven CPS Behavior Verification language file.
Returns:
model: The built model object representing the goal-driven CPS Behavior Verification language.
"""
mm = get_metamodel(debug=False) # Get the metamodel for the language
model = mm.model_from_file(model_path) # Parse the model from the file
conds = get_top_level_condition(model) # Get the top-level conditions from the model
for cond in conds:
build_cond_expr(cond, model)
# entities = get_children_of_type('Entity', model)
return model
build_cond_expr(cond, model) # Build the condition expressions for each top-level condition
return model # Return the built model


def get_model_entities(model):
Expand Down

0 comments on commit 91d433f

Please sign in to comment.