alcides / GeneticEngine

A Hybrid between Grammar-Guided and Strongly-Typed Genetic Programming in Python
32 stars 5 forks source link

Liquid Types #8

Open alcides opened 2 years ago

alcides commented 2 years ago

(Ab)use Annotated types to refer to the previous fields in the object, or place any SMT-encodable restriction on the field.

A corresponding metahandler will be needed to synthesize based on the previous value, using an SMTSolver

An example of a possible syntax:

class Range(object):
   start : AnnotatedType[int, "start > 0"]
   end : AnnotatedType[int,"end > start"]
alcides commented 8 months ago

Example in #53