Search Results

Search found 447 results on 18 pages for 'semantic'.

Page 3/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Types of semantic bugs, logic errors [closed]

    - by C-Otto
    I am a PhD student and currently focus on automatically finding instances of new types of bugs in (Java) programs that cannot be found by existing tools like FindBugs. The existing tool currently is used to prove/disprove termination of (Java) programs. I have some ideas (see below), but I could need more input from you (experienced programmers, potential users of my tool). What kind of bugs do you wish to find? What types of bugs exist and might be suitable for my analysis? One strength of the approach I use is detailled information about the heap. So in contrast to FindBugs, I can work with knowledge of the form "variable x and variable y are disjoint on the heap" or "variable z is not cyclic". It is also possible to see if a method might have side effects (and if so, which variables may/may not be affected by it). Example 1: Vacuous call: Graph graphOne = createGraph(); Graph graphTwo = createGraph(); Node source = graphTwo.getRootNode(); for (Node n : graphOne.getNodes()) { if (areConnected(source, n)) { graphTwo.addNode(n); } } Imagine createGraph() creates a fresh graph, so that graphOne and graphTwo are disjoint on the heap. Then, because source is taken from graphTwo instead of graphOne, the call to areConnected always returns false. In this situation I could find out that the call areConnected is useless (because it does not have any side effect and the return value always is false) which helps finding the real bug (taking source from the wrong graph). For this the information that x and y are disjoint (because graphOne and graphTwo are disjoint) is crucial. This bug is related to calling x.equals(y) where x and y are objects of different classes. In this scenario, most implementations of equals() always return false, which most likely is not the intended result. FindBugs already finds this bug (hardcoded to equals(), semantics of implementation is not checked). Example 2: Useless code: someCode(); while (something()) { yetMoreSomething(); } moreCode(); In the case that the loop (so the code in something() and yetMoreSomething()) does not modify anything visible outside the loop, it does not make sense to run this code - the program has the same behaviour as someCode(); moreCode() (i.e., without the loop). To find this out, one needs detailled information about the side effects of the (possibly useless) code. If I can prove that the code does not have any side effect that can be observed afterwards (in the example: in moreCode() or later), then the code indeed is useless. Of course, here Input/Output of any form must be seen as a side effect, so that a System.out.println(...) is not considered useless. Example 3: Ignored return value: Instead of x = foo(); and making use of x, the method is called without storing the result: foo();. If the method does not have any side effect, its invocation is useless and can be dropped. Most likely, the bug here is that the returned value should have been used. Here, too, detailled information about side effects are needed. Can you think of similar types of bugs that might be detected (only) with detailled information about the heap, side effects, semantics of called methods, ...? Did you encounter bugs related to the ones shown below in "real life"? By the way, the tool is AProVE and Java related publications can be found on my homepage. Thanks a lot, Carsten

    Read the article

  • lighter-weight (semantic) scuttle

    - by hroptatyr
    Before patching scuttle or semanticscuttle I thought I'd ask if anyone knows of a lighter-weight/faster system to tag bookmarks and vote on them? LAMP is fine. Ideally, I should be allowed to interfere with the database directly. My actual problem is I want to administer roughly 80m bookmarks, tag them, vote on them (it's just 10 users accessing the system), but here's the thing: All of those bookmarks will change their descriptions (and title lines) at least once a day. Both systems support the del.icio.us API but my LAMP stack is unable to cope with the load.

    Read the article

  • "static" as a semantic clue about statelessness?

    - by leoger
    this might be a little philosophical but I hope someone can help me find a good way to think about this. I've recently undertaken a refactoring of a medium sized project in Java to go back and add unit tests. When I realized what a pain it was to mock singletons and statics, I finally "got" what I've been reading about them all this time. (I'm one of those people that needs to learn from experience. Oh well.) So, now that I'm using Spring to create the objects and wire them around, I'm getting rid of static keywords left and right. (If I could potentially want to mock it, it's not really static in the same sense that Math.abs() is, right?) The thing is, I had gotten into the habit of using static to denote that a method didn't rely on any object state. For example: //Before import com.thirdparty.ThirdPartyLibrary.Thingy; public class ThirdPartyLibraryWrapper { public static Thingy newThingy(InputType input) { new Thingy.Builder().withInput(input).alwaysFrobnicate().build(); } } //called as... ThirdPartyLibraryWrapper.newThingy(input); //After public class ThirdPartyFactory { public Thingy newThingy(InputType input) { new Thingy.Builder().withInput(input).alwaysFrobnicate().build(); } } //called as... thirdPartyFactoryInstance.newThingy(input); So, here's where it gets touchy-feely. I liked the old way because the capital letter told me that, just like Math.sin(x), ThirdPartyLibraryWrapper.newThingy(x) did the same thing the same way every time. There's no object state to change how the object does what I'm asking it to do. Here are some possible answers I'm considering. Nobody else feels this way so there's something wrong with me. Maybe I just haven't really internalized the OO way of doing things! Maybe I'm writing in Java but thinking in FORTRAN or somesuch. (Which would be impressive since I've never written FORTRAN.) Maybe I'm using staticness as a sort of proxy for immutability for the purposes of reasoning about code. That being said, what clues should I have in my code for someone coming along to maintain it to know what's stateful and what's not? Perhaps this should just come for free if I choose good object metaphors? e.g. thingyWrapper doesn't sound like it has state indepdent of the wrapped Thingy which may itself be mutable. Similarly, a thingyFactory sounds like it should be immutable but could have different strategies that are chosen among at creation. I hope I've been clear and thanks in advance for your advice!

    Read the article

  • boost spirit semantic action parameters

    - by lurscher
    Hi, in this article about boost spirit semantic actions it is mentioned that There are actually 2 more arguments being passed: the parser context and a reference to a boolean ‘hit’ parameter. The parser context is meaningful only if the semantic action is attached somewhere to the right hand side of a rule. We will see more information about this shortly. The boolean value can be set to false inside the semantic action invalidates the match in retrospective, making the parser fail. All fine, but i've been trying to find an example passing a function object as semantic action that uses the other parameters (parser context and hit boolean) but i haven't found any. I would love to see an example using regular functions or function objects, as i barely can grok the phoenix voodoo

    Read the article

  • Looking for a good semantic parser for the Russian language.

    - by Gregory Gelfond
    Does anyone known of a semantic parser for the Russian language? I've attempted to configure the link-parser available from link-grammar site but to no avail. I'm hoping for a system that can run on the Mac and generate either a prolog or lisp-like representation of the parse tree (but XML output is fine as well). Thank you kindly in advance, Gregory Gelfond

    Read the article

  • What is the most semantic way to display a street address in HTML?

    - by tomk
    I have an address that is going to be displayed on a webpage, but it is not the address for the author of the page. How should this be coded to be semantic given the w3c recommendation of: The ADDRESS element may be used by authors to supply contact information for a document or a major part of a document such as a form. This element often appears at the beginning or end of a document.

    Read the article

  • Is it bad to be semantic purist all the time, at work?

    - by metal-gear-solid
    Is it bad to be semantic purist all the time, at work? is it not achievable all the time ? when i saw code of any other person/interviewee. I know selection of element for a purpose is most important thing. what i should judge person ability from his code; from a good written, managed, optimized css or how he wrote class and id names? Or both every time.

    Read the article

  • Is it possible to get Semantic (emacs) to visit all files automatically?

    - by RealityMonster
    From what I can tell from the docs, semantic works by slowly building up an idea of what's in your project by analysing each file (and possibly its neighbours) as you visit them. This is too slow. I'd like to just have it visit all the files in my project. Is there an easy way to do this? Having to visit hundreds of files before I can get decent autocomplete working seems crazy. I've also got a etags file generated. Can I leverage that somehow?

    Read the article

  • difference between a lexical, morphological and semantic mistakes?

    - by AnH
    Hi there, I just want to make sure that I understood the differences between a lexical, morphological and semantic mistakes correctly. If am not mistaken semantic mistakes deal with problems concerning meanings, for example writing a sentence that is correct grammar wise but doesn't make any sense is a semantic mistake, morphological mistakes deals more or less on how the word should look like, for example childrenS is a morphological mistake, so that leaves lexical mistakes, what are those exactly?? can someone sum up the differences between those 3 mistakes please so that I may know for sure that I got them down correctly? Thank you in advance

    Read the article

  • Semantic errors

    - by gautam kumar
    Can semantic errors be detected by the compiler or not? If not when do the errors get detected? As far as I know semantic errors are those errors which result from the expressions involving operators with incorrect number/type of operands. For example: n3=n1*n2;//n1 is integer, n2 is a string, n3 is an integer The above statement is semantically incorrect. But while reading C Primer Plus by Stephen Prata I found the following statement The compiler does not detect semantic errors, because they don't violate C rules. The compiler has no way of divining your true intentions. That leaves it to you to find these kinds of errors. One way is to compare what a program does to what you expected it to do. If not the compiler, who detects those errors? Am I missing something?

    Read the article

  • Is there any killer application for Ontology/semantics/OWL/RDF yet?

    - by narnirajesh
    Hi Guys, I got interested in semantic technologies after reading a lot of books, blogs and articles on the net saying that it would make data machine-understandable, allow intelligent agents make great reasoning, automated & dynamic service composition etc.. I am still reading the same stuff from 2 years. The number of articles/blogs/semantic-conferences have increased considerably. But I am still unable to see any killer-application. Why is it so? Or is there some application/product (commercial/open-source) already existing, which actually is doing all that being boasted of? To put it more precisely, is there any product that leverages semantic technologies (esp RDF/OWL/SPARQL) and is delivering functionality/performance/maintainability, which would not have been possible with the existing (no-semantic) technologies? Some product that is completely dependent on semantic technologies and really adds value to the customers and generating revenues?

    Read the article

  • Can a Mediawiki table be dynamically created using other Mediawiki pages?

    - by Ashimema
    OK, So I've got created a page on my wiki which contains just a single table listing various details about servers and customers. You can follow links for each customer name in the table to find additional details about said customer. What I want to know is; Can the information in the customers page (page B) be used to dynamically update the table (Page A). Is this something that the Semantic MediaWiki extension can accomplished? Running Mediawiki 1.16.2

    Read the article

  • H1 vs H2 vs Other for website title/logo and SEO

    - by Ilian Iliev
    It is a common practice for front-end developers to put the website title or logo in H1 tag and the title in H2. But most of the time the title of the page/article is more important because it caries the content value. So my question is what is the best approac from semantic and seo viewpoint. Examples: logo - H1, title - H1 logo - H1, title - H2 logo - H2, title - H1 logo - other tag, title - H1 Provided other variants if you think they will have bigger effect.

    Read the article

  • SQL 2012 - MySemanticSearch Demo with Tag Clouds

    - by sqlartist
    Excellent demonstration of the new SQL Server 2012 Semantic Search feature available at http://mysemanticsearch.codeplex.com Just tried it out on a large Business Intelligence related Microsoft Word collection and also the health related DMOZ collection of html files discussed in my previous posts. I have included some screenshots below of each document collection. I have realised that the Tag Cloud may need to be a bit more configurable based on the results of any search term. Business Intelligence...(read more)

    Read the article

  • Is there a semantic difference <span>'s and <div>'s?

    - by DavidR
    I know when coding HTML, I'm supposed to keep semantics in mind, e.g., h1 needs to be a main header, h2 needs to be a subheader, tables need to be tables, use <em> for emphasis instead of <i>, etc. Is there a proper difference between divs and spans except one is a block and the other is in-line? When I was learning I was told that <span>'s were for styling text mid-line. If I had a small blurb of text that I needed positioned at a certain point in my webpage, one that doesn't warrent a <p> tag, would I use a span should I stick with div's? What if that text needs to cover two lines (i.e., it needs a width) if it contains nothing but text, what should I use?

    Read the article

  • Better, simpler example of 'semantic conflict'?

    - by rhubbarb
    I like to distinguish three different types of conflict from a version control system (VCS): textual syntactic semantic A textual conflict is one that is detected by the merge or update process. This is flagged by the system. A commit of the result is not permitted by the VCS until the conflict is resolved. A syntactic conflict is not flagged by the VCS, but the result will not compile. Therefore this should also be picked up by even a slightly careful programmer. (A simple example might be a variable rename by Left and some added lines using that variable by Right. The merge will probably have an unresolved symbol. Alternatively, this might introduce a semantic conflict by variable hiding.) Finally, a semantic conflict is not flagged by the VCS, the result compiles, but the code may have problems running. In mild cases, incorrect results are produced. In severe cases, a crash could be introduced. Even these should be detected before commit by a very careful programmer, through either code review or unit testing. My example of a semantic conflict uses SVN (Subversion) and C++, but those choices are not really relevant to the essence of the question. The base code is: int i = 0; int odds = 0; while (i < 10) { if ((i & 1) != 0) { odds *= 10; odds += i; } // next ++ i; } assert (odds == 13579) The Left (L) and Right (R) changes are as follows. Left's 'optimisation' (changing the values the loop variable takes): int i = 1; // L int odds = 0; while (i < 10) { if ((i & 1) != 0) { odds *= 10; odds += i; } // next i += 2; // L } assert (odds == 13579) Right's 'optimisation' (changing how the loop variable is used): int i = 0; int odds = 0; while (i < 5) // R { odds *= 10; odds += 2 * i + 1; // R // next ++ i; } assert (odds == 13579) This is the result of a merge or update, and is not detected by SVN (which is correct behaviour for the VCS). int i = 1; // L int odds = 0; while (i < 5) // R { odds *= 10; odds += 2 * i + 1; // R // next i += 2; // L } assert (odds == 13579) The assert fails because odds is 37. So my question is as follows. Is there a simpler example than this? Is there a simple example where the compiled executable has a new crash? As a secondary question, are there cases of this that you have encountered in real code? Again, simple examples are especially welcome.

    Read the article

  • Schema.org vs microformats

    - by Tordek
    They both server the same purpose: providing a vocabulary for semantic markup. Schema is recognized and standardized... but microformats are open. Schema exploits microdata, while microformats go on classes. (Of note: microdata means that an element must be of a single itemtype, while microformats allow several classes to apply to the same element. I can markup xFolk+hAtom with classes, but not with microdata.) Is this a black-and-white situation? Google says I can't use both "because it may confuse the parser". What's the consensus on these?

    Read the article

  • Convert doc/docx to semantic HTML

    - by sandstrom
    I would like to convert doc/docx documents to semantic HTML. Some wishes/requirements: Semantic HTML such that headers in the document are <h1>, <h2> etc., tables are <table> and so forth. Should preferably be possible to handle headings, lists, tables and images. Graphs and math formulas is a nice extra. • Doesn't have to be converted straight from doc/docx to html, could use an intermediary format, such as xml or docbook. • Should work programatically, and with large number of documents. The closest thing to a solution I've found so far is http://holloway.co.nz/docvert/index.html, but unfortunately there are many a few bugs, small user base and it can't handle a lot of documents. More of a proof of concept.

    Read the article

  • Where do you hang your semantic information, html?

    - by bobobobo
    Well, I keep putting semantic information about what an element means for the page logically in the class attribute <li class="phone-number">555-5555</li> It seems to work for this dual purpose of hanging semantic information and a pointer to how to style it. I'm not sure if this is the best idea, I'm trying to see if others have other ways of doing it. I also started to use a hidden input: <li>555-5555 <input class="semantics" type="hidden" value="phone-number" /></li> inside an element, so with jQuery, I can retrieve additional information about the element using li.find( '.semantics' ).val() To get an element's semantics from JavaScript

    Read the article

  • Semantic Grid System, Media Query issue

    - by Andy
    I'm using the Semantic Grid System to build a responsive site. However, something isn't quite right with the media queries that should obviously kick in once it hits a particular screen size. I'll reference what i mean with their example on the website : if I view this on my iPhone for example, given that it is supposed to adjust to a single column structure on a mobile device, it still throws out the web version of the page. That is true for both Safari and Chrome on my iPhone. However, if I use the RWD bookmarklet to check it's appearance at different resolutions it appears as expected for the mobile resolution. Also, ironically, if I resize the page in Safari on my desktop it also adjusts accordingly once I get down to the approriate screen size, but not in Firefox. The media query that it uses once it hits 720px is @media screen and (max-width: 720px) { #maincolumn, #sidebar { .column(12); margin-bottom: 1em; } } and I might be wide of the mark here but I think that must be the issue. But given that this is directly from the semantic.gs website I'm not inclined to question their own code. Any idea what the problem might be?

    Read the article

  • Semantic urls with dots in .net

    - by Jokin
    I'm trying to make semantic urls for search pages, but if someone use a search finished in dot, the .net engine return a 404. The request don't even get to the routing engine, so i think its something related to security or something like that. For example, the stackoverflow routes also don't work in these case: http://stackoverflow.com/questions/tagged/etc.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >