Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Program synthesis
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Syntax-guided synthesis === In 2013, a unified framework for program synthesis problems called Syntax-guided Synthesis (stylized SyGuS) was proposed by researchers at [[UPenn]], [[UC Berkeley]], and [[MIT]].<ref>{{cite conference |title =Syntax-guided Synthesis |last1 = Alur |first1 = Rajeev| last2 = al.| first2 = et| date = 2013| publisher = IEEE| book-title = Proceedings of Formal Methods in Computer-Aided Design| pages = 8}}</ref> The input to a SyGuS algorithm consists of a logical specification along with a [[context-free grammar]] of expressions that constrains the syntax of valid solutions.<ref>{{harv|David|Kroening}}</ref> For example, to synthesize a function {{var|f}} that returns the maximum of two integers, the logical specification might look like this: {{math|(''f''(''x'',''y'') {{=}} ''x'' β¨ ''f''(''x'',''y'') {{=}} ''y'') β§ ''f''(''x'',''y'') β₯ x β§ ''f''(''x'',''y'') β₯ y}} and the grammar might be: <syntaxhighlight lang="bnf"> <Exp> ::= x | y | 0 | 1 | <Exp> + <Exp> | ite(<Cond>, <Exp>, <Exp>) <Cond> ::= <Exp> <= <Exp> </syntaxhighlight> where "ite" stands for "if-then-else". The expression ite(x <= y, y, x) would be a valid solution, because it conforms to the grammar and the specification. From 2014 through 2019, the yearly Syntax-Guided Synthesis Competition (or SyGuS-Comp) compared the different algorithms for program synthesis in a competitive event.<ref>[https://sygus-org.github.io/comp/ SyGuS-Comp (Syntax-Guided Synthesis Competition)]</ref> The competition used a standardized input format, SyGuS-IF, based on [[SMT-LIB|SMT-Lib 2]]. For example, the following SyGuS-IF encodes the problem of synthesizing the maximum of two integers (as presented above): (set-logic LIA) (synth-fun f ((x Int) (y Int)) Int ((i Int) (c Int) (b Bool)) ((i Int (c x y (+ i i) (ite b i i))) (c Int (0 1)) (b Bool ((<= i i))))) (declare-var x Int) (declare-var y Int) (constraint (>= (f x y) x)) (constraint (>= (f x y) y)) (constraint (or (= (f x y) x) (= (f x y) y))) (check-synth) A compliant solver might return the following output: ((define-fun f ((x Int) (y Int)) Int (ite (<= x y) y x)))
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)