diff --git a/README.md b/README.md index de5abe9..5990350 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ price(bag,5). selected(frame). { selected(bag) }. -&sum{price(P)} = V :- selected(P), price(P,V). +&sum{V} = price(P) :- selected(P), price(P,V). &sum{price(P) : selected(P)} = price(total). #show selected/1. @@ -76,7 +76,7 @@ pricelimit(14). selected(frame). { selected(bag) }. -&sum{price(P)} = V :- selected(P), price(P,V). +&sum{V} = price(P) :- selected(P), price(P,V). :- &sum { price(P) : selected(P) } >= L, pricelimit(L). @@ -109,7 +109,7 @@ pricelimit(14). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). :- &sus { price(P) : selected(P) } >= L, pricelimit(L). @@ -142,7 +142,7 @@ default_range(1,2). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). &in{L..U} =: price(P) :- selected(P), not price(P,_), default_range(L,U). &sus{price(P) : selected(P)} =: price(total). @@ -181,7 +181,7 @@ default_price(20). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). &sus{price(P) : selected(P)} =: calc_price(total). &sus{price(total)} = calc_price(total) :- &df{calc_price(total)}. @@ -217,7 +217,7 @@ price(bag,5). part(bag). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). &sus{price(P) : selected(P)} = price(total). min_price(P) :- &min{price(P') : selected(P')} = price(P), @@ -262,7 +262,7 @@ part(standardframe). price(standardframe,14). type(frame,frame). part(fancysaddle). price(fancysaddle,6). type(fancysaddle,saddle). part(standardsaddle). price(standardsaddle,5). type(standardsaddle,saddle). -&sum{price(P)} = V :- price(P,V). +&sum{V} = price(P) :- price(P,V). pricelimit(20). diff --git a/examples/config_assignment.lp b/examples/config_assignment.lp index 606b516..55f8e43 100644 --- a/examples/config_assignment.lp +++ b/examples/config_assignment.lp @@ -4,7 +4,7 @@ price(frame,15). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). &sus{price(P) : selected(P)} =: price(total). #show selected/1. diff --git a/examples/config_default.lp b/examples/config_default.lp index d93735a..4e0b552 100644 --- a/examples/config_default.lp +++ b/examples/config_default.lp @@ -3,7 +3,7 @@ price(frame,15). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). &sus{price(P)} = 1 :- selected(P), not price(P,_). &sus{price(P) : selected(P)} =: price(total). diff --git a/examples/config_default_df.lp b/examples/config_default_df.lp index c6f4a84..ebd3021 100644 --- a/examples/config_default_df.lp +++ b/examples/config_default_df.lp @@ -5,7 +5,7 @@ default_price(20). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). &sus{price(P) : selected(P)} =: calc_price(total). &sus{price(total)} = calc_price(total) :- &df{calc_price(total)}. diff --git a/examples/config_default_in.lp b/examples/config_default_in.lp index 6e5eef2..19af57d 100644 --- a/examples/config_default_in.lp +++ b/examples/config_default_in.lp @@ -4,7 +4,7 @@ default_range(1,2). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). &in{L..U} =: price(P) :- selected(P), not price(P,_), default_range(L,U). &sus{price(P) : selected(P)} =: price(total). diff --git a/examples/config_maxlimit_choice.lp b/examples/config_maxlimit_choice.lp index c6212e3..99c0bae 100644 --- a/examples/config_maxlimit_choice.lp +++ b/examples/config_maxlimit_choice.lp @@ -3,7 +3,7 @@ part(standardframe). price(standardframe,14). type(frame,frame). part(fancysaddle). price(fancysaddle,6). type(fancysaddle,saddle). part(standardsaddle). price(standardsaddle,5). type(standardsaddle,saddle). -&sum{price(P)} = V :- price(P,V). +&sum{V} = price(P) :- price(P,V). maxlimit(14). diff --git a/examples/config_minmax_price.lp b/examples/config_minmax_price.lp index e5a0e27..a121643 100644 --- a/examples/config_minmax_price.lp +++ b/examples/config_minmax_price.lp @@ -4,7 +4,7 @@ price(bag,5). part(bag). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). &sus{price(P) : selected(P)} = price(total). min_price(P) :- &min{price(P') : selected(P')} = price(P), diff --git a/examples/config_optional.lp b/examples/config_optional.lp index 75eb2fc..b74f076 100644 --- a/examples/config_optional.lp +++ b/examples/config_optional.lp @@ -4,7 +4,7 @@ price(bag,5). selected(frame). { selected(bag) }. -&sum{price(P)} = V :- selected(P), price(P,V). +&sum{V} = price(P) :- selected(P), price(P,V). &sum{price(P) : selected(P)} = price(total). #show selected/1. diff --git a/examples/config_pricelimit_choice.lp b/examples/config_pricelimit_choice.lp index 63b1838..f6b12ba 100644 --- a/examples/config_pricelimit_choice.lp +++ b/examples/config_pricelimit_choice.lp @@ -3,7 +3,7 @@ part(standardframe). price(standardframe,14). type(frame,frame). part(fancysaddle). price(fancysaddle,6). type(fancysaddle,saddle). part(standardsaddle). price(standardsaddle,5). type(standardsaddle,saddle). -&sum{price(P)} = V :- price(P,V). +&sum{V} = price(P) :- price(P,V). pricelimit(20). diff --git a/examples/config_pricelimit_sum.lp b/examples/config_pricelimit_sum.lp index 26e4d55..3b41b3f 100644 --- a/examples/config_pricelimit_sum.lp +++ b/examples/config_pricelimit_sum.lp @@ -5,7 +5,7 @@ pricelimit(14). selected(frame). { selected(bag) }. -&sum{price(P)} = V :- selected(P), price(P,V). +&sum{V} = price(P) :- selected(P), price(P,V). :- &sum { price(P) : selected(P) } >= L, pricelimit(L). diff --git a/examples/config_pricelimit_sus.lp b/examples/config_pricelimit_sus.lp index d4b8d6d..a3448f3 100644 --- a/examples/config_pricelimit_sus.lp +++ b/examples/config_pricelimit_sus.lp @@ -5,7 +5,7 @@ pricelimit(14). selected(frame). { selected(bag) }. -&sus{price(P)} = V :- selected(P), price(P,V). +&sus{V} = price(P) :- selected(P), price(P,V). :- &sus { price(P) : selected(P) } >= L, pricelimit(L).