program-synthesis / examples.py
ayushnoori's picture
Refactor directory structure
389a372
raw
history blame
690 Bytes
'''
EXAMPLES
This file contains input-output examples for both arithmetic and string domain-specific languages (DSLs).
To add a new example, add a new key to the dictionary 'examples' and set the value to be a list of tuples.
'''
# define examples
examples = {
# arithmetic examples
'addition': [([7, 2], 9), ([4, 6], 10), ([8, 1], 9), ([3, 9], 12), ([5, 8], 13)],
'subtraction': [([9, 2], 7), ([6, 1], 5), ([7, 3], 4), ([8, 4], 4), ([10, 2], 8)],
'multiplication': [([2, 3], 6), ([4, 5], 20), ([7, 8], 56), ([9, 2], 18), ([3, 4], 12)],
'division': [([6, 2], 3), ([8, 4], 2), ([9, 3], 3), ([10, 5], 2), ([12, 6], 2)]
# string examples
# custom user examples
}