Questions tagged [termination]

is used in its general meaning, but it is bounded by the programming scope.

351 questions
0
votes
3 answers

How to terminate in a recursive function in Haskell?

I have a function that needs to terminate on a certain condition. So for example say we have the following functions: func :: Int -> [[Int]] -> [[Int]] func _ [] = [] func x (a:as) = func2 x a:func x as func2 :: Int -> [Int] -> [Int] func2 _…
Kerry
  • 1
  • 1
  • 1
0
votes
0 answers

How do you compare multiple variables to a certain data type in C++?

I have an assignment where I find the cost of shipping an item based on input from a file. One section asks me to terminate the program when an "An invalid character is present in the text file" Expected output: *************** File Read Error…
0
votes
1 answer

pyomo with gurobi solver max time limit termination criterion not working

I am trying to solve an optimization problem in pyomo by using gurobipy. Given the size of the problem, I would like to set a time limit of 100 seconds as a termination criterion. Although I specified it in the solver options, as follows, it seems…
Mike
  • 375
  • 1
  • 4
  • 14
0
votes
2 answers

The conditional operator is not allowing the program to terminate

I just learnt about conditional operators and was doing an introductory exercise stating: Write a program to use a conditional operator to find the elements in a vector that have odd value and double the value of each such element. Here…
0
votes
0 answers

Can we use probabilities to determine whether an algorithm is non-terminating?

My question isn't about some specific code but rather theoritical, so my apologies in advance if that's not the right place to post it. Given a certain problem - for the sake of discussion, let it be a permutation problem - with an input of size N,…
0
votes
0 answers

Why R session aborts in a for loop with 13 K pdf files?

I'm doing for loop for 13 K pdf files, where it reads, pre-processes text, finds similarities and writes in txt. However, when I run the for loop after 760 pdf files, R session aborts. What can be the reason? I tried to write minimal code to…
0
votes
2 answers

IntelliJ IDEA: Abnormal build process termination - how to fix?

I am trying to build the project and get the following response. Do you know that can be a reason for this? Error:Abnormal build process termination: /usr/lib/jvm/jdk-11.0.2/bin/java -Xmx700m -Djava.awt.headless=true…
harmider
  • 373
  • 6
  • 18
0
votes
1 answer

Function definition does not terminate...?

I have the following isabelle code snippet: type_synonym vname = string datatype aexp = N int | V vname | Plus aexp aexp fun full_plus :: "aexp ⇒ aexp ⇒ aexp" where "full_plus (N n⇩1) (N n⇩2) = N (n⇩1+n⇩2)" | "full_plus (N n⇩1) (Plus (N n⇩2) a) =…
bobismijnnaam
  • 1,361
  • 2
  • 10
  • 20
0
votes
1 answer

Call function when closing RMI server

I'm working on a Java RMI application that has many servers. One of these servers is an LDAP-like server that keeps track of the other servers IP addresses (and some other info): Every time a new server is created, it immediately connects to the…
0
votes
0 answers

Having a C++ program terminate when there is no input

I'd like to start by saying I am very new to this, so please forgive me if there is a relatively trivial solution to this. I learned here, that we can do a while(std::cin>>inputs){} loop to repeatedly do what we want to, but I can't seem to figure…
Shinaolord
  • 157
  • 6
0
votes
9 answers

Does the termination condition of a 'for loop' refresh in VC++ 6?

for (int i = 0 ; i < stlVector.size() ; i++) { if (i == 10) { stlVector.erase(stlVector.begin() + 5 ) } } Does the termination condition part "stlVector.size()" take "stlVector.erase(...)" into consideration? In other word…
zhengtonic
  • 720
  • 12
  • 25
0
votes
1 answer

How to stop or terminate a job after 02:00 AM

I want to terminate a job after running until a particular time, but I should not specify a date. I know sendevent -E KILLJOB -J job name -T "mm/dd/yy HH:mm, but this has a date also to be specified. But for my requirement, I don't need a date. Can…
0
votes
1 answer

Proving termination of Takeuchi function in Isabelle

Here is my try at proving that Takeuchi function does terminate: function moore :: "(int ⇒ int ⇒ int) ⇒ (int ⇒ int ⇒ int)" where "moore x y z = ((if (x ≤ y) then 0 else 1) (max(x,y,z) - min(x,y,z)) (x - min(x,y,z)))" fun tk :: "int ⇒ int ⇒ int ⇒…
user1868607
  • 2,558
  • 1
  • 17
  • 38
0
votes
1 answer

Why is my program printing out the null termination character?

When I run this, it will SOMETIMES print out a null termination character. Most of the time it will, and probably 1/5 times it will print just the characters. void cryptogram::Encrypt(){ cout<<"encrypt"<
Tyler Pfaff
  • 4,900
  • 9
  • 47
  • 62
0
votes
2 answers

Message from debugger: Terminated due to memory issue, when i reload my tableview

My app is crash with the message : "Message from debugger: Terminated due to memory issue", when my tableview is reload with row counts are increased. I have fetch the data on row from document directory path, and show the image of path on imageview…
Appdev02
  • 11
  • 1
  • 1