Skip to content

opendf.exceptions.python_exception.SemanticException: alias usage should respect positional order : MD.month #14

@hankcs

Description

@hankcs

Dear authors,

When running the simplified expression generated by OpenDF, sometimes MD raised the following exception:

File "OpenDF/test/research/run_dialog/run_utility.py", line 70, in execute_dialog
igl, ex = construct_graph(isexp, d_context, constr_tag=OUTLINE_SIMP, no_post_check=True)
File "OpenDF/opendf/graph/constr_graph.py", line 91, in construct_graph
raise ex
File "OpenDF/opendf/graph/constr_graph.py", line 87, in construct_graph
root = ast_top_down_construct(prs[0], None, d_context, register=register, top_only=top_only,
File "OpenDF/opendf/graph/constr_graph.py", line 293, in ast_top_down_construct
_ = ast_top_down_construct(nd, n, d_context, register, False, constr_tag)
File "OpenDF/opendf/graph/constr_graph.py", line 293, in ast_top_down_construct
_ = ast_top_down_construct(nd, n, d_context, register, False, constr_tag)
File "OpenDF/opendf/graph/constr_graph.py", line 293, in ast_top_down_construct
_ = ast_top_down_construct(nd, n, d_context, register, False, constr_tag)
File "OpenDF/opendf/graph/constr_graph.py", line 264, in ast_top_down_construct
raise SemanticException('alias usage should respect positional order : %s.%s' % (typ, alias))
opendf.exceptions.python_exception.SemanticException: alias usage should respect positional order : MD.month

Dialog 37

GUID: a70dc17b-7e6b-4a7a-a8fb-71bdaad5f39d OpenDF:

  • U1: Please put in dentist appt 2:30 12/19
  • A1: I've put that on your calendar. Your status is set to Busy.
  • U2: Is there anything I have on the schedule before that?
  • A2: No, I didn't find any events before yesterday at 2:30 PM.

Program:

 CreateEvent(
    AND(
       has_subject(
          dentist appt ) ,
       starts_at(
          MD(
             day= 19 ,
             month= toMonth(
                12 ) ) ) ,
       starts_at(
          HourMinutePm(
             hours= 2 ,
             minutes= 30 ) ) ) ) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions