I understand that Prolog is not an object-oriented language, and after reading a few StackOverflow posts, it is not clear to me that this is feasible, but I figured I'd ask anyway:
If a Customer
has and only has a name
(atomic string) and an age
(integer), is it possible to ask Prolog to give some examples of Customer
dictionaries, given a list of possible name
s and an age
range? Actual usage will feature extensive constraints on dictionary values.
For example, ideally I want something like this
between(18, 60, Customer.age),
member(Customer.name, [jodie, tengyu, adiche, tomoyo, wolfgang]),
Customer = whatisthis{age: What, name: Wot}.
to give me something like
Customer = whatisthis{age: 24, name: tomoyo} ;
Customer = whatisthis{age: 55, name: tengyu} ;
...
...