Comments (2)
Format strings should probably behave a lot like Variable
s. The general approach would be to convert the format string into a Constant::String
once we know all the variable(s) value are otherwise leave it as some structure of variables. e.g. we'd prob want to allow queries like this:
foo(Y) :- bar(f"${Y}")
query foo(Y)
Which would result in bar(f"${Y}")
.
But another case:
foo(Y, Z) :- bar(f"${Y} and ${Z}")
query foo("hello", Z)
should be bar(f"hello and ${Z}")
.
This is at the proof/build tree level, whether we want to allow this to actually be built is a completely different problem.
from modus.
Yes, they are more like variables. In the intermediate representation, they should be converted into variables and string_concat
. For example,
foo(X) :- bar(f"a${X}")
should be translated into
foo(X) :- string_concat("a", X, Y), bar(Y).
@maowtm and I discussed that we may restrict the number of variables appearing in a formatted string to one to avoid ambiguities, but we need to think about it more.
from modus.
Related Issues (20)
- `run(...)` and `(copy(...))::merge` fails on scratch image
- Invalid operator usage does not result in proper error messages HOT 1
- Better Analysis in recursive cases HOT 2
- Stratified construction
- Array Types (v1) HOT 4
- Fix hard-coded scratch image spec
- Better error messages for malformed goals
- Better Proof Highlighting HOT 2
- Proposal: Allow copying multiple files to the same destination via `(::)copy([...], dest)` HOT 3
- Types HOT 1
- `modus run`, `modus ls`, etc
- Format strings in negated expressions HOT 1
- string_concat -> f-string reversal HOT 1
- Layer expression that creates no layers HOT 5
- Should mention in the README.md to download protoc for M1
- Outdated comment
- Print a warning when there multiple minimal proofs
- Who's behind this project ? HOT 4
- SLD Resolution? HOT 2
- I would like to join your team and contribute with my many years of experience and skills.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modus.