text stringlengths 81 47k | source stringlengths 59 147 |
|---|---|
Question: <p>Why LL(k) and LL(∞) are incompatible with left-recursion? I understand that a LL(k) language can support left-recursivity provided that with k-overahead tokens can be resolved any ambiguity. But, with a LL(∞) grammar, which type of ambiguities can't be solved?</p>
Answer: <p>The problem that $LL$ variants... | https://cs.stackexchange.com/questions/6809/ll-grammars-and-left-recursiviity |
Question: <p>From a security level standpoint (such as Server, DataBase, Token Code, Authorization, Authentication, etc.) in regarding the Two Step Verification, usually Apple send a total of <strong>4</strong> digits security code vs Google send a total of <strong>6</strong> digits security code. What are the main dif... | https://cs.stackexchange.com/questions/30300/two-step-verification-4-digits-vs-6-digits |
Question: <p>The LZ77 compression algorithm uses a sliding window technique, where the window consists of a look-ahead puffer and a search-buffer. What I am wondering is how the algorithm handles the case if the match of the word in the search-buffer is the entire word in the look-ahead buffer? According to the desript... | https://cs.stackexchange.com/questions/75925/how-the-lz77-compression-algorithm-handles-the-case-when-the-entire-look-ahead-b |
Question: <p>I am working on a task embedding sentences into a lower-dimensional space according to style, both grammatical and lexical. As such, I want to have as input the linear ordering of tokens in each sentence, together with its dependency parse as provided by spacy. </p>
<p>In particular, I'd like to find a w... | https://cs.stackexchange.com/questions/96814/how-to-represent-sentences-with-their-dependency-parses-as-input-to-an-rnn |
Question: <p>I was looking into how a <strong>next-word prediction engine</strong> like swift key or XT9 can be implemented.</p>
<p>Here's what I did.</p>
<ul>
<li>I read about <strong>n-grams</strong> here - en.wikipedia.org/wiki/N-gram and aicat.inf.ed.ac.uk/entry.php?id=663</li>
<li>I read about <strong>Language M... | https://cs.stackexchange.com/questions/18354/next-word-prediction-language-models-n-grams |
Question: <p>I saw the following paragraph in a data modeling <a href="https://www.gooddata.com/blog/what-a-semantic-data-model/" rel="nofollow noreferrer">article</a>:</p>
<blockquote>
<p>Semantics relates to the study of references, specifically describing the real meaning between symbols or words. In computer scienc... | https://cs.stackexchange.com/questions/171438/language-constructs-vs-forms-in-semantic-modeling |
Question: <p>I found a paper titled <a href="https://doi.org/10.1109/ICIP.2016.7532765" rel="nofollow noreferrer">Multimodal representation: Kneser-Ney Smoothing/Skip-Gram based neural language model</a>. I am curious about how the Kneser-Ney Smoothing technique can be integrated into a feed-forward neural language mod... | https://cs.stackexchange.com/questions/127864/how-can-kneser-ney-smoothing-be-integrated-into-a-neural-language-model |
Question: <p>I have this question I found regarding n-gram modelling in the textbook <em>Speech and Language Processing</em>:</p>
<blockquote>
<p>Suppose we didn't use the end symbol </s>. Train an unsmoothed bigram grammar on the following corpus without using the end-symbol </s>.</p>
<blockquote>
<p><s... | https://cs.stackexchange.com/questions/105909/n-gram-language-model-question |
Question: <p>I am currently working my way through <em><a href="https://arxiv.org/abs/2005.14165" rel="nofollow noreferrer">Language Models are Few-Shot Learners
</a></em>, the initial 75-page paper about <a href="https://en.wikipedia.org/wiki/GPT-3" rel="nofollow noreferrer">GPT-3</a>, the language learning model spaw... | https://cs.stackexchange.com/questions/156130/what-are-the-175-billion-parameters-used-in-the-gpt-3-language-model |
Question: <p>As far as a I understand, a regular language is a set of words that can be run in a DFA.</p>
<p>$L_1 = \{ x\#y \mid x,y \in \{0,1\}^* \ \text{and} \ |x| = |y| \}$</p>
<p>$L_2 = \{ xy \mid x,y \in \{0,1\}^* \ \text{and} \ |x| = |y| \}$</p>
<p>$L_1$ is not regular but $L_2$ is, why is that?
Is it possibl... | https://cs.stackexchange.com/questions/9645/regular-languages-models-of-computation |
Question: <p>Are there any examples of real-world computer languages that are non-deterministic?</p>
<p>By computer languages I include programming languages, markup languages, query languages, modeling language, transformation languages, etc.</p>
<p>By non-deterministic I mean they cannot be parsed with deterministi... | https://cs.stackexchange.com/questions/49037/what-real-world-computer-languages-cannot-be-described-by-deterministic-grammars |
Question: <p>First of all, I know objects are not meant to model the real world, although they have been marketed as such and perhaps that was an intention at some point.</p>
<p>Here I say 'modeling the real world' in a general sense. That includes simulations, modeling of abstract (non-real) concepts and modeling of b... | https://cs.stackexchange.com/questions/129926/are-objects-appropriate-for-modeling-the-real-world |
Question: <p>I want use DFA to describe a sequence of movements in a 2D-space (language will be the path accepted by automaton in a particular case).</p>
<p>That is a typical modeling problem: how can I encode a sequence of 2D movements in a DFA?</p>
<p>Infact, walking through DFA or NFA seems a process analogous to... | https://cs.stackexchange.com/questions/44733/model-paths-by-regular-languages |
Question: <p>Algorithm complexity is designed to be independent of lower level details but it is based on an imperative model, e.g. array access and modifying a node in a tree take O(1) time. This is not the case in pure functional languages. The Haskell list takes linear time for access. Modifying a node in a tree inv... | https://cs.stackexchange.com/questions/74494/how-is-algorithm-complexity-modeled-for-functional-languages |
Question: <p>How were the <a href="https://openai.com/blog/better-language-models/" rel="nofollow noreferrer">GPT-2</a> token embeddings constructed? </p>
<p>The authors mention that they used Byte Pair Encoding to construct their vocabulary. But BPE is a compression algorithm that returns a list of subword tokens tha... | https://cs.stackexchange.com/questions/116184/question-about-word-embeddings-in-a-specific-language-model-gpt-2 |
Question: <p>In Large Language Models, using 1-bit binary weights (<a href="https://arxiv.org/pdf/2310.11453" rel="nofollow noreferrer">BitNet: Scaling 1-bit Transformers for Large Language Models - Wang et al, 2023</a>) instead of 32-bit floating point weights has numerous advantages. Some of the recent research (<a h... | https://cs.stackexchange.com/questions/169098/data-type-implementation-of-1-58-bits |
Question: <p>I hope this question makes sense, but I was wondering if there are other models of computation similar to lambda calculus that you can use to build up axiomatic mathematical and logical fundamentals like numbers, operators, arithmetic functions and such?</p>
Answer: <p>Yes, there are many models of comput... | https://cs.stackexchange.com/questions/106004/what-are-the-other-language-models-of-computation-similar-to-lambda-calculus |
Question: <p>In a video Noam Chomsky said, that if these LLM get bigger, than also the things they are not good at get bigger too. He doesn't explain more details about this. So is this true? In what way do their problems get bigger? Sry for the little context of in what they are getting also more bad at.</p>
<p>here i... | https://cs.stackexchange.com/questions/159907/if-large-language-models-like-chatgpt-grow-do-also-their-problems-grow |
Question: <p>I tried to prove that the following language is recursive/decidable/in R: for $\Sigma=\{0,1\}$, $k$ a positive integer:
$$
L_k= H_\text{TM,epsilon}\cap \Sigma^k
$$
where $H_\text{TM,epsilon}=\{\langle M\rangle\mid M \text{ is a TM that halts on epsilon input}\}$</p>
<p>It is easy to prove because $L_k$ is... | https://cs.stackexchange.com/questions/44474/computational-models-proving-language-is-decidable |
Question: <p>In models like GPT-2, TXL and Grover, is there a good way to know which input weights (tokens) resulted in each token of the output? </p>
Answer: | https://cs.stackexchange.com/questions/115948/is-there-a-way-to-connect-a-deep-language-model-output-to-input |
Question: <p>I am learning about model of computation and I found this <a href="https://en.wikipedia.org/wiki/Model_of_computation" rel="nofollow noreferrer">wikipedia</a> entry that categorises and outlines various model of computation.</p>
<p>Now I want to know the programming languages that builds on these models.</... | https://cs.stackexchange.com/questions/133116/programming-languages-and-model-of-computations |
Question: <p>I am confused on the inputs of a Long-Short Term Memory (LSTM) for the slot filling task in Spoken Language Understanding. </p>
<p>Before I worked on this, I implemented a language model with a Recurrent Neural Network (RNN) and then with a LSTM. The input to the RNN and LSTM language models was a one hot... | https://cs.stackexchange.com/questions/71032/what-are-the-inputs-to-an-lstm-for-slot-filling-task |
Question: <p>For a bigram language model, I can calculate the perplexity of sentences of a test document. However, I'm not sure what would be the perplexity of the whole document. Should I get the average of the perplexities of sentences?</p>
Answer: | https://cs.stackexchange.com/questions/105220/how-can-i-find-the-perplexity-of-a-text-by-the-perplexity-of-its-sentences |
Question: <p>In the turing model we have the statements that if there is an unary or sparse language that is NP complete then P=NP and if there is a Turing reduction from an NP complete problem to an unary or sparse language then NP is in P/poly.</p>
<p>Is there an analog of these statements in the Valiant model and i... | https://cs.stackexchange.com/questions/60461/uses-of-unary-or-sparse-languages-in-other-models |
Question: <blockquote>
<p>The simply typed lambda-calculus with numbers and fix has long been a favorite experimental subject for programming language researchers, since it is the simplest language in which a range of subtle semantic phenomena such as full abstraction arise. </p>
</blockquote>
<p>I tried to find a d... | https://cs.stackexchange.com/questions/116807/what-is-meant-by-a-full-abstract-model-of-a-lambda-calculus-like-language |
Question: <p>the corpus</p>
<p><s> what is the shape ? </s>
<s> what is the colour ? </s>
<s> what colour is it ? </s>
<s> it is what ? </s>
<s> is it red ? </s>
<s> what is it ? </s>
<s> what shape is it ? </s>
<s> it is red </s>
<s> it is green </s>
<s> the colour is red </s>
<s> the shape is square </s>
<s> red is t... | https://cs.stackexchange.com/questions/132713/should-you-take-question-mark-as-a-separate-word-in-bigram-language-modelling-wh |
Question: <p>What are the differences and limitations between model checking and type-checking dependent types for verifying correctness?</p>
<p>If I were to model a state machine in a language like Idris, what can't I verify that a model checker can and vice-versa? I can enforce valid transitions in Idris, but can I p... | https://cs.stackexchange.com/questions/170371/model-checking-and-dependently-typed-languages-for-formal-verification |
Question: <p>I'm trying to prove some statements about execution in Java programs under some heavy restrictions (basically I have a conjecture that if two methods satisfy a set of constraints for a given input then the are they equivalent - i.e., that return value and state after execution are identical). To prove this... | https://cs.stackexchange.com/questions/82424/formal-model-of-execution-for-java-or-general-imperative-language |
Question: <p>I am curious as to how one might <em>very compactly</em> compress the domain of an arbitrary <a href="http://en.wikipedia.org/wiki/Internationalized_domain_name" rel="nofollow noreferrer">IDN</a> hostname (as defined by <a href="https://www.rfc-editor.org/rfc/rfc5890" rel="nofollow noreferrer">RFC5890</a>)... | https://cs.stackexchange.com/questions/3056/compression-of-domain-names |
Question: <p><a href="https://i.sstatic.net/ngTqN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ngTqN.png" alt="enter image description here" /></a></p>
<p>from the <a href="https://web.stanford.edu/%7Ejurafsky/slp3/3.pdf" rel="nofollow noreferrer">book</a>, Speech and Language Processing (3rd ed. draf... | https://cs.stackexchange.com/questions/161693/n-gram-model-why-conditioning-on-the-start-symbol-s |
Question: <p>I'm creating a powerful regular expression matching system that can be augmented by adding small microprograms to deterministic finite automaton (DFA) states. The microprogram solves the <a href="http://pages.cs.wisc.edu/~estan/publications/bigbang.pdf" rel="nofollow noreferrer">big bang</a> issue where a ... | https://cs.stackexchange.com/questions/103129/how-to-create-model-for-a-powerful-language-whose-programs-are-guaranteed-to-ter |
Question: <p>Is there a way to check LTL properties in a bounded model checker?</p>
<p>As an example, consider a liveness property ($G F p$ - always eventually $p$)? Suppose we have the following trivial program</p>
<pre><code>#include <pthread.h>
int a = 0;
void * f(void * x)
{
a = 1;
return x;
}
int main(... | https://cs.stackexchange.com/questions/49169/ltl-properties-in-bounded-model-checking-via-assertions |
Question: <p>For context, yesterday I posted <a href="https://cs.stackexchange.com/q/161643/131435">Does the first incompleteness theorem imply that any Turing complete programming language must have undefined behavior?</a>. Part of what prompted me to ask that question in the first place is that, awhile ago, someone ... | https://cs.stackexchange.com/questions/161663/what-are-the-conditions-necessary-for-a-programming-language-to-have-no-undefine |
Question: <p>There are other models of computation equivalent to Turing machines in terms of computability. </p>
<p>Turing machines also recognize recursively enumerable languages.</p>
<p>My questions are</p>
<ul>
<li>Do other models of computation equivalent to Turing machines also recognize the same languages?</li... | https://cs.stackexchange.com/questions/64207/can-other-models-of-computation-equivalent-to-turing-machines-also-recognize-the |
Question: <p>I am implementing worflow where the code in industrial programming languages (JavaScript and Java) should be generated from the formal (formally verified) expressions (from ontologies as objects and rule formulas as behaviors). What is the best pratice for such code generation? Are some frameworks availabl... | https://cs.stackexchange.com/questions/55781/the-importance-of-the-language-semantics-for-code-generation-and-frameworks-for |
Question: <p>From <a href="https://cs.stackexchange.com/questions/43137/machines-for-context-free-languages-which-gain-no-extra-power-from-nondeterminis?noredirect=1#comment86645_43137">a comment</a>, an interesting question popped up. The class of CFLs (the languages recognized by PDAs) are obviously not closed under ... | https://cs.stackexchange.com/questions/43152/smallest-class-of-automata-model-whose-corresponding-language-class-contains-cfl |
Question: <p>I am studying the following paper for understanding next-word prediction using n-gram & trie: - <a href="http://nlp.cs.berkeley.edu/pubs/Pauls-Klein_2011_LM_paper.pdf" rel="nofollow">http://nlp.cs.berkeley.edu/pubs/Pauls-Klein_2011_LM_paper.pdf</a> Before this, I did some brief study on what are n-gram... | https://cs.stackexchange.com/questions/18351/next-word-prediction-using-n-gram-tries |
Question: <p>I have had a somewhat hard time trying to understand how ChatGPT can "solve" some tasks that cannot be entirely cast as language-model-based rephrasing of textual subsets of the internet directed by a textual query.</p>
<p>For example, ChatGPT seems to be able to do calculations, even if not alwa... | https://cs.stackexchange.com/questions/156287/does-chatgpt-use-specific-sub-programs |
Question: <p>I am trying to build a bigram letter model.</p>
<p>I obtain a sequence of words in a form of ['hello','I','am','Johnny'].</p>
<p>Firstly, I lower all the words to obtain : ['hello','i','am','johnny'].</p>
<p>I am capable of building a bigram letter model, but I have read somewhere that you should provid... | https://cs.stackexchange.com/questions/52526/question-about-bigram-model |
Question: <p>I am working on the <em>base</em> of a language model, and am wondering how to represent the base type, which is a type <code>Type</code>. I have heard of an "infinite chain of types", but (a) I can't seem to find it on the internet while searching anymore, and (b) I am not sure if that's what I ... | https://cs.stackexchange.com/questions/131117/how-do-you-have-a-type-typed-type-when-implementing-a-programming-language |
Question: <p>It seems like an RNN has to have the h<sub>t-1</sub> needs to be the same size as the input vector since they're being added to one another, but if you're doing something like modeling to another language or classification, how would you handle this? I'd imagine you'd just have a fully connected layer tha... | https://cs.stackexchange.com/questions/54607/how-do-rnns-handle-providing-output-with-different-dimension-than-input |
Question: <p>I am very new to the whole concept of context-free grammars to represent the syntax tree of formal languages (i.e., programming languages). It seems that the Backus–Naur form (BNF) is the oldest of all possible notations and the most prevalent one. Though it looks like to be an ancient piece of art. Now I'... | https://cs.stackexchange.com/questions/127499/what-are-the-modern-alternatives-to-backus-naur-form-and-what-are-their-advantag |
Question: <p>I'm designing puzzles by running a <a href="https://en.wikipedia.org/wiki/Constraint_satisfaction_problem#Flexible_CSPs" rel="nofollow">MAX-CSP</a> solver, and it works nicely in practice. For concreteness, my problems have the following form (in a pseudo-modeling language):</p>
<pre><code># set up vars &... | https://cs.stackexchange.com/questions/65097/theoretical-csps-where-inequality-constraints-can-be-expressed-as-a-single-con |
Question: <p><em>I'm not sure if it's the right place for this question. Sorry if going a bit off-topic.</em></p>
<p>Choosing a suitable Language for the first programming course is one of the most important things that every related teacher/lecturer should bear in mind; especially if the students are young or having ... | https://cs.stackexchange.com/questions/66983/as-a-teacher-choosing-a-suitable-programming-language |
Question: <p>I am interested in exploring the world of <a href="http://en.wikipedia.org/wiki/BDI_software_agent" rel="nofollow">BDI agents</a> (software agents that possess "beliefs, desires, intentions", essentially the agent has knowledge of the world, a set of motivations, and carries out certain plans).</p>
<p>I r... | https://cs.stackexchange.com/questions/2764/canonical-reference-on-agent-based-computing |
Question: <p>I have this question I found regarding n-gram modeling in the <em>Speech and Language Processing</em> textbook by Daniel Jurafsky:</p>
<blockquote>
<p>Suppose we didn’t use the end-symbol <code></s></code>. Train an unsmoothed bigram grammar on the following training corpus without using the end-s... | https://cs.stackexchange.com/questions/125653/n-grams-textbook-question |
Question: <p><strong>Background</strong></p>
<p>Good-Turing (GT) smoothing is used in language models to estimate the counts of words in the test set that have not been seen in the training set. </p>
<p>In GT smoothing, $N_c$ is the count of things observed $c$ times (so a count of a count). As an example, the senten... | https://cs.stackexchange.com/questions/90000/proving-the-probability-of-zero-occurrences-in-training-using-good-turing-maximu |
Question: <p>Data flow analysis work over a control flow graph. When a language under consideration supports exceptions, control flow graph can explode. </p>
<p>What are the standard techniques for dealing with this blow-up?
Can we soundly disregard edges induced by exception? Data flow analyses anyhow compute over-ap... | https://cs.stackexchange.com/questions/59832/data-flow-analysis-with-exceptions |
Question: <p>I understand that there are three types of programming languages:</p>
<ul>
<li>Machine languages</li>
<li>Assembly languages</li>
<li>high-level languages</li>
</ul>
<p>And that:</p>
<ul>
<li>Machine languages have no abstraction</li>
<li>Assembly language have little abstraction</li>
<li>High-level langua... | https://cs.stackexchange.com/questions/149309/is-there-a-standard-or-model-or-taxonomy-of-programming-languages-different-than |
Question: <p>Several papers(<a href="http://www.iro.umontreal.ca/%7Elisa/pointeurs/hierarchical-nnlm-aistats05.pdf" rel="nofollow noreferrer">1</a> (originator), <a href="http://arxiv.org/pdf/1310.4546.pdf" rel="nofollow noreferrer">2</a>, <a href="http://dx.doi.org/10.1007/978-3-662-45924-9_16" rel="nofollow noreferre... | https://cs.stackexchange.com/questions/43912/what-is-the-activation-function-label-and-loss-function-for-hierachical-softmax |
Question: <p>Can any RAM BSS model based machine, or machines which are variants, recognize boolean languages(languages such as P, NP, or the like)? If so which languages are recognizable by RAM/BSS nachines, or its variants?(A variant could be to allow comparison. Or a RAM/BSS with weaker assumptions). </p>
Answer: <... | https://cs.stackexchange.com/questions/102832/ram-bss-model-based-or-its-variant-computer-recognizing-boolean-languages |
Question: <blockquote>
<p>I was trying to ask this question in StackOverflow, but later realized that this question is more relevant to general computer science, not specific engineering problems. If you think it's not, please let me know.</p>
</blockquote>
<p>Recently I've found out what CSP(Communicating Sequential P... | https://cs.stackexchange.com/questions/119711/why-the-most-dominant-programming-languages-didnt-follow-csp-thread-model |
Question: <p>I am working on a problem of whose complexity is unknown.
By the nature of the problem, I cannot use long edges as I please, so 3SAT and variants are almost impossible to use.</p>
<p>Finally, I have decided to go for the most primitive method -- Turing Machines.</p>
<p>Oddly enough, I could not find any ... | https://cs.stackexchange.com/questions/114952/how-to-prove-np-hardness-from-scratch |
Question: <ol>
<li><p>Does the concurrent language CSP (or CCS, $pi$-calculus) model interacting machines?</p></li>
<li><p>Is CSP (or CCS, $pi$-calculus) Turing-equivalent to other programming languages like C? </p></li>
</ol>
Answer: <p>The answer to your (1) depends on what exactly you mean by "model" and by "intera... | https://cs.stackexchange.com/questions/32743/is-concurrent-language-ccs-or-csp-turing-equivalent-in-language-power |
Question: <p>Wondering if/how you could define a highly nested structure as a <a href="https://en.wikipedia.org/wiki/Dependent_type" rel="nofollow noreferrer">Dependent Type</a> (or an Algebraic or Parameterized type). Specifically, an HTML template. Not that they work like this (HTML <a href="https://www.html5rocks.co... | https://cs.stackexchange.com/questions/94026/defining-an-html-template-as-an-algebraic-type |
Question: <p>What is the technical term that describes a programming language that abstracts (or at least largely abstracts) the machine location of programs? I’m thinking here specifically of the evolution of handheld calculator programming languages, from early (and some late) models where each instruction exists in ... | https://cs.stackexchange.com/questions/125606/term-for-language-that-abstracts-program-location |
Question: <p>I'm evaluating Amazon's machine learning platform, and thought that I would give it a "simple" classification problem first. As a disclaimer, I am quite new to machine learning (hence my interest in an ML platform).</p>
<p>The classification problem is language detection. Given a list of 20k words, and ... | https://cs.stackexchange.com/questions/66475/language-classification-aws-ml-what-am-i-doing-wrong |
Question: <p>I wonder if there exists language-agnostic data structure notation. Preferably a standard, allowing to describe data structures and basic data types. e.g. something like a subset of <code>WebIDL</code>.</p>
<p>A motivation is to describe data structures (a model) in a way that is standardized and language-... | https://cs.stackexchange.com/questions/129904/does-there-exist-standardized-language-agnostic-data-structure-notation |
Question: <p>Is there any tool for prototyping a programming language semantics and type system and that also allows for some sort of <em>model checking</em> of standard properties, like type soundness? </p>
<p>I'm asking this, because I'm reading a book on <a href="http://alloy.mit.edu/alloy/">Alloy</a> and it provid... | https://cs.stackexchange.com/questions/65383/programming-language-semantics-prototyping-tool |
Question: <p>I found this formal definition of a programming language in the 1973 paper <a href="https://dl.acm.org/citation.cfm?doid=986953.986988" rel="nofollow noreferrer">Formal definition of programming languages</a> by Terrence Pratt.</p>
<blockquote>
<p>PL is a formal language endowed with two structures: a t... | https://cs.stackexchange.com/questions/116507/is-my-formal-definition-of-programming-language-correct |
Question: <p>Suppose $\Sigma = \{ a,b \}$ and the regular expression $(a^*b+dc)^*(b^*d + ad)^*$. Is it equal to $\varnothing$?</p>
<p>So I have a regular expression like this: $(a^*b+dc)^*$. As only $(a,b) \in \Sigma$, I see that:</p>
<ul>
<li>$dc=\varnothing$</li>
</ul>
<p>So $(a^*b+dc)^*=(a^*b)^*$.</p>
<p>Then:</... | https://cs.stackexchange.com/questions/64990/does-a-regular-expression-model-the-empty-language-if-it-contains-symbols-not-in |
Question: <p>If I understand correctly, the first incompleteness theorem says that any "effectively axiomatized" formal system which is consistent must contain theorems which are <em>independent</em> of the axioms. In other words, there are models of the system where the theorem is provably true and others w... | https://cs.stackexchange.com/questions/161643/does-the-first-incompleteness-theorem-imply-that-any-turing-complete-programming |
Question: <p>I am currently getting ready for my final exam in computational models. I know that there aren't any rules or rule of thumb to show that a language is NP-complete and each problem has its own tricks, but I am really struggling with questions where they give me a language and showing that the language is NP... | https://cs.stackexchange.com/questions/110715/showing-that-a-language-is-np-complete-advice |
Question: <p>A have a following toy data modeling java-like language:</p>
<ul>
<li>all class fields are <code>protected</code></li>
<li>multiple inheritance is allowed</li>
<li>if a class sees several definitions of a field in its superclasses and all these defitions are the same (verbatim), then we do not reject such ... | https://cs.stackexchange.com/questions/170968/clustering-changes-in-a-directed-acyclic-graph |
Question: <p>There are nice examples for context free grammars which cannot be expressed with <a href="https://www.wikiwand.com/en/Regular_language" rel="nofollow noreferrer">regular language</a>, for example the palindrome and a similar contrived example <a href="https://cs.stackexchange.com/questions/57117/how-can-i-... | https://cs.stackexchange.com/questions/75916/examples-for-cfg-that-cannot-be-expressed-by-regular-language |
Question: <p>So I am trying to find a language with which i can write code to build/search through deductive reasoning 'nets', as well as self-modify it's search algorithms based on information learned from these nets.
I also want a language that i can use to write scripts for a 2d game engine, as i would like to build... | https://cs.stackexchange.com/questions/55948/good-language-for-introduction-to-self-modifying-algorithms |
Question: <p>Suppose you have 1. a grammar for terms of a language; 2. type-assignment rules, 3. a set of reduction rules. You want to prove that your language is adequate for mathematical reasoning. If I understand correctly, the right way to do it is to develop a semantics for it, and then prove certain desirable pro... | https://cs.stackexchange.com/questions/103333/what-are-different-ways-to-provide-a-semantics-to-a-language |
Question: <p>Languages to express domain rules are quite diverse from very simple and inexpressive to Turing-complete programming languages. If we consider developing some DSL (domain-specific language), is there any generally useful scale (Chomsky hierarchy comes to mind as an analogy, as well as Description Logic "le... | https://cs.stackexchange.com/questions/44395/rules-language-dsl-expressivity-measure |
Question: <p>As I understand, everyone can create logic programming language and system by declaring that the valid program of some logic programming language is the set of statements in the form: <code>body->head</code>, where <code>body</code> is arbitrary expression of boolean type and the <code>head</code> is se... | https://cs.stackexchange.com/questions/96058/what-are-constraints-on-some-new-logic-programming-language-and-system |
Question: <p>Regarding static typing and dynamic typing, <a href="https://www.cs.cmu.edu/~rwh/pfpl/2nded.pdf" rel="nofollow noreferrer">Practical Foundation of Programming Languages by Harper</a> says:</p>
<blockquote>
<p>There have been many attempts by advocates of dynamic typing to
distinguish dynamic from stat... | https://cs.stackexchange.com/questions/125245/what-is-the-single-type-in-a-dynamic-typing-language |
Question: <p>Kind of what it says on the tin. Let's say I have a countably infinite alphabet $A$ and a "language" $L = \{s_1s_2 | s_1,s_2 \in A\}$ (i.e. all possible strings of length 2). Now, my question is this: does it even make sense to think of this in terms of formal languages? Is there some construct akin to a s... | https://cs.stackexchange.com/questions/67223/what-kind-of-language-uses-an-infinite-alphabet |
Question: <p>My question is pretty basic, I'm looking for a named method if you know one, but also proper terminology, further reading, and anything this reminds you of if you don't. (I'm new to this, don't have the right terminology and just need a starting point so I can help myself.)</p>
<p>I'm trying to interpret ... | https://cs.stackexchange.com/questions/82080/how-to-compare-the-efficiency-of-two-encoding-schemes-or-hypothesis-languages |
Question: <p>Regular languages (RLs) have a necessary condition (from the pumping lemma) that, for some <span class="math-container">$k$</span>, if the string <span class="math-container">$|s| \geq k$</span> is in the language there is some splitting of <span class="math-container">$s$</span> into <span class="math-con... | https://cs.stackexchange.com/questions/170176/classes-of-language-with-at-least-n-pump-able-substrings |
Question: <p>In Python, I can change the types of values associated with a variable:</p>
<pre><code>>>> x=1
>>> x="abc"
</code></pre>
<p>In C, I can't do the same.</p>
<p>What is the name of the feature that allows Python to behave so, while not C?</p>
<p>I was wondering if the following language... | https://cs.stackexchange.com/questions/116504/what-is-the-language-feature-which-allows-a-variable-to-be-associated-with-value |
Question: <p>I am a CS undergraduate. I understand how Turing came up with his abstract machine (modeling a person doing a computation), but it seems to me to be an awkward, inelegant abstraction. Why do we consider a "tape", and a machine head writing symbols, changing state, shifting the tape back and forth? </p>
<p... | https://cs.stackexchange.com/questions/91773/why-is-the-turing-machine-a-popular-model-of-computation |
Question: <ul>
<li>The syntax of a language is a structure. </li>
<li>The semantic of a language is a structure.</li>
<li>The semantic of a language is a model of its syntax.</li>
</ul>
<p>And that's all ? The duality syntax/semantic is just model theory applied to languages ?</p>
<p>(A short answer could be ok; I ha... | https://cs.stackexchange.com/questions/45291/are-syntax-and-semantic-just-2-structures-such-that-one-is-a-model-of-the-other |
Question: <p>I am doing an exercise from <a href="http://web.engr.illinois.edu/~jeffe/teaching/algorithms/all-models.pdf" rel="nofollow">Models Of Computation - Ch - 5, Q-1(r)</a>.</p>
<p>Design a grammar that generates this context-free language</p>
<p>$\{ x\space\$\space y^R \,|\, x, y \in\{0, 1\}^* \text{ and } x... | https://cs.stackexchange.com/questions/54759/design-a-grammar-for-this-context-free-language |
Question: <p>I want to model the absorption of CO2 with multiple different materials such as cement, limestone, wood, etc? I know Matlab is capable of these types of physics simulation according to this research paper: <a href="https://www.sciencedirect.com/science/article/abs/pii/S025527011630006X" rel="nofollow noref... | https://cs.stackexchange.com/questions/128448/what-programming-language-should-i-use-to-run-physics-simulations-of-co2-being-a |
Question: <p>Several computation models have representative programming language counterparts, as, according to <a href="https://cs.stackexchange.com/a/44310/86914">this answer</a>, Snobol for rewriting systems, APL for combinators, Lisp/Scheme for lambda calculus, and off course the family of imperative languages for ... | https://cs.stackexchange.com/questions/90400/what-is-the-computation-model-of-prolog |
Question: <p>What is the technical term that describes the use of the same programming language in every tier in the architecture of a system? For example, having JavaScript in model, view and controller.</p>
<p>edit #1: MVC was mentioned just to give an example. I read the concept in a book once when I was at the uni... | https://cs.stackexchange.com/questions/106093/term-for-the-use-of-the-same-programming-language-in-every-tier |
Question: <ol>
<li><p>What is the relation and difference between a programming model and
a programming paradigm? (especially when talking about the
programming model and the programming paradigm for a programming
language.)</p></li>
<li><p><a href="https://en.wikipedia.org/wiki/Programming_paradigm" rel="noreferrer">W... | https://cs.stackexchange.com/questions/49421/differences-between-programming-model-and-programming-paradigm |
Question: <p>I've been reading some formal language theory papers, and I've come across a term that I don't understand.</p>
<p>The paper will often refer to a set being "effectively closed under intersection" or other operations. What does "effectively" mean here? How does this differ from normal closure?</p>
<p>For ... | https://cs.stackexchange.com/questions/11920/what-does-it-mean-to-say-that-a-language-is-effectively-closed-under-an-operat |
Question: <p>The wikipedia page for the <a href="https://en.wikipedia.org/wiki/Halting_problem" rel="nofollow noreferrer">Halting problem</a> mentioned <em>practical solutions</em> to avoiding the halting problem such as avoiding infinite loops. And there is a mention that "by restricting the capabilities of general-pu... | https://cs.stackexchange.com/questions/57739/theoretical-justification-of-halting-problem-avoidance |
Question: <p>I'm working on a simple editor for the C programming language (without using an AST), and I need to implement a code folding feature.</p>
<p>When the user opens a file, an initial parse is performed, and all {} code blocks are easily detected. I store these blocks in a tree structure, where nested blocks a... | https://cs.stackexchange.com/questions/171868/what-algorithm-can-be-used-to-implement-code-folding-for-the-c-programming-langu |
Question: <p>I've been playing around with an alternative to the standard object-oriented paradigm for modeling data, and I would like to know if there is any research or already existing systems along the same lines. Let me briefly explain my ideas.</p>
<p>What I call the object-oriented paradigm goes something like ... | https://cs.stackexchange.com/questions/63332/an-alternative-to-the-object-paradigm |
Question: <p>I'm wondering about the relationship between computational complexity and the Chomsky hierarchy, in general.</p>
<p>In particular, if I know that some problem is NP-complete, does it follow that the <em>language</em> of that problem is not context-free?</p>
<p>For example, the clique problem is NP-comple... | https://cs.stackexchange.com/questions/25940/computational-complexity-vs-chomsky-hierarchy |
Question: <p>Let <span class="math-container">$L$</span> be a regular language over the alphabet <span class="math-container">$\sum$</span>, prove that the language defined by <span class="math-container">$\hat{L} = \{uv \in \sum^* | u^Rv \in L \}$</span> is regular.</p>
<p>There is guidance in the exercise that instru... | https://cs.stackexchange.com/questions/159660/proving-a-certain-language-is-regular-by-constructing-a-dfa |
Question: <p>I have read a lot of times, that models that can parse Dyck-2 are of great importance. It appears that Dyck-2 is interchangeably used like Dyck-N.</p>
<p>Afaik the Chomsky-Schützenberger representation theorem states that you can convert and context-free language into a Dyck-N language, using a homomorphis... | https://cs.stackexchange.com/questions/162654/why-is-dyck-2-so-important-for-the-chomsky-sch%c3%bctzenberger-theorem |
Question: <p>I have a simple question of how would you measure the logicality of a programming language?</p>
<p>EDIT: I was asked to specify the term "logicality". Hence I will try and provide a stipulation. By "logicality" I mean that the programming language is in correspondence with the least amo... | https://cs.stackexchange.com/questions/170042/measuring-logicality-of-programming-languages |
Question: <p>I understand if this question sounds non-sense, but in my understanding the concept of semantics applies to programing languages. And a model of computation is ( generally speaking ) a formal system, a mathematical object which describes exactly how to use, and what to expect while using it, thus having in... | https://cs.stackexchange.com/questions/170997/difference-between-a-model-of-computation-and-semantics |
Question: <p><strong>Introduction</strong><br>
For a paper I need contracts, which are also referred to as Design by Contract (DbC)<a href="http://www.eclipse.org/forums/index.php?t=thread&frm_id=157" rel="nofollow">1</a>, and conceptually go back to Hoare[2]. For my work I need to apply contracts to Java bytecode.... | https://cs.stackexchange.com/questions/13121/contracts-for-java-bytecode |
Question: <p>Getting layout right (even if only a structure is considered) with HTML5/CSS3 is still more like an art or black magic.</p>
<p>On the other hand, there are other GUI systems (like wxWindows and Tcl/Tk) and some GUI research (like The Auckland Layout Model, ALM, and <a href="https://hal.inria.fr/hal-009533... | https://cs.stackexchange.com/questions/35490/mathematical-model-for-a-webpage-layout |
Question: <p>In my first algorithms class we're creating these patterns that are supposed to model a finite state machine. We were given a task to think if we can figure out a way to detect palindromes in binary sequences (no points if we do, it's just a food for thought).</p>
<p>I specifically asked the professor, kn... | https://cs.stackexchange.com/questions/32081/detecting-palindromes-in-binary-numbers-using-a-finite-state-machine |
Question: <p>I asked this in stackoverflow, but the question probably fits here better.</p>
<p>This question arose from the objection that LISP is regarded as a functional language with some simple principles, namely functions, variables, and operators that roughly correspond to predicates, propositional variables, an... | https://cs.stackexchange.com/questions/79642/how-do-you-represent-lisp-as-mathematical-logical-model |
Question: <p>Let's say I have a programming language that allows procedures, i.e., methods without return values, and immutable data-structures, so no sideeffecting inside a procedure. Is it possible to simulate a program written in a language with return values in our language?</p>
<p>In other words, do return values... | https://cs.stackexchange.com/questions/44412/procedures-and-immutable-data-to-simulate-return-values |
Question: <p>In my descriptive complexity class, we've been asked to find a formula that characterises the language $(aa)^*$ (over the alphabet $\{a\}$) with a first order formula over the language $\{<, P_a\}$.</p>
<p>This was the first class, so I will recall what we've learned to be sure that I understood. To a ... | https://cs.stackexchange.com/questions/14545/characterising-aa-in-first-order-logic |
Question: <p>So, I know that the halting problem is undecidable for Turing machines. The trick is that TMs can decide recursive languages, and can accept Recursively Enumerable (RE) languages.</p>
<p>I'm wondering, is there a more limited model of computation which accepts only recursive languages, and not RE? And if ... | https://cs.stackexchange.com/questions/11936/is-there-an-always-halting-limited-model-of-computation-accepting-r-but-not |
Question: <p>I want to prove that if we have a model, $A$, with unbound number of tapes, then
$A$ is stronger then Turing Machine model. Can you help me with example of such a language that $M$ will fail but $A$ will give an output? thanks.</p>
Answer: <p>It is a standard proof that Turing machines with any finite num... | https://cs.stackexchange.com/questions/75014/prove-that-a-model-of-infinite-tapes-is-stronger-then-turing-machine-model |
Question: <p>One can have a look on the Chomsky hierarchy <a href="https://en.wikipedia.org/wiki/Chomsky_hierarchy" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Chomsky_hierarchy</a> , especially the inset named "Automata theory: formal languages and formal grammars" at the bottom of the page. When one tries... | https://cs.stackexchange.com/questions/102305/why-full-chomsky-hierarchy-is-so-detailed-if-there-are-decidable-recursive-lang |
Question: <p>I'm studying the didactic programming language <strong>Oz</strong>, following the book "Concepts, Techniques, and Models of Computer Programming".</p>
<p>In the book, the nondeterminism is introduced through the concept of <strong>choice</strong>, as it's explained <a href="https://en.wikipedia.org/wiki/N... | https://cs.stackexchange.com/questions/108817/why-choice-points-introduce-non-determinism-in-a-program |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.