发明名称 Efficient automated translation of procedures in an constraint-based programming language implemented with notification and callback
摘要 A method is provided for translating sets of constraint declarations to imperative code sequences based on defining an instantiatable object per set, inserting calls to a notification callback mechanism on state modification and defining calls in the constraint context as imperative code sequences that, in response to these callbacks, take actions to maintain these constraints. This notification and callback mechanism can also be employed in connection with external events, thereby providing for efficient implementation of event-sequenced imperative procedures in a constraint programming language.
申请公布号 US8972950(B2) 申请公布日期 2015.03.03
申请号 US201213494404 申请日期 2012.06.12
申请人 OptumSoft, Inc. 发明人 Cheriton David R.
分类号 G06F9/44 主分类号 G06F9/44
代理机构 Van Pelt, Yi & James LLP 代理人 Van Pelt, Yi & James LLP
主权项 1. A method for automatically translating input code to a computer executable imperative output representation, the method comprising: providing an input source program expressed in a programming language that provides for specification of event-sequenced procedures, wherein said input source program includes one or more event-sequenced procedures specified in accordance with said programming language, and said one or more event-sequenced procedures have dependence on one or more external events; automatically translating, using one or more computer processors, said input source program to said computer executable imperative output representation, including: generating code that specifies one or more inputs according to at least one or more parameters of said one or more event-sequenced procedures; andgenerating notification and callback code for the one or more inputs; and providing said computer executable imperative output representation as an output; wherein: said computer executable imperative output representation includes an imperative representation of said one or more event-sequenced procedures with the notification and callback code for the one or more inputs; the notification and callback code for the one or more inputs is realized as a listener pattern having one or more callback interfaces associated with one or more object types; the notification and callback code for the one or more inputs comprises callback subroutines for inputs to the event-sequenced procedures; each of the callback subroutines comprises a switch statement having one or more case blocks; control flow is provided by setting case variables of the switch statements; and the control flow includes one or more constructs selected from the group consisting of:conditional wait, return, goto, statement label, and throwing an exception.
地址 Menlo Park CA US